Files
Electron_Test/tf/js/705.cba30c55.js
2024-04-07 09:46:14 +08:00

43 lines
2.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self["webpackChunk_object_Object_"]=self["webpackChunk_object_Object_"]||[]).push([[705],{50206:function(e,t,n){"use strict";var r=n(1702);e.exports=r([].slice)},89363:function(e){"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},6833:function(e,t,n){"use strict";var r=n(88113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},35268:function(e,t,n){"use strict";var r=n(17854),i=n(84326);e.exports="process"===i(r.process)},22104:function(e,t,n){"use strict";var r=n(34374),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},49974:function(e,t,n){"use strict";var r=n(21470),i=n(19662),o=n(34374),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},21470:function(e,t,n){"use strict";var r=n(84326),i=n(1702);e.exports=function(e){if("Function"===r(e))return i(e)}},60490:function(e,t,n){"use strict";var r=n(35005);e.exports=r("document","documentElement")},67066:function(e,t,n){"use strict";var r=n(19670);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},17152:function(e,t,n){"use strict";var r=n(17854),i=n(22104),o=n(60614),a=n(89363),s=n(88113),l=n(50206),c=n(48053),A=r.Function,u=/MSIE .\./.test(s)||a&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return u?function(r,a){var s=c(arguments.length,1)>n,u=o(r)?r:A(r),d=s?l(arguments,n):[],h=s?function(){i(u,this,d)}:u;return t?e(h,a):e(h)}:e}},20261:function(e,t,n){"use strict";var r,i,o,a,s=n(17854),l=n(22104),c=n(49974),A=n(60614),u=n(92597),d=n(47293),h=n(60490),p=n(50206),f=n(80317),g=n(48053),m=n(6833),v=n(35268),b=s.setImmediate,y=s.clearImmediate,w=s.process,x=s.Dispatch,k=s.Function,C=s.MessageChannel,B=s.String,_=0,E={},S="onreadystatechange";d((function(){r=s.location}));var F=function(e){if(u(E,e)){var t=E[e];delete E[e],t()}},T=function(e){return function(){F(e)}},M=function(e){F(e.data)},I=function(e){s.postMessage(B(e),r.protocol+"//"+r.host)};b&&y||(b=function(e){g(arguments.length,1);var t=A(e)?e:k(e),n=p(arguments,1);return E[++_]=function(){l(t,void 0,n)},i(_),_},y=function(e){delete E[e]},v?i=function(e){w.nextTick(T(e))}:x&&x.now?i=function(e){x.now(T(e))}:C&&!m?(o=new C,a=o.port2,o.port1.onmessage=M,i=c(a.postMessage,a)):s.addEventListener&&A(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!d(I)?(i=I,s.addEventListener("message",M,!1)):i=S in f("script")?function(e){h.appendChild(f("script"))[S]=function(){h.removeChild(this),F(e)}}:function(e){setTimeout(T(e),0)}),e.exports={set:b,clear:y}},92087:function(e,t,n){"use strict";var r=n(17854),i=n(19781),o=n(47045),a=n(67066),s=n(47293),l=r.RegExp,c=l.prototype,A=i&&s((function(){var e=!0;try{l(".","d")}catch(A){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);var s=Object.getOwnPropertyDescriptor(c,"flags").get.call(t);return s!==r||n!==r}));A&&o(c,"flags",{configurable:!0,get:a})},11091:function(e,t,n){"use strict";var r=n(82109),i=n(17854),o=n(20261).clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==o},{clearImmediate:o})},84633:function(e,t,n){"use strict";n(11091),n(12986)},12986:function(e,t,n){"use strict";var r=n(82109),i=n(17854),o=n(20261).set,a=n(17152),s=i.setImmediate?a(o,!1):o;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==s},{setImmediate:s})},32515:function(){},657:function(e,t,n){"use strict";n.d(t,{_u:function(){return Wp},lA:function(){return Vp},GJ:function(){return Gp},Gr:function(){return Kp}});var r=n(13087),i=n(62833),o=n(93806),a=n(24343),s=n(43629),l=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"execute",value:function(){var e=this.editor;(0,s.iC)(e)&&(e.readonly||e.history.redo())}},{key:"queryState",value:function(){var e=this.editor;if((0,s.iC)(e)&&!e.readonly)return e.history.hasRedo()}},{key:"hotkey",value:function(){return this.options.hotkey||["mod+y","shift+mod+y"]}}],[{key:"pluginName",get:function(){return"redo"}}]),n}(s.Sy),c=l,A=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"execute",value:function(){var e=this.editor;(0,s.iC)(e)&&(e.readonly||e.history.undo())}},{key:"queryState",value:function(){var e=this.editor;if((0,s.iC)(e)&&!e.readonly)return e.history.hasUndo()}},{key:"hotkey",value:function(){return this.options.hotkey||["mod+z","shift+mod+z"]}}],[{key:"pluginName",get:function(){return"undo"}}]),n}(s.Sy),u=A,d=n(26334),h=n(62040),p="markdown-it",f=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="strong",e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("emphasis")},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(p,this.markdownIt)}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+b"}},{key:"conversion",value:function(){return[{from:{span:{style:{"font-weight":["bold","700"]}}},to:this.tagName},{from:"b",to:this.tagName}]}},{key:"destroy",value:function(){this.editor.off(p,this.markdownIt)}}],[{key:"pluginName",get:function(){return"bold"}}]),n}(s.Rw),g=f;function m(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var v=".am-engine code, .am-engine-view code {\n font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;\n font-size: inherit;\n background-color: rgba(0, 0, 0, 0.06);\n padding: 0 2px;\n border-radius: 6px;\n line-height: inherit;\n word-wrap: break-word;\n text-indent: 0;\n}";m(v);var b="parse:html",y="markdown-it",w=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="code",e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("backticks")},e.parseHtml=function(t){t.find(e.tagName).css({"font-family":"monospace","font-size":"inherit","background-color":"rgba(0,0,0,.06)",padding:"0 2px","border-radius":"6px","line-height":"inherit","overflow-wrap":"break-word","text-indent":"0"})},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;e.on(b,this.parseHtml),(0,s.iC)(e)&&e.on(y,this.markdownIt)}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+e"}},{key:"destroy",value:function(){var e=this.editor;e.off(b,this.parseHtml),e.off(y,this.markdownIt)}}],[{key:"pluginName",get:function(){return"code"}}]),n}(s.Cy),x=w,k=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.mergeLeval=2,e.tagName="span",e.style={"background-color":"@var0"},e.variable={"@var0":{required:!0,value:"@color"}},e}return(0,i.Z)(n,[{key:"schema",value:function(){var e=(0,d.Z)((0,h.Z)(n.prototype),"schema",this).call(this);return e.attributes.style["background"]="@color",e}},{key:"conversion",value:function(){var e=this;return[{from:function(t,n){return t===e.tagName&&!!n.background},to:function(e,t,n){var r=(0,s.$)("<".concat(e," />")),i=t["background"];return delete t["background"],t["background-color"]=i,r.css(t),Object.keys(n).forEach((function(e){r.attributes(e,n[e])})),r}}]}},{key:"isTrigger",value:function(e,t){return void 0===t||e!==t}},{key:"hotkey",value:function(){return this.options.hotkey||[]}}],[{key:"pluginName",get:function(){return"backcolor"}}]),n}(s.Rw),C=k,B=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.mergeLeval=3,e.tagName="span",e.style={color:"@var0"},e.variable={"@var0":{required:!0,value:"@color"}},e}return(0,i.Z)(n,[{key:"isTrigger",value:function(e,t){return void 0===t||e!==t}},{key:"hotkey",value:function(){return this.options.hotkey||[]}}],[{key:"pluginName",get:function(){return"fontcolor"}}]),n}(s.Rw),_=B,E=n(52417),S=n(39693),F=n(72036),T="paste:each",M=(0,F.Z)("styleName"),I=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.mergeLeval=4,e.tagName="span",e.style={"font-size":"@var0"},e.variable={"@var0":{required:!0,value:/[\d\.]+(pt|px)$/}},Object.defineProperty((0,E.Z)(e),M,{writable:!0,value:"font-size"}),e.defaultSize=e.options.defaultSize||e.editor.container.css("font-size")||"14px",e.pasteEach=function(t){if(t.name===e.tagName){var n=t.css((0,S.Z)((0,E.Z)(e),M)[M]);if(!n)return;var r=e.convertToPX(n);if(n.endsWith("pt")&&t.css((0,S.Z)((0,E.Z)(e),M)[M],r),r!==e.defaultSize){var i=e.options.filter;if(i){var o=i(r);!1===o?t.css((0,S.Z)((0,E.Z)(e),M)[M],""):"string"===typeof o&&t.css((0,S.Z)((0,E.Z)(e),M)[M],o)}else t.css((0,S.Z)((0,E.Z)(e),M)[M],"");var a=e.editor.node;a.isMark(t)||a.unwrap(t)}}},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(T,this.pasteEach),this.options.defaultSize&&e.container.css("font-size",this.defaultSize)}},{key:"isTrigger",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultSize;return e!==t}},{key:"hotkey",value:function(){return this.options.hotkey||[]}},{key:"convertToPX",value:function(e){var t=/([\d\.]+)(pt|px)$/i.exec(e);return t&&"pt"===t[2]?String(Math.round(96*parseInt(t[1],10)/72))+"px":e}},{key:"destroy",value:function(){var e=this.editor;(0,s.iC)(e)&&e.off(T,this.pasteEach)}}],[{key:"pluginName",get:function(){return"fontsize"}}]),n}(s.Rw),N=I,U="markdown-it",L=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="em",e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("emphasis")},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(U,this.markdownIt)}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+i"}},{key:"conversion",value:function(){return[{from:{span:{style:{"font-style":"italic"}}},to:this.tagName},{from:"i",to:this.tagName}]}},{key:"destroy",value:function(){this.editor.off(U,this.markdownIt)}}],[{key:"pluginName",get:function(){return"italic"}}]),n}(s.Rw),Q=L,D=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="u",e}return(0,i.Z)(n,[{key:"hotkey",value:function(){return this.options.hotkey||"mod+u"}},{key:"conversion",value:function(){var e=this;return[{from:function(e,t){return"span"===e&&(t["text-decoration"]||"").includes("underline")},to:function(t,n,r){var i=(0,s.$)("<".concat(e.tagName," />"));return n["text-decoration"]=n["text-decoration"].split(/\s+/).filter((function(e){return"underline"!==e})).join(" ").trim(),i.css(n),i.attributes(r),i}}]}}],[{key:"pluginName",get:function(){return"underline"}}]),n}(s.Rw),H=D;n(57658);function O(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var z=".am-engine .card-hr,.am-engine-view .card-hr {\r\n border: 1px solid transparent;\r\n padding: 18px 0;\r\n border-radius: 2px 2px;\r\n}\r\n\r\n.am-engine .card-hr hr,.am-engine-view .card-hr hr {\r\n box-sizing: border-box;\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n margin-top: -1px;\r\n width: 100%;\r\n height: 2px;\r\n background-color: #e8e8e8;\r\n padding: 0;\r\n border: 1px solid transparent;\r\n}\r\n\r\n.am-engine .card-hr:hover , .am-engine .card-hr.hr-activated {\r\n background-color: #f4f4f4;\r\n}";O(z);var Z=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"toolbar",value:function(){var e,t=this.editor,n=function(){return!(0,s.iC)(t)||t.readonly?[]:[{key:"dnd",type:"dnd"},{key:"copy",type:"copy"},{key:"delete",type:"delete"}]},r=null===(e=t.plugin.findPlugin("hr"))||void 0===e?void 0:e.options;return(null===r||void 0===r?void 0:r.cardToolbars)?r.cardToolbars(n(),this.editor):n()}},{key:"onActivate",value:function(e){(0,d.Z)((0,h.Z)(n.prototype),"onActivate",this).call(this,e);var t="hr-activated",r=this.getCenter();e?r.addClass(t):r.removeClass(t)}},{key:"onSelectByOther",value:function(e,t){(0,d.Z)((0,h.Z)(n.prototype),"onSelectByOther",this).call(this,e,t),this.getCenter().find("hr").css("background-color",e?t.rgb:"")}},{key:"onActivateByOther",value:function(e,t){this.onSelectByOther(e,t)}},{key:"render",value:function(){return this.getCenter().addClass("card-hr"),"<hr />"}}],[{key:"cardName",get:function(){return"hr"}},{key:"cardType",get:function(){return s.eT.BLOCK}},{key:"autoActivate",get:function(){return!1}},{key:"selectStyleType",get:function(){return s.dw.BACKGROUND}}]),n}(s.Zb),R="parse:html",P="paste:schema",q="paste:each",K="markdown-it",W=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("hr")},e.pasteSchema=function(e){e.add([{type:"block",name:"hr",isVoid:!0}])},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n))return"hr"!==t.name||(n.card.replaceNode(t,Z.cardName),!1)},e.parseHtml=function(t,n){var r=[];return t.find("[".concat(s.Jr,"=").concat(Z.cardName,"]")).each((function(t){var i=(0,s.$)(t),o=(0,s.$)("<hr />");if(o.css({"background-color":"#e8e8e8",border:"1px solid transparent",margin:"18px 0"}),n){var a=e.editor.card.find(i),l=(null===a||void 0===a?void 0:a.getValue())||(0,s.RW)(i.attributes(s.TM));o=n(o,l)}i.replaceWith(o),r.push(o)})),r},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.on(R,this.parseHtml),e.on(P,this.pasteSchema),e.on(q,this.pasteHtml),(0,s.iC)(e)&&e.on(K,this.markdownIt)}},{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.card;t.insert(Z.cardName)}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+e"}},{key:"destroy",value:function(){var e=this.editor;e.off(R,this.parseHtml),e.off(P,this.pasteSchema),e.off(q,this.pasteHtml),(0,s.iC)(e)&&e.off(K,this.markdownIt)}}],[{key:"pluginName",get:function(){return"hr"}}]),n}(s.Sy),j=W,V=n(54621),G=["[ ] ","[x] ","[X] "];function $(e,t){t||(t={checkStrings:G}),t.checkStrings=t.checkStrings||G,e.core.ruler.after("inline","task-list",(function(e){for(var n=e.tokens,r=2;r<n.length;r++)J(n,r,t)?te(n,r,e,t):ee(n,r-1,t)&&ne(n,r,e,t)}))}function Y(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):(e.attrs||(e.attrs=[]),e.attrs[r]=i)}function X(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return-1}function J(e,t,n){return oe(e[t])&&ae(e[t-1])&&le(e[t],!1,n)&&se(e[t-2])}function ee(e,t,n){return oe(e[t])&&ae(e[t-1])&&le(e[t],!0,n)&&(t-2<0||!se(e[t-2]))}function te(e,t,n,r){var i=e[t],o=e[t-2];r.itemClass&&Y(o,"class",r.itemClass),r.rootClass&&Y(e[X(e,t-2)],"class",r.rootClass);var a=re(i,r.checkStrings),s=a.markup,l=a.content,c=a.checked;o.markup=s,i.content=l,i.children&&i.children.length>0&&(i.children[0].content=i.content),o.info=c?"true":"false";var A=ie(c,n.Token),u=(0,V.Z)(A,2),d=u[0],h=u[1];e.splice(t,0,d),e.splice(t+1,0,h)}function ne(e,t,n,r){var i=e[t],o=e[t-1],a=e[t-2];a.tag="ul",a.type="task_list_open",r.rootClass&&Y(a,"class",r.rootClass);var s=new n.Token("task_list_item_open","li",1);r.itemClass&&Y(s,"class",r.itemClass),e.splice(t-1,0,s);var l=re(o,r.checkStrings),c=l.markup,A=l.content,u=l.checked;s.markup=c,o.content=A,o.children&&o.children.length>0&&(o.children[0].content=o.content),s.info=u?"true":"false";var d=ie(u,n.Token),h=(0,V.Z)(d,2),p=h[0],f=h[1];e.splice(t,0,p),e.splice(t+1,0,f);var g=new n.Token("task_list_item_close","li",-1);e.splice(t+3,0,g),i.tag="ul",i.type="task_list_close"}function re(e,t){for(var n="",r="",i=!1,o=function(o){var a=t[o],s=function(t){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=o?t.trim():a;return!!e.content.startsWith(s)&&(n=s,r=e.content.replace(s,""),i="x"===s.substring(1,2).trim().toLowerCase(),!0)},l=s(a);if(l||(l=s(a,!0)),l)return"break"},a=0;a<t.length;a++){var s=o(a);if("break"===s)break}return{markup:n,content:r,checked:i}}function ie(e,t){var n=new t("task_list_item_checkbox_open","span",1);Y(n,s.W9,"inline"),Y(n,s.Jr,"checkbox"),Y(n,s.TM,(0,s.it)({type:"inline",checked:e}));var r=new t("task_list_item_checkbox_close","span",-1);return[n,r]}function oe(e){return"inline"===e.type}function ae(e){return"paragraph_open"===e.type}function se(e){return"list_item_open"===e.type}function le(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;return n.checkStrings.some((function(n){return 0===e.content.indexOf(t?n.trim():n)}))}function ce(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Ae=".data-checkbox {\r\n\tfont-size: 14px;\r\n\tfont-variant: tabular-nums;\r\n\tcolor: rgba(0, 0, 0, 0.65);\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmax-width: 16px !important;\r\n\tlist-style: none;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\toutline: none;\r\n\tdisplay: inline-block;\r\n\tline-height: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.data-checkbox-checked:after {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder-radius: 2px;\r\n\tborder: 1px solid #347eff;\r\n\tcontent: \"\";\r\n\tvisibility: hidden;\r\n}\r\n\r\n.data-checkbox:not(.data-checkbox-mobile):focus .data-checkbox-inner,.data-checkbox:not(.data-checkbox-mobile) .data-checkbox-inner {\r\n border-color: #347eff\r\n}\r\n\r\n.data-checkbox:hover:after{\r\n\tvisibility: visible;\r\n}\r\n\r\n.data-checkbox-inner {\r\n\tposition: relative;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n display: inline-block;\r\n\tborder: 1px solid #d9d9d9;\r\n\tborder-radius: 2px;\r\n\tbackground-color: #fff;\r\n\t-webkit-transition: all 0.3s;\r\n\ttransition: all 0.3s;\r\n\tborder-collapse: separate;\r\n}\r\n\r\n.data-checkbox-inner:after {\r\n\t-webkit-transform: rotate(45deg) scale(0);\r\n\t-ms-transform: rotate(45deg) scale(0);\r\n\ttransform: rotate(45deg) scale(0);\r\n\tposition: absolute;\r\n\tleft: 4.57142857px;\r\n\ttop: 1.14285714px;\r\n\tdisplay: table;\r\n\twidth: 5.71428571px;\r\n\theight: 9.14285714px;\r\n\tborder: 2px solid #fff;\r\n\tborder-top: 0;\r\n\tborder-left: 0;\r\n\tcontent: ' ';\r\n\t-webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\r\n\ttransition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\r\n\topacity: 0;\r\n}\r\n\r\n.data-checkbox-checked .data-checkbox-inner:after {\r\n\t-webkit-transform: rotate(45deg) scale(1);\r\n\t-ms-transform: rotate(45deg) scale(1);\r\n\ttransform: rotate(45deg) scale(1);\r\n\tposition: absolute;\r\n\tdisplay: table;\r\n\tborder: 2px solid #fff;\r\n\tborder-top: 0;\r\n\tborder-left: 0;\r\n\tcontent: ' ';\r\n\t-webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\r\n\ttransition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\r\n\topacity: 1;\r\n}\r\n\r\n.data-checkbox-checked .data-checkbox-inner {\r\n\tbackground-color: #347eff;\r\n border-color: #347eff;\r\n}\r\n\r\n.data-checkbox-disabled {\r\n\tcursor: not-allowed;\r\n}\r\n\r\n.data-checkbox-disabled.data-checkbox-checked .data-checkbox-inner:after {\r\n\t-webkit-animation-name: none;\r\n\tanimation-name: none;\r\n\tborder-color: rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.data-checkbox-disabled .data-checkbox-input {\r\n\tcursor: not-allowed;\r\n}\r\n\r\n.data-checkbox-disabled .data-checkbox-inner {\r\n\tborder-color: #d9d9d9 !important;\r\n\tbackground-color: #f5f5f5;\r\n}\r\n\r\n.data-checkbox-disabled .data-checkbox-inner:after {\r\n\t-webkit-animation-name: none;\r\n\tanimation-name: none;\r\n\tborder-color: #f5f5f5;\r\n\tborder-collapse: separate;\r\n}\r\n\r\n.data-checkbox-disabled + span {\r\n\tcolor: rgba(0, 0, 0, 0.25);\r\n\tcursor: not-allowed;\r\n}\r\n";ce(Ae);var ue="data-checkbox",de="data-checkbox-inner",he="data-checkbox-checked",pe=(0,F.Z)("container"),fe=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),Object.defineProperty((0,E.Z)(e),pe,{writable:!0,value:void 0}),e.update=function(t){var n,r,i=void 0===t?e.isChecked():t,o=e.root.parent();i?(null===(n=(0,S.Z)((0,E.Z)(e),pe)[pe])||void 0===n||n.removeClass(he),null===o||void 0===o||o.removeAttributes("checked")):(null===(r=(0,S.Z)((0,E.Z)(e),pe)[pe])||void 0===r||r.addClass(he),null===o||void 0===o||o.attributes("checked","true"));return i},e.isChecked=function(){var t;return!!(null===(t=(0,S.Z)((0,E.Z)(e),pe)[pe])||void 0===t?void 0:t.hasClass(he))},e.onClick=function(t){t.preventDefault(),t.stopPropagation();var n=e.update();e.setValue({checked:!n})},e}return(0,i.Z)(n,[{key:"onSelectByOther",value:function(){}},{key:"onSelect",value:function(){}},{key:"onActivateByOther",value:function(){}},{key:"render",value:function(){var e='\n <span class="'.concat(ue).concat(s.tq?" ".concat(ue,"-mobile"):"",'">\n <span class="').concat(de,'"></span>\n </span>'),t=this.getValue();(0,S.Z)(this,pe)[pe]?(0,S.Z)(this,pe)[pe]=this.getCenter().first():((0,S.Z)(this,pe)[pe]=(0,s.$)(e),this.getCenter().append((0,S.Z)(this,pe)[pe]));var n=this.editor;this.update(!(null===t||void 0===t?void 0:t.checked)),(0,s.iC)(n)&&!n.readonly&&(0,S.Z)(this,pe)[pe].on("mousedown",this.onClick)}},{key:"destroy",value:function(){var e;null===(e=(0,S.Z)(this,pe)[pe])||void 0===e||e.off("mousedown",this.onClick)}}],[{key:"cardName",get:function(){return"checkbox"}},{key:"cardType",get:function(){return s.eT.INLINE}},{key:"singleSelectable",get:function(){return!1}},{key:"autoSelected",get:function(){return!1}},{key:"collab",get:function(){return!1}},{key:"focus",get:function(){return!1}}]),n}(s.Zb),ge='.am-engine .data-list-item [data-card-key="checkbox"],.am-engine-view .data-list-item [data-card-key="checkbox"] {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.am-engine .data-list-task,.am-engine-view .data-list-task {\r\n\tlist-style: none;\r\n\ttext-indent: 0;\r\n}\r\n\r\n.am-engine .data-list-task [data-card-key="checkbox"],.am-engine-view .data-list-task [data-card-key="checkbox"] {\r\n margin-left: -22px;\r\n height: 16px;\r\n display: inline-block;\r\n width: 22px;\r\n vertical-align: middle;\r\n height: 100%;\r\n}\r\n\r\n.am-engine .data-list-task [data-card-key="checkbox"] [data-card-element="center"],.am-engine .data-list-task [data-card-key="checkbox"] [data-card-element="body"],.am-engine-view .data-list-task [data-card-key="checkbox"] [data-card-element="center"]{\r\n height: 16px;\r\n width: 16px;\r\n vertical-align: unset;\r\n}';ce(ge);var me="data-list-task",ve="parse:html",be="markdown-it",ye="paste:each",we="paste:each-after",xe=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.cardName="checkbox",e.tagName="ul",e.attributes={class:"@var0","data-indent":"@var1"},e.variable={"@var0":{required:!0,value:[e.editor.list.CUSTOMZIE_UL_CLASS,me]},"@var1":"@number"},e.allowIn=["blockquote","$root"],e.parseHtml=function(t,n){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return'<span style="'.concat(e?"background:#347eff;position:relative;":"background:#fff;",'width: 16px;height: 16px;display: inline-block;border: 1px solid #347eff;border-radius: 2px;transition: all 0.3s;border-collapse: separate;">').concat(e,"</span>")},i=[];return t.find("[".concat(s.Jr,'="checkbox"]')).each((function(t){var o=(0,s.$)(t),a=(0,s.$)("<span>".concat(o.find(".data-checkbox-checked").length>0?r('<span style="transform: rotate(45deg) scale(1);position: absolute;display: block;border: 2px solid #fff;border-top: 0;border-left: 0;width:5.71428571px;height:9.14285714px;transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;opacity: 1;left:3.57142857px;top:0.14285714px;"></span>'):r(),"</span>"));if(a.css({margin:"3px 0.5ex","vertical-align":"middle",width:"16px",height:"16px",color:"rgba(0, 0, 0, 0.65)"}),o.empty(),n){var l=e.editor.card.find(o),c=(null===l||void 0===l?void 0:l.getValue())||(0,s.RW)(o.attributes(s.TM));c&&(a=n(a,c))}o.append(a),i.push(o)})),t.find(".".concat(me)).css({"list-style":"none"}),i},e.markdownIt=function(t){var n=e.editor;!1!==e.options.markdown&&(t.use($,{itemClass:n.list.CUSTOMZIE_LI_CLASS,rootClass:"".concat(n.list.CUSTOMZIE_UL_CLASS," ").concat(me)}),t.enable("task-list"))},e.pasteHtml=function(t){if((0,s.iC)(e.editor)){if(t.isElement()){var n,r=t.attributes(),i=r[s.Jr]||r[s.mV];if(i&&i===fe.cardName&&"li"!==(null===(n=t.parent())||void 0===n?void 0:n.name))return t.remove(),!1}return!0}},e.pasteEachAfter=function(t){var n=e.editor,r=t.find("li.".concat(n.list.CUSTOMZIE_LI_CLASS));r.each((function(e,t){var i=r.eq(t);if(i){var o=i.first();if(o&&o.name===fe.cardName){var a=n.card.find(o);if(a){var s=i.parent();null===s||void 0===s||s.addClass(me);var l=a.getValue();l&&l.checked?null===s||void 0===s||s.attributes("checked","true"):null===s||void 0===s||s.removeAttributes("checked")}}}}))},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;e.on(ve,this.parseHtml),(0,s.iC)(e)&&(e.on(be,this.markdownIt),e.on(we,this.pasteEachAfter),e.on(ye,this.pasteHtml))}},{key:"schema",value:function(){var e=(0,d.Z)((0,h.Z)(n.prototype),"schema",this).call(this);return[e,{name:"li",type:"block",attributes:{class:{required:!0,value:this.editor.list.CUSTOMZIE_LI_CLASS},checked:["true","false"]},allowIn:["ul"]}]}},{key:"isCurrent",value:function(e){var t;return"li"===e.name?e.hasClass(this.editor.list.CUSTOMZIE_LI_CLASS)&&"checkbox"===(null===(t=e.first())||void 0===t?void 0:t.attributes(s.Jr)):e.hasClass("data-list")&&e.hasClass(me)}},{key:"execute",value:function(e){var t=this.editor;if((0,s.iC)(t)){var n=t.change,r=t.list,i=t.block;r.split();var o=n.range.get(),a=i.findBlocks(o);if(a){var l,c=o.createSelection("tasklist-execute");if(r.isSpecifiedType(a,"ul","checkbox"))r.unwrap(a);else{var A=r.toCustomize(a,"checkbox",e);A.forEach((function(e){t.node.isList(e)&&e.addClass(me)}))}c.move();var u=null!==(l=o.startContainer.parentElement)&&void 0!==l?l:o.startContainer.parentNode;if(o.collapsed&&o.startContainer.nodeType===Node.ELEMENT_NODE&&0===o.startContainer.childNodes.length&&u){var d=document.createElement("br");o.startNode.before(d),u.removeChild(o.startContainer),o.select(d),o.collapse(!1)}n.apply(o),r.merge()}}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+9"}},{key:"destroy",value:function(){var e=this.editor;e.off(ve,this.parseHtml),(0,s.iC)(e)&&(e.off(be,this.markdownIt),e.off(we,this.pasteEachAfter),e.off(ye,this.pasteHtml))}}],[{key:"pluginName",get:function(){return"tasklist"}}]),n}(s.BX),ke=xe,Ce=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="ol",e.attributes={start:"@var0","data-indent":"@var1"},e.variable={"@var0":"@number","@var1":"@number"},e.allowIn=["blockquote","$root"],e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("list")},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on("markdown-it",this.markdownIt)}},{key:"schema",value:function(){var e=(0,d.Z)((0,h.Z)(n.prototype),"schema",this).call(this);return[e,{name:"ol",type:"block"},{name:"li",type:"block",allowIn:["ol"]}]}},{key:"isCurrent",value:function(e){var t=this.editor.list;return!e.hasClass(t.CUSTOMZIE_UL_CLASS)&&"ol"===e.name}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this.editor;if((0,s.iC)(t)){var n=t.change,r=t.list,i=t.block;r.split();var o=n.range.get(),a=i.findBlocks(o);if(a){var l=o.createSelection();"orderedlist"===r.getPluginNameByNodes(a)?r.unwrap(a):r.toNormal(a,"ol",e),l.move(),n.range.select(o),r.merge()}}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+7"}},{key:"destroy",value:function(){this.editor.off("markdown-it",this.markdownIt)}}],[{key:"pluginName",get:function(){return"orderedlist"}}]),n}(s.BX),Be=Ce,_e="markdown-it",Ee=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="ul",e.attributes={"data-indent":"@var0"},e.variable={"@var0":"@number"},e.allowIn=["blockquote","$root"],e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("list")},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(_e,this.markdownIt)}},{key:"schema",value:function(){var e=(0,d.Z)((0,h.Z)(n.prototype),"schema",this).call(this);return[e,{name:"ul",type:"block"},{name:"li",type:"block",allowIn:["ul"]}]}},{key:"isCurrent",value:function(e){return!e.hasClass(this.editor.list.CUSTOMZIE_UL_CLASS)&&"ul"===e.name}},{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=e.list,r=e.block;n.split();var i=t.range.get(),o=r.findBlocks(i);if(o){var a=i.createSelection();"unorderedlist"===n.getPluginNameByNodes(o)?n.unwrap(o):n.toNormal(o,"ul"),a.move(),t.range.select(i),n.merge()}}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+8"}},{key:"destroy",value:function(){this.editor.off(_e,this.markdownIt)}}],[{key:"pluginName",get:function(){return"unorderedlist"}}]),n}(s.BX),Se=Ee,Fe=n(82482),Te="text-indent",Me="keydown:backspace",Ie="keydown:tab",Ne="keydown:shift-tab",Ue="paste:each",Le=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.onBackspace=function(t){var n=e.editor;if((0,s.iC)(n)){var r=n.change,i=n.list,o=n.node,a=n.block,l=r.range.get(),c=a.closest(l.startNode);if(o.isBlock(c)){var A=c.parent(),u=r.blocks;if(A&&o.isBlock(A)&&(u=u.filter((function(e){return!e.equal(A)}))),"li"===c.name){if(l.collapsed&&!i.isFirst(l))return;if(!l.collapsed)return}else{if((l.collapsed&&a.isLastOffset(l,"end")||!a.isFirstOffset(l,"start"))&&!o.isEmptyWidthChild(c)||u.length>1)return;if(!l.collapsed)return}return e.queryState()?(t.preventDefault(),n.command.execute(e.constructor.pluginName,"out"),!1):void 0}}},e.onTab=function(t){var n=e.editor;if((0,s.iC)(n)){var r=n.change,i=n.list,o=n.block,a=r.range.get();return a.collapsed&&i.isFirst(a)?(t.preventDefault(),n.command.execute(e.constructor.pluginName,"in"),!1):!a.collapsed||o.isFirstOffset(a,"start")?(t.preventDefault(),n.command.execute(e.constructor.pluginName,"in",!0),!1):void 0}},e.onShiftTab=function(t){var n=e.editor;if((0,s.iC)(n))return t.preventDefault(),n.command.execute(e.constructor.pluginName,"out"),!1},e.pasteEach=function(t){var n=e.editor;if(t.isElement()&&!t.isCard()&&n.node.isBlock(t)){var r=t.css(),i=r[Te];if(i&&i.endsWith("pt")){var o=e.convertToPX(i);if(o){var a=e.options.maxPadding||50,l=(0,s.ZQ)(o),c=t.width();c=0===c?n.root.width():c;var A=t.css("font-size");A=!A||A.endsWith("em")?n.root.css("font-size"):A,A.endsWith("em")&&(A=(0,s.$)(document.body).css("font-size")),A.endsWith("px")||(A="16px");var u=c>0?c/(0,s.ZQ)(A):a;l=Math.min(o.endsWith("px")?l/(0,s.ZQ)(A):l,a,u),l<=0?t.css(Te,""):t.css(Te,(0,s.Nn)(l>0?l:0,"em"))}}}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.schema.add(this.schema()),this.conversion().forEach((function(t){var n=t.from,r=t.to;e.conversion.add(n,r)})),e.on(Me,this.onBackspace),e.on(Ie,this.onTab),e.on(Ne,this.onShiftTab),(0,s.iC)(e)&&e.on(Ue,this.pasteEach)}},{key:"execute",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"in",n=this.editor;if((0,s.iC)(n)){var r=n.change,i=n.list,o=n.block;i.split();var a=r.range.get(),l=o.findBlocks(a);if(l){var c=this.options.maxPadding||50;l.forEach((function(n){e.addPadding(n,"in"===t?2:-2,c)})),i.merge()}}}},{key:"queryState",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=e.list,r=e.node,i=t.range.get();if(!i.startNode.inEditor())return 0;var o=e.block.closest(i.startNode);return"li"===o.name?n.getIndent(o.closest("ul,ol")):r.isRootBlock(o)||r.isNestedBlock(o)?(0,s.ZQ)(o.css(Te)):0}}},{key:"addPadding",value:function(e,t,n){var r=this.editor,i=r.list,o=r.node;if("li"!==e.name)if(o.isList(e))i.addIndent(e,t,n);else if(o.isRootBlock(e)||o.isNestedBlock(e))if(t>0)if((0,s.ZQ)(e.css(Te))){var a=e.css(Te),l=(0,s.ZQ)(a)+t,c=e.width();c=0===c?r.root.width():c;var A=e.css("font-size");A=!A||A.endsWith("em")?r.root.css("font-size"):A,A.endsWith("em")&&(A=(0,s.$)(document.body).css("font-size")),A.endsWith("px")||(A="16px");var u=c>0?c/(0,s.ZQ)(A):n;l=Math.min(a.endsWith("px")?l/(0,s.ZQ)(A):l,n,u),l<=0?e.css(Te,""):e.css(Te,(0,s.Nn)(l>0?l:0,"em"))}else e.css(Te,"".concat(t,"em"));else{var d=e.css(Te),h=(0,s.ZQ)(d)+t;h<=0?e.css(Te,""):e.css(Te,(0,s.Nn)(h>0?h:0,"em"))}}},{key:"hotkey",value:function(){var e,t,n=(null===(e=this.options.hotkey)||void 0===e?void 0:e.in)||"mod+]",r=(null===(t=this.options.hotkey)||void 0===t?void 0:t.out)||"mod+[";return[{key:n,args:"in"},{key:r,args:"out"}]}},{key:"schema",value:function(){return{type:"block",attributes:{style:(0,Fe.Z)({},Te,"@length")}}}},{key:"conversion",value:function(){var e=this;return[{from:function(e,t,n){return!!t["padding-left"]||!!n[Te]},to:function(t,n,r){var i=(0,s.$)("<".concat(t," />")),o=n["padding-left"]||r[Te];if(o.endsWith("pt")&&(o=e.convertToPX(o)),o.endsWith("px")){var a=n["font-size"];a=!a||a.endsWith("em")?e.editor.root.css("font-size"):a,a.endsWith("em")&&(a=(0,s.$)(document.body).css("font-size")),a.endsWith("px")||(a="16px");var l=(0,s.ZQ)(o)/(0,s.ZQ)(a);n[Te]="".concat(l,"em")}else o.endsWith("em")&&(n[Te]=o);return delete n["padding-left"],delete r[Te],i.css(n),Object.keys(r).forEach((function(e){i.attributes(e,r[e])})),i}}]}},{key:"convertToPX",value:function(e){var t=/([\d\.]+)(pt|px)$/i.exec(e);return t&&"pt"===t[2]?String(Math.round(96*parseInt(t[1],10)/72))+"px":e}},{key:"destroy",value:function(){var e=this.editor;e.off(Me,this.onBackspace),e.off(Ie,this.onTab),e.off(Ne,this.onShiftTab),(0,s.iC)(e)&&e.off(Ue,this.pasteEach)}}],[{key:"pluginName",get:function(){return"indent"}}]),n}(s.Sy),Qe=Le,De=n(7279),He="markdown-it",Oe=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="del",e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("strikethrough")},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(He,this.markdownIt)}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+x"}},{key:"conversion",value:function(){var e=this;return[{from:function(e,t){return"span"===e&&(t["text-decoration"]||"").includes("line-through")},to:function(t,n,r){var i=(0,s.$)("<".concat(e.tagName," />"));return n["text-decoration"]=n["text-decoration"].split(/\s+/).filter((function(e){return"line-through"!==e})).join(" ").trim(),i.css(n),i.attributes(r),i}},{from:"s",to:this.tagName},{from:"strike",to:this.tagName}]}},{key:"destroy",value:function(){this.editor.off(He,this.markdownIt)}}],[{key:"pluginName",get:function(){return"strikethrough"}}]),n}(s.Rw),ze=Oe,Ze=n(10082),Re=n.n(Ze),Pe="markdown-it",qe=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="sub",e.markdownIt=function(t){!1!==e.options.markdown&&(t.use(Re()),t.enable("sub"))},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(Pe,this.markdownIt)}},{key:"conversion",value:function(){var e=this;return[{from:function(e,t){return"span"===e&&"sub"===(t["vertical-align"]||"")},to:function(t,n,r){var i=(0,s.$)("<".concat(e.tagName," />"));return delete n["vertical-align"],i.css(n),i.attributes(r),i}}]}},{key:"execute",value:function(){for(var e,t=this.editor.command.queryState("sub"),r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t&&(e=(0,d.Z)((0,h.Z)(n.prototype),"execute",this)).call.apply(e,[this].concat(i));var a,s=this.editor.command.queryState("sup");(s&&this.editor.command.execute("sup"),t)||(a=(0,d.Z)((0,h.Z)(n.prototype),"execute",this)).call.apply(a,[this].concat(i))}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+,"}},{key:"destroy",value:function(){this.editor.off(Pe,this.markdownIt)}}],[{key:"pluginName",get:function(){return"sub"}}]),n}(s.Rw),Ke=qe,We=n(27632),je=n.n(We),Ve="markdown-it",Ge=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="sup",e.markdownIt=function(t){!1!==e.options.markdown&&(t.use(je()),t.enable("sup"))},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(Ve,this.markdownIt)}},{key:"conversion",value:function(){var e=this;return[{from:function(e,t){return"span"===e&&"super"===(t["vertical-align"]||"")},to:function(t,n,r){var i=(0,s.$)("<".concat(e.tagName," />"));return delete n["vertical-align"],i.css(n),i.attributes(r),i}}]}},{key:"execute",value:function(){for(var e,t=this.editor.command.queryState("sup"),r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t&&(e=(0,d.Z)((0,h.Z)(n.prototype),"execute",this)).call.apply(e,[this].concat(i));var a,s=this.editor.command.queryState("sub");(s&&this.editor.command.execute("sub"),t)||(a=(0,d.Z)((0,h.Z)(n.prototype),"execute",this)).call.apply(a,[this].concat(i))}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+."}},{key:"destroy",value:function(){this.editor.off(Ve,this.markdownIt)}}],[{key:"pluginName",get:function(){return"sup"}}]),n}(s.Rw),$e=Ge,Ye="keydown:backspace",Xe=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.kind="block",e.style={"text-align":"@var0","list-style-position":"@var1"},e.variable={"@var0":["center","right","justify"],"@var1":["outside","inside"]},e.onBackspace=function(t){var n=e.editor;if((0,s.iC)(n)){var r=n.change,i=n.block,o=r.range.get();if(!(i.isLastOffset(o,"end")||!i.isFirstOffset(o,"start")||r.blocks.length>1)){var a=n.command,l=e.queryState();return"center"===l?(t.preventDefault(),a.execute(e.constructor.pluginName,"left"),!1):"right"===l?(t.preventDefault(),a.execute(e.constructor.pluginName,"center"),!1):void 0}}},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this),this.editor.on(Ye,this.onBackspace)}},{key:"execute",value:function(e){var t=this.editor;if((0,s.iC)(t)&&!t.readonly){var n=t.change,r=t.block;r.setBlocks({style:{"text-align":!e||["left"].indexOf(e)>-1?"":e}}),n.blocks.forEach((function(n){"li"===n.name&&t.list.addAlign(n,e)}))}}},{key:"queryState",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=e.schema,r=t.blocks;if(0!==r.length){var i=r[0],o=n.getAllowInTags();o.indexOf(i.name)>-1&&(i=r[1]||i.first()||i);var a=i.css("text-align");return"start"===a&&(a="left"),"end"===a&&(a="right"),a}}}},{key:"hotkey",value:function(){var e,t,n,r,i=(null===(e=this.options.hotkey)||void 0===e?void 0:e.left)||"mod+shift+l",o=(null===(t=this.options.hotkey)||void 0===t?void 0:t.center)||"mod+shift+c",a=(null===(n=this.options.hotkey)||void 0===n?void 0:n.right)||"mod+shift+r",s=(null===(r=this.options.hotkey)||void 0===r?void 0:r.justify)||"mod+shift+j";return[{key:i,args:"left"},{key:o,args:"center"},{key:a,args:"right"},{key:s,args:"justify"}]}},{key:"destroy",value:function(){this.editor.off(Ye,this.onBackspace)}}],[{key:"pluginName",get:function(){return"alignment"}}]),n}(s.YX),Je=Xe,et=n(84462),tt=n.n(et);function nt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var rt=".am-engine mark,\r\n.am-engine-view mark {\r\n padding: 0;\r\n background: #ff0;\r\n}";nt(rt);var it="markdown-it",ot=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="mark",e.markdownIt=function(t){!1!==e.options.markdown&&(t.use(tt()),t.enable("mark"))},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(it,this.markdownIt)}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"destroy",value:function(){this.editor.off(it,this.markdownIt)}}],[{key:"pluginName",get:function(){return"mark"}}]),n}(s.Rw),at=ot;function st(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var lt=".am-engine blockquote, .am-engine-view blockquote {\n margin: 5px 0 5px 0;\n border-left: 3px solid #eee;\n opacity: 0.6;\n}\n\n.am-engine blockquote + blockquote, .am-engine-view blockquote + blockquote {\n margin-top: -5px;\n}\n\n.am-engine blockquote > *, .am-engine-view blockquote > * {\n margin-left: 14px;\n}\n";st(lt);var ct="parse:html",At="keydown:backspace",ut="keydown:enter",dt="paste:each",ht="markdown-it",pt=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="blockquote",e.canMerge=!0,e.pasteEach=function(t){var n;t.isText()&&(null===(n=t.parent())||void 0===n?void 0:n.name)===e.tagName&&e.editor.node.wrap(t,(0,s.$)("<p></p>"))},e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("blockquote")},e.onBackspace=function(t){var n=e.editor;if((0,s.iC)(n)){var r=n.change,i=n.node,o=r.range.get(),a=n.block,l=a.isLastOffset(o,"end");if(l&&!o.collapsed){var c=a.closest(o.startNode),A=a.closest(o.endNode),u=c.parent(),d=A.parent();if(u&&d&&"blockquote"===d.name&&!u.equal(d))return void d.remove()}if(o.collapsed){var h=a.isFirstOffset(o,"start");if(h){var p=a.closest(o.startNode),f=p.parent();if(f&&"blockquote"===f.name&&i.isBlock(p)){if(t.preventDefault(),p.prevElement())r.mergeAfterDelete(p);else if(i.isEmpty(f)){var g=(0,s.$)("<p><br/></p>");f.replaceWith(g),o.select(g,!0).collapse(!1),r.apply(o)}else a.unwrap("<blockquote />");return!1}}}}},e.onEnter=function(t){var n=e.editor;if((0,s.iC)(n)){var r=n.change,i=n.block,o=r.range.get(),a=i.closest(o.endNode),l=a.parent();return(null===l||void 0===l?void 0:l.name)===e.tagName&&"p"===a.name&&a.nextElement()?(t.preventDefault(),i.insertOrSplit(o,a),!1):void 0}},e.parseHtml=function(e){e.find("blockquote").css({"margin-top":"5px","margin-bottom":"5px","padding-left":"1em","margin-left":"0px","border-left":"3px solid #eee",opacity:"0.6"})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.name===e.tagName){var r=n.node;return t.css("padding-left",""),t.css("text-indent",""),r.isEmpty(t)&&t.empty().append("<p><br/></p>"),n.normalize(t),!1}return!0}},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;e.schema.addAllowIn(this.tagName),e.on(ct,this.parseHtml),(0,s.iC)(e)&&(e.on(dt,this.pasteHtml),e.on(At,this.onBackspace),e.on(ut,this.onEnter),e.on(dt,this.pasteEach),e.on(ht,this.markdownIt))}},{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=e.block,r=e.node;if(this.queryState()){var i=t.range.get(),o=t.blocks[0].closest(this.tagName),a=i.createSelection();return r.unwrap(o),a.move(),void t.range.select(i)}n.wrap("<".concat(this.tagName," />"))}}},{key:"queryState",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=t.blocks;if(0===n.length)return!1;var r=n[0].closest(this.tagName);return this.isSelf(r)}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+shift+u"}},{key:"destroy",value:function(){var e=this.editor;e.off(ct,this.parseHtml),(0,s.iC)(e)&&(e.off(dt,this.pasteHtml),e.off(At,this.onBackspace),e.off(ut,this.onEnter),e.off(dt,this.pasteEach),e.off(ht,this.markdownIt))}}],[{key:"pluginName",get:function(){return"quote"}}]),n}(s.AT),ft=pt;function gt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var mt=".am-engine.data-paintformat-mode,\r\n.am-engine-view.data-paintformat-mode {\r\n cursor: text;\r\n cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAUCAYAAACTQC2+AAAABGdBTUEAALGPC/xhBQAAATtJREFUSA3dlTFLA0EQhU+jlSkEG63EYGdlZZFG7QUbSyG/QP/C/Q0rqzQWQX+BwUKwtrexEFRQtFSI35NZWDa3soOHhQ8eM/v2zWw2N9xVVVUdwXUYoFxaq5il2wa8hvtG5dJaxYx16xFvLN8i3lmehiFC6Y94wbsTGsxZosajKA/7aewjrKZiyTocJO9DSYHT82r+YXyQs0eRfYBrD/Y1DB58OMyfeM/hrWq8N9qlZkmFBXiPPd6D7ikWUxwjrKWirTeJkzDeNYttKIxhDUuxiFGjfAnfMkUX3hs19emYqFt9P48mU6zVLEQPFjCfwgk8gyuwEd6pS5t0EQYmHhCXLZ8Kvz1oqmFO+H8HxVOXfZC5vwNd46y3xbx5ni1mQ4+dJ6NyDw4xX0GN9484YfcRhg+fcmmt408+5V99wSyVTWN94gAAAABJRU5ErkJggg==) 5 10, text;\r\n}";gt(mt);var vt="data-paintformat-mode",bt=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.activeMarks=void 0,e.activeBlocks=void 0,e.type=void 0,e.event=void 0,e.isFormat=!1,e.onBeforeCommandExecute=function(t){"paintformat"!==t&&!e.isFormat&&e.event&&e.removeActiveNodes(e.editor.container[0].ownerDocument)},e.onContainerMouseUp=function(t){if(e.activeMarks&&t.target){var n=e.editor;n.card.closest((0,s.$)(t.target))?e.removeActiveNodes(n.container[0].ownerDocument):(e.isFormat=!0,e.paintFormat(e.activeMarks,e.activeBlocks),e.isFormat=!1,"single"===e.type&&e.removeActiveNodes(n.container[0].ownerDocument))}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;(0,s.iC)(e)&&(e.on("beforeCommandExecute",this.onBeforeCommandExecute),e.container.on("mouseup",this.onContainerMouseUp))}},{key:"removeActiveNodes",value:function(e){(0,s.mW)(e)&&(e=(0,s.$)(e));var t=this.editor;t.container.removeClass(vt),this.activeMarks=void 0,this.activeBlocks=void 0,this.event&&(e.off("keydown",this.event),this.event=void 0),(0,s.iC)(t)&&t.trigger("select")}},{key:"bindEvent",value:function(e){var t=this,n=e[0].ownerDocument,r=function r(i){i.metaKey||i.ctrlKey||i.shiftKey||(t.event=void 0,"Escape"!==i.key&&27!==i.keyCode||(e.off("keydown",r),n&&t.removeActiveNodes(n)))};n&&((0,s.$)(n).on("keydown",r),this.event=r)}},{key:"paintFormat",value:function(e,t){var n=this,r=this.editor;if((0,s.iC)(r)){var i=r.change,o=r.command,a=r.block,l=i.range.get(),c=this.options.removeCommand||"removeformat";if(l.collapsed){var A=(0,s.$)("<img ".concat(s.Zi,'="').concat(s.UI,'" role="format-dummy" style="display: none;" />'));l.insertNode(A[0]);var u=a.closest(l.startNode);l.select(u,!0),i.range.select(l),"function"===typeof c?c(l):o.execute(c),this.paintMarks(e);var d=a.getBlocks(l);t&&d.forEach((function(e){n.paintBlocks(e,t)})),A=u.find('img[role="format-dummy"]'),l.select(A),l.collapse(!0),A.remove(),i.apply(l)}else{"function"===typeof c?c(l):o.execute(c),this.paintMarks(e);var h=a.getBlocks(l);t&&h.forEach((function(e){n.paintBlocks(e,t)}))}r.mark.merge(l)}}},{key:"paintMarks",value:function(e){for(var t=this.editor,n=t.mark,r=e.length-1;r>=0;r--){var i=e[r];n.wrap(t.node.clone(i,!1,!1))}}},{key:"paintBlocks",value:function(e,t){var n=this,r=this.editor;if((0,s.iC)(r)&&e.inEditor()){var i=r.node,o=r.change,a=r.block,l=o.range.get(),c=l.createSelection("removeformat");t.forEach((function(t){if(e.inEditor()){if(n.options.paintBlock){var r=n.options.paintBlock(e,t);if(!1===r)return}if(t.name!==e.name)if(l.select(e).shrinkToElementNode(),o.blocks=[e],"p"===t.name){var s=a.findPlugin(e);s&&s.execute(t.name)}else if(i.isRootBlock(t)){var c=a.findPlugin(t);c&&c.execute(t.name)}else if(i.isList(t)&&"li"!==t.name){var A=a.findPlugin(t),u=a.findPlugin("li"===e.name?e.parent():e);A&&u!==A&&A.execute()}var d=t.css();Object.keys(d).length>0&&a.setBlocks({style:d})}})),c.move()}}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"single",t=this.editor;if((0,s.iC)(t))if(this.activeMarks)this.removeActiveNodes(t.container);else{this.type=e,this.bindEvent(t.container);var n=t.change,r=t.mark,i=t.block,o=n.range.get();this.activeMarks=r.findMarks(o),this.activeBlocks=i.findBlocks(o),t.trigger("select"),t.container.addClass("data-paintformat-mode")}}},{key:"queryState",value:function(){return!!this.activeMarks}},{key:"destroy",value:function(){var e=this.editor;e.off("beforeCommandExecute",this.onBeforeCommandExecute),e.container.off("mouseup",this.onContainerMouseUp)}}],[{key:"pluginName",get:function(){return"paintformat"}}]),n}(s.Sy),yt=bt,wt=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,i.Z)(n,[{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=e.block,r=e.mark,i=e.inline,o=n,a=t.range.get(),l=o.getBlocks(a),c=r.findMarks(a),A=i.findInlines(a);if(c.length>0)r.unwrap();else if(A.length>0)i.unwrap();else{var u=a.createSelection("removeformat");l.forEach((function(e){var t=o.findPlugin("li"===e.name?e.parent():e);t&&(a.select(e).shrinkToElementNode(),t.execute()),e.removeAttributes("style")})),u.move()}}}},{key:"hotkey",value:function(){return this.options.hotkey||"mod+\\"}}],[{key:"pluginName",get:function(){return"removeformat"}}]),n}(s.Sy),xt=wt,kt="keydown:all",Ct=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.onSelectAll=function(t){var n=e.editor.command;t.preventDefault(),n.execute("selectall")},e}return(0,i.Z)(n,[{key:"init",value:function(){this.editor.on(kt,this.onSelectAll)}},{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.change,n=t.range.get(),r=n.startNode.closest(s.Su);r.length>0?n.select(r,!0):n.select(e.container,!0),t.range.select(n),e.trigger("select")}}},{key:"destroy",value:function(){this.editor.off(kt,this.onSelectAll)}}],[{key:"pluginName",get:function(){return"selectall"}}]),n}(s.Sy),Bt=Ct,_t=n(48534),Et=n(78305),St=n.n(Et),Ft=n(73396),Tt=n(44870),Mt=n(87139),It=n(49242),Nt=n(44339),Ut=n(73886),Lt=n(30898),Qt=n(30670),Dt=(0,Ft.aZ)({name:"am-link-editor",components:{AConfigProvider:Nt.ZP,AInput:Ut.ZP,AButton:Lt.Z},props:{language:{type:Object,required:!0},defaultText:String,defaultLink:String,className:String,onLoad:Function,onOk:Function},setup(e){const t=(0,Tt.iH)(e.defaultText),n=(0,Tt.iH)(e.defaultLink),r=(0,Tt.iH)(null),i=e.language.get("link","text"),o=e.language.get("link","text_placeholder"),a=e.language.get("link","link"),s=e.language.get("link","link_placeholder"),l=e.language.get("link","ok_button"),c=e=>{t.value=e},A=e=>{n.value=e};return(0,Ft.bv)((()=>{r.value&&r.value.focus(),setTimeout((()=>{e.onLoad&&e.onLoad()}),200)})),{text:t,link:n,textTitle:i,textPlaceholder:o,linkTitle:a,linkPlaceholder:s,buttonTitle:l,onTextChange:c,onLinkChange:A,linkRef:r}}});function Ht(e,t,n,r,i,o){const a=(0,Ft.up)("a-input"),s=(0,Ft.up)("a-button"),l=(0,Ft.up)("a-config-provider");return(0,Ft.wg)(),(0,Ft.j4)(l,{"auto-insert-space-in-button":!1},{default:(0,Ft.w5)((()=>[(0,Ft._)("div",{"data-element":"ui",class:(0,Mt.C_)(["data-link-editor",e.className])},[(0,Ft._)("p",null,(0,Mt.zw)(e.textTitle),1),(0,Ft._)("p",null,[(0,Ft.Wm)(a,{class:"data-link-input",value:e.text,placeholder:e.textPlaceholder,onChange:t[0]||(t[0]=t=>e.onTextChange(t.target.value))},null,8,["value","placeholder"])]),(0,Ft._)("p",null,(0,Mt.zw)(e.linkTitle),1),(0,Ft._)("p",null,[(0,Ft.Wm)(a,{ref:"linkRef",class:"data-link-input",value:e.link,placeholder:e.linkPlaceholder,onChange:t[1]||(t[1]=t=>e.onLinkChange(t.target.value))},null,8,["value","placeholder"])]),(0,Ft._)("p",null,[(0,Ft.Wm)(s,{class:"data-link-button",onClick:t[2]||(t[2]=t=>e.onOk(e.text,e.link)),disabled:""===e.link.trim()},{default:(0,Ft.w5)((()=>[(0,Ft.Uk)((0,Mt.zw)(e.buttonTitle),1)])),_:1},8,["disabled"])])],2)])),_:1})}Dt.render=Ht,Dt.__file="src/toolbar/editor.vue";var Ot=(0,Ft.aZ)({name:"am-link-preview",components:{ATooltip:Qt.Z},props:{language:{type:Object,required:!0},readonly:{type:Boolean,required:!0},href:String,className:String,onEdit:Function,onRemove:Function,onLoad:Function},setup(e){const t=e.language.get("link","link_open"),n=e.language.get("link","link_edit"),r=e.language.get("link","link_remove");return(0,Ft.bv)((()=>{e.onLoad&&e.onLoad()})),{openTitle:t,editTitle:n,removeTitle:r,isMobile:s.tq}}});const zt={class:"data-link-preview","data-element":"ui"},Zt=["href"],Rt={key:0,class:"data-link-op"};function Pt(e,t,n,r,i,o){const a=(0,Ft.up)("a-tooltip");return(0,Ft.wg)(),(0,Ft.iD)("div",zt,[(0,Ft.Wm)(a,{title:e.openTitle},{default:(0,Ft.w5)((()=>[(0,Ft._)("a",{class:"data-icon data-icon-link data-link-preview-open",href:e.href,target:"_blank"},(0,Mt.zw)(e.href),9,Zt)])),_:1},8,["title"]),e.readonly?(0,Ft.kq)("v-if",!0):((0,Ft.wg)(),(0,Ft.iD)("div",Rt,[e.isMobile?(0,Ft.kq)("v-if",!0):((0,Ft.wg)(),(0,Ft.j4)(a,{key:0,title:e.editTitle},{default:(0,Ft.w5)((()=>[(0,Ft._)("a",{class:"data-icon data-icon-edit",onClick:t[0]||(t[0]=(...t)=>e.onEdit&&e.onEdit(...t))})])),_:1},8,["title"])),e.isMobile?((0,Ft.wg)(),(0,Ft.iD)("a",{key:1,class:"data-icon data-icon-edit",onClick:t[1]||(t[1]=(...t)=>e.onEdit&&e.onEdit(...t))})):(0,Ft.kq)("v-if",!0),e.isMobile?(0,Ft.kq)("v-if",!0):((0,Ft.wg)(),(0,Ft.j4)(a,{key:2,title:e.removeTitle},{default:(0,Ft.w5)((()=>[(0,Ft._)("a",{class:"data-icon data-icon-unlink",onClick:t[2]||(t[2]=(...t)=>e.onRemove&&e.onRemove(...t))})])),_:1},8,["title"])),e.isMobile?((0,Ft.wg)(),(0,Ft.iD)("a",{key:3,class:"data-icon data-icon-unlink",onClick:t[3]||(t[3]=(...t)=>e.onRemove&&e.onRemove(...t))})):(0,Ft.kq)("v-if",!0)]))])}Ot.render=Pt,Ot.__file="src/toolbar/preview.vue";var qt=function(){function e(t,n){var i=this;(0,r.Z)(this,e),this.engine=void 0,this.root=void 0,this.target=void 0,this.options=void 0,this.mouseInContainer=!1,this.vm=void 0,this.position=void 0,this.engine=t;var o=this.engine.change;this.options=n,this.position=new s.Ly(this.engine),o.event.onWindow("mousedown",(function(e){if(e.target){var t=(0,s.$)(e.target),n=t.closest(".data-link-container");i.mouseInContainer=n&&n.length>0,t.inEditor()||i.mouseInContainer||i.hide()}}))}return(0,i.Z)(e,[{key:"create",value:function(){var e;if(this.target){var t=(0,s.$)(".data-link-container");0===t.length&&(t=(0,s.$)("<div ".concat(s.Zi,'="').concat(s.UI,'" class="data-link-container').concat(s.tq?" data-link-container-mobile":"",'"></div>'))),this.root=t;var n=null===(e=this.target.get())||void 0===e?void 0:e.getBoundingClientRect();n&&this.root.css({top:"".concat(window.pageYOffset+n.bottom+4,"px"),left:"".concat(window.pageXOffset,"px"),position:"absolute","z-index":125})}}},{key:"onOk",value:function(){var e=(0,_t.Z)(St().mark((function e(t,n){var r,i,o,a,s,l,c,A,u,d,h;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.target){e.next=2;break}return e.abrupt("return");case 2:if(r=this.engine.change,i=r.range.get(),r.rangePathBeforeCommand||(i.startNode.inEditor()||(i.select(this.target,!0),r.range.select(i)),r.cacheRangeBeforeCommand()),o=this.options||{},a=o.onConfirm,!a){e.next=12;break}return e.next=9,a(t,n);case 9:s=e.sent,t=s.text,n=s.link;case 12:if(this.target.attributes("href",n),t=""===t.trim()?n:t,l=this.target.text(),l===t){e.next=45;break}if(A=this.target.children(),!(A.length<3)){e.next=21;break}this.target.text(t),e.next=45;break;case 21:if(3!==A.length||!(null===(c=A.eq(1))||void 0===c?void 0:c.isText())){e.next=25;break}this.target.text(t),e.next=45;break;case 25:if(3!==A.length){e.next=44;break}u=A.eq(1);case 27:if(!u){e.next=42;break}if(h=u.children(),!(h.length>1||0===h.length)){e.next=34;break}return u.text(t),e.abrupt("break",42);case 34:if(!(null===(d=h.eq(0))||void 0===d?void 0:d.isText())){e.next=39;break}return u.text(t),e.abrupt("break",42);case 39:u=h;case 40:e.next=27;break;case 42:e.next=45;break;case 44:this.target.text(t);case 45:this.engine.inline.repairCursor(this.target),i.setStart(this.target.next(),1),i.setEnd(this.target.next(),1),r.apply(i),this.mouseInContainer=!1,this.hide();case 51:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"editor",value:function(e,t,n){var r=this,i=(0,It.ri)(Dt,{language:this.engine.language,defaultText:e,defaultLink:t,onLoad:function(){r.mouseInContainer=!0,n&&n()},onOk:function(e,t){return r.onOk(e,t)}});return i}},{key:"preview",value:function(e,t){var n=this,r=this.engine,i=r.change,o=r.inline,a=r.language,s=(0,It.ri)(Ot,{language:a,href:e,readonly:this.engine.readonly,onLoad:function(){t&&t()},onEdit:function(){n.target&&(n.mouseInContainer=!1,n.hide(void 0,!1),n.show(n.target,!0))},onRemove:function(){if(n.target){var e=i.range.get();e.select(n.target,!0),o.repairRange(e),i.range.select(e),i.cacheRangeBeforeCommand(),o.unwrap(),n.mouseInContainer=!1,n.target=void 0,n.hide()}}});return s}},{key:"show",value:function(e,t){var n,r,i,o=this;if(!(null===(n=this.target)||void 0===n?void 0:n.equal(e))||!(null===(r=this.root)||void 0===r||null===(i=r.parent())||void 0===i?void 0:i.length)){this.target=e,this.create();var a,s=e.text().replace(/\u200B/g,""),l=e.attributes("href"),c=this.root.get(),A=l&&!t||this.engine.readonly?"am-link-preview":"am-link-editor";if(this.vm&&this.vm._component.name===A){var u,d;if(!this.root||!this.target)return;return null===(u=this.position)||void 0===u||u.destroy(),void(null===(d=this.position)||void 0===d||d.bind(this.root,this.target))}this.vm&&(this.vm.unmount(),this.vm=void 0,null===(a=this.position)||void 0===a||a.destroy()),setTimeout((function(){var e,n;null===(e=o.position)||void 0===e||e.destroy(),null===(n=o.position)||void 0===n||n.bind(o.root,o.target),o.vm=l&&!t||o.engine.readonly?o.preview(l,(function(){var e;null===(e=o.position)||void 0===e||e.update()})):o.editor(s,l,(function(){var e;null===(e=o.position)||void 0===e||e.update()})),o.vm.mount(c)}),20)}}},{key:"hide",value:function(e,t){var n;if(!(e&&this.target&&e.equal(this.target))){var r=null===(n=this.root)||void 0===n?void 0:n.get();if(r&&!this.mouseInContainer){var i;if(this.vm)this.vm.unmount(),this.vm=void 0,null===(i=this.position)||void 0===i||i.destroy();if(this.root=void 0,this.target&&!this.target.attributes("href")){var o=this.engine,a=o.change,s=o.inline,l=a.range.get();l.select(this.target,!0),s.unwrap(l),a.apply(l.collapse(!0))}!1!==t&&(this.target=void 0)}}}}]),e}(),Kt={link:{text:"Text",link:"Link",text_placeholder:"Description text",link_placeholder:"Link address",link_open:"Open link",link_edit:"Edit link",link_remove:"Remove link",ok_button:"OK"}},Wt={link:{text:"文本",link:"链接",text_placeholder:"描述文本",link_placeholder:"链接地址",link_open:"打开链接",link_edit:"编辑链接",link_remove:"移除链接",ok_button:"确定"}},jt={"en-US":Kt,"zh-CN":Wt};function Vt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Gt=".data-link-container {\r\n max-width: 398px;\r\n display: inline-block;\r\n border: 1px solid #E8E8E8;\r\n border-radius: 4px;\r\n box-shadow: rgba(221, 221, 221, 0.5) 0px 1px 3px;\r\n background: white;\r\n}\r\n\r\n.data-link-container-mobile {\r\n max-width: calc(100vw - 20px);;\r\n}\r\n\r\n.data-link-container .data-link-editor {\r\n min-width: 365px;\r\n padding: 16px 12px;\r\n padding-bottom: 4px;\r\n}\r\n\r\n.data-link-container-mobile .data-link-editor {\r\n min-width: calc(100vw - 40px);\r\n padding: 8px 6px;\r\n}\r\n\r\n.data-link-container p {\r\n margin-top: 0;\r\n margin-bottom: 14px;\r\n}\r\n\r\n.data-link-container .itellyou-icon {\r\n color: #8590A6;\r\n font-size: 16px;\r\n}\r\n.data-link-preview {\r\n line-height: 16px;\r\n padding: 6px 8px;\r\n vertical-align: middle;\r\n white-space: nowrap;\r\n display: flex;\r\n justify-content:space-between;\r\n}\r\n.data-link-preview > * {\r\n display: block;\r\n}\r\n\r\n.data-link-preview a {\r\n display: inline-block;\r\n color: #595959;\r\n margin: 0px 0px 0px 8px;\r\n padding: 4px;\r\n}\r\n.data-link-preview a:hover {\r\n background: #F4F4F4;\r\n cursor: pointer;\r\n}\r\n.data-link-preview a.data-link-preview-open {\r\n color: #1890FF;\r\n max-width: 292px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n text-decoration: none;\r\n font-size: 14px;\r\n letter-spacing: 1.2px;\r\n vertical-align: middle;\r\n margin: 0;\r\n}\r\n.data-link-container-mobile .data-link-preview a.data-link-preview-open {\r\n max-width: 70%;\r\n}\r\n.data-link-preview a.data-link-preview-open::before\r\n{\r\n vertical-align: middle;\r\n margin-right: 2px;\r\n}\r\n\r\n.data-link-preview a.data-link-preview-open:hover{\r\n background: transparent;\r\n}";Vt(Gt);var $t="paste:each",Yt="markdown-it",Xt="parse:html",Jt="select",en=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.toolbar=void 0,e.attributes={target:"@var0",href:"@var1"},e.variable={"@var0":["_blank","_parent","_top","_self"],"@var1":{required:!0,value:"*"}},e.tagName="a",e.handleClick=function(t){if(t.target){var n=e.options.onLinkClick;if(n){var r=(0,s.$)(t.target).closest("".concat(e.tagName));r.name===e.tagName&&n(t,r.attributes("href"))}}},e.bindQuery=function(){e.query()},e.query=function(){var t,n=e.editor;if((0,s.iC)(n)){var r=n.change,i=r.inlines.find((function(t){return e.isSelf(t)}));if(null===(t=e.toolbar)||void 0===t||t.hide(i),i&&i.length>0&&!i.isCard()){var o,a,l=r.range.get();if(l.collapsed||i.contains(l.startNode)&&i.contains(l.endNode))return null===(o=e.toolbar)||void 0===o||o.show(i),!0;null===(a=e.toolbar)||void 0===a||a.hide()}return!1}},e.markdownIt=function(t){!1!==e.options.markdown&&(t.enable("link"),t.enable("linkify"))},e.pasteHtml=function(t){if(t.isText()){var n=t.text(),r=e.editor,i=r.node,o=r.inline;if(/^https?:\/\/\S+$/.test(n.toLowerCase().trim())&&o.closest(t).equal(t)){var a=i.wrap(t,(0,s.$)("<".concat(e.tagName,' target="_blank" href="').concat(decodeURI(n).trim().replace(/\u200b/g,""),'"></a>')));return o.repairCursor(a),!1}}else if("a"===t.name){var l=t.attributes("href");t.attributes("target","_blank"),t.attributes("href",decodeURI(l).trim().replace(/\u200b/g,""))}return!0},e.parseHtml=function(t){t.find(e.tagName).css({"font-family":"monospace","font-size":"inherit","background-color":"rgba(0,0,0,.06)",padding:"0 2px",border:"1px solid rgba(0,0,0,.08)","border-radius":"2px 2px","line-height":"inherit","overflow-wrap":"break-word","text-indent":"0"})},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&(!1!==this.options.enableToolbar&&(this.toolbar=new qt(e,{onConfirm:this.options.onConfirm})),e.container.on("click",this.handleClick),e.on(Yt,this.markdownIt),e.on($t,this.pasteHtml)),e.on(Xt,this.parseHtml),e.on(Jt,this.bindQuery),e.language.add(jt)}},{key:"hotkey",value:function(){return this.options.hotkey||{key:"mod+k",args:["_blank"]}}},{key:"execute",value:function(){var e=this,t=this.editor;if((0,s.iC)(t)){var n=t.inline,r=t.change;if(this.queryState()){var i=r.inlines.find((function(t){return e.isSelf(t)}));i&&i.length>0&&n.unwrap(i)}else{var o=(0,s.$)("<".concat(this.tagName," />"));this.setStyle.apply(this,[o].concat(Array.prototype.slice.call(arguments))),this.setAttributes.apply(this,[o].concat(Array.prototype.slice.call(arguments)));var a=arguments.length>2?arguments[2]:"";a?(o.text(a),n.insert(o)):n.wrap(o);var l,c=r.range.get();if(!c.collapsed&&r.inlines.length>0)null===(l=this.toolbar)||void 0===l||l.show(r.inlines[0])}}}},{key:"queryState",value:function(){return this.query()}},{key:"destroy",value:function(){var e=this.editor;e.container.off("click",this.handleClick),e.off($t,this.pasteHtml),e.off(Xt,this.parseHtml),e.off(Jt,this.bindQuery),e.off(Yt,this.markdownIt)}}],[{key:"pluginName",get:function(){return"link"}}]),n}(s.Cy),tn=en,nn=n(95082),rn=n(69767),on=n.n(rn),an=n(73738),sn=n.n(an),ln=n(44274),cn=(n(32515),n(67462),n(8365),n(16880),n(30029),n(44258),n(48314),n(69150),n(3341),n(18511),n(42797),n(62470),n(16107),n(59228),n(70189),n(36608),n(86788),n(152),n(14240),n(91909),n(89099),n(38722),n(4668),n(72989),n(33991),n(14040),n(84984),n(12492),n(70284),n(53810),n(43004),n(61804),n(37406),n(63348),["c","cpp","csharp","erlang","go","groovy","java","kotlin","makefile","objectivec","perl","python","rust","swift","vbnet"]),An={header:"color: blue;font-weight: bold;",quote:"color: #090;",negative:"color: #d44;",positive:"color: #292;",strong:"font-weight: bold;",em:"font-style: italic;",link:"text-decoration: underline;color: #00c;",strikethrough:"text-decoration: line-through;",keyword:"color: #d73a49;",atom:"color: #905;",number:"color: #005cc5;",def:"color: #005cc5;",variable:"","variable-2":"color: #005cc5;","variable-3":"color: #22863a;",type:"color: #22863a;",comment:"color: #6a737d;",string:"color: #690","string-2":"color: #690;",meta:"color: #1f7f9a;",qualifier:"color: #555;",builtin:"color: #6f42c1;",bracket:"color: #997;",tag:"color: #22863a;",attribute:"color: #6f42c1;",hr:"color: #999;",error:"color: #f00;",invalidchar:"color: #f00;",operator:"color: #d73a49;",property:"color: #005cc5;"},un=function(){function e(t,n){(0,r.Z)(this,e),this.editor=void 0,this.options=void 0,this.styleMap=void 0,this.codeMirror=void 0,this.mode="plain",this.container=void 0,this.editor=t,this.options=n,this.styleMap=(0,nn.Z)((0,nn.Z)({},An),n.styleMap),this.container=n.container||(0,s.$)(this.renderTemplate())}return(0,i.Z)(e,[{key:"renderTemplate",value:function(){return'<div class="data-codeblock-container"><div class="data-codeblock-content"></div></div>'}},{key:"getConfig",value:function(e,t){var n=this.codeMirror,r=this.editor,i=n?n.getOption("indentUnit"):cn.indexOf(t||"")>-1?4:2,o=e?e.match(/^ {2,4}(?=[^\s])/gm):null;return o&&(i=o.reduce((function(e,t){return Math.min(e,t.length)}),1/0)),{tabSize:i,indentUnit:i,scrollbarStyle:"simple",readOnly:!(0,s.iC)(r)||r.readonly,viewportMargin:1/0}}},{key:"getSyntax",value:function(e){return this.options.synatxMap[e]||e}},{key:"create",value:function(e,t,n){var r=this;this.mode=e;var i=this.getSyntax(e),o=on()(this.container.find(".data-codeblock-content").get(),(0,nn.Z)((0,nn.Z)({value:t,mode:i,lineNumbers:!0,lineWrapping:!1,autofocus:!1,dragDrop:!1},this.getConfig(t,i)),n));return o.on("focus",(function(){var e=r.options.onFocus;e&&e()})),o.on("blur",(function(){var e=r.options.onBlur;e&&e()})),s.tq?o.on("touchstart",(function(e,t){var n=r.options.onMouseDown;n&&n(t)})):o.on("mousedown",(function(e,t){var n=r.options.onMouseDown;2===t.button&&t.stopPropagation(),n&&n(t)})),o.on("change",sn()((function(){(0,s.iC)(r.editor)&&r.save()}),50)),o.setOption("extraKeys",{Enter:function(e){var t=r.getConfig(e.getValue());Object.keys(t).forEach((function(n){return e.setOption(n,t[n])})),e.execCommand("newlineAndIndent")}}),o.on("keydown",(function(e,t){((0,s.P6)("mod+z",t)||(0,s.P6)("mod+y",t)||(0,s.P6)("mod+shift+z",t))&&t.stopPropagation();var n=e.lineCount(),i=e.getCursor(),o=i.line,a=i.ch,l=r.options,c=l.onUpFocus,A=l.onDownFocus,u=l.onLeftFocus,d=l.onRightFocus,h=e.getLine(o);if(o===n-1&&a===h.length){if((0,s.P6)("down",t)||(0,s.P6)("ctrl+n",t))return void(A&&A(t));if((0,s.P6)("right",t)||(0,s.P6)("shift+right",t)||(0,s.P6)("ctrl+e",t)||(0,s.P6)("ctrl+f",t))return void(d&&d(t))}0===o&&0===a&&((0,s.P6)("up",t)||(0,s.P6)("ctrl+p",t)?c&&c(t):((0,s.P6)("left",t)||(0,s.P6)("shift+left",t)||(0,s.P6)("ctrl+b",t)||(0,s.P6)("ctrl+a",t))&&u&&u(t))})),this.container.on("mousedown",(function(e){(null===o||void 0===o?void 0:o.hasFocus())||setTimeout((function(){null===o||void 0===o||o.focus()}),0)})),this.codeMirror=o,this.codeMirror}},{key:"setAutoWrap",value:function(e){var t;null===(t=this.codeMirror)||void 0===t||t.setOption("lineWrapping",e)}},{key:"update",value:function(e,t){this.mode=e;var n=this.codeMirror,r=this.editor;void 0!==t&&(null===n||void 0===n||n.setValue(t)),null===n||void 0===n||n.setOption("mode",this.getSyntax(e)),null===n||void 0===n||n.setOption("readOnly",!((0,s.iC)(r)&&!r.readonly)),this.save()}},{key:"render",value:function(e,t,n){var r=this.container.find(".data-codeblock-content");e=this.getSyntax(e);var i=(0,s.$)('<div style="font-family: monospace;font-size: 13px; line-height: 21px; color: #595959; direction: ltr; height: auto; overflow: hidden;background: transparent;"><pre style="color: rgb(89, 89, 89); margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" /></div>');r.append(i);var o=i.find("pre")[0];this.runMode(t||"",e,o,(0,nn.Z)((0,nn.Z)({},this.getConfig(t,e)),n))}},{key:"save",value:function(){var e=this.codeMirror,t=this.editor;if((0,s.iC)(t)&&e&&!t.change.isComposing()){var n=e.getValue(),r=this.options.onSave;r&&r(this.mode,n)}}},{key:"focus",value:function(){var e=this.codeMirror;e&&e.focus()}},{key:"select",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.codeMirror;if(t)if(t.focus(),e)t.setSelection({line:0,ch:0});else{var n=t.lineCount()-1,r=t.getLine(n);t.setSelection({line:n,ch:r.length})}}},{key:"toHtml",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i=i||on().defaults.tabSize;for(var o="",a="",l=0;;){var c=t.indexOf("\t",l);if(-1===c){a+=t.slice(l),e+=t.length-l;break}e+=c-l,a+=t.slice(l,c);var A=i-e%i;e+=A;for(var u=0;u<A;++u)a+=" ";l=c+1}if(r){var d="";r.split(" ").forEach((function(e){var t;d+=null!==(t=n.styleMap[e])&&void 0!==t?t:""}));var h="<span ".concat(d?'style="'.concat(d,'"'):"",">").concat((0,s.YU)(a),"</span>");o+=h}else o+=a;return o}},{key:"runMode",value:function(e,t,n,r){var i=on().getMode(on().defaults,t),o=r&&r.tabSize||on().defaults.tabSize,a=n,s=0;a.innerHTML="";for(var l="",c=on().splitLines(e),A=r&&r.state||on().startState(i),u=0,d=c.length;u<d;++u){u&&(l+="<br />",s=0);var h=new(on().StringStream)(c[u]);!h.string&&i.blankLine&&i.blankLine(A);while(!h.eol()){var p=i.token?i.token(h,A):"";l+=this.toHtml(s,h.current(),p||"",o),h.start=h.pos}}a.innerHTML=l}},{key:"destroy",value:function(){this.container.remove()}}]),e}();const dn=ln.ZP.Option;var hn=(0,Ft.aZ)({name:"am-codeblock-select",components:{ASelect:ln.ZP,ASelectOption:dn},props:{modeDatas:Array,defaultValue:String,getContainer:Function,onSelect:Function},methods:{filter(e,t){e=e.toLowerCase();const n=t.key||"";let r=t.name||"";return r=r.toLowerCase(),n.includes(e)||r.includes(e)}}});function pn(e,t,n,r,i,o){const a=(0,Ft.up)("a-select-option"),s=(0,Ft.up)("a-select");return(0,Ft.wg)(),(0,Ft.j4)(s,{"show-search":!0,size:"small",bordered:!1,style:{"min-width":"128px"},"default-value":e.defaultValue,"get-popup-container":e.getContainer,onSelect:e.onSelect,"filter-option":e.filter},{default:(0,Ft.w5)((()=>[((0,Ft.wg)(!0),(0,Ft.iD)(Ft.HY,null,(0,Ft.Ko)(e.modeDatas,(e=>((0,Ft.wg)(),(0,Ft.j4)(a,{name:e.name,value:e.value,key:e.value},{default:(0,Ft.w5)((()=>[(0,Ft.Uk)((0,Mt.zw)(e.name),1)])),_:2},1032,["name","value"])))),128))])),_:1},8,["default-value","get-popup-container","onSelect","filter-option"])}hn.render=pn,hn.__file="src/component/select/component.vue";var fn=function(e,t,n,r){var i=(0,It.ri)(hn,{modeDatas:t,defaultValue:n,getContainer:e?function(){return e}:void 0,onSelect:r});return i.mount(e),i},gn=[{value:"plain",syntax:"simplemode",name:"Plain Text"},{value:"bash",syntax:"shell",name:"Bash"},{value:"basic",syntax:"vbscript",name:"Basic"},{value:"c",syntax:"text/x-csrc",name:"C"},{value:"cpp",syntax:"text/x-c++src",alias:["c++"],name:"C++"},{value:"csharp",syntax:"text/x-csharp",alias:["c#"],name:"C#"},{value:"css",syntax:"css",name:"CSS"},{value:"dart",syntax:"dart",name:"Dart"},{value:"diff",syntax:"diff",name:"Diff"},{value:"dockerfile",syntax:"dockerfile",name:"Dockerfile"},{value:"erlang",syntax:"erlang",name:"Erlang"},{value:"git",syntax:"shell",name:"Git"},{value:"go",syntax:"go",alias:["golang"],name:"Go"},{value:"graphql",syntax:"simplemode",name:"GraphQL"},{value:"groovy",syntax:"groovy",name:"Groovy"},{value:"html",syntax:"htmlmixed",name:"HTML",alias:["html5"]},{value:"http",syntax:"http",name:"HTTP"},{value:"java",syntax:"text/x-java",name:"Java"},{value:"javascript",syntax:"text/javascript",name:"JavaScript",alias:["js"]},{value:"json",syntax:"application/json",name:"JSON"},{value:"jsx",syntax:"jsx",name:"JSX"},{value:"katex",syntax:"simplemode",name:"KaTeX"},{value:"kotlin",syntax:"text/x-kotlin",name:"Kotlin"},{value:"less",syntax:"css",name:"Less"},{value:"makefile",syntax:"cmake",name:"Makefile"},{value:"markdown",syntax:"markdown",name:"Markdown"},{value:"matlab",syntax:"octave",name:"MATLAB"},{value:"nginx",syntax:"nginx",name:"Nginx"},{value:"objectivec",syntax:"text/x-objectivec",name:"Objective-C"},{value:"pascal",syntax:"pascal",name:"Pascal"},{value:"perl",syntax:"perl",name:"Perl"},{value:"php",syntax:"php",name:"PHP"},{value:"powershell",syntax:"powershell",name:"PowerShell"},{value:"protobuf",syntax:"protobuf",name:"Protobuf"},{value:"python",syntax:"python",name:"Python",alias:["py"]},{value:"r",syntax:"r",name:"R"},{value:"ruby",syntax:"ruby",name:"Ruby"},{value:"rust",syntax:"rust",name:"Rust"},{value:"scala",syntax:"text/x-scala",name:"Scala"},{value:"shell",syntax:"shell",name:"Shell"},{value:"sql",syntax:"text/x-sql",name:"SQL"},{value:"swift",syntax:"swift",name:"Swift"},{value:"typescript",syntax:"text/typescript",name:"TypeScript",alias:["ts"]},{value:"vbnet",syntax:"vb",name:"VB.net"},{value:"velocity",syntax:"velocity",name:"Velocity"},{value:"xml",syntax:"xml",name:"XML"},{value:"yaml",syntax:"yaml",name:"YAML"}];function mn(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var vn=".data-codeblock-container {\r\n position: relative;\r\n padding: 0;\r\n overflow: visible;\r\n border: 1px solid #e8e8e8;\r\n border-radius: 2px 2px;\r\n text-indent: 0;\r\n }\r\n \r\n .data-codeblock-container .am-embed-toolbar-item {\r\n float: right;\r\n line-height: 32px;\r\n }\r\n \r\n .data-codeblock-content {\r\n background: #f9f9f9;\r\n overflow: auto;\r\n }\r\n \r\n .am-engine .CodeMirror,\r\n .am-engine-view .CodeMirror {\r\n font-family: monospace;\r\n font-size: 13px;\r\n line-height: 21px;\r\n color: #595959;\r\n direction: ltr;\r\n height: auto;\r\n overflow: hidden;\r\n background: transparent;\r\n }\r\n \r\n .am-engine .CodeMirror-lines,\r\n .am-engine-view .CodeMirror-lines {\r\n padding: 8px 0;\r\n }\r\n \r\n .am-engine .CodeMirror-scrollbar-filler,\r\n .am-engine-view .CodeMirror-scrollbar-filler,\r\n .am-engine .CodeMirror-gutter-filler,\r\n .am-engine-view .CodeMirror-gutter-filler {\r\n background-color: white;\r\n \r\n /* The little square between H and V scrollbars */\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutters,\r\n .am-engine-view .CodeMirror-gutters {\r\n border: 0;\r\n white-space: nowrap;\r\n padding: 0 8px;\r\n background-color: unset;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-linenumber,\r\n .am-engine-view .CodeMirror-linenumber {\r\n padding: 0;\r\n min-width: 20px;\r\n text-align: right;\r\n color: #BFBFBF;\r\n white-space: nowrap;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-guttermarker,\r\n .am-engine-view .CodeMirror-guttermarker {\r\n color: black;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-guttermarker-subtle,\r\n .am-engine-view .CodeMirror-guttermarker-subtle {\r\n color: #999;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-cursor,\r\n .am-engine-view .CodeMirror-cursor {\r\n border-left: 1px solid black;\r\n border-right: none;\r\n width: 0;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror div.CodeMirror-secondarycursor,\r\n .am-engine-view .CodeMirror div.CodeMirror-secondarycursor {\r\n border-left: 1px solid silver;\r\n \r\n }\r\n \r\n .am-engine .cm-fat-cursor .CodeMirror-cursor,\r\n .am-engine-view .cm-fat-cursor .CodeMirror-cursor {\r\n width: auto;\r\n border: 0 !important;\r\n background: #7e7;\r\n \r\n }\r\n \r\n .am-engine .cm-fat-cursor div.CodeMirror-cursors,\r\n .am-engine-view .cm-fat-cursor div.CodeMirror-cursors {\r\n z-index: 1;\r\n \r\n }\r\n \r\n .am-engine .cm-fat-cursor-mark,\r\n .am-engine-view .cm-fat-cursor-mark {\r\n background-color: rgba(20, 255, 20, 0.5);\r\n -webkit-animation: blink 1.06s steps(1) infinite;\r\n animation: blink 1.06s steps(1) infinite;\r\n \r\n }\r\n \r\n .am-engine .cm-animate-fat-cursor,\r\n .am-engine-view .cm-animate-fat-cursor {\r\n width: auto;\r\n border: 0;\r\n -webkit-animation: blink 1.06s steps(1) infinite;\r\n animation: blink 1.06s steps(1) infinite;\r\n background-color: #7e7;\r\n \r\n }\r\n \r\n @-webkit-keyframes blink {\r\n 50% {\r\n background-color: transparent;\r\n \r\n }\r\n \r\n \r\n }\r\n \r\n @keyframes blink {\r\n 50% {\r\n background-color: transparent;\r\n \r\n }\r\n \r\n \r\n }\r\n \r\n .am-engine .cm-tab,\r\n .am-engine-view .cm-tab {\r\n display: inline-block;\r\n text-decoration: inherit;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-rulers,\r\n .am-engine-view .CodeMirror-rulers {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: -50px;\r\n bottom: -20px;\r\n overflow: hidden;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-ruler,\r\n .am-engine-view .CodeMirror-ruler {\r\n border-left: 1px solid #ccc;\r\n top: 0;\r\n bottom: 0;\r\n position: absolute;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-header,\r\n .am-engine-view .cm-s-default .cm-header {\r\n color: blue;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-quote,\r\n .am-engine-view .cm-s-default .cm-quote {\r\n color: #090;\r\n \r\n }\r\n \r\n .am-engine .cm-negative,\r\n .am-engine-view .cm-negative {\r\n color: #d44;\r\n \r\n }\r\n \r\n .am-engine .cm-positive,\r\n .am-engine-view .cm-positive {\r\n color: #292;\r\n \r\n }\r\n \r\n .am-engine .cm-header,\r\n .am-engine-view .cm-header,\r\n .am-engine .cm-strong,\r\n .am-engine-view .cm-strong {\r\n font-weight: bold;\r\n \r\n }\r\n \r\n .am-engine .cm-em,\r\n .am-engine-view .cm-em {\r\n font-style: italic;\r\n \r\n }\r\n \r\n .am-engine .cm-link,\r\n .am-engine-view .cm-link {\r\n text-decoration: underline;\r\n \r\n }\r\n \r\n .am-engine .cm-strikethrough,\r\n .am-engine-view .cm-strikethrough {\r\n text-decoration: line-through;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-keyword,\r\n .am-engine-view .cm-s-default .cm-keyword {\r\n color: #d73a49;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-atom,\r\n .am-engine-view .cm-s-default .cm-atom {\r\n color: #905;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-number,\r\n .am-engine-view .cm-s-default .cm-number {\r\n color: #005cc5;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-def,\r\n .am-engine-view .cm-s-default .cm-def {\r\n color: #005cc5;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-variable-2,\r\n .am-engine-view .cm-s-default .cm-variable-2 {\r\n color: #005cc5;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-variable-3,\r\n .am-engine-view .cm-s-default .cm-variable-3,\r\n .am-engine .cm-s-default .cm-type,\r\n .am-engine-view .cm-s-default .cm-type {\r\n color: #22863a;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-comment,\r\n .am-engine-view .cm-s-default .cm-comment {\r\n color: #6a737d;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-string,\r\n .am-engine-view .cm-s-default .cm-string {\r\n color: #690;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-string-2,\r\n .am-engine-view .cm-s-default .cm-string-2 {\r\n color: #690;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-meta,\r\n .am-engine-view .cm-s-default .cm-meta {\r\n color: #1f7f9a;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-qualifier,\r\n .am-engine-view .cm-s-default .cm-qualifier {\r\n color: #555;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-builtin,\r\n .am-engine-view .cm-s-default .cm-builtin {\r\n color: #6f42c1;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-bracket,\r\n .am-engine-view .cm-s-default .cm-bracket {\r\n color: #997;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-tag,\r\n .am-engine-view .cm-s-default .cm-tag {\r\n color: #22863a;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-attribute,\r\n .am-engine-view .cm-s-default .cm-attribute {\r\n color: #6f42c1;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-hr,\r\n .am-engine-view .cm-s-default .cm-hr {\r\n color: #999;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-link,\r\n .am-engine-view .cm-s-default .cm-link {\r\n color: #00c;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-error,\r\n .am-engine-view .cm-s-default .cm-error {\r\n color: #f00;\r\n \r\n }\r\n \r\n .am-engine .cm-invalidchar,\r\n .am-engine-view .cm-invalidchar {\r\n color: #f00;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-operator,\r\n .am-engine-view .cm-s-default .cm-operator {\r\n color: #d73a49;\r\n \r\n }\r\n \r\n .am-engine .cm-s-default .cm-property,\r\n .am-engine-view .cm-s-default .cm-property {\r\n color: #005cc5;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-composing,\r\n .am-engine-view .CodeMirror-composing {\r\n border-bottom: 2px solid;\r\n \r\n }\r\n \r\n .am-engine div.CodeMirror span.CodeMirror-matchingbracket,\r\n .am-engine-view div.CodeMirror span.CodeMirror-matchingbracket {\r\n color: #0b0;\r\n \r\n }\r\n \r\n .am-engine div.CodeMirror span.CodeMirror-nonmatchingbracket,\r\n .am-engine-view div.CodeMirror span.CodeMirror-nonmatchingbracket {\r\n color: #a22;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-matchingtag,\r\n .am-engine-view .CodeMirror-matchingtag {\r\n background: rgba(255, 150, 0, 0.3);\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-activeline-background,\r\n .am-engine-view .CodeMirror-activeline-background {\r\n background: transparent;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-scroll,\r\n .am-engine-view .CodeMirror-scroll {\r\n overflow: scroll !important;\r\n \r\n /* Things will break if this is overridden */\r\n \r\n /* 30px is the magic margin used to hide the element's real scrollbars */\r\n \r\n /* See overflow: hidden in .CodeMirror */\r\n margin-bottom: -50px;\r\n margin-right: -50px;\r\n padding-bottom: 50px;\r\n outline: none;\r\n \r\n /* Prevent dragging from highlighting the element */\r\n position: relative;\r\n z-index: 0;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-sizer,\r\n .am-engine-view .CodeMirror-sizer {\r\n position: relative;\r\n border-right: 50px solid transparent;\r\n min-height: auto !important;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-vscrollbar,\r\n .am-engine-view .CodeMirror-vscrollbar,\r\n .am-engine .CodeMirror-hscrollbar,\r\n .am-engine-view .CodeMirror-hscrollbar,\r\n .am-engine .CodeMirror-scrollbar-filler,\r\n .am-engine-view .CodeMirror-scrollbar-filler,\r\n .am-engine .CodeMirror-gutter-filler,\r\n .am-engine-view .CodeMirror-gutter-filler {\r\n position: absolute;\r\n z-index: 6;\r\n display: none;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-vscrollbar,\r\n .am-engine-view .CodeMirror-vscrollbar {\r\n right: 0;\r\n top: 0;\r\n overflow-x: hidden;\r\n overflow-y: scroll;\r\n display: none;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-hscrollbar,\r\n .am-engine-view .CodeMirror-hscrollbar {\r\n bottom: 0;\r\n left: 0;\r\n overflow-y: hidden;\r\n overflow-x: scroll;\r\n display: none;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-scrollbar-filler,\r\n .am-engine-view .CodeMirror-scrollbar-filler {\r\n right: 0;\r\n bottom: 0;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-filler,\r\n .am-engine-view .CodeMirror-gutter-filler {\r\n left: 0;\r\n bottom: 0;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutters,\r\n .am-engine-view .CodeMirror-gutters {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n min-height: 100%;\r\n background: #f9f9f9;\r\n z-index: 3;\r\n }\r\n \r\n .am-engine .CodeMirror-gutter,\r\n .am-engine-view .CodeMirror-gutter {\r\n white-space: normal;\r\n height: 100%;\r\n display: inline-block;\r\n vertical-align: top;\r\n margin-bottom: -30px;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-wrapper,\r\n .am-engine-view .CodeMirror-gutter-wrapper {\r\n position: absolute;\r\n z-index: 4;\r\n background: none !important;\r\n border: none !important;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-background,\r\n .am-engine-view .CodeMirror-gutter-background {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n z-index: 4;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-elt,\r\n .am-engine-view .CodeMirror-gutter-elt {\r\n position: absolute;\r\n cursor: default;\r\n z-index: 4;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-wrapper ::-moz-selection,\r\n .am-engine-view .CodeMirror-gutter-wrapper ::-moz-selection {\r\n background-color: transparent;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-wrapper ::selection,\r\n .am-engine-view .CodeMirror-gutter-wrapper ::selection {\r\n background-color: transparent;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-gutter-wrapper ::-moz-selection,\r\n .am-engine-view .CodeMirror-gutter-wrapper ::-moz-selection {\r\n background-color: transparent;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-lines,\r\n .am-engine-view .CodeMirror-lines {\r\n cursor: text;\r\n min-height: 40px;\r\n \r\n /* prevents collapsing before first draw */\r\n \r\n }\r\n \r\n .am-engine .CodeMirror pre,\r\n .am-engine-view .CodeMirror pre {\r\n \r\n /* Reset some styles that the rest of the page might have set */\r\n border-radius: 0;\r\n border-width: 0;\r\n background: transparent;\r\n font-family: inherit;\r\n font-size: inherit;\r\n margin: 0;\r\n white-space: pre;\r\n word-wrap: normal;\r\n line-height: inherit;\r\n color: inherit;\r\n z-index: 2;\r\n position: relative;\r\n overflow: visible;\r\n -webkit-tap-highlight-color: transparent;\r\n font-variant-ligatures: contextual;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-wrap pre,\r\n .am-engine-view .CodeMirror-wrap pre {\r\n word-wrap: break-word;\r\n white-space: pre-wrap;\r\n word-break: normal;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-linebackground,\r\n .am-engine-view .CodeMirror-linebackground {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n bottom: 0;\r\n z-index: 0;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-linewidget,\r\n .am-engine-view .CodeMirror-linewidget {\r\n position: relative;\r\n z-index: 2;\r\n padding: 0.1px;\r\n \r\n /* Force widget margins to stay inside of the container */\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-rtl pre,\r\n .am-engine-view .CodeMirror-rtl pre {\r\n direction: rtl;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-code,\r\n .am-engine-view .CodeMirror-code {\r\n outline: none;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-scroll,\r\n .am-engine-view .CodeMirror-scroll,\r\n .am-engine .CodeMirror-sizer,\r\n .am-engine-view .CodeMirror-sizer,\r\n .am-engine .CodeMirror-gutter,\r\n .am-engine-view .CodeMirror-gutter,\r\n .am-engine .CodeMirror-gutters,\r\n .am-engine-view .CodeMirror-gutters,\r\n .am-engine .CodeMirror-linenumber,\r\n .am-engine-view .CodeMirror-linenumber {\r\n box-sizing: content-box;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-simplescroll-horizontal, .am-engine-view .CodeMirror-simplescroll-horizontal {\r\n bottom: 4px;\r\n cursor: pointer;\r\n }\r\n \r\n .am-engine .CodeMirror-measure,\r\n .am-engine-view .CodeMirror-measure {\r\n position: absolute;\r\n width: 100%;\r\n height: 0;\r\n overflow: hidden;\r\n visibility: hidden;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-cursor,\r\n .am-engine-view .CodeMirror-cursor {\r\n position: absolute;\r\n pointer-events: none;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-measure pre,\r\n .am-engine-view .CodeMirror-measure pre {\r\n position: static;\r\n \r\n }\r\n \r\n .am-engine div.CodeMirror-cursors,\r\n .am-engine-view div.CodeMirror-cursors {\r\n visibility: hidden;\r\n position: relative;\r\n z-index: 3;\r\n \r\n }\r\n \r\n .am-engine div.CodeMirror-dragcursors,\r\n .am-engine-view div.CodeMirror-dragcursors {\r\n visibility: visible;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-focused div.CodeMirror-cursors,\r\n .am-engine-view .CodeMirror-focused div.CodeMirror-cursors {\r\n visibility: visible;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-selected,\r\n .am-engine-view .CodeMirror-selected {\r\n background: #e8e8e8;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-focused .CodeMirror-selected,\r\n .am-engine-view .CodeMirror-focused .CodeMirror-selected {\r\n background: #b3d7fd;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-crosshair,\r\n .am-engine-view .CodeMirror-crosshair {\r\n cursor: crosshair;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-line::-moz-selection,\r\n .am-engine-view .CodeMirror-line::-moz-selection,\r\n .am-engine .CodeMirror-line>span::-moz-selection,\r\n .am-engine-view .CodeMirror-line>span::-moz-selection,\r\n .am-engine .CodeMirror-line>span>span::-moz-selection,\r\n .am-engine-view .CodeMirror-line>span>span::-moz-selection {\r\n background: #b3d7fd;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-line::selection,\r\n .am-engine-view .CodeMirror-line::selection,\r\n .am-engine .CodeMirror-line>span::selection,\r\n .am-engine-view .CodeMirror-line>span::selection,\r\n .am-engine .CodeMirror-line>span>span::selection,\r\n .am-engine-view .CodeMirror-line>span>span::selection {\r\n background: #b3d7fd;\r\n \r\n }\r\n \r\n .am-engine .CodeMirror-line::-moz-selection,\r\n .am-engine-view .CodeMirror-line::-moz-selection,\r\n .am-engine .CodeMirror-line>span::-moz-selection,\r\n .am-engine-view .CodeMirror-line>span::-moz-selection,\r\n .am-engine .CodeMirror-line>span>span::-moz-selection,\r\n .am-engine-view .CodeMirror-line>span>span::-moz-selection {\r\n background: #b3d7fd;\r\n \r\n }\r\n \r\n .am-engine .cm-searching,\r\n .am-engine-view .cm-searching {\r\n background-color: #ffa;\r\n background-color: rgba(255, 255, 0, 0.4);\r\n \r\n }\r\n \r\n .am-engine .cm-force-border,\r\n .am-engine-view .cm-force-border {\r\n padding-right: 0.1px;\r\n \r\n }\r\n \r\n @media print {\r\n \r\n /* .am-engine,\r\n .am-engine-view { */\r\n \r\n /* Hide the cursor when printing */\r\n \r\n /* } */\r\n \r\n .am-engine .CodeMirror div.CodeMirror-cursors,\r\n .am-engine-view .CodeMirror div.CodeMirror-cursors {\r\n visibility: hidden;\r\n \r\n }\r\n \r\n \r\n }\r\n \r\n .am-engine .cm-tab-wrap-hack:after,\r\n .am-engine-view .cm-tab-wrap-hack:after {\r\n content: '';\r\n \r\n }\r\n \r\n .am-engine span.CodeMirror-selectedtext,\r\n .am-engine-view span.CodeMirror-selectedtext {\r\n background: none;\r\n \r\n }\r\n \r\n .am-engine-view .data-codeblock-container {\r\n margin: 5px 0;\r\n \r\n }\r\n \r\n .am-content-editor .am-engine .data-codeblock-container .CodeMirror-lines {\r\n min-height: 40px;\r\n }";mn(vn);var bn=(0,F.Z)("modeNameMap"),yn=(0,F.Z)("modeSynatxMap"),wn=(0,F.Z)("viewAutoWrap"),xn=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.mirror=void 0,e.resize=function(){var t;return null===(t=e.codeEditor)||void 0===t?void 0:t.container.find(".data-codeblock-content")},e.codeEditor=void 0,Object.defineProperty((0,E.Z)(e),bn,{writable:!0,value:{}}),Object.defineProperty((0,E.Z)(e),yn,{writable:!0,value:{}}),Object.defineProperty((0,E.Z)(e),wn,{writable:!0,value:void 0}),e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this;if(!s.sk&&((0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this),!this.codeEditor)){gn.forEach((function(t){(0,S.Z)(e,bn)[bn][t.value]=t.name,(0,S.Z)(e,yn)[yn][t.value]=t.syntax,t.alias&&t.alias.forEach((function(n){(0,S.Z)(e,bn)[bn][n]=t.name,(0,S.Z)(e,yn)[yn][n]=t.syntax}))}));var t=this.editor;this.codeEditor=new un(t,{synatxMap:(0,S.Z)(this,yn)[yn],onSave:function(t,n){var r=e.getValue();t===(null===r||void 0===r?void 0:r.mode)&&n===r.code||e.setValue({mode:t,code:n})},onMouseDown:function(n){e.activated||setTimeout((function(){t.card.activate(e.root,s.Fp.MOUSE_DOWN)}),10)},onUpFocus:function(n){var r;if((0,s.iC)(t)){n.preventDefault();var i=t.change,o=t.card,a=i.range.get().cloneRange(),l=e.root.prev(),c=l?o.find(l):void 0;if(null===c||void 0===c?void 0:c.onSelectUp)c.onSelectUp(n);else{if(!l)return e.focus(a,!0),void i.range.select(a);o.focusPrevBlock(e,a,!1),i.range.select(a)}e.activate(!1),null===(r=e.toolbarModel)||void 0===r||r.hide()}},onDownFocus:function(n){var r;if((0,s.iC)(t)){n.preventDefault();var i=t.change,o=t.card,a=i.range.get().cloneRange(),l=e.root.next(),c=l?o.find(l):void 0;if(null===c||void 0===c?void 0:c.onSelectDown)c.onSelectDown(n);else{if(!l)return e.focus(a,!1),void i.range.select(a);o.focusNextBlock(e,a,!1),i.range.select(a)}e.activate(!1),null===(r=e.toolbarModel)||void 0===r||r.hide()}},onLeftFocus:function(n){var r;if((0,s.iC)(t)){n.preventDefault();var i=t.change,o=i.range.get().cloneRange();e.focus(o,!0),i.range.select(o),e.activate(!1),null===(r=e.toolbarModel)||void 0===r||r.hide()}},onRightFocus:function(n){var r;if((0,s.iC)(t)){n.preventDefault();var i=t.change,o=i.range.get().cloneRange();e.focus(o,!1),i.range.select(o),e.activate(!1),null===(r=e.toolbarModel)||void 0===r||r.hide()}}})}}},{key:"toolbar",value:function(){var e,t=this,r=this.editor,i=function(){return t.loading?[]:!(0,s.iC)(r)||r.readonly?[{key:"copy",type:"copy"},{key:"autoWrap",type:"switch",content:r.language.get(n.cardName,"autoWrap"),getState:function(){var e;void 0===(0,S.Z)(t,wn)[wn]&&((0,S.Z)(t,wn)[wn]=!!(null===(e=t.getValue())||void 0===e?void 0:e.autoWrap));return(0,S.Z)(t,wn)[wn]},onClick:function(){var e,n=!(0,S.Z)(t,wn)[wn];(0,S.Z)(t,wn)[wn]=n,null===(e=t.codeEditor)||void 0===e||e.setAutoWrap(n)}}]:[{key:"dnd",type:"dnd"},{key:"copy",type:"copy"},{key:"delete",type:"delete"},{key:"select",type:"node",node:(0,s.$)("<div />"),didMount:function(e){setTimeout((function(){fn(e.get(),t.constructor.getModes(),(0,S.Z)(t,bn)[bn][t.codeEditor.mode]||t.codeEditor.mode||"plain",(function(e){setTimeout((function(){t.focusEditor(),t.codeEditor&&(0,Tt.IU)(t.codeEditor).update(e)}),100)}))}),100)}},{key:"autoWrap",type:"switch",content:r.language.get(n.cardName,"autoWrap"),getState:function(){var e;return!!(null===(e=t.getValue())||void 0===e?void 0:e.autoWrap)},onClick:function(){var e,n=t.getValue(),r=!(null===n||void 0===n?void 0:n.autoWrap);t.setValue({autoWrap:r}),null===(e=t.codeEditor)||void 0===e||e.setAutoWrap(r)}}]},o=null===(e=r.plugin.findPlugin("codeblock"))||void 0===e?void 0:e.options;return(null===o||void 0===o?void 0:o.cardToolbars)?o.cardToolbars(i(),this.editor):i()}},{key:"focusEditor",value:function(){var e;null===(e=this.codeEditor)||void 0===e||e.focus(),this.editor.card.activate(this.root)}},{key:"onSelectLeft",value:function(e){var t;this.codeEditor&&(e.preventDefault(),this.codeEditor.select(!1),this.activate(!0),null===(t=this.toolbarModel)||void 0===t||t.show())}},{key:"onSelectRight",value:function(e){var t;this.codeEditor&&(e.preventDefault(),this.codeEditor.select(!0),this.activate(!0),null===(t=this.toolbarModel)||void 0===t||t.show())}},{key:"onSelectDown",value:function(e){var t;this.codeEditor&&(e.preventDefault(),this.codeEditor.select(!0),this.activate(!0),null===(t=this.toolbarModel)||void 0===t||t.show())}},{key:"onSelectUp",value:function(e){var t;this.codeEditor&&(e.preventDefault(),this.codeEditor.select(!1),this.activate(!0),null===(t=this.toolbarModel)||void 0===t||t.show())}},{key:"render",value:function(){if(this.codeEditor){this.codeEditor.container.inEditor()||(this.codeEditor.container=(0,s.$)(this.codeEditor.renderTemplate()),this.mirror=void 0,this.getCenter().empty().append(this.codeEditor.container));var e=this.getValue(),t=(null===e||void 0===e?void 0:e.mode)||"plain",n=(null===e||void 0===e?void 0:e.code)||"";if((0,s.iC)(this.editor)){var r;if(this.mirror)return this.codeEditor.update(t,n),void this.codeEditor.setAutoWrap(!!(null===e||void 0===e?void 0:e.autoWrap));this.mirror=null===(r=this.codeEditor)||void 0===r?void 0:r.create(t,n,{lineWrapping:!!(null===e||void 0===e?void 0:e.autoWrap)})}else{var i;null===(i=this.codeEditor)||void 0===i||i.create(t,n,{lineWrapping:!!(null===e||void 0===e?void 0:e.autoWrap)})}}}}],[{key:"cardName",get:function(){return"codeblock"}},{key:"cardType",get:function(){return s.eT.BLOCK}},{key:"autoSelected",get:function(){return!1}},{key:"singleSelectable",get:function(){return!1}},{key:"getModes",value:function(){return gn}},{key:"lazyRender",get:function(){return!0}}]),n}(s.Zb),kn={codeblock:{autoWrap:"Auto Wrap"}},Cn={codeblock:{autoWrap:"自动换行"}},Bn={"en-US":kn,"zh-CN":Cn},_n="data-syntax",En="parse:html",Sn="paste:schema",Fn="paste:each",Tn="markdown-it",Mn=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.markdownIt=function(t){!1!==e.options.markdown&&(t.enable("code"),t.enable("fence"))},e.pasteSchema=function(e){var t,n,r;e.add([{type:"block",name:"pre",attributes:(t={},(0,Fe.Z)(t,_n,"*"),(0,Fe.Z)(t,"class","*"),(0,Fe.Z)(t,"language","*"),(0,Fe.Z)(t,"auto-wrap","*"),t)},{type:"block",name:"code",attributes:(n={},(0,Fe.Z)(n,_n,{required:!0,value:"*"}),(0,Fe.Z)(n,"auto-wrap","*"),n)},{type:"block",name:"code",attributes:{language:{required:!0,value:"*"}}},{type:"block",name:"code",attributes:{class:{required:!0,value:function(e){return e.includes("language")}}},allowIn:["pre","$root"]},{type:"block",name:"div",attributes:(r={},(0,Fe.Z)(r,_n,{required:!0,value:"*"}),(0,Fe.Z)(r,"auto-wrap","*"),r)}])},e.pasteHtml=function(t){var n,r=e.editor;if((0,s.iC)(r)&&!t.isText()){if((null===(n=t.get())||void 0===n?void 0:n.hasAttribute(_n))||"pre"===t.name){var i=t.attributes(_n);if(!i){var o=function(e){var t,n=null===e||void 0===e||null===(t=e.get())||void 0===t?void 0:t.classList;if(n)for(var r=0;r<n.length;r++){var i=n.item(r);if(i&&i.startsWith("language-")){var o=i.split("-");return o.shift(),o.join("-")}}};"pre"===t.name&&(i=t.attributes("language"),i||(i=o(t)));var a=t.find("code");!i&&a.length>0&&(i=a.attributes(_n)||a.attributes("language"),i||(i=o(a)))}var l=new s._b(t,r).toText(void 0,void 0,!1);return l=(0,s.AK)(l.replace(/\u200b/g,"")),l.endsWith("\n")&&(l=l.slice(0,-1)),r.card.replaceNode(t,"codeblock",{mode:i||"plain",code:l,autoWrap:"true"===t.attributes("auto-wrap")}),t.remove(),!1}return!0}},e.parseHtml=function(t,n){var r=e.editor,i=[],o={};xn.getModes().forEach((function(e){o[e.value]=e.syntax}));var a=new un(r,{synatxMap:o,styleMap:e.options.styleMap}),l="data-codeblock-content",c=a.container.find(".".concat(l));return c.css({border:"1px solid #e8e8e8",padding:"8px"}),c.addClass(s.S),c.css("background","#f9f9f9"),t.find("[".concat(s.Jr,'="').concat(xn.cardName,'"],[').concat(s.mV,'="').concat(xn.cardName,'"]')).each((function(e){var t=(0,s.$)(e),o=r.card.find(t),A=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(t.attributes(s.TM));if(A){t.empty(),c.empty(),a.render(A.mode||"plain",A.code||"");var u=c.clone(!0);t.append(u),t.removeAttributes(s.Jr),t.removeAttributes(s.W9),t.removeAttributes(s.TM),t.attributes(_n,A.mode||"plain"),t.attributes("auto-wrap",A.autoWrap?"true":"false"),u.removeClass(s.S).removeClass(l);var d=t;n&&(d=n(t,A),t.replaceWith(d)),i.push(d)}else t.remove()})),a.destroy(),i},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.language.add(Bn),e.on(En,this.parseHtml),e.on(Sn,this.pasteSchema),e.on(Fn,this.pasteHtml),(0,s.iC)(e)&&e.on(Tn,this.markdownIt)}},{key:"execute",value:function(e,t){var n=this.editor;if((0,s.iC)(n)){var r=n.card;if(!t){var i=n.getSelectionData();i&&(t=i.text)}var o=r.insert(xn.cardName,{mode:e,code:t});setTimeout((function(){o.focusEditor()}),200)}}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"destroy",value:function(){var e=this.editor;e.off(En,this.parseHtml),e.off(Sn,this.pasteSchema),e.off(Fn,this.pasteHtml),(0,s.iC)(e)&&e.off(Tn,this.markdownIt)}}],[{key:"pluginName",get:function(){return"codeblock"}}]),n}(s.Sy),In=Mn,Nn=(n(82801),n(1439),n(87585),n(55315),n(40255)),Un=n.n(Nn),Ln=n(82718),Qn=n(76711),Dn=n.n(Qn),Hn=n(77209),On=n.n(Hn);class zn{constructor(e,t){(0,Fe.Z)(this,"pswp",void 0),(0,Fe.Z)(this,"editor",void 0),(0,Fe.Z)(this,"prevStatus","default"),(0,Fe.Z)(this,"nextStatus","default"),(0,Fe.Z)(this,"zoomInStatus","default"),(0,Fe.Z)(this,"zoomOutStatus","default"),(0,Fe.Z)(this,"originSizeStatus","default"),(0,Fe.Z)(this,"bestSizeStatus","default"),this.editor=e,this.pswp=t}init(){this.pswp.on("afterzoom",(()=>{this.afterZoom()})),this.pswp.on("afterchange",(()=>{this.afterChange()})),this.pswp.on("resize",(()=>{setTimeout((()=>{this.afterChange(),this.afterZoom()}),333)})),this.render()}renderTemplate(){const e=(0,s.$)('\n\t\t\t<div class="data-pswp-tool-bar">\n\t\t\t\t<div class="pswp-toolbar-content"></div>\n\t\t\t</div>\n '),t=e.find(".pswp-toolbar-content"),n=this.editor.language.get("image");return t.append(this.renderBtn("arrow-left",n["prev"],this.prevStatus,(()=>{"disable"!==this.prevStatus&&this.pswp.prev()}))),t.append('<span class="data-pswp-counter"></span>'),t.append(this.renderBtn("arrow-right",n["next"],this.nextStatus,(()=>{"disable"!==this.nextStatus&&this.pswp.next()}))),t.append('<span class="separation"></span>'),t.append(this.renderBtn("zoom-in",n["zoomIn"],this.zoomInStatus,(()=>{"disable"!==this.zoomInStatus&&this.pswp.zoomIn()}))),t.append(this.renderBtn("zoom-out",n["zoomOut"],this.zoomOutStatus,(()=>{"disable"!==this.zoomOutStatus&&this.pswp.zoomOut()}))),t.append(this.renderBtn("origin-size",n["originSize"],this.originSizeStatus,(()=>{"disable"!==this.originSizeStatus&&this.pswp.zoomToOriginSize()}))),t.append(this.renderBtn("best-size",n["bestSize"],this.bestSizeStatus,(()=>{"disable"!==this.bestSizeStatus&&this.pswp.zoomToBestSize()}))),e}afterZoom(){const e=this.pswp.getCurrentZoomLevel(),t=this.pswp.getInitialZoomLevel();let n="default";e===t&&(n="activated"),1===t&&(n="disable"),this.zoomOutStatus=.05===e?"disable":"default",this.zoomInStatus=5===e?"disable":"default",this.originSizeStatus=1===e?"activated":"default",this.bestSizeStatus=n,this.render()}afterChange(){const e=this.pswp.getCount();this.nextStatus=1===e?"disable":"default",this.prevStatus=1===e?"disable":"default",this.render()}renderBtn(e,t,n,r){const i=(0,s.$)(`<span class="data-pswp-${e} btn ${n}"></span>`);return i.on("mouseenter",(()=>{s.u.show(i,t)})),i.on("mouseleave",(()=>{s.u.hide()})),i.on("mousedown",(e=>{e.stopPropagation(),s.u.hide()})),i.on("click",r),i}render(){this.pswp.barUI.empty(),this.pswp.barUI.append(this.renderTemplate())}}var Zn=zn;class Rn extends Ln.EventEmitter2{constructor(e,t){super(),(0,Fe.Z)(this,"editor",void 0),(0,Fe.Z)(this,"options",void 0),(0,Fe.Z)(this,"timeouts",[]),(0,Fe.Z)(this,"pswpUI",void 0),(0,Fe.Z)(this,"zoom",void 0),(0,Fe.Z)(this,"isDestroy",!0),(0,Fe.Z)(this,"zoomUI",void 0),(0,Fe.Z)(this,"root",void 0),(0,Fe.Z)(this,"barUI",void 0),(0,Fe.Z)(this,"closeUI",void 0),(0,Fe.Z)(this,"reset",(()=>{this.root.removeClass(s.tq?"data-pswp-mobile":"data-pswp-pc"),this.root.addClass(s.tq?"data-pswp-mobile":"data-pswp-pc"),this.unbindKeyboardEvnet(),this.unbindControllerFadeInAndOut(),s.tq||(this.bindKeyboardEvnet(),this.bindControllerFadeInAndOut())})),(0,Fe.Z)(this,"onBarMouseEnter",(()=>{this.removeFadeOut(this.barUI,"barFadeInAndOut"),this.removeFadeOut(this.closeUI,"closeFadeInAndOut")})),(0,Fe.Z)(this,"onBarMouseLeave",(()=>{this.fadeOut(this.barUI,"barFadeInAndOut"),this.fadeOut(this.closeUI,"closeFadeInAndOut")})),(0,Fe.Z)(this,"onCloseMouseEnter",(()=>{this.removeFadeOut(this.barUI,"barFadeInAndOut"),this.removeFadeOut(this.closeUI,"closeFadeInAndOut")})),(0,Fe.Z)(this,"onCloseMouseLeave",(()=>{this.fadeOut(this.barUI,"barFadeInAndOut"),this.fadeOut(this.closeUI,"closeFadeInAndOut")})),(0,Fe.Z)(this,"onKeyboardEvent",(e=>{(e.metaKey||e.ctrlKey)&&187===e.keyCode&&(e.preventDefault(),this.zoomIn()),(0,s.P6)("mod+-",e)&&(e.preventDefault(),this.zoomOut())})),(0,Fe.Z)(this,"close",(()=>{this.pswpUI?.close()})),this.editor=e,this.options={shareEl:!1,fullscreenEl:!1,zoomEl:!1,history:!1,closeOnScroll:!1,preloaderEl:!1,captionEl:!1,counterEl:!1,clickToCloseNonZoomable:!1,showAnimationDuration:0,hideAnimationDuration:0,closeOnVerticalDrag:s.tq,tapToClose:!0,bgOpacity:.8,barsSize:{top:44,bottom:80},...t},this.isDestroy=!0,this.root=this.renderTemplate(),this.barUI=this.root.find(".data-pswp-custom-top-bar"),this.closeUI=this.root.find(".data-pswp-button-close"),(0,s.$)(document.body).append(this.root),this.zoomUI=new Zn(e,this),this.zoomUI.render(),this.reset(),this.bindClickEvent(),window.addEventListener("resize",this.reset)}renderTemplate(){const e=(0,s.$)('\n\t\t\t<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">\n\t\t\t\t<div class="pswp__bg"></div>\n\t\t\t\t<div class="pswp__scroll-wrap">\n\t\t\t\t\t<div class="pswp__container">\n\t\t\t\t\t\t<div class="pswp__item"></div>\n\t\t\t\t\t\t<div class="pswp__item"></div>\n\t\t\t\t\t\t<div class="pswp__item"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="pswp__ui pswp__ui--hidden">\n\t\t\t\t\t\t<button type="button" class="pswp__button data-pswp-button-close" title="Close (Esc)"></button>\n\t\t\t\t\t\t<div class="data-pswp-custom-top-bar"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>');return e}bindControllerFadeInAndOut(){this.barUI.on("mouseenter",this.onBarMouseEnter),this.barUI.on("mouseleave",this.onBarMouseLeave),this.closeUI.on("mouseenter",this.onCloseMouseEnter),this.closeUI.on("mouseleave",this.onCloseMouseLeave)}unbindControllerFadeInAndOut(){this.barUI.off("mouseenter",this.onBarMouseEnter),this.barUI.off("mouseleave",this.onBarMouseLeave),this.closeUI.off("mouseenter",this.onCloseMouseEnter),this.closeUI.off("mouseleave",this.onCloseMouseLeave)}removeFadeOut(e,t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),e.removeClass("pswp-fade-out")}fadeOut(e,t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),this.timeouts[t]=setTimeout((()=>{e.addClass("pswp-fade-out")}),3e3)}bindClickEvent(){const e=e=>{const t=window.TouchEvent&&e instanceof TouchEvent?(0,s.$)(e.touches[0].target):(0,s.$)(e.target||[]);t.hasClass("pswp__img")&&setTimeout((()=>{this.zoom=void 0,this.afterZoom()}),366),(t.hasClass("pswp__bg")||t.hasClass("data-pswp-tool-bar"))&&this.close()};this.root.on("click",e,{passive:!0}),this.closeUI.on("click",this.close)}prev(){this.pswpUI?.prev()}next(){this.pswpUI?.next()}renderCounter(){this.barUI.find(".data-pswp-counter").html(`${(this.pswpUI?.getCurrentIndex()||0)+1} / ${this.pswpUI?.items.length||""}`)}getCurrentZoomLevel(){return this.zoom&&+this.zoom.toFixed(2)||this.pswpUI&&+this.pswpUI.getZoomLevel().toFixed(2)||0}zoomTo(e){this.pswpUI&&(this.pswpUI.zoomTo(e,{x:this.pswpUI.viewportSize.x/2,y:this.pswpUI.viewportSize.y/2},100),this.zoom=e,this.afterZoom())}zoomIn(){const e=this.getCurrentZoomLevel();let t=(e||0)+.2;5!==e&&(t>5&&(t=5),this.zoomTo(t))}zoomOut(){const e=this.getCurrentZoomLevel();if(.05!==e&&void 0!==e){let t=e-.2;.05>t&&(t=.05),this.zoomTo(t)}}bindKeyboardEvnet(){this.root.on("keydown",this.onKeyboardEvent)}unbindKeyboardEvnet(){this.root.off("keydown",this.onKeyboardEvent)}zoomToOriginSize(){this.zoomTo(1)}zoomToBestSize(){const e=this.getInitialZoomLevel();e&&this.zoomTo(e)}updateCursor(){const{root:e}=this,t=this.getCurrentZoomLevel(),n=this.getInitialZoomLevel();1===t?e.addClass("pswp--zoomed-in"):n===n&&e.removeClass("pswp--zoomed-in")}getInitialZoomLevel(){return this.pswpUI?+(this.pswpUI.currItem.initialZoomLevel?.toFixed(2)||0):0}afterZoom(){this.updateCursor(),this.emit("afterzoom")}getCount(){return this.pswpUI?.items.length||0}afterChange(){if(!s.tq){const e=this.getInitialZoomLevel();this.renderCounter(),this.zoom=e,setTimeout((()=>{this.afterZoom()}),100),this.emit("afterchange"),this.zoom=this.getInitialZoomLevel()}this.setWhiteBackground()}bindPswpEvent(){this.pswpUI?.listen("afterChange",(()=>{this.afterChange()})),this.pswpUI?.listen("destroy",(()=>{this.isDestroy=!0})),this.pswpUI?.listen("resize",(()=>{this.emit("resize")})),this.pswpUI?.listen("imageLoadComplete",(()=>{this.setWhiteBackground()}))}setWhiteBackground(){this.root.find(".pswp__img").each((e=>{const t=e;t.complete?(t.style.background="white",t.style["boxShadow"]="0 0 10px rgba(0, 0, 0, 0.5)"):t.onload=()=>{t.style.background="white",t.style["boxShadow"]="0 0 10px rgba(0, 0, 0, 0.5)"}}))}open(e,t){if(!0===this.isDestroy){const{root:n}=this,r=new(Dn())(this.root.get(),On(),e,{index:t,...this.options});r.items=e,r.init(),this.pswpUI=r,this.isDestroy=!1,s.tq||(this.barUI.removeClass("pswp-fade-out"),this.fadeOut(this.barUI,"barFadeInAndOut"),this.closeUI.removeClass("pswp-fade-out"),this.fadeOut(this.closeUI,"closeFadeInAndOut")),n.removeClass("pswp-fade-in"),n.addClass("pswp-fade-in"),this.afterChange(),this.bindPswpEvent()}}destroy(){window.removeEventListener("resize",this.reset),this.close()}}var Pn=Rn;const qn=window.devicePixelRatio;let Kn;class Wn{constructor(e,t){(0,Fe.Z)(this,"editor",void 0),(0,Fe.Z)(this,"options",void 0),(0,Fe.Z)(this,"root",void 0),(0,Fe.Z)(this,"progress",void 0),(0,Fe.Z)(this,"image",void 0),(0,Fe.Z)(this,"detail",void 0),(0,Fe.Z)(this,"meta",void 0),(0,Fe.Z)(this,"maximize",void 0),(0,Fe.Z)(this,"bg",void 0),(0,Fe.Z)(this,"resizer",void 0),(0,Fe.Z)(this,"pswp",void 0),(0,Fe.Z)(this,"src",void 0),(0,Fe.Z)(this,"status",void 0),(0,Fe.Z)(this,"size",void 0),(0,Fe.Z)(this,"maxWidth",void 0),(0,Fe.Z)(this,"maxHeight",void 0),(0,Fe.Z)(this,"rate",1),(0,Fe.Z)(this,"isLoad",!1),(0,Fe.Z)(this,"message",void 0),(0,Fe.Z)(this,"cropper",void 0),(0,Fe.Z)(this,"onWindowResize",(()=>{if(!(0,s.iC)(this.editor))return;this.maxWidth=this.getMaxWidth(),this.resetSize();const e=this.image.get();if(!e)return;const{clientWidth:t,clientHeight:n}=e;this.resizer&&(this.resizer.maxWidth=this.maxWidth,this.resizer.setSize(t,n))})),(0,Fe.Z)(this,"getSrc",(()=>{const{onBeforeRender:e}=this.options;return e&&"error"!==this.status?e(this.status,this.src,this.editor):this.src})),(0,Fe.Z)(this,"openZoom",(e=>{e.preventDefault(),e.stopPropagation();const t=this.editor,n=[],r=t.card.closest(this.root);let i=0;t.container.find('[data-card-key="image"]').toArray().filter((e=>e.find("img").length>0)).forEach(((e,o)=>{const a=t.card.find(e),s=a?.getValue();if(!a||!s)return;const l=a.getCenter().find("img"),c=parseInt(l.css("width")),A=parseInt(l.css("height")),u=s.size,d=u?u.naturalWidth||this.size.naturalWidth:c*qn,h=u?u.naturalHeight||this.size.naturalHeight:A*qn;let p=s["src"];const{onBeforeRender:f}=this.options;f&&(p=f("done",p,this.editor));const g=l.attributes("src");n.push({src:p,msrc:g,w:d,h:h}),r?.equal(e)&&(i=o)})),this.pswp.open(n,i)})),(0,Fe.Z)(this,"focus",(()=>{(0,s.iC)(this.editor)&&(this.root.addClass("data-image-active"),"done"===this.status&&(this.destroyEditor(),this.renderEditor()))})),(0,Fe.Z)(this,"blur",(()=>{(0,s.iC)(this.editor)&&(this.root.removeClass("data-image-active"),"done"===this.status&&(this.destroyEditor(),this.cropImageSave()))})),this.editor=e,this.options=t,this.src=this.options.src,this.size=this.options.size||{width:0,height:0,naturalHeight:0,naturalWidth:0},this.maxHeight=this.options.maxHeight,this.status=this.options.status,this.root=(0,s.$)(this.renderTemplate()),this.progress=this.root.find(".data-image-progress"),this.image=this.root.find("img"),this.detail=this.root.find(".data-image-detail"),this.meta=this.root.find(".data-image-meta"),this.maximize=this.root.find(".data-image-maximize"),this.bg=this.root.find(".data-image-bg"),this.maxWidth=this.getMaxWidth(),this.pswp=Kn||new Pn(e),this.message=this.options.message,Kn=this.pswp}renderTemplate(e){const{link:t,percent:n,className:r,onBeforeRender:i}=this.options;if("error"===this.status)return`<span class="data-image-error" style="max-width:${this.maxWidth}px">\n\t\t\t\t<span class="data-icon data-icon-error"></span>\n\t\t\t\t${e||this.options.message}\n\t\t\t\t<span class="data-icon data-icon-copy"></span>\n\t\t\t</span>`;const o=i?i(this.status,this.options.src,this.editor):this.options.src,a=`<span class="data-image-progress">\n\t\t\t\t\t\t\t\t\t\t\t\t<i class="data-anticon">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<svg viewBox="0 0 1024 1024" class="data-anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class="percent">${n||0}%</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>`,l=(0,s.YU)(this.options.alt||""),c=l?` alt="${l}" title="${l}" `:"";let A=`<img src="${(0,s.Nm)(o)}" class="${r||""} data-drag-image" ${c}/>`;if(t&&!(0,s.iC)(this.editor)){const e=t.target||"_blank";A=`<a href="${(0,s.Nm)(t.href)}" target="${e}">${A}</a>`}const u='<span class="data-image-maximize" style="display: none;"><span class="data-icon data-icon-maximize"></span></span>';return`\n\t\t\t<span class="data-image">\n\t\t\t\t<span class="data-image-content data-image-loading">\n\t\t\t\t\t<span class="data-image-detail">\n\t\t\t\t\t\t<span class="data-image-meta">\n\t\t\t\t\t\t\t${A}\n\t\t\t\t\t\t\t${a}\n\t\t\t\t\t\t\t<span class="data-image-bg"></span>\n\t\t\t\t\t\t\t${u}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t</span>`}bindErrorEvent(e){const t=this.editor,n=e.find(".data-icon-copy");n.on("mouseenter",(()=>{s.u.show(n,t.language.get("image","errorMessageCopy").toString())})),n.on("mouseleave",(()=>{s.u.hide()})),n.on("click",(e=>{e.stopPropagation(),e.preventDefault(),s.u.hide(),t.clipboard.copy(this.message||this.options.message||"Error message"),t.messageSuccess("copy",t.language.get("copy","success").toString())}))}setProgressPercent(e){this.progress.find(".percent").html(`${e}%`)}imageLoadCallback(){const e=this.editor,t=e.card.closest(this.root);if(!t||"uploading"===this.status)return;if("done"===this.status){const e=this.root.find(".data-image-content");e.addClass("data-image-loaded"),e.removeClass("data-image-loading")}const n=this.image.get();if(!n)return;const{naturalWidth:r,naturalHeight:i}=n;this.rate=i/r,this.size.naturalWidth=r,this.size.naturalHeight=i,this.size.width||(this.size.width=r),this.size.height||(this.size.height=i),this.resetSize(),this.image.css("visibility","visible"),this.detail.css("height",""),this.detail.css("width","");const{onChange:o}=this.options;(0,s.iC)(e)&&o&&o(this.size,!0),window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize),e.off("editor:resize",this.onWindowResize),e.on("editor:resize",this.onWindowResize),this.resizer&&this.resizer.setSize(n.clientWidth,n.clientHeight),this.isLoad=!0,this.options.onLoad&&this.options.onLoad()}imageLoadError(){if("uploading"===this.status)return;this.status="error";const{container:e}=this.options;e.empty(),e.append(this.renderTemplate(this.editor.language.get("image","loadError").toString())),this.detail.css("width",""),this.detail.css("height",""),this.bindErrorEvent(e);const{onError:t}=this.options;t&&t(),this.isLoad=!0}getMaxWidth(e=this.options.root){const t=this.editor.block.closest(e).get();return t?t.clientWidth-6:0}resetSize(){this.meta.css({"background-color":"",width:""}),this.image.css({width:""});const e=this.image.get();if(!e)return;let{width:t,height:n}=this.size;if(n)if(t)if(t&&n)n=Math.round(this.rate*t),this.size.height=n;else{const{clientWidth:r,clientHeight:i}=e;t=r,n=i;const{naturalWidth:o,naturalHeight:a}=this.size;this.isSvg()&&o&&a&&(t=o,n=a)}else t=Math.round(n/this.rate);else n=Math.round(this.rate*t);t>this.maxWidth&&(t=this.maxWidth,n=Math.round(t*this.rate)),!1===this.options.enableResizer?this.image.css("width",""):this.image.css("width",`${t}px`)}changeSize(e,t){e<24&&(e=24,t=e*this.rate),e>this.maxWidth&&(e=this.maxWidth,t=e*this.rate),t<24&&(t=24,e=t/this.rate),e=Math.round(e),t=Math.round(t),this.size.width=e,this.size.height=t,this.image.css({width:`${e}px`});const{onChange:n}=this.options;n&&n(this.size),this.destroyEditor(),this.renderEditor()}changeUrl(e){this.src!==e&&(this.src=e,this.isLoad=!1,this.image.attributes("src",this.getSrc()))}isSvg(){return this.src.split("?")[0].endsWith(".svg")||this.src.startsWith("data:image/svg+xml")}closeZoom(){this.pswp?.close()}cropImage(){"done"===this.status&&this.destroyEditor();const e=this.image.get();this.cropper=new(Un())(e,{autoCropArea:1})}async cropImageSave(){if(this.cropper){const e=this.cropper.getCroppedCanvas(),t=e?.toDataURL(),n=this.dataURIToFile(t),r=(0,s.Ym)(n),i=r?"image.".concat(r):"image",o=new globalThis.File([n],i,{type:"image/jpeg"});o.uid=(new Date).getTime()+"-"+(0,s.ZU)();const a=await this.uploadImage([o]),{onChangeSrc:l}=this.options;this.changeUrl(a),l&&l(a),this.size.naturalWidth=e?.width,this.size.naturalHeight=e?.height;const{width:c,height:A}=this.cropper?.getCropBoxData();this.changeSize(c,A),this.cropper.destroy(),this.cropper=void 0}}async rotateImage(){console.log("rotateImage",this.editor);const e=document.createElement("canvas");e.width=this.size.naturalHeight,e.height=this.size.naturalWidth;const t=e.getContext("2d");t?.save(),t?.fillRect(0,0,e.width,e.height),t?.rotate(90*Math.PI/180);const n=this.image.get();t?.drawImage(n,0,-e.width);const r=e.toDataURL("image/png"),i=this.dataURIToFile(r),o=(0,s.Ym)(i),a=o?"image.".concat(o):"image",l=new globalThis.File([i],a,{type:"image/jpeg"});l.uid=(new Date).getTime()+"-"+(0,s.ZU)();const c=await this.uploadImage([l]),{onChangeSrc:A}=this.options;this.changeUrl(c),A&&A(c);const u={width:this.size.height,height:this.size.width,naturalWidth:this.size.naturalHeight,naturalHeight:this.size.naturalWidth};this.size.naturalWidth=u.naturalWidth,this.size.naturalHeight=u.naturalHeight,this.changeSize(u.width,u.height)}dataURIToFile(e){let t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);const n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new Blob([r],{type:n})}uploadImage(e){const{request:t,card:n}=this.editor,r=this.editor.plugin.findPlugin("image-uploader"),{action:i,crossOrigin:o,headers:a}=r?.options.file,s=r?.options.parse;return new Promise(((n,r)=>t.upload({url:i,crossOrigin:o,headers:a,onSuccess:(e,t)=>{const r=s(e);return n(r.data)},onError:(e,t)=>r(e)},e,"file")))}renderEditor(){const e=this.image.get();if(!e)return;const{clientWidth:t,clientHeight:n}=e;if(!t||!n)return;const r=this.editor;if(this.maxWidth=this.getMaxWidth(),this.rate=n/t,s.tq||!(0,s.iC)(r)||r.readonly)return;if(!1===this.options.enableResizer)return;const i=new s.w_({imgUrl:this.getSrc(),width:t,height:n,rate:this.rate,maxWidth:this.maxWidth,onChange:({width:e,height:t})=>this.changeSize(e,t)}),o=i.render();this.root.find(".data-image-detail").append(o),this.resizer=i,this.resizer.on("dblclick",this.openZoom)}destroyEditor(){this.resizer?.off("dblclick",this.openZoom),this.resizer?.destroy()}destroy(){window.removeEventListener("resize",this.onWindowResize),this.editor.off("editor:resize",this.onWindowResize),this.destroyEditor(),this.image.off("click",this.openZoom),this.image.off("dblclick",this.openZoom),this.maximize.off("click",this.openZoom)}render(e){const{container:t,display:n,enableResizer:r}=this.options;n===s.eT.BLOCK&&this.root.addClass("data-image-blcok");const i=this.editor;if(!1===r&&this.root.addClass("data-image-disable-resize"),"error"===this.status&&(0,s.iC)(i))return this.root=(0,s.$)(this.renderTemplate(this.message||i.language.get("image","uploadError"))),this.bindErrorEvent(this.root),t.empty().append(this.root),void this.progress.remove();if("uploading"===this.status?(this.progress.show(),t.empty().append(this.root)):this.progress.remove(),"done"===this.status&&this.isLoad){const e=this.root.find(".data-image-content");e.addClass("data-image-loaded"),e.removeClass("data-image-loading")}"done"!==this.status||this.isLoad||this.root.inEditor()||t.empty().append(this.root),this.maxWidth=this.getMaxWidth();let{width:o,height:a}=this.size;if(o&&a||!this.src){if(o>this.maxWidth?(o=this.maxWidth,a=Math.round(o*a/this.size.width)):this.src||o||a||(o=this.maxWidth,a=this.maxWidth/2),this.src){!1===this.options.enableResizer?this.image.css({width:"100%"}):this.image.css({width:o+"px"});const{onChange:e}=this.options;o>0&&a>0&&(this.size={...this.size,width:o,height:a},e&&e(this.size))}!1===this.options.enableResizer?this.bg.css({width:"100%"}):this.bg.css({width:o+"px",height:a+"px"}),e&&this.bg.css("background-image",`url(${e})`)}if(this.image.on("load",(()=>this.imageLoadCallback())),this.image.on("error",(()=>this.imageLoadError())),s.tq||(this.root.on("mouseenter",(()=>{this.maximize.show()})),this.root.on("mouseleave",(()=>{this.maximize.hide()}))),!(0,s.iC)(i)||i.readonly){const e=this.image.closest("a");0===e.length&&this.image.on("click",this.openZoom)}this.maximize.on("click",this.openZoom),!(0,s.iC)(i)&&this.root.inEditor()||this.image.on("dblclick",this.openZoom)}}var jn=Wn;class Vn extends s.Zb{constructor(...e){super(...e),(0,Fe.Z)(this,"image",void 0),(0,Fe.Z)(this,"widthInput",void 0),(0,Fe.Z)(this,"heightInput",void 0),(0,Fe.Z)(this,"isLocalError",void 0)}static get cardName(){return"image"}static get cardType(){return s.eT.INLINE}static get collab(){return!1}setProgressPercent(e){this.image?.setProgressPercent(e),this.setValue({percent:e})}setSize(e,t){if(!e.width||!e.height)return;const n=this.getValue();t&&n.size&&n.size.height&&n.size.width&&n.size.naturalWidth&&n.size.naturalHeight||this.setValue({size:e}),this.widthInput&&(this.widthInput.get().value=e.width.toString()),this.heightInput&&(this.heightInput.get().value=e.height.toString())}onInputChange(e,t){const n=this.getValue();"string"===typeof e&&(!/^[1-9]+(\d+)?$/.test(e)&&this.widthInput&&(e=n?.size?.width||n?.size?.naturalWidth||0,this.widthInput.get().value=e.toString()),e=parseInt(e.toString(),10)),"string"===typeof t&&(!/^[1-9]+(\d+)?$/.test(t)&&this.heightInput&&(t=n?.size?.height||n?.size?.naturalHeight||0,this.heightInput.get().value=t.toString()),t=parseInt(t.toString(),10)),this.image?.changeSize(parseInt(e.toString(),10),t)}toolbar(){const e=this.editor,t=()=>{if(!(0,s.iC)(e)||e.readonly)return[];const{language:t}=e;let n=this.getValue();if(!0===this.isLocalError||"done"!==n?.status)return[{key:"delete",type:"delete"}];const r=[{key:"copy",type:"copy"},{key:"delete",type:"delete"}];if(s.tq)return r;const i=[{key:"button",type:"button",content:'<span class="data-icon data-icon-rotate-right"></span>',title:"旋转",onClick:()=>{this.image?.rotateImage()}}],o=[{key:"button",type:"button",content:'<span class="data-icon data-icon-cut"></span>',title:"裁剪",onClick:()=>{this.image?.cropImage()}}],a=[{key:"width",type:"input",placeholder:t.get("image","toolbbarWidthTitle").toString(),prefix:"宽:",value:n?.size?.width||0,didMount:e=>{this.widthInput=e.find("input[type=input]")},onChange:e=>{const t=Math.round(parseInt(e,10)*(this.image?.rate||1));this.onInputChange(e,t)}},{key:"height",type:"input",placeholder:t.get("image","toolbbarHeightTitle").toString(),prefix:"高:",value:n?.size?.height||0,didMount:e=>{this.heightInput=e.find("input[type=input]")},onChange:e=>{const t=Math.round(parseInt(e,10)/(this.image?.rate||1));this.onInputChange(t,e)}},{key:"resize",type:"button",content:'<span class="data-icon data-icon-huanyuan"></span>',title:t.get("image","toolbarReductionTitle"),onClick:()=>{n=this.getValue(),this.onInputChange(n?.size?.naturalWidth||0,n?.size?.naturalHeight||0)}}],l=[{key:"block",type:"button",content:'<span class="data-icon data-icon-block-image"></span>',title:t.get("image","displayBlockTitle"),onClick:()=>{this.type=s.eT.BLOCK}},{key:"inline",type:"button",content:'<span class="data-icon data-icon-inline-image"></span>',title:t.get("image","displayInlineTitle"),onClick:()=>{this.type=s.eT.INLINE}}],c=e.plugin.findPlugin("image");return r.concat([...!1===c?.options?.enableRotate?[]:i,...!1===c?.options?.enableCropper?[]:o,...!1===c?.options?.enableResizer?[]:a,...!1===c?.options?.enableTypeSwitch?[]:l])},n=e.plugin.findPlugin("image")?.options;return n?.cardToolbars?n.cardToolbars(t(),this.editor):t()}onActivate(e){super.onActivate(e),e&&!this.selectedByOther?this.image?.focus():this.image?.blur()}onSelectByOther(e,t){this.image?.root?.css("outline",e?"2px solid "+t.color:"");const n="card-selected-other";return e?this.root.addClass(n):this.root.removeClass(n),this.image?.root}writeHistoryOnValueChange(){if(this.loading)return!1}render(e){const t=this.getValue();if(!t)return;const n=this.editor;if(this.image&&0!==this.image.root.length)this.image.changeUrl(t.src),this.image.status=t.status||"done",this.image.message=t.message,this.image.size.width=t.size?.width||0,this.image.size.height=t.size?.height||0,t.percent&&this.image.setProgressPercent(t.percent),this.image.resizer?.destroy();else{const e=n.plugin.findPlugin("image");this.image=new jn(n,{root:this.root,container:this.getCenter(),status:t.status||"done",src:t.src,size:t.size,alt:t.alt,link:t.link,display:this.type,percent:t.percent,message:t.message,enableResizer:e?.options?.enableResizer,onBeforeRender:(e,t)=>{const r=n.plugin.findPlugin("image");if(r){const{onBeforeRender:n}=r.options||{};if(n)return n(e,t,this.editor)}return t},onChangeSrc:e=>{if((0,s.iC)(n)&&!n.readonly&&e){const t=this.getValue();console.log("value",t),this.setValue({...t,src:e})}},onChange:(e,t)=>{(0,s.iC)(n)&&!n.readonly&&e&&this.setSize(e,t)},onError:()=>{this.isLocalError=!0,this.didUpdate()},onLoad:()=>{if(this.image?.size&&(!t.size?.naturalHeight||!t.size?.naturalWidth)){const{naturalHeight:e,naturalWidth:n}=this.image.size;this.setSize({...t.size,naturalHeight:e,naturalWidth:n},!0)}this.activated&&this.image?.focus()},maxHeight:e?.options?.maxHeight})}this.image.render(e)}didUpdate(){super.didUpdate(),this.toolbarModel?.getContainer()?.remove(),this.toolbarModel?.create(),this.toolbarModel?.setDefaultAlign("top")}didRender(){const e=this.getValue();"done"===e.status&&super.didRender(),this.toolbarModel?.setDefaultAlign("top")}}var Gn=Vn;const $n="drop:files",Yn="paste:event",Xn="paste:schema",Jn="paste:each",er="paste:after",tr="markdown-it";var nr=class extends s.Sy{constructor(...e){super(...e),(0,Fe.Z)(this,"cardComponents",{}),(0,Fe.Z)(this,"loadCounts",{}),(0,Fe.Z)(this,"extensionNames",{svg:"image/svg+xml",png:"image/png",bmp:"image/bmp",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tif:"image/tiff",tiff:"image/tiff",emf:"image/emf",webp:"image/webp"}),(0,Fe.Z)(this,"dropFiles",(e=>{const t=this.editor;if((0,s.iC)(t)&&(e=e.filter((e=>this.isImage(e))),0!==e.length))return t.command.execute("image-uploader",e),!1})),(0,Fe.Z)(this,"pasteSchema",(e=>{e.add({type:"inline",name:"img",isVoid:!0,attributes:{src:{required:!0,value:"@url"},width:"@number",height:"@number",style:{"max-width":"@length","max-height":"@length",width:"@length",height:"@length"},alt:"*",title:"*","data-type":"*","data-size":"@number","data-width":"@number","data-height":"@number"}})})),(0,Fe.Z)(this,"pasteFiles",(({files:e})=>{const t=this.editor;if((0,s.iC)(t)&&(e=e.filter((e=>this.isImage(e))),0!==e.length))return t.command.execute("image-uploader",e),!1})),(0,Fe.Z)(this,"pasteEach",(e=>{const t=this.editor,{isRemote:n}=this.options;if(e.isCard()&&e.attributes(s.mV)){if("image"!==e.attributes(s.mV))return;const r=(0,s.RW)(e.attributes(s.TM));return r&&r.src?void(n&&n(r.src)?(r.status="uploading",r.percent=0,t.card.replaceNode(e,"image",r)):"uploading"===r.status&&(r.percent=0,e.attributes(s.TM,(0,s.it)({...r,status:"done"})))):void e.remove()}if("img"===e.name){const r=e.attributes(),i=r["src"]||r["data-src"],o=r["alt"];if(!i)return void e.remove();const a=t.plugin.findPlugin("image"),l=r["width"],c=r["height"],A=l||e.css("width"),u=c||e.css("height"),d=r["data-type"]||a?.options.defaultType;let h=s.eT.INLINE;if("block"===d){const n=e.parent();n&&"p"===n.name&&t.node.unwrap(n),h=s.eT.BLOCK}t.card.replaceNode(e,"image",{type:h,src:i,status:n&&n(i)||/^data:image\//i.test(i)?"uploading":"done",alt:o,percent:0,size:{width:(0,s.ZQ)(A),height:(0,s.ZQ)(u)}}),e.remove()}})),(0,Fe.Z)(this,"pasteAfter",(()=>{const e=this.editor;e.container.find("[data-card-key=image]").each(((t,n)=>{const r=e.card.find(t);if(!r||!(0,s.iC)(e))return;const i=r.getValue();if("uploading"!==i?.status||Object.keys(this.cardComponents).find((e=>this.cardComponents[e].id===r.id)))return;const{src:o}=i;if(/^data:image\//i.test(o)){const t=this.dataURIToFile(o),n=(0,s.Ym)(t),i=n?"image.".concat(n):"image",a=new globalThis.File([t],i);return a.uid=(new Date).getTime()+"-"+(0,s.ZU)(),e.command.execute("image-uploader",[a]),void(this.cardComponents[a.uid]=r)}const{isRemote:a}=this.options;a&&a(o)&&this.uploadAddress(o,r)}))})),(0,Fe.Z)(this,"markdownIt",(e=>{!1!==this.options.markdown&&(e.enable("image"),e.enable("reference"))}))}static get pluginName(){return"image-uploader"}init(){const e=this.editor;(0,s.iC)(this.editor)&&(e.on($n,this.dropFiles),e.on(Yn,this.pasteFiles),e.on(Xn,this.pasteSchema),e.on(Jn,this.pasteEach),e.on(er,this.pasteAfter),e.on(tr,this.markdownIt));let{accept:t}=this.options.file||{};if("string"===typeof t&&(t=t.split(",")),Array.isArray(t)){const e=[];(t||[]).forEach((t=>{t=t.trim();const n=t.split(".").pop();n&&e.push(n)})),e.length>0&&(this.extensionNames=e)}else"object"===typeof t&&(this.extensionNames=t)}isImage(e){const t=(0,s.Ym)(e),n=Array.isArray(this.extensionNames)?this.extensionNames:Object.keys(this.extensionNames);return n.indexOf("*")>=0||n.indexOf(t)>=0}dataURIToFile(e){let t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);const n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new Blob([r],{type:n})}getUrl(e){const t=this.editor.plugin.components["image"];if(t){const{onBeforeRender:n}=t["options"]||{};if(n)return n(e.status,e.src,this.editor)}return e.src}loadImage(e,t){this.loadCounts[e]||(this.loadCounts[e]=1);const n=new Image,r=this.editor;n.src=this.getUrl(t),n.onload=()=>{delete this.loadCounts[e],r.card.update(e,t)},n.onerror=()=>{this.loadCounts[e]<=3?setTimeout((()=>{this.loadCounts[e]++,this.loadImage(e,t)}),500):(delete this.loadCounts[e],t.status="error",t.message=r.language.get("image","loadError"),r.card.update(e,t))}}async execute(e){const t=this.editor;if(!(0,s.iC)(t))return;const{request:n,card:r,language:i}=t,{action:o,data:a,type:l,contentType:c,multiple:A,crossOrigin:u,withCredentials:d,headers:h,name:p}=this.options.file,{parse:f}=this.options,g=this.options.file.limitSize||5242880;if(Array.isArray(e)||"string"===typeof e){if("string"===typeof e)return void this.insertRemote(e)}else{const t=Array.isArray(this.extensionNames)?"."+this.extensionNames.join(",."):Object.values(this.extensionNames).join(",");e=await n.getFiles({event:e,accept:s.Dt?"image/*":t.length>0?t:"",multiple:A})}0!==e.length&&n.upload({url:o,crossOrigin:u,withCredentials:d,headers:h,data:a,type:l,contentType:c,onBefore:e=>!(e.size>g)||(t.messageError("upload-limit",i.get("image","uploadLimitError").toString().replace("$size",(g/1024/1024).toFixed(0)+"M")),!1),onReady:e=>{if(!(0,s.iC)(t)||this.cardComponents[e.uid])return;const n=e.src||"",i="string"!==typeof n?window.btoa(String.fromCharCode(...new Uint8Array(n))):n,o=n=>{const o=t.plugin.findPlugin("image"),a=r.insert("image",{...n,status:"uploading",type:n.type||o?.options?.defaultType},i);this.cardComponents[e.uid]=a};return new Promise((e=>{const n=new Image;n.src=i;const r=t.plugin.findPlugin("image");n.onload=()=>{const{naturalWidth:t,naturalHeight:i,height:a,width:s}=n;let l=s,c=a;const A=r?.options?.maxHeight;A&&i>t&&a>A&&(c=A,l=t*(A/i)),o({src:"",size:{width:l,height:c,naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth}}),e()},n.onerror=()=>{o({src:"",status:"error"}),e()}}))},onUploading:(e,{percent:t})=>{const n=this.cardComponents[e.uid||""];n&&n.setProgressPercent(t)},onSuccess:(e,t)=>{const n=this.cardComponents[t.uid||""];if(!n)return;let o=e.url||e.data&&e.data.url||e.src||e.data&&e.data.src;const a=f?f(e):o?{result:!0,data:o}:{result:!1};a.result?o=a.data:r.update(n.id,{status:"error",message:a.data||i.get("image","uploadError")});const s={status:"done"};o&&(s.src=o,this.loadImage(n.id,s)),delete this.cardComponents[t.uid||""]},onError:(e,t)=>{const n=this.cardComponents[t.uid||""];n&&(r.update(n.id,{status:"error",message:e.message||i.get("image","uploadError")}),delete this.cardComponents[t.uid||""])}},e,p)}async uploadAddress(e,t){const n=this.editor;if(!(0,s.iC)(n))return;const{action:r,type:i,contentType:o,crossOrigin:a,withCredentials:l,headers:c,name:A,data:u}=this.options.remote,{parse:d}=this.options,h=A||"url";n.request.ajax({url:r,method:"POST",contentType:o||"application/json",type:void 0===i?"json":i,crossOrigin:a,withCredentials:l,headers:c,data:"function"===typeof u?async()=>{const t=await u();return{...t,[h]:e}}:{...u,[h]:e},success:e=>{let r=e.url||e.data&&e.data.url||e.src||e.data&&e.data.src;const i=d?d(e):r?{result:!0,data:r}:{result:!1};i.result?r=i.data:n.card.update(t.id,{status:"error",message:i.data||n.language.get("image","uploadError")});const o={status:"done"};r&&(o.src=r,this.loadImage(t.id,o))},error:e=>{n.card.update(t.id,{status:"error",message:e.message||n.language.get("image","uploadError")})}})}insertRemote(e,t){const n=this.editor,r=n.plugin.findPlugin("image"),i={src:e,alt:t,status:"uploading",type:r?.options.defaultType||s.eT.INLINE},{isRemote:o}=this.options;if(o&&o(e)){const t=n.card.insert("image",i);this.uploadAddress(e,t)}else i.status="done",n.card.insert("image",i)}destroy(){const e=this.editor;(0,s.iC)(e)&&(e.off($n,this.dropFiles),e.off(Yn,this.pasteFiles),e.off(Xn,this.pasteSchema),e.off(Jn,this.pasteEach),e.off(er,this.pasteAfter),e.off(tr,this.markdownIt))}},rr={image:{next:"Next",prev:"Previous",zoomIn:"Zoom In",zoomOut:"Zoom Out",originSize:"Origin Size",bestSize:"Best Size",errorMessageCopy:"Copy error message",loadError:"The picture failed to load!",uploadError:"The picture failed to upload!",uploadLimitError:"Upload image size is limited to $size",toolbarReductionTitle:"Reduction size",toolbarWidthTitle:"Width",toolbarHeightTitle:"Height",displayBlockTitle:"Block",displayInlineTitle:"In line"}},ir={image:{next:"下一张",prev:"上一张",zoomIn:"放大",zoomOut:"缩小",originSize:"实际尺寸",bestSize:"适应屏幕",errorMessageCopy:"复制错误信息",loadError:"图片加载失败!",uploadError:"上传图片失败!",uploadLimitError:"上传图片大小限制为 $size",toolbarReductionTitle:"还原",toolbarWidthTitle:"宽度",toolbarHeightTitle:"宽度",displayBlockTitle:"独占一行",displayInlineTitle:"嵌入行内"}},or={"en-US":rr,"zh-CN":ir};const ar="parse:html";var sr=class extends s.Sy{constructor(...e){super(...e),(0,Fe.Z)(this,"parseHtml",((e,t)=>{const n=[],r=this.editor;return e.find(`[${s.Jr}="${Gn.cardName}"],[${s.mV}="${Gn.cardName}"]`).each((e=>{const i=(0,s.$)(e),o=r.card.find(i),a=o?.getValue()||(0,s.RW)(i.attributes(s.TM));if(a?.src&&"done"===a.status){const e=i.find(".data-image-meta img");let o=e.length>0?e.clone(!0):(0,s.$)("<img />");i.empty();let l=a.src;const{onBeforeRender:c}=this.options;c&&(l=c(a.status,a.src,this.editor));const A=i.attributes(s.W9);o.attributes("src",l),o.css("visibility","visible");const u=a.size;u?.width&&o.css("width",`${u.width}px`),u?.height&&o.css("height",`${u.height}px`),o.removeAttributes("class"),o.attributes("data-type",A),t&&(o=t(o,a)),A===s.eT.BLOCK&&(o=r.node.wrap(o,(0,s.$)('<p style="text-align:center;"></p>'))),i.replaceWith(o),n.push(o)}else i.remove()})),n}))}static get pluginName(){return"image"}init(){const e=this.editor;e.language.add(or),e.on(ar,this.parseHtml)}execute(e,t,n){const r={status:e,src:t,alt:n};"error"===e&&(r.src="",r.message=t),this.editor.card.insert("image",r)}async waiting(e){const{card:t}=this.editor,n=e=>e.root.inEditor()&&e.name===Gn.cardName&&"uploading"===e.getValue()?.status,r=()=>t.components.find(n),i=t=>{let r=6e4;return new Promise(((i,o)=>{if(e){const n=e(this.constructor.pluginName,t);if(!1===n)return o({name:this.constructor.pluginName,card:t});"number"===typeof n&&(r=n)}const a=(new Date).getTime(),s=(new Date).getTime(),l=()=>{if(s-a>=r)return i();setTimeout((()=>{n(t)?l():i()}),10)};l()}))};return new Promise(((e,t)=>{const n=r(),o=n=>{i(n).then((()=>{const t=r();t?o(t):e()})).catch(t)};n?o(n):e()}))}destroy(){this.editor.off(ar,this.parseHtml)}},lr=n(88478),cr=n(77898),Ar=n.n(cr),ur=n(66046),dr="table-wrapper",hr="table-overflow",pr="data-table",fr="table-cols-header",gr="table-cols-header-item",mr="cols-trigger",vr="cols-addition-header",br="table-rows-header",yr="table-rows-header-item",wr="rows-trigger",xr="table-header",kr="table-menubar",Cr="table-menubar-item",Br="table-menubar-item-input",_r="table-viewport",Er="data-table-reader",Sr="table-placeholder",Fr="multi-addition",Tr="table-highlight",Mr="table-row-delete-button",Ir="table-col-delete-button",Nr="table-row-add-button",Ur="table-row-add-split-button",Lr="table-col-add-button",Qr="table-col-add-split-button",Dr="table-main-content",Hr="table-main-bg",Or=function(){function e(t){(0,r.Z)(this,e),this.isReadonly=!1,this.table=void 0,this.table=t}return(0,i.Z)(e,[{key:"getEmptyCell",value:function(){return e.EmptyCell(this.isReadonly)}},{key:"renderRowsHeader",value:function(e){return"<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(br,'">')+'<div class="'.concat(Mr,'"><span class="data-icon data-icon-delete"></span></div>')+'<div class="'.concat(Nr,'"><span class="data-icon data-icon-plus"></span><div class="').concat(Ur,'"></div></div>')+'<div class="'.concat(yr,'" draggable="true">\n <div class="row-dragger">\n <span class="data-icon data-icon-drag"></span>\n <span class="drag-info"></span>\n </div>\n <div class="').concat(wr,'"></div>\n </div>').repeat(e)+"\n </div>"}},{key:"renderColsHeader",value:function(e){return"<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(fr,'">')+'<div class="'.concat(Ir,'"><span class="data-icon data-icon-delete"></span></div>')+'<div class="'.concat(Lr,'"><span class="data-icon data-icon-plus"></span><div class="').concat(Qr,'"></div></div>')+'<div class="'.concat(gr,'" draggable="true">\n <div class="col-dragger">\n <span class="data-icon data-icon-drag"></span>\n <span class="drag-info"></span>\n </div>\n <div class="').concat(mr,'"></div>\n </div>').repeat(e)+"\n </div>"}},{key:"htmlEdit",value:function(e,t){var n=e.rows,r=e.cols,i=e.html,o=e.noBorder,a=e.overflow;r=r===-1/0?1:r,n=n===-1/0?1:n,r=r===1/0?10:r,n=n===1/0?10:n;var l="<td ".concat(s.rN,'="table-cell-selection">').concat(this.getEmptyCell(),"</td>").repeat(r),c="<tr>".concat(l,"</tr>").repeat(n),A="<col />".repeat(r),u="<colgroup>".concat(A,"</colgroup>"),d="<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(Tr,'"></div>'),h="<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(xr,'"><div class="').concat(xr,'-item"></div></div>'),p="<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(Sr,'"></div>'),f=t.map((function(e){var t;if(e.split)return'<div class="split"></div>';var n=e.text;switch(e.action){case"insertColLeft":case"insertColRight":case"insertRowUp":case"insertRowDown":n=(null===(t=n)||void 0===t?void 0:t.replace("$data",'<input type=\'text\' maxlength="3" class="'.concat(Br,'" />')))||"";break}return'<div class="'.concat(Cr,'" ').concat(s.Zi,'="').concat(s.UI,'" data-action="').concat(e.action,'">\n <span class="data-icon data-icon-table-').concat(e.icon,'"></span>').concat(n,"</div>")}));if(f=["<div ".concat(s.Zi,'="').concat(s.UI,'" class="').concat(kr,'">').concat(f.join(""),"</div>")],i){var g,m=i.indexOf("<colgroup")>-1;if(i=(0,s.Gg)(i)||i,!m)i=null===(g=i)||void 0===g?void 0:g.replace(/^(<table[^>]+>)/,(function(e){return e+u}));var v=this.table.helper.normalize((0,s.$)(i)),b=v.find("tr");n=b.length,i=v.get().outerHTML}var y=i||'<table class="'.concat(pr,'"').concat(!0===o?" data-table-no-border='true'":""," ").concat(s.rN,'="class">').concat(u).concat(c,"</table>");return"<div ".concat(s.rN,'="*" class="').concat(dr," ").concat(!1!==a?hr:"",'" ').concat(s.rN,'="*">').concat(h,"<div ").concat(s.rN,'="*" class="').concat(_r,'">').concat(this.renderColsHeader(r)).concat(y).concat(p).concat(d,"</div>").concat(this.renderRowsHeader(n)).concat(f,"</div>")}},{key:"htmlView",value:function(e){var t,n,r=e.html,i=e.noBorder,o=e.overflow;r=(0,s.Gg)(null!==(t=r)&&void 0!==t?t:"");var a=(0,s.$)(r);return a.find("td").attributes(s.Zi,s.gJ),'<div class="'.concat(dr," ").concat(!1!==o?hr:"",'"><div class="').concat(Er,'"').concat(!0===i?" data-table-no-border='true'":"",">").concat(null===(n=a.get())||void 0===n?void 0:n.outerHTML,"</div></div>")}}],[{key:"EmptyCell",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return'<div class="'.concat(Dr,'" ').concat(s.rN,'="').concat(s.xT,'" ').concat(s.xT,'="').concat(t?"false":"true",'" ').concat(s.Zi,'="').concat(s.gJ,'"><p><br /></p></div>').concat(e.CellBG)}}]),e}();Or.TABLE_WRAPPER_CLASS=".".concat(dr),Or.TABLE_OVERFLOW_CLASS=".".concat(hr),Or.TABLE_CLASS=".".concat(pr),Or.COLS_HEADER_CLASS=".".concat(fr),Or.COLS_HEADER_ITEM_CLASS=".".concat(gr),Or.COLS_HEADER_TRIGGER_CLASS=".".concat(mr),Or.COLS_ADDITION_HEADER_CLASS=".".concat(vr),Or.ROWS_HEADER_CLASS=".".concat(br),Or.ROWS_HEADER_ITEM_CLASS=".".concat(yr),Or.ROWS_HEADER_TRIGGER_CLASS=".".concat(wr),Or.HEADER_CLASS=".".concat(xr),Or.MENUBAR_CLASS=".".concat(kr),Or.MENUBAR_ITEM_CLASS=".".concat(Cr),Or.MENUBAR_ITEM_INPUT_CALSS=".".concat(Br),Or.VIEWPORT=".".concat(_r),Or.VIEWPORT_READER=".".concat(Er),Or.PLACEHOLDER_CLASS=".".concat(Sr),Or.MULTI_ADDITION_CLASS=".".concat(Fr),Or.TABLE_HIGHLIGHT_CLASS=".".concat(Tr),Or.ROW_DELETE_BUTTON_CLASS=".".concat(Mr),Or.COL_DELETE_BUTTON_CLASS=".".concat(Ir),Or.ROW_ADD_BUTTON_CLASS=".".concat(Nr),Or.COL_ADD_BUTTON_CLASS=".".concat(Lr),Or.ROW_ADD_BUTTON_SPLIT_CLASS=".".concat(Ur),Or.COL_ADD_BUTTON_SPLIT_CLASS=".".concat(Qr),Or.TABLE_TD_CONTENT_CLASS=".".concat(Dr),Or.TABLE_TD_BG_CLASS=".".concat(Hr),Or.CellBG='<div class="'.concat(Hr,'"><div class="table-main-border-top"></div><div class="table-main-border-right"></div><div class="table-main-border-bottom"></div><div class="table-main-border-left"></div></div>');var zr=function(e){var t=/([\d\.]+)(pt|px)$/i.exec(e);return t&&"pt"===t[2]?String(Math.round(96*parseInt(t[1],10)/72))+"px":e},Zr=(0,F.Z)("editor"),Rr=function(){function e(t){(0,r.Z)(this,e),this.clipboard=void 0,Object.defineProperty(this,Zr,{writable:!0,value:void 0}),(0,S.Z)(this,Zr)[Zr]=t}return(0,i.Z)(e,[{key:"isEmptyModelCol",value:function(e){return e&&e.isEmpty}},{key:"getTableModel",value:function(e){for(var t=[],n=e.get(),r=n.rows,i=(null===r||void 0===r?void 0:r.length)||0,o=0;o<i;o++)for(var a=r[o],s=a.cells,l=s.length,c=0;c<l;c++){var A=s[c],u=A.rowSpan,d=A.colSpan;u=void 0===u?1:u,d=void 0===d?1:d;var h=u>1||d>1;t[o]=t[o]||[];var p=c;while(t[o][p])p++;if(t[o][p]={rowSpan:u,colSpan:d,isMulti:h,element:A},h){var f=u;while(f>0){var g=d;while(g>0){if(1!==g||1!==f){var m=o+f-1,v=p+g-1;t[m]=t[m]||[],t[m][v]={isEmpty:!0,parent:{row:o,col:p},element:null}}g--}f--}}}var b=t.map((function(e){return e.length})),y=Math.max.apply(Math,(0,lr.Z)(b));t.forEach((function(e){if(e.length<y){var t=y-e.length;while(t--)e.push({rowSpan:1,colSpan:1,isShadow:!0,element:null})}for(var n=0;n<y;n++)e[n]||(e[n]={rowSpan:1,colSpan:1,isShadow:!0,element:null})}));var w={rows:t.length,cols:y,width:n.offsetWidth,height:n.offsetHeight,table:t};return w}},{key:"normalize",value:function(e){var t=this;this.trimStartTr(e),this.fixNumberTr(e),e.addClass("data-table"),e.attributes(s.rN,"class");var n=e.css("width");0===parseInt(n)&&e.css("width","auto"),e.css("background-color","");var r=this.getTableModel(e),i=e.find("col");if(0!==i.length){for(var o=i.length-1;o>=0;o--){var a,l,c=i[o],A=null===(a=i.eq(o))||void 0===a?void 0:a.attributes("width");if(A)null===(l=i.eq(o))||void 0===l||l.attributes("width",parseInt(A));if(c.span>1){var u=c.span-1;while(u--){var d,h;null===(d=null!==(h=i[o].parentElement)&&void 0!==h?h:i[o].parentNode)||void 0===d||d.insertBefore(i[o].cloneNode(),i[o])}}}if(i=e.find("col"),i.length<r.cols){var p=i.length-1,f=r.cols-i.length;while(f--){var g,m;null===(g=null!==(m=i[0].parentElement)&&void 0!==m?m:i[0].parentNode)||void 0===g||g.appendChild(i[p].cloneNode())}}e.find("col").attributes("span",1)}else{var v=e.find("colgroup")[0];v||(v=document.createElement("colgroup")),e.prepend(v);for(var b=function(e){var t=e.find("tr")[0],n=(0,s.$)(t).find("td"),r=[];n.each((function(e,t){var i=n.eq(t);if(i){var o=i.attributes("data-colwidth"),a=i.attributes("width"),s=i[0].colSpan;o?o=o.split(","):a&&(a=parseInt(a)/s);for(var l=0;s>l;l++)o&&o[l]?r.push(parseInt(o[l])):a?r.push(parseInt(a.toString())):r.push(void 0)}}));var i=e.find("td");return i.removeAttributes("data-colwidth"),i.removeAttributes("width"),r}(e),y=document.createElement("col"),w=0;r.cols>w;w++){var x=y.cloneNode();b[w]&&x.setAttribute("width",(b[w]||"").toString()),v.appendChild(x)}}var k=e.get();r.table.forEach((function(e,n){k.rows[n]||k.insertRow(n);var r=e.filter((function(e){return!t.isEmptyModelCol(e)&&e.isShadow})),i=r.length;while(i--)0===n?k.rows[n].insertCell(0):k.rows[n].insertCell()}));var C=e.find("tr");C.each((function(e,n){var r,i=C.eq(n);if(i){var o=parseInt(i.css("height"));o=o||(null===(r=(0,S.Z)(t,Zr)[Zr].plugin.findPlugin("table"))||void 0===r?void 0:r.options.rowMinHeight)||0,i.css("height",o+"px")}}));var B=e.find("td"),_=(0,s.$)(Or.EmptyCell(!(0,s.iC)((0,S.Z)(this,Zr)[Zr])||(0,S.Z)(this,Zr)[Zr].readonly));return B.each((function(e,t){var n=B.eq(t);if(n){n.attributes(s.rN,"table-cell-selection");var r=n.find(s.Su);if(0===r.length){var i=n.children();n.append(_.clone(!0)),r=n.find(s.Su),r.empty(),r.append(i)}r.find("p").each((function(e){0===e.childNodes.length&&e.appendChild(document.createElement("br"))}))}})),e}},{key:"trimStartTr",value:function(e){var t,n=e.find("tr"),r=n.eq(0);r&&0===(null===(t=r.get())||void 0===t?void 0:t.childNodes.length)&&r.remove()}},{key:"fixNumberTr",value:function(e){for(var t=e.get(),n=t.rows,r=(null===n||void 0===n?void 0:n.length)||0,i=[],o=0,a=[],s=0,l=0,c=0,A=0;A<r;A++){for(var u=n[A],d=u.cells,h=0,p=0;p<d.length;p++){var f=d[p],g=f.rowSpan,m=f.colSpan;s+=g*m,h+=m,g>1&&(l+=(g-1)*m)}a[A]=h,0===A&&(o=h),c=Math.max(h,c)}var v=Ar()(s/o),b=o===c,y=v&&b;if(y){var w=0;if(a.forEach((function(e){w+=c-e})),w!==l){var x=l-w;if(Ar()(x/c)){for(var k=[],C=0;C<r;C++){var B=n[C],_=B.cells,E=C+k.length;while(i[E]===c)k.push(E),E++;for(var S=0;S<_.length;S++){var F=_[S],T=F.rowSpan,M=F.colSpan;if(T>1)for(var I=1;I<T;I++)i[E+I]=(i[E+I]||0)+M}}k.forEach((function(e){t.insertRow(e)}))}}}}},{key:"fixDragEvent",value:function(e){var t,n;null===(t=e.dataTransfer)||void 0===t||t.clearData(),null===(n=e.dataTransfer)||void 0===n||n.setData("aomao",""),e.dataTransfer&&(e.dataTransfer.effectAllowed="all")}},{key:"copyCss",value:function(e,t){(0,s.mW)(e)&&(e=(0,s.$)(e)),(0,s.mW)(t)&&(t=(0,s.$)(t)),t.css("vertical-align",e.css("vertical-align"));var n=e.css("background-color");n="rgba(0, 0, 0, 0)"!==n?n:"",t.css("background-color",n)}},{key:"copyTo",value:function(e,t){(0,s.mW)(e)&&(e=(0,s.$)(e)),(0,s.mW)(t)&&(t=(0,s.$)(t));var n=t.find(s.Su);0===n.length&&(t.html(Or.EmptyCell(!(0,s.iC)((0,S.Z)(this,Zr)[Zr])||(0,S.Z)(this,Zr)[Zr].readonly)),n=t.find(s.Su)),n.html((0,s.Gg)(e.html())),"td"===t.name&&0===t.find(Or.TABLE_TD_BG_CLASS).length&&t.append((0,s.$)(Or.CellBG)),"td"===t.name&&t.attributes("data-transient-attributes","table-cell-selection"),this.copyCss(e,t)}},{key:"copyHTML",value:function(e){var t;this.clipboard={html:e,text:(null===(t=(0,s.$)(e).get())||void 0===t?void 0:t.innerText)||""}}},{key:"getCopyData",value:function(){return this.clipboard}},{key:"clearCopyData",value:function(){this.clipboard=void 0}},{key:"trimBlankSpan",value:function(e){var t=e.length,n=[],r=0,i=t-1;while(e[r]&&"span"===e[r].tagName.toLowerCase()&&""===e[r].innerText.trim())r++;while(e[i]&&"span"===e[i].tagName.toLowerCase()&&""===e[i].innerText.trim())i--;if(r<=i)for(var o=r;o<=i;o++)n.push(e[o]);return n.length?(0,s.$)(n):e}},{key:"normalizeTable",value:function(e){var t=this;this.trimStartTr(e),this.fixNumberTr(e),e.addClass("data-table");var n=e.css("width");0===parseInt(n)?e.css("width","auto"):n.endsWith("%")||e.css("width",parseInt(n,10)+"px"),e.css("background-color","");var r=this.getTableModel(e),i=e.find("col");if(0!==i.length){for(var o=i.length-1;o>=0;o--){var a,l=i[o],c=null===(a=i.eq(o))||void 0===a?void 0:a.attributes("width");if(c&&!c.endsWith("%")){var A,u=parseInt(c);Number.isNaN(u)||null===(A=i.eq(o))||void 0===A||A.attributes("width",u)}if(l.span>1){var d=l.span-1;while(d--){var h,p;null===(h=null!==(p=i[o].parentElement)&&void 0!==p?p:i[o].parentNode)||void 0===h||h.insertBefore(i[o].cloneNode(),i[o])}}}if(i=e.find("col"),i.length<r.cols){var f=i.length-1,g=r.cols-i.length;while(g--){var m,v;null===(m=null!==(v=i[0].parentElement)&&void 0!==v?v:i[0].parentNode)||void 0===m||m.appendChild(i[f].cloneNode())}}e.find("col").attributes("span",1)}else{var b=e.find("colgroup")[0];b||(b=document.createElement("colgroup")),e.prepend(b);for(var y=function(e){var t=e.find("tr"),n=t[0];t.each((function(e){var t=e;t.cells.length>n.cells.length&&(n=t)}));var r=(0,s.$)(n).find("td"),i=[];r.each((function(e,t){var n=r.eq(t);if(n){var o=n.attributes("data-colwidth"),a=n.attributes("width")||n.css("width"),s=n[0].colSpan;if(o)o=o.split(",");else if(a){var l=parseInt(a),c=n.css("border-width"),A=n.css("padding-left"),u=n.css("padding-right");c&&(l+=parseInt(zr(c))),A&&(l+=parseInt(zr(A))),u&&(l+=parseInt(zr(u))),a=l/s}for(var d=0;s>d;d++)o&&o[d]?i.push(parseInt(o[d])):a?i.push(parseInt(a.toString())):i.push(void 0)}}));var o=e.find("td");return o.css("width",""),o.css("border-width",""),o.css("padding-left",""),o.css("padding-right",""),o.removeAttributes("data-colwidth"),o.removeAttributes("width"),i}(e),w=document.createElement("col"),x=0;r.cols>x;x++){var k=w.cloneNode();y[x]&&k.setAttribute("width",(y[x]||"").toString()),b.appendChild(k)}}var C=e.get();r.table.forEach((function(e,t){C.rows[t]||C.insertRow(t);var n=e.filter((function(e){return e.isShadow})),r=n.length;while(r--)C.rows[t].insertCell()}));var B=e.find("tr");return B.each((function(e,n){var r,i=B.eq(n);if(i){var o=i.css("height");if("0px"!==o){var a=parseInt(o);a=a||(null===(r=(0,S.Z)(t,Zr)[Zr].plugin.findPlugin("table"))||void 0===r?void 0:r.options.rowMinHeight)||0,i.css("height",a+"px")}else i.remove()}})),e}}]),e}(),Pr=function(e){return[{action:"cut",icon:"cut",text:e.cut},{action:"copy",icon:"copy",text:e.copy},{action:"mockPaste",icon:"paste",text:e.paste},{split:!0},{action:"insertColLeft",icon:"insert-col-left",text:e.insertColLeft},{action:"insertColRight",icon:"insert-col-right",text:e.insertColRight},{action:"insertRowUp",icon:"insert-row-up",text:e.insertRowUp},{action:"insertRowDown",icon:"insert-row-down",text:e.insertRowDown},{split:!0},{action:"mergeCell",icon:"merge-cell",text:e.mergeCell},{action:"splitCell",icon:"split-cell",text:e.splitCell},{split:!0},{action:"removeCol",icon:"remove-col",text:e.removeCol},{action:"removeRow",icon:"remove-row",text:e.removeRow},{split:!0},{action:"removeTable",icon:"remove-table",text:e.removeTable},{split:!0},{action:"clear",icon:"clear",text:e.clear}]},qr=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(e,i,o){var a;return(0,r.Z)(this,n),a=t.call(this),a.editor=void 0,a.table=void 0,a.COL_MIN_WIDTH=void 0,a.ROW_MIN_HEIGHT=void 0,a.MAX_INSERT_NUM=void 0,a.tableRoot=void 0,a.colsHeader=void 0,a.rowsHeader=void 0,a.tableHeader=void 0,a.menuBar=void 0,a.dragging=void 0,a.draggingHeader=void 0,a.changeSize=void 0,a.viewport=void 0,a.placeholder=void 0,a.contextVisible=!1,a.rowDeleteButton=void 0,a.colDeleteButton=void 0,a.colAddButton=void 0,a.colAddAlign=void 0,a.colAddButtonSplit=void 0,a.moveColIndex=-1,a.hideColAddButtonTimeount=void 0,a.rowAddButton=void 0,a.rowAddAlign=void 0,a.rowAddButtonSplit=void 0,a.moveRowIndex=-1,a.hideRowAddButtonTimeount=void 0,a.onMouseDownColsHeader=function(e){var t=(0,s.$)(e.target||[]).closest(Or.COLS_HEADER_TRIGGER_CLASS);0!==t.length?a.startChangeCol(t,e):e instanceof MouseEvent&&2===e.button&&a.showContextMenu(e)},a.onMouseDownRowsHeader=function(e){var t=(0,s.$)(e.target||[]).closest(Or.ROWS_HEADER_TRIGGER_CLASS);0!==t.length?a.startChangeRow(t,e):e instanceof MouseEvent&&2===e.button&&a.showContextMenu(e)},a.onClickColsHeader=function(e){var t,n=a.table.selection,r=(0,s.$)(e.target||[]).closest(Or.COLS_HEADER_TRIGGER_CLASS);if(!(r.length>0)){var i=(0,s.$)(e.target||[]).closest(Or.COLS_HEADER_ITEM_CLASS);if(0!==i.length){var o=null===(t=a.colsHeader)||void 0===t?void 0:t.find(Or.COLS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(i)}));void 0!==o&&n.selectCol(o)}}},a.onClickRowsHeader=function(e){var t,n=a.table.selection,r=(0,s.$)(e.target||[]).closest(Or.ROWS_HEADER_TRIGGER_CLASS);if(!(r.length>0)){var i=(0,s.$)(e.target||[]).closest(Or.ROWS_HEADER_ITEM_CLASS);if(0!==i.length){var o=null===(t=a.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(i)}));void 0!==o&&n.selectRow(o)}}},a.onClickTableHeader=function(e){var t;e.preventDefault();var n=a.table.selection;if(null===(t=a.tableHeader)||void 0===t?void 0:t.hasClass("selected"))n.clearSelect();else{var r=n.tableModel;if(!r)return;n.select({row:0,col:0},{row:r.rows-1,col:r.cols-1})}},a.onChangeSize=function(e){a.dragging&&(a.dragging.y>-1?a.onChangeRowHeight(e):a.dragging.x>-1&&a.onChangeColWidth(e),a.emit("sizeChanging"))},a.onChangeSizeEnd=function(e){if("mouseleave"!==e.type||!a.table.getCenter().contains(e["toElement"])){if(a.dragging&&a.changeSize){var t=a.changeSize.trigger,n=t.width,r=t.height,i=t.element;i.removeClass("dragging"),a.dragging.x>-1&&i.css("height","".concat(r,"px")),a.dragging.y>-1&&i.css("width","".concat(n,"px")),a.dragging=void 0,a.renderRowBars(),a.emit("sizeChanged")}a.unbindChangeSizeEvent()}},a.onDragStartColsHeader=function(e){var t,n;e.stopPropagation();var r=a.table.selection,i=r.getSelectArea();if(e.target&&i.allRow){var o=(0,s.$)(e.target).closest(Or.COLS_HEADER_ITEM_CLASS);if(0!==o.length){var l=null===(t=a.colsHeader)||void 0===t?void 0:t.find(Or.COLS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(o)}));if(void 0!==l){var c=l;c<i.begin.col||c>i.end.col||(a.draggingHeader={element:o,minIndex:i.begin.col,maxIndex:i.end.col,count:i.end.col-i.begin.col+1},o.addClass("dragging"),o.find(".drag-info").html(a.editor.language.get("table","draggingCol").replace("$data",a.draggingHeader.count.toString())),null===(n=a.colsHeader)||void 0===n||n.addClass("dragging"),a.table.helper.fixDragEvent(e),a.bindDragColEvent())}}}},a.onDragStartRowsHeader=function(e){var t,n;e.stopPropagation();var r=a.table.selection,i=r.getSelectArea();if(e.target&&i.allCol){var o=(0,s.$)(e.target).closest(Or.ROWS_HEADER_ITEM_CLASS);if(0!==o.length){var l=null===(t=a.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(o)}));if(void 0!==l){var c=l;c<i.begin.row||c>i.end.row||(a.draggingHeader={element:o,minIndex:i.begin.row,maxIndex:i.end.row,count:i.end.row-i.begin.row+1},o.addClass("dragging"),o.find(".drag-info").html(a.editor.language.get("table","draggingRow").replace("$data",a.draggingHeader.count.toString())),null===(n=a.rowsHeader)||void 0===n||n.addClass("dragging"),a.table.helper.fixDragEvent(e),a.bindDragRowEvent())}}}},a.onDragCol=function(e){var t;if(e.stopPropagation(),a.draggingHeader&&e.target&&(void 0===a.dragging&&(a.dragging={x:e.offsetX,y:e.offsetY}),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),!(Math.abs(a.dragging.x-e.offsetX)<3))){a.dragging.x=e.offsetX,a.draggingHeader.element.removeClass("dragging");var n=(0,s.$)(e.target).closest("td"),r=(0,s.$)(e.target).closest(Or.COLS_HEADER_ITEM_CLASS);if(0!==n.length||0!==r.length)if(r.length>0){var i,o=null===(i=a.colsHeader)||void 0===i?void 0:i.find(Or.COLS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(r)}));if(void 0===o)return;var l=o,c=e.offsetX>r.get().offsetWidth/2?l+1:l;a.showPlaceHolder(c,c!==l)}else{var A=null===(t=a.colsHeader)||void 0===t?void 0:t.find(Or.COLS_HEADER_ITEM_CLASS);if(A){for(var u=n.get(),d=u.colSpan,h=a.table.selection.getCellPoint(n),p=(0,V.Z)(h,2),f=(p[0],p[1]),g=f,m=0,v=0;v<d;v++){var b=A.eq(f+v).get();if(m+b.offsetWidth/2>e.offsetX){g=f+v;break}if(m+b.offsetWidth>e.offsetX){g=f+v+1;break}m+=b.offsetWidth}a.showPlaceHolder(g,g!==f)}}}},a.onDragColEnd=function(){var e,t;a.unbindDragColEvent();var n=a.draggingHeader||{},r=n.index,i=n.count,o=n.isNext;if(a.draggingHeader&&void 0!==r&&void 0!==i){var s=a.table,l=s.command,c=s.selection,A=c.getSelectArea(),u=null===(e=a.table.wrapper)||void 0===e?void 0:e.find(Or.COLS_HEADER_ITEM_CLASS);if(u){for(var d=[],h=A.begin.col;h<=A.end.col;h++){var p,f;d.push((null===(p=u.eq(h))||void 0===p||null===(f=p.get())||void 0===f?void 0:f.offsetWidth)||0)}if(l.mockCopy(),A.begin.col>r){var g=o?r-1:r;l.removeCol(),l.insertColAt(g,i,o,d,!0),c.selectCol(g,g+i-1),l.mockPaste(!0)}else{l.removeCol();var m=(o?r-1:r)-i;l.insertColAt(m,i,o,d,!0),c.selectCol(m+1,m+i),l.mockPaste(!0)}null===(t=a.placeholder)||void 0===t||t.css("display","none"),a.draggingHeader=void 0,a.dragging=void 0}}},a.onDragRow=function(e){var t;if(e.stopPropagation(),a.draggingHeader&&e.target&&(void 0===a.dragging&&(a.dragging={x:e.offsetX,y:e.offsetY}),!(Math.abs(a.dragging.y-e.offsetY)<3))){a.dragging.y=e.offsetY,a.draggingHeader.element.removeClass("dragging");var n=(0,s.$)(e.target).closest("td"),r=(0,s.$)(e.target).closest(Or.ROWS_HEADER_ITEM_CLASS);if(0!==n.length||0!==r.length)if(r.length>0){var i,o=null===(i=a.rowsHeader)||void 0===i?void 0:i.find(Or.ROWS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(r)}));if(void 0===o)return;var l=o,c=e.offsetY>r.get().offsetHeight/2?l+1:l;a.showPlaceHolder(c,c!==l)}else{var A=null===(t=a.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS);if(A){for(var u=n.get().rowSpan,d=a.table.selection.getCellPoint(n),h=(0,V.Z)(d,1),p=h[0],f=p,g=0,m=0;m<u;m++){var v=A[p+m];if(g+v.offsetHeight/2>e.offsetY){f=p+m;break}if(g+v.offsetHeight>e.offsetY){f=p+m+1;break}g+=v.offsetHeight}a.showPlaceHolder(f,f!==p)}}}},a.onDragRowEnd=function(){var e;a.unbindDragRowEvent();var t=a.draggingHeader||{},n=t.index,r=t.count,i=t.isNext;if(a.draggingHeader&&void 0!==n&&void 0!==r){var o=a.table,s=o.command,l=o.selection,c=l.getSelectArea(),A=c.begin;c.end;if(s.mockCopy(),A.row>n){var u=i?n-1:n;s.removeRow(),s.insertRowAt(u,r,!i,!0),l.selectRow(n,n+r-1),s.mockPaste(!0)}else{s.removeRow();var d=(i?n-1:n)-r;s.insertRowAt(d,r,!i,!0),l.selectRow(d+1,d+r),s.mockPaste(!0)}null===(e=a.placeholder)||void 0===e||e.css("display","none"),a.draggingHeader=void 0,a.dragging=void 0}},a.menuSets=new WeakSet,a.onMenuInputMousedown=function(e){e.stopPropagation()},a.handleHighlightRow=function(){var e=a.table.selection,t=e.tableModel;if(t){var n=(0,nn.Z)({},e.getSelectArea());n.allCol=!0,n.begin=n.begin,n.end=n.end,e.showHighlight(n)}},a.handleHighlightCol=function(){var e=a.table.selection,t=e.tableModel;if(t){var n=(0,nn.Z)({},e.getSelectArea());n.allRow=!0,n.begin=n.begin,n.end=n.end,e.showHighlight(n)}},a.handleHighlightTable=function(){var e=a.table.selection,t=e.tableModel;if(t){var n=(0,nn.Z)({},e.getSelectArea());n.allRow=!0,n.allCol=!0,n.begin={row:0,col:0},n.end={row:t.rows-1,col:t.cols-1},e.showHighlight(n)}},a.table=i,a.editor=e,a.COL_MIN_WIDTH=o.col_min_width,a.ROW_MIN_HEIGHT=o.row_min_height,a.MAX_INSERT_NUM=o.max_insert_num,a}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.table.wrapper;e&&(this.tableRoot=e.find(Or.TABLE_CLASS),this.colsHeader=e.find(Or.COLS_HEADER_CLASS),this.rowsHeader=e.find(Or.ROWS_HEADER_CLASS),this.tableHeader=e.find(Or.HEADER_CLASS),this.viewport=e.find(Or.VIEWPORT),this.menuBar=e.find(Or.MENUBAR_CLASS),this.placeholder=e.find(Or.PLACEHOLDER_CLASS),this.renderRowBars(),this.renderColBars(),this.bindEvents())}},{key:"renderRowBars",value:function(){var e,t,n,r,i,o,a,l,c=this,A=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],u=null===(e=this.tableRoot)||void 0===e?void 0:e.get();if(u&&(null===(t=this.rowDeleteButton)||void 0===t||t.removeAllEvents(),this.rowDeleteButton=null===(n=this.rowsHeader)||void 0===n?void 0:n.find(Or.ROW_DELETE_BUTTON_CLASS),null===(r=this.rowAddButton)||void 0===r||r.removeAllEvents(),this.rowAddButton=null===(i=this.rowsHeader)||void 0===i?void 0:i.find(Or.ROW_ADD_BUTTON_CLASS),this.rowAddButtonSplit=null===(o=this.rowAddButton)||void 0===o?void 0:o.find(Or.ROW_ADD_BUTTON_SPLIT_CLASS),null===(a=this.rowDeleteButton)||void 0===a||a.on("mouseover",(function(e){return c.handleHighlightRow()})).on("mouseleave",(function(e){return c.hideHighlight(e)})).on("mousedown",(function(e){e.preventDefault(),c.table.command["removeRow"]()})),null===(l=this.rowAddButton)||void 0===l||l.on("mouseenter",(function(){var e;c.hideRowAddButtonTimeount&&clearTimeout(c.hideRowAddButtonTimeount),null===(e=c.rowsHeader)||void 0===e||e.css("z-index",128)})).on("mouseleave",(function(){c.hideRowAddButtonTimeount=setTimeout((function(){var e,t;null===(e=c.rowAddButton)||void 0===e||e.hide(),null===(t=c.rowsHeader)||void 0===t||t.css("z-index",1),c.moveRowIndex=-1}),200)})).on("mousedown",(function(e){e.preventDefault(),c.table.command.insertRowAt(c.moveRowIndex,1,"down"!==c.rowAddAlign)})),A)){var d,h,p,f,g=u.rows,m=(null===g||void 0===g?void 0:g.length)||0,v=null===(d=this.rowsHeader)||void 0===d?void 0:d.find(Or.ROWS_HEADER_ITEM_CLASS);if(v)for(var b=0;b<m;b++){var y=(0,s.yx)(g[b],"height"),w=v[b],x=null===w||void 0===w?void 0:w.style.height;w&&y!==x&&(w.style.height=y)}var k=null===(h=this.rowsHeader)||void 0===h?void 0:h.find(Or.ROWS_HEADER_TRIGGER_CLASS),C=this.tableRoot.width(),B=(null===(p=this.table.wrapper)||void 0===p?void 0:p.width())||0,_=C<B?C:B,E=_+((null===(f=this.rowsHeader)||void 0===f?void 0:f.width())||0)-1;null===k||void 0===k||k.each((function(e){var t=e.style.width;t!==E+"px"&&(e.style.width=E+"px")}))}}},{key:"renderColBars",value:function(){var e,t,n,r,i,o,a,l,c,A,u=this,d=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],h=null===(e=this.tableRoot)||void 0===e?void 0:e.get();if(h){var p=(0,s.ZQ)((0,s.yx)(h,"width"));null===(t=this.colDeleteButton)||void 0===t||t.removeAllEvents(),this.colDeleteButton=null===(n=this.table.wrapper)||void 0===n?void 0:n.find(Or.COL_DELETE_BUTTON_CLASS),null===(r=this.colAddButton)||void 0===r||r.removeAllEvents(),this.colAddButton=null===(i=this.colsHeader)||void 0===i?void 0:i.find(Or.COL_ADD_BUTTON_CLASS),this.colAddButtonSplit=null===(o=this.colAddButton)||void 0===o?void 0:o.find(Or.COL_ADD_BUTTON_SPLIT_CLASS),null===(a=this.colDeleteButton)||void 0===a||a.on("mouseover",(function(e){return u.handleHighlightCol()})).on("mouseleave",(function(e){return u.hideHighlight(e)})).on("mousedown",(function(e){e.preventDefault(),u.table.command["removeCol"]()})),null===(l=this.colAddButton)||void 0===l||l.on("mouseenter",(function(){u.hideColAddButtonTimeount&&clearTimeout(u.hideColAddButtonTimeount)})).on("mouseleave",(function(){u.hideColAddButtonTimeount=setTimeout((function(){var e;null===(e=u.colAddButton)||void 0===e||e.hide(),u.moveColIndex=-1}),200)})).on("mousedown",(function(e){e.preventDefault(),u.moveColIndex>-1&&u.table.command.insertColAt(u.moveColIndex,1,"right"!==u.colAddAlign)}));var f=this.table.root.width(),g=this.table.enableScroll?p:Math.min(p,f);null===(c=this.tableRoot)||void 0===c||c.css("width","".concat(g,"px")),null===(A=this.colsHeader)||void 0===A||A.css("width","".concat(g,"px")),d&&this.renderColSize()}}},{key:"renderColSize",value:function(){var e,t,n,r,i,o=this,a=null===(e=this.tableRoot)||void 0===e?void 0:e.get();if(a){var l=(0,s.ZQ)((0,s.yx)(a,"width"));this.table.enableScroll||(l=Math.min(l,this.table.root.width()));var c=null===(t=this.tableRoot)||void 0===t?void 0:t.find("col");if(c){var A=!0,u={},d=0,h=0;c.each((function(e,t){var n=c[t],r=(0,s.ZQ)((0,s.$)(n).attributes("width"));r?(u[t]=r,d+=r,A=!1):h++}));var p=null===(n=this.colsHeader)||void 0===n?void 0:n.find(Or.COLS_HEADER_ITEM_CLASS);if(p){var f=this.table.selection.tableModel;if(A){var g,m=[];null===f||void 0===f||null===(g=f.table)||void 0===g||g.forEach((function(e){e.forEach((function(e,t){m[t]||o.table.helper.isEmptyModelCol(e)||e.isMulti||!e.element||(m[t]=(0,s.ZQ)((0,s.yx)(e.element,"width")))}))}));for(var v=0,b=0,y=0;y<c.length;y++)m[y]?b+=m[y]:v++;var w=0;v>0&&(w=Math.round(1e4*Math.round((l-b)/v))/1e4);for(var x=0;x<c.length;x++){var k,C,B=m[x]||w;null===(k=p.eq(x))||void 0===k||k.css("width",B+"px"),null===(C=c.eq(x))||void 0===C||C.attributes("width",B)}}else if(h){var _=Math.round((l-d)/h*1e4)/1e4;c.each((function(e,t){var n,r,i=void 0===u[t]?_:u[t];null===(n=p.eq(t))||void 0===n||n.css("width",i+"px"),null===(r=c.eq(t))||void 0===r||r.attributes("width",i)}))}else c.each((function(e,t){var n=Math.round(l*u[t]/d*1e4)/1e4,r=p[t],i=null===r||void 0===r?void 0:r.style.width;r&&i!==n+"px"&&(r.style.width=n+"px")}));var E=null===(r=this.colsHeader)||void 0===r?void 0:r.find(Or.COLS_HEADER_TRIGGER_CLASS),S=((null===f||void 0===f?void 0:f.height)||0)+((null===(i=this.colsHeader)||void 0===i?void 0:i.height())||0);null===E||void 0===E||E.each((function(e){var t=e.style.height;t!==S+"px"&&(e.style.height=S+"px")}))}}}}},{key:"bindEvents",value:function(){var e,t,n,r,i,o,a,l,c,A,u,d,h,p,f,g,m,v,b=this;null===(e=this.colsHeader)||void 0===e||e.on(s.tq?"touchstart":"mousedown",this.onMouseDownColsHeader).on("mouseup",this.onClickColsHeader).on("dragstart",this.onDragStartColsHeader),null===(t=this.rowsHeader)||void 0===t||t.on(s.tq?"touchstart":"mousedown",this.onMouseDownRowsHeader).on("mouseup",this.onClickRowsHeader).on("dragstart",this.onDragStartRowsHeader),null===(n=this.tableHeader)||void 0===n||n.on("mousedown",this.onClickTableHeader),null===(r=this.table.wrapper)||void 0===r||r.on("contextmenu",(function(e){return e.preventDefault()})),null===(i=this.tableRoot)||void 0===i||i.on("contextmenu",(function(e){return e.preventDefault()})),null===(o=this.colsHeader)||void 0===o||o.on("contextmenu",(function(e){return e.preventDefault()})),null===(a=this.rowsHeader)||void 0===a||a.on("contextmenu",(function(e){return e.preventDefault()})),null===(l=this.tableRoot)||void 0===l||l.on("mousedown",(function(e){return b.onTableMouseDown(e)})),null===(c=this.menuBar)||void 0===c||c.on("click",(function(e){return b.handleClickMenu(e)})),null===(A=this.menuBar)||void 0===A||A.on("mouseover",(function(e){return b.handleHoverMenu(e)})),null===(u=this.menuBar)||void 0===u||u.on("mouseleave",(function(e){return b.hideHighlight(e)}));var y=this.editor;null===(d=this.viewport)||void 0===d||d.on(s.tq?"touchstart":"mousedown",(function(e){var t;if(e.target){var n=(0,s.$)(e.target);if((0,s.iC)(y)&&e.target&&(null===(t=b.viewport)||void 0===t?void 0:t.equal(n))){e.preventDefault(),e.stopPropagation();var r=y.change,i=r.range.get();y.card.focusPrevBlock(b.table,i,!0),y.card.activate(i.startNode,s.Fp.MOUSE_DOWN),r.range.select(i)}}}));var w=null;null===(h=this.colsHeader)||void 0===h||h.on("mouseenter",(function(){b.hideColAddButtonTimeount&&clearTimeout(b.hideColAddButtonTimeount)})).on("mousemove",(function(e){w&&clearTimeout(w),w=setTimeout((function(){b.onMouseMoveColsHeader(e)}),200)})).on("mouseleave",(function(e){w&&clearTimeout(w),b.hideColAddButtonTimeount=setTimeout((function(){var e;null===(e=b.colAddButton)||void 0===e||e.hide()}),200)}));var x=null;null===(p=this.colsHeader)||void 0===p||p.find(Or.COLS_HEADER_ITEM_CLASS).on("mouseenter",(function(e){x&&clearTimeout(x),x=setTimeout((function(){e.target&&(0,s.$)(e.target).closest(Or.COLS_HEADER_ITEM_CLASS).addClass("active")}),200)})).on("mouseleave",(function(e){x&&clearTimeout(x),e.target&&(0,s.$)(e.target).closest(Or.COLS_HEADER_ITEM_CLASS).removeClass("active")}));var k=null;null===(f=this.colsHeader)||void 0===f||f.find(Or.COLS_HEADER_TRIGGER_CLASS).on("mouseenter",(function(e){k&&clearTimeout(k);var t=(0,s.$)(e.target||[]);k=setTimeout((function(){t.addClass("active")}),200)})).on("mouseleave",(function(e){k&&clearTimeout(k),e.target&&(0,s.$)(e.target).removeClass("active")}));var C=null;null===(g=this.rowsHeader)||void 0===g||g.on("mouseenter",(function(){b.hideRowAddButtonTimeount&&clearTimeout(b.hideRowAddButtonTimeount)})).on("mousemove",(function(e){C&&clearTimeout(C),C=setTimeout((function(){var t;b.onMouseMoveRowsHeader(e),null===(t=b.rowsHeader)||void 0===t||t.css("z-index",128)}),200)})).on("mouseleave",(function(){C&&clearTimeout(C),b.hideRowAddButtonTimeount=setTimeout((function(){var e,t;null===(e=b.rowsHeader)||void 0===e||e.css("z-index",""),null===(t=b.rowAddButton)||void 0===t||t.hide()}),200)}));var B=null;null===(m=this.rowsHeader)||void 0===m||m.find(Or.ROWS_HEADER_ITEM_CLASS).on("mouseenter",(function(e){B&&clearTimeout(B),B=setTimeout((function(){e.target&&(0,s.$)(e.target).closest(Or.ROWS_HEADER_ITEM_CLASS).addClass("active")}),200)})).on("mouseleave",(function(e){B&&clearTimeout(B),e.target&&(0,s.$)(e.target).closest(Or.ROWS_HEADER_ITEM_CLASS).removeClass("active")}));var _=null;null===(v=this.rowsHeader)||void 0===v||v.find(Or.ROWS_HEADER_TRIGGER_CLASS).on("mouseenter",(function(e){_&&clearTimeout(_);var t=(0,s.$)(e.target||[]);_=setTimeout((function(){t.addClass("active")}),200)})).on("mouseleave",(function(e){_&&clearTimeout(_),e.target&&(0,s.$)(e.target).removeClass("active")}))}},{key:"onTableMouseDown",value:function(e){if(e.target){var t=(0,s.$)(e.target).closest("td");t.length>0&&2===e.button&&this.table.activated?this.showContextMenu(e):this.hideContextMenu()}}},{key:"onMouseMoveColsHeader",value:function(e){var t,n;if(e.target&&this.colAddButton&&this.colAddButtonSplit){var r=(0,s.$)(e.target),i=r.closest(Or.COLS_HEADER_ITEM_CLASS);if(0!==i.length){var o=this.colsHeader.find(Or.COLS_HEADER_ITEM_CLASS).toArray(),a=i.width(),l=this.colAddButton.width(),c=i.get().offsetLeft,A=o.findIndex((function(e){return e.equal(i)})),u=e.offsetX>a/2||r.hasClass("cols-trigger"),d=o[o.length-1].equal(i);u&&(c+=d?a-l/2:a),this.colAddAlign=u?"left":"right",this.moveColIndex=A,null===(t=this.colAddButton)||void 0===t||t.show("flex"),this.colAddButton.css("left","".concat(c,"px")),this.colAddButton.css("z-index",128);var h=((null===(n=this.table.selection.tableModel)||void 0===n?void 0:n.height)||0)+i.height()+4;this.colAddButtonSplit.css("height","".concat(h,"px")),this.colAddButtonSplit.css("left","".concat(d&&u?l-3+"px":""))}}}},{key:"onMouseMoveRowsHeader",value:function(e){var t,n;if(e.target&&this.rowAddButton&&this.rowAddButtonSplit){var r=(0,s.$)(e.target),i=r.closest(Or.ROWS_HEADER_ITEM_CLASS);if(0!==i.length){var o=this.rowsHeader.find(Or.ROWS_HEADER_ITEM_CLASS).toArray(),a=i.height(),l=i.get().offsetTop,c=o.findIndex((function(e){return e.equal(i)})),A=e.offsetY>a/2||r.hasClass("rows-trigger");A&&(l+=a),this.moveRowIndex=c,this.rowAddButton.show("flex"),this.rowAddButton.css("top","".concat(l,"px")),this.rowAddAlign=A?"down":"up";var u=null===(t=this.viewport)||void 0===t?void 0:t.get(),d=((null===(n=this.table.selection.tableModel)||void 0===n?void 0:n.width)||0)+i.width()+4,h=Math.min(u.offsetWidth+4,d);this.rowAddButtonSplit.css("width","".concat(h,"px"))}}}},{key:"activeHeader",value:function(){var e,t,n,r=this.table.selection.getSelectArea();this.clearActiveStatus();var i=null===(e=this.colsHeader)||void 0===e?void 0:e.find(Or.COLS_HEADER_ITEM_CLASS),o=null===(t=this.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS),a=r.begin,s=r.end,l=r.allCol,c=r.allRow;if(o)for(var A=a.row;A<=s.row;A++)if(l){var u=o[A];(null===u||void 0===u?void 0:u.classList.contains("selected"))||null===u||void 0===u||u.classList.add("selected"),c&&!(null===u||void 0===u?void 0:u.classList.contains("no-dragger"))&&(null===u||void 0===u||u.classList.add("no-dragger"))}if(i)for(var d=a.col;d<=s.col;d++)if(c){var h=i[d];(null===h||void 0===h?void 0:h.classList.contains("selected"))||null===h||void 0===h||h.classList.add("selected"),l&&!(null===h||void 0===h?void 0:h.classList.contains("no-dragger"))&&(null===h||void 0===h||h.classList.add("no-dragger"))}var p=null===(n=this.tableHeader)||void 0===n?void 0:n.get();if(l&&c?(null===p||void 0===p?void 0:p.classList.contains("selected"))||null===p||void 0===p||p.classList.add("selected"):(null===p||void 0===p?void 0:p.classList.contains("selected"))&&(null===p||void 0===p||p.classList.remove("selected")),l&&!c){var f,g=null===(f=this.tableRoot)||void 0===f?void 0:f.find("tr").eq(a.row);if(g){var m,v,b=g.get().offsetTop;null===(m=this.rowDeleteButton)||void 0===m||m.show("flex"),null===(v=this.rowDeleteButton)||void 0===v||v.css("top","".concat(b-this.rowDeleteButton.height(),"px"))}}else{var y;null===(y=this.rowDeleteButton)||void 0===y||y.hide()}if(!l&&c){for(var w,x,k,C,B=0,_=a.col;_<=s.col;_++){var E;B+=(null===i||void 0===i||null===(E=i.eq(_))||void 0===E?void 0:E.width())||0}var S=(null===i||void 0===i||null===(w=i.eq(a.col))||void 0===w||null===(x=w.get())||void 0===x?void 0:x.offsetLeft)||0;null===(k=this.colDeleteButton)||void 0===k||k.show("flex"),null===(C=this.colDeleteButton)||void 0===C||C.css("left","".concat(S+B/2,"px"))}else{var F;null===(F=this.colDeleteButton)||void 0===F||F.hide()}}},{key:"clearActiveStatus",value:function(){var e,t,n,r=null===(e=this.colsHeader)||void 0===e?void 0:e.find(Or.COLS_HEADER_ITEM_CLASS),i=null===(t=this.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS);null===r||void 0===r||r.each((function(e){var t=e;t.classList.contains("selected")&&t.classList.remove("selected"),t.classList.contains("no-dragger")&&t.classList.remove("no-dragger")})),null===i||void 0===i||i.each((function(e){var t=e;t.classList.contains("selected")&&t.classList.remove("selected"),t.classList.contains("no-dragger")&&t.classList.remove("no-dragger")}));var o=null===(n=this.tableHeader)||void 0===n?void 0:n.get();(null===o||void 0===o?void 0:o.classList.contains("selected"))&&o.classList.remove("selected")}},{key:"refresh",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.renderColBars(e),this.renderRowBars(e),this.activeHeader()}},{key:"startChangeCol",value:function(e,t){var n,r;if(t.stopPropagation(),t.preventDefault(),this.colsHeader){var i=e.parent(),o=i.get();this.table.selection.clearSelect(),this.dragging={x:t instanceof MouseEvent?t.clientX:t.touches[0].clientX,y:-1};for(var a=this.colsHeader.find(Or.COLS_HEADER_ITEM_CLASS),l=a.toArray(),c=0,A=[],u=0;u<l.length;u++){var d=l[u];d.equal(i)&&(c=u),A.push((0,s.ZQ)(d.css("width")))}this.changeSize={trigger:{element:e,height:(0,s.ZQ)((0,s.yx)(e.get(),"height")),width:(0,s.ZQ)((0,s.yx)(e.get(),"width"))},element:i,width:(0,s.ZQ)((0,s.yx)(o,"width")),height:-1,index:c,colsWidths:A,table:{width:(null===(n=this.table.selection.tableModel)||void 0===n?void 0:n.width)||0,height:(null===(r=this.table.selection.tableModel)||void 0===r?void 0:r.height)||0}},this.bindChangeSizeEvent()}}},{key:"startChangeRow",value:function(e,t){var n,r,i;t.stopPropagation(),t.preventDefault();var o=e.parent(),a=o.get();this.table.selection.clearSelect(),this.dragging={x:-1,y:t instanceof MouseEvent?t.clientY:t.touches[0].clientY};var l=(null===(n=this.rowsHeader)||void 0===n?void 0:n.find(Or.ROWS_HEADER_ITEM_CLASS).toArray().findIndex((function(e){return e.equal(o)})))||0;this.changeSize={trigger:{element:e,height:(0,s.ZQ)((0,s.yx)(e.get(),"height")),width:(0,s.ZQ)((0,s.yx)(e.get(),"width"))},element:o,width:-1,height:(0,s.ZQ)((0,s.yx)(a,"height")),index:l,table:{width:(null===(r=this.table.selection.tableModel)||void 0===r?void 0:r.width)||0,height:(null===(i=this.table.selection.tableModel)||void 0===i?void 0:i.height)||0}},this.bindChangeSizeEvent()}},{key:"bindChangeSizeEvent",value:function(){var e,t;null===(e=this.colsHeader)||void 0===e||e.addClass("resize"),null===(t=this.rowsHeader)||void 0===t||t.addClass("resize"),document.addEventListener(s.tq?"touchmove":"mousemove",this.onChangeSize),document.addEventListener(s.tq?"touchend":"mouseup",this.onChangeSizeEnd),s.tq||document.addEventListener("mouseleave",this.onChangeSizeEnd)}},{key:"unbindChangeSizeEvent",value:function(){var e,t;null===(e=this.colsHeader)||void 0===e||e.removeClass("resize"),null===(t=this.rowsHeader)||void 0===t||t.removeClass("resize"),document.removeEventListener(s.tq?"touchmove":"mousemove",this.onChangeSize),document.removeEventListener(s.tq?"touchend":"mouseup",this.onChangeSizeEnd),s.tq||document.removeEventListener("mouseleave",this.onChangeSizeEnd)}},{key:"onChangeColWidth",value:function(e){var t,n,r;if(this.dragging&&this.changeSize){var i=this.table.root.width(),o=(e instanceof MouseEvent?e.clientX:e.touches[0].clientX)-this.dragging.x,a=Math.max(this.COL_MIN_WIDTH,this.changeSize.width+o),s=this.changeSize.table.width+(a-this.changeSize.width),l=null===(t=this.tableRoot)||void 0===t?void 0:t.find("col");if(!this.table.enableScroll&&l){var c,A,u=this.table.colMinWidth,d=(null!==(c=this.changeSize.colsWidths)&&void 0!==c?c:[]).concat(),h=this.changeSize.index;if(h<d.length-1){var p,f;a=Math.min(d[h]+d[h+1]-u,a);var g=d[h+1]-o;g=Math.max(g,u),g=Math.min(d[h]+d[h+1]-u,g),d[h+1]=g,null===(p=this.changeSize.element.next())||void 0===p||p.css("width",g+"px"),null===l||void 0===l||null===(f=l.eq(h+1))||void 0===f||f.attributes("width",g)}else{var m=d.reduce((function(e,t,n){return n!==h?e+t:e}),0);a=Math.min(i-m,a)}d[h]=a,this.changeSize.element.css("width",a+"px"),null===l||void 0===l||null===(A=l.eq(h))||void 0===A||A.attributes("width",a),s=Math.min(d.reduce((function(e,t){return e+t}),0),i)}else{var v;this.changeSize.element.css("width",a+"px"),null===l||void 0===l||null===(v=l.eq(this.changeSize.index))||void 0===v||v.attributes("width",a)}if(this.table.enableScroll){var b,y=this.changeSize.element.get(),w=null===(b=this.viewport)||void 0===b?void 0:b.get(),x=y.offsetLeft+y.offsetWidth;x-w.scrollLeft+20>w.offsetWidth?w.scrollLeft=x+20-w.offsetWidth:w.scrollLeft+w.offsetWidth===w.scrollWidth&&(w.scrollLeft=Math.max(0,s+34-w.offsetWidth))}this.clearActiveStatus(),this.hideContextMenu(),this.renderRowBars(),this.renderColSplitBars(this.changeSize.element,this.changeSize.trigger.element),null===(n=this.tableRoot)||void 0===n||n.css("width","".concat(s,"px")),null===(r=this.colsHeader)||void 0===r||r.css("width","".concat(s,"px"))}}},{key:"onChangeRowHeight",value:function(e){var t,n;if(this.dragging&&this.changeSize){var r=(e instanceof MouseEvent?e.clientY:e.touches[0].clientY)-this.dragging.y,i=Math.max(this.ROW_MIN_HEIGHT,this.changeSize.height+r);r=i-this.changeSize.height,this.changeSize.element.css("height",i+"px"),this.clearActiveStatus(),this.hideContextMenu(),this.renderRowSplitBars(this.changeSize.element,this.changeSize.trigger.element),null===(t=this.tableRoot)||void 0===t||null===(n=t.find("tr").eq(this.changeSize.index))||void 0===n||n.css("height","".concat(i,"px"))}}},{key:"renderColSplitBars",value:function(e,t){var n,r=(null===(n=this.table.selection.tableModel)||void 0===n?void 0:n.height)||0;t.addClass("dragging").css("height","".concat(r+e.height(),"px"))}},{key:"renderRowSplitBars",value:function(e,t){var n,r,i=null===(n=this.viewport)||void 0===n?void 0:n.get(),o=(null===(r=this.table.selection.tableModel)||void 0===r?void 0:r.width)||0,a=Math.min(i.offsetWidth-e.width(),o);t.addClass("dragging").css("width","".concat(a+e.width(),"px"))}},{key:"bindDragColEvent",value:function(){var e=this.table.wrapper;null===e||void 0===e||e.on("dragover",this.onDragCol),null===e||void 0===e||e.on("drop",this.onDragColEnd),null===e||void 0===e||e.on("dragend",this.onDragColEnd)}},{key:"unbindDragColEvent",value:function(){var e,t,n=this.table.wrapper,r=null===(e=this.colsHeader)||void 0===e?void 0:e.find(Or.COLS_HEADER_ITEM_CLASS);null===r||void 0===r||r.removeClass("dragging"),null===(t=this.colsHeader)||void 0===t||t.removeClass("dragging"),null===n||void 0===n||n.off("dragover",this.onDragCol),null===n||void 0===n||n.off("drop",this.onDragColEnd),null===n||void 0===n||n.off("dragend",this.onDragColEnd)}},{key:"bindDragRowEvent",value:function(){var e=this.table.wrapper;null===e||void 0===e||e.on("dragover",this.onDragRow),null===e||void 0===e||e.on("drop",this.onDragRowEnd),null===e||void 0===e||e.on("dragend",this.onDragRowEnd)}},{key:"unbindDragRowEvent",value:function(){var e,t,n=this.table.wrapper,r=null===(e=this.rowsHeader)||void 0===e?void 0:e.find(Or.ROWS_HEADER_ITEM_CLASS);null===r||void 0===r||r.removeClass("dragging"),null===(t=this.rowsHeader)||void 0===t||t.removeClass("dragging"),null===n||void 0===n||n.off("dragover",this.onDragRow),null===n||void 0===n||n.off("drop",this.onDragRowEnd),null===n||void 0===n||n.off("dragend",this.onDragRowEnd)}},{key:"showPlaceHolder",value:function(e,t){if(this.draggingHeader){var n=this.draggingHeader,r=n.element,i=n.minIndex,o=n.maxIndex;if(r.closest(Or.COLS_HEADER_CLASS).length>0){var a,l,c,A,u,d,h,p,f,g,m;if(e===this.draggingHeader.index)return;if(i<=e&&e<=o+1)return delete this.draggingHeader.index,delete this.draggingHeader.isNext,void(null===(m=this.placeholder)||void 0===m||m.css("display","none"));this.draggingHeader.isNext=t,this.draggingHeader.index=e;var v=null===(a=this.colsHeader)||void 0===a?void 0:a.find(Or.COLS_HEADER_ITEM_CLASS);if(!v)return;var b=this.draggingHeader.index!==v.length?v.eq(this.draggingHeader.index).get().offsetLeft+2:v.eq(this.draggingHeader.index-1).get().offsetLeft+v.eq(this.draggingHeader.index-1).get().offsetWidth+2,y=null===(l=this.viewport)||void 0===l?void 0:l.get(),w=y.scrollLeft,x=y.offsetWidth;b<w&&(y.scrollLeft=b-5),b>w+x&&(y.scrollLeft=b-x+5);var k=((null===(c=this.table.selection.tableModel)||void 0===c?void 0:c.height)||0)+v.height(),C=null===(A=this.viewport)||void 0===A?void 0:A.css("padding-top"),B=(null===(u=this.viewport)||void 0===u?void 0:u.css("padding-left"))||"0";null===(d=this.placeholder)||void 0===d||d.css("width","2px"),null===(h=this.placeholder)||void 0===h||h.css("height","".concat(k,"px")),null===(p=this.placeholder)||void 0===p||p.css("left",b-4+(0,s.ZQ)(B)+"px"),null===(f=this.placeholder)||void 0===f||f.css("top",C),null===(g=this.placeholder)||void 0===g||g.css("display","block")}else if(r.closest(Or.ROWS_HEADER_CLASS).length>0){var _,E,S,F,T,M,I,N,U,L,Q;if(e===this.draggingHeader.index)return;if(i<=e&&e<=o+1)return delete this.draggingHeader.index,delete this.draggingHeader.isNext,void(null===(Q=this.placeholder)||void 0===Q||Q.css("display","none"));this.draggingHeader.index=e,this.draggingHeader.isNext=t;var D=null===(_=this.rowsHeader)||void 0===_?void 0:_.find(Or.ROWS_HEADER_ITEM_CLASS);if(!D)return;var H=this.draggingHeader.index!==D.length?D.eq(this.draggingHeader.index).get().offsetTop+2:D.eq(this.draggingHeader.index-1).get().offsetTop+D.eq(this.draggingHeader.index-1).get().offsetHeight-2,O=(null===(E=this.table.selection.tableModel)||void 0===E?void 0:E.width)||0,z=null===(S=this.viewport)||void 0===S?void 0:S.css("padding-top"),Z=(null===(F=this.viewport)||void 0===F?void 0:F.css("padding-left"))||"0",R=null===(T=this.colsHeader)||void 0===T?void 0:T.find(Or.COLS_HEADER_ITEM_CLASS);null===(M=this.placeholder)||void 0===M||M.css("height","2px"),null===(I=this.placeholder)||void 0===I||I.css("width","".concat(O,"px")),null===(N=this.placeholder)||void 0===N||N.css("left",Z),null===(U=this.placeholder)||void 0===U||U.css("top",H+(0,s.ZQ)(z||"0")+((null===R||void 0===R?void 0:R.height())||0)-2+"px"),null===(L=this.placeholder)||void 0===L||L.css("display","block")}}}},{key:"removeRow",value:function(e){var t,n,r,i,o=null===(t=this.rowsHeader)||void 0===t?void 0:t.find(Or.ROWS_HEADER_ITEM_CLASS),a=null===o||void 0===o||null===(n=o.eq(e))||void 0===n?void 0:n.get();a&&(null===(r=this.rowsHeader)||void 0===r||null===(i=r.get())||void 0===i||i.removeChild(a))}},{key:"removeCol",value:function(e){var t,n,r,i,o,a,s=null===(t=this.colsHeader)||void 0===t?void 0:t.find(Or.COLS_HEADER_ITEM_CLASS),l=null===(n=this.colsHeader)||void 0===n?void 0:n.get(),c=null===s||void 0===s||null===(r=s.eq(e))||void 0===r?void 0:r.get();l&&c&&(null===(i=this.colsHeader)||void 0===i||i.css("width",l.offsetWidth-c.offsetWidth+"px"),l.removeChild(c),null===(o=this.tableRoot)||void 0===o||o.css("width",null===(a=this.colsHeader)||void 0===a?void 0:a.css("width")))}},{key:"showContextMenu",value:function(e){var t=this,n=this.editor;if(this.menuBar&&e.target&&this.table.wrapper&&n.scrollNode){e.preventDefault();var r=this.table.selection,i=this.menuBar.find(Or.MENUBAR_ITEM_CLASS);i.removeClass("disabled"),i.each((function(e){var n=(0,s.$)(e),i=n.attributes("data-action");if(t.getMenuDisabled(i))n.addClass("disabled");else{var o=n.find("input".concat(Or.MENUBAR_ITEM_INPUT_CALSS));if(0===o.length)return;var a=o.get();t.menuSets.has(e)||(t.menuSets.add(e),o.on("blur",(function(){a.value=Math.min(parseInt(a.value,10)||1,t.MAX_INSERT_NUM).toString()})).on("keydown",(function(e){(0,s.P6)("enter",e)&&t.handleTriggerMenu(n)})),o.on("mousedown",t.onMenuInputMousedown));var l=r.getSelectArea(),c=["insertColLeft","insertColRight"].indexOf(i)>-1,A=["insertRowUp","insertRowDown"].indexOf(i)>-1;c&&(a.value="".concat(l.end.col-l.begin.col+1)),A&&(a.value="".concat(l.end.row-l.begin.row+1))}}));var o=this.menuBar.find("div.split");o.each((function(e){var t=(0,s.$)(e),n=t.prev();while(n){if(n.hasClass("split")){t.remove();break}if(!n.hasClass("disabled"))break;n=n.prev()}n||t.remove()}));var a=(0,s.$)(e.target),l=a.getBoundingClientRect()||{top:0,left:0},c=a.parent(),A=0,u=0;while(c&&c.closest(Or.TABLE_WRAPPER_CLASS).length>0){var d=c.getBoundingClientRect()||{top:0,left:0};A+=l.top-d.top,u+=l.left-d.left,l=d,c=c.parent()}var h=this.table.wrapper.get().getBoundingClientRect(),p=n.scrollNode.getViewport();A+=e.offsetY;var f=this.menuBar.height(),g=h.top+A+f+4;if(g>p.bottom){var m=g-p.bottom;A-m<0&&h.top+A-m<p.top&&(m=h.top+A-p.top),A-=m}this.menuBar.css("left",u+e.offsetX+"px"),this.menuBar.css("top",A+"px"),this.contextVisible=!0}}},{key:"hideContextMenu",value:function(){var e,t;if(this.contextVisible){var n=null===(e=this.menuBar)||void 0===e?void 0:e.find(Or.MENUBAR_ITEM_CLASS);null===n||void 0===n||n.removeClass("disabled"),this.contextVisible=!1,null===(t=this.menuBar)||void 0===t||t.css({top:"-99999px",left:"-99999px"})}}},{key:"getMenuDisabled",value:function(e){var t=this.table,n=t.selection,r=t.command;switch(e){case"cut":case"copy":return!n.selectArea||n.selectArea.count<=1;case"splitCell":return!n.hasMergeCell();case"mergeCell":return!n.selectArea;case"mockPaste":return!r.hasCopyData();case"removeCol":case"insertColLeft":case"insertColRight":return n.isColSelected();case"removeRow":case"insertRowUp":case"insertRowDown":return n.isRowSelected();default:return!1}}},{key:"handleClickMenu",value:function(e){if(e.target){var t=(0,s.$)(e.target),n=t.closest(".table-menubar-item");0!==n.length&&"input"!==t.name&&(e.stopPropagation(),this.handleTriggerMenu(n))}}},{key:"handleTriggerMenu",value:function(e){if(!e.hasClass("disabled")){var t,n=e.attributes("data-action"),r=e.find("input".concat(Or.MENUBAR_ITEM_INPUT_CALSS)),i=void 0;if(r.length>0)i=Math.min(parseInt((null===(t=r.get())||void 0===t?void 0:t.value)||"1",10),this.MAX_INSERT_NUM);this.table.command[n](i)}this.hideContextMenu()}},{key:"handleHoverMenu",value:function(e){if(e.target){var t=(0,s.$)(e.target).closest(".table-menubar-item");if(0!==t.length){e.stopPropagation();var n=this.table.selection;if(!t.hasClass("disabled")){var r=t.attributes("data-action");switch(r){case"removeCol":this.handleHighlightCol();break;case"removeRow":this.handleHighlightRow();break;case"removeTable":this.handleHighlightTable();break;default:n.hideHighlight()}}}}}},{key:"hideHighlight",value:function(e){e.stopPropagation(),this.table.selection.hideHighlight()}},{key:"drawBackgroundColor",value:function(e){var t=this.table,n=t.selection,r=t.helper;n.each((function(t){!r.isEmptyModelCol(t)&&t.element&&(e&&"transparent"!==e?t.element.style.backgroundColor=e:t.element.style.removeProperty("background-color"))}))}},{key:"setAlign",value:function(e){var t=this.table,n=t.selection,r=t.helper;n.each((function(t){!r.isEmptyModelCol(t)&&t.element&&(e&&"top"!==e?t.element.style.verticalAlign=e:t.element.style.removeProperty("vertical-align"))}))}},{key:"destroy",value:function(){var e,t,n,r,i,o,a,s,l,c,A,u,d;null===(e=this.colsHeader)||void 0===e||e.removeAllEvents(),null===(t=this.rowsHeader)||void 0===t||t.removeAllEvents(),null===(n=this.tableHeader)||void 0===n||n.removeAllEvents(),null===(r=this.table.wrapper)||void 0===r||r.removeAllEvents(),null===(i=this.tableRoot)||void 0===i||i.removeAllEvents(),null===(o=this.menuBar)||void 0===o||o.removeAllEvents(),null===(a=this.viewport)||void 0===a||a.removeAllEvents(),null===(s=this.rowDeleteButton)||void 0===s||s.removeAllEvents(),null===(l=this.colDeleteButton)||void 0===l||l.removeAllEvents(),null===(c=this.colAddButton)||void 0===c||c.removeAllEvents(),null===(A=this.colsHeader)||void 0===A||A.removeAllEvents(),null===(u=this.rowAddButton)||void 0===u||u.removeAllEvents(),null===(d=this.rowsHeader)||void 0===d||d.removeAllEvents()}}]),n}(Ln.EventEmitter2),Kr=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(e,i){var o;return(0,r.Z)(this,n),o=t.call(this),o.editor=void 0,o.table=void 0,o.tableRoot=void 0,o.colsHeader=void 0,o.rowsHeader=void 0,o.tableHeader=void 0,o.tableModel=void 0,o.selectArea=void 0,o.selectRange=void 0,o.dragging=void 0,o.isShift=!1,o.prevMouseDownTd=void 0,o.prevOverTd=void 0,o.highlight=void 0,o.beginAllRow=void 0,o.beginAllCol=void 0,o.onTdMouseDown=function(e){o.selectRange=void 0;var t=o.editor;if(e.target&&(0,s.iC)(t)){var n=t.change,r=(0,s.$)(e.target),i=r.closest("td");if(0!==i.length&&i.inEditor()){var a=n.range.get(),l=o.getCellPoint(i),c=(0,V.Z)(l,2),A=c[0],u=c[1],d=!!i.attributes("table-cell-selection");if(o.isShift){var h={row:0,col:0};if(o.prevMouseDownTd){var p=o.getCellPoint(o.prevMouseDownTd),f=(0,V.Z)(p,2),g=f[0],m=f[1];h={row:g,col:m}}else if(o.selectArea&&(h=o.selectArea.begin,o.tableModel)){var v=o.tableModel.table[h.row][h.col];!o.table.helper.isEmptyModelCol(v)&&v.element&&(o.prevMouseDownTd=(0,s.$)(v.element))}o.select(h,{row:A,col:u})}else{if(o.prevMouseDownTd=i,e instanceof MouseEvent&&2!==e.button&&o.select({row:A,col:u},{row:A,col:u}),"td"!==r.name||!d&&a.startNode.closest("td").equal(i)&&a.endNode.closest("td").equal(i))"td"===r.name&&e.preventDefault();else{if(e instanceof MouseEvent&&2===e.button&&r.attributes("table-cell-selection"))return;e.preventDefault(),o.focusCell(i)}var b=function(){o.select({row:A,col:u},{row:A,col:u}),o.dragging={trigger:{element:i}},o.addDragEvent()};if(e instanceof MouseEvent&&2===e.button)r.attributes("table-cell-selection")&&e.preventDefault();else{if("td"===r.name){var y=i.find(s.Su);if(y.length>0){var w=y.last();if(w){var x,k;if(!w.isBlockCard())return b();if(((null===(x=w.get())||void 0===x?void 0:x.offsetTop)||0)+((null===(k=w.get())||void 0===k?void 0:k.clientHeight)||0)>(e instanceof MouseEvent?e:e.touches[0]).clientY)return b();var C=(0,s.$)("<p><br /></p>");y.append(C);var B=t.change.range.get();B.select(C,!0).collapse(!1),t.change.apply(B)}}}b()}}}}},o.removeDragEvent=function(){var e,t;null===(e=o.tableRoot)||void 0===e||e.removeClass("drag-select"),null===(t=o.table.wrapper)||void 0===t||t.removeClass("drag-selecting"),document.removeEventListener(s.tq?"touchend":"mouseup",o.removeDragEvent),document.removeEventListener(s.tq?"touchmove":"mousemove",o.onDragMove),o.dragging=void 0},o.onDragMove=function(e){if(o.dragging&&e.target){var t,n,r=(0,s.$)(e.target).closest("td");if(!(0===r.length||!r.inEditor()||o.prevOverTd&&r.equal(o.prevOverTd)))if(o.prevOverTd=r,o.dragging.trigger.element.equal(r))null===(t=o.table.wrapper)||void 0===t||t.removeClass("drag-selecting"),o.clearSelect();else null===(n=o.table.wrapper)||void 0===n||n.addClass("drag-selecting"),o.selectCell(o.dragging.trigger.element,r)}},o.onShiftKeydown=function(e){e.target&&o.tableModel&&(0,s.iC)(o.editor)&&(0,s.P6)("shift",e)&&(o.isShift=!0)},o.onKeydown=function(e){if(e.target&&o.tableModel&&(0,s.iC)(o.editor)){var t=(0,s.$)(e.target).closest("td");if(0!==t.length&&t.inEditor()){var n=o.getCellPoint(t),r=(0,V.Z)(n,2),i=r[0],a=r[1];if(!(i<0||a<0))if((0,s.P6)("shift+left",e)?o.selectLeft(e,t):(0,s.P6)("shift+right",e)?o.selectRigth(e,t):(0,s.P6)("shift+up",e)?o.selectUp(e,t):(0,s.P6)("shift+down",e)&&o.selectDown(e,t),(0,s.P6)("shift",e))o.isShift=!0;else{if(o.selectRange&&(o.isShift=!1,o.selectRange=void 0),(0,s.P6)("tab",e)||(0,s.P6)("mod",e)||(0,s.P6)("opt",e)||(0,s.P6)("shift",e)||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;setTimeout((function(){o.clearSelect()}),50)}}}},o.onShiftKeyup=function(e){!1===o.isShift&&o.selectRange&&(o.selectRange=void 0,o.clearSelect()),o.isShift=!1},o.table=i,o.editor=e,o}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.table.wrapper;e&&(this.tableRoot=e.find(Or.TABLE_CLASS),this.colsHeader=e.find(Or.COLS_HEADER_CLASS),this.rowsHeader=e.find(Or.ROWS_HEADER_CLASS),this.tableHeader=e.find(Or.HEADER_CLASS),this.highlight=e.find(Or.TABLE_HIGHLIGHT_CLASS),this.render("init"),this.bindEvents())}},{key:"render",value:function(e){this.refreshModel();var t=this.tableModel;if(t){var n=this.getSelectArea(),r=n.begin,i=n.end;if("mergeCell"===e||"splitCell"===e){var o=r.row<0?0:Math.min(r.row,t.rows-1),a=r.col<0?0:Math.min(r.col,t.cols-1),s=t.table[o][a];this.table.helper.isEmptyModelCol(s)&&(s=t.table[s.parent.row][s.parent.col]),!this.table.helper.isEmptyModelCol(s)&&s.element&&"mergeCell"===e&&(this.clearSelect(),this.selectCellRange(s.element))}else if("removeRow"===e){var l=r.row<0?0:Math.min(r.row,t.rows-1),c=t.table[l][0];!this.table.helper.isEmptyModelCol(c)&&c.element&&this.focusCell(c.element)}else if("removeCol"===e){var A=r.col<0?0:Math.min(r.col,t.cols-1),u=t.table[0][A];!this.table.helper.isEmptyModelCol(u)&&u.element&&this.focusCell(u.element)}else this.select(r,i);this.renderBorder()}}},{key:"renderBorder",value:function(){var e=this,t=this.tableModel;t&&t.table.forEach((function(n,r){n.forEach((function(n,i){if(!e.table.helper.isEmptyModelCol(n)){if(!n.element)return;var o=r===t.rows-1,a=i===t.cols-1;n.isMulti&&(i+n.colSpan===t.cols&&(a=!0),r+n.rowSpan===t.rows&&(o=!0)),o?n.element.classList.contains("table-last-column")||n.element.classList.add("table-last-column"):n.element.classList.contains("table-last-column")&&n.element.classList.remove("table-last-column"),a?n.element.classList.contains("table-last-row")||n.element.classList.add("table-last-row"):n.element.classList.contains("table-last-row")&&n.element.classList.remove("table-last-row")}}))}))}},{key:"bindEvents",value:function(){var e;document.addEventListener("keydown",this.onShiftKeydown),document.addEventListener("keyup",this.onShiftKeyup),null===(e=this.table.wrapper)||void 0===e||e.on("mousedown",this.onTdMouseDown).on("keydown",this.onKeydown)}},{key:"unbindEvents",value:function(){var e;document.removeEventListener("keydown",this.onShiftKeydown),document.removeEventListener("keyup",this.onShiftKeyup),null===(e=this.table.wrapper)||void 0===e||e.off("mousedown",this.onTdMouseDown).off("keydown",this.onKeydown)}},{key:"refreshModel",value:function(){this.tableRoot&&0!==this.tableRoot.length&&(this.tableModel=this.table.helper.getTableModel(this.tableRoot))}},{key:"each",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.tableModel;if(n){var r=this.getSelectArea(),i=r.begin,o=r.end;if(!(i.row<0||i.col<0))if(t)for(var a=o.row;a>-1&&a>=i.row;a--)for(var s=o.col;s>-1&&s>=i.col;s--){var l=n.table[a][s];e(l,a,s)}else for(var c=i.row;c>-1&&c<=o.row;c++)for(var A=i.col;A>-1&&A<=o.col;A++){var u=n.table[c][A];e(u,c,A)}}}},{key:"getCellPoint",value:function(e){var t,n,r,i=this;if("td"!==e.name)return[-1,-1];var o=null===(t=e.parent())||void 0===t?void 0:t.index();if(void 0===o||o<0)return[-1,-1];var a=null===(n=this.tableModel)||void 0===n||null===(r=n.table[o])||void 0===r?void 0:r.findIndex((function(t){var n;return e.equal((i.table.helper.isEmptyModelCol(t)?null===(n=i.tableModel)||void 0===n?void 0:n.table[t.parent.row][t.parent.col]:t).element)}));return void 0===a||a<0?[-1,-1]:[o,a]}},{key:"getCellIndex",value:function(e,t){if(!this.tableModel)return 0;for(var n=this.tableModel.table[e],r=0,i=0;i<t;i++){var o=n[i];!this.table.helper.isEmptyModelCol(o)&&o.element&&r++}return r}},{key:"getSingleCell",value:function(){return this.prevMouseDownTd?this.prevMouseDownTd:null}},{key:"getSingleCellPoint",value:function(){var e=this.getSingleCell();return e?this.getCellPoint(e):[-1,-1]}},{key:"getSelectArea",value:function(){if(this.selectArea)return this.selectArea;var e=this.getSingleCellPoint();if(!this.tableModel||-1===e[0])return{begin:{row:-1,col:-1},end:{row:-1,col:-1},count:0,allCol:!1,allRow:!1};var t=this.tableModel,n=t.cols,r=t.rows,i=t.table,o=i[e[0]][e[1]];return this.table.helper.isEmptyModelCol(o)&&(o=i[o.parent.row][o.parent.col],o.element&&(e=this.getCellPoint((0,s.$)(o.element)))),{begin:{row:e[0],col:e[1]},end:{row:e[0],col:e[1]},count:-1===e[0]?0:1,allCol:1===n,allRow:1===r}}},{key:"selectCol",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.tableModel){if(this.isShift)if(this.beginAllCol)e<this.beginAllCol?t=this.beginAllCol:e=this.beginAllCol;else if(this.prevMouseDownTd){var n=this.getCellPoint(this.prevMouseDownTd),r=(0,V.Z)(n,2),i=(r[0],r[1]);e=i,this.beginAllCol=i}else if(this.selectArea&&(e=this.selectArea.begin.col,this.tableModel)){var o=this.tableModel.table[this.selectArea.begin.row][this.selectArea.begin.col];!this.table.helper.isEmptyModelCol(o)&&o.element&&this.focusCell(o.element)}this.select({row:0,col:e},{row:this.tableModel.rows-1,col:t})}}},{key:"selectRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.tableModel){if(this.isShift)if(this.beginAllRow)e<this.beginAllRow?t=this.beginAllRow:e=this.beginAllRow;else if(this.prevMouseDownTd){var n=this.getCellPoint(this.prevMouseDownTd),r=(0,V.Z)(n,2),i=r[0];r[1];e=i,this.beginAllRow=i}else if(this.selectArea&&(e=this.selectArea.begin.row,this.tableModel)){var o=this.tableModel.table[this.selectArea.begin.row][this.selectArea.begin.col];!this.table.helper.isEmptyModelCol(o)&&o.element&&this.focusCell(o.element)}this.select({row:e,col:0},{row:t,col:this.tableModel.cols-1})}}},{key:"selectCell",value:function(e,t){if("td"===e.name&&"td"===t.name){var n=this.getCellPoint(e),r=this.getCellPoint(t);this.select({row:n[0],col:n[1]},{row:r[0],col:r[1]})}}},{key:"clearSelect",value:function(){this.select({row:-1,col:-1},{row:-1,col:-1})}},{key:"calcEdge",value:function(e,t){var n=this,r=Math.min(e.row,t.row),i=Math.max(e.row,t.row),o=Math.min(e.col,t.col),a=Math.max(e.col,t.col),s=function e(){if(!n.tableModel)return{beginCol:o,beginRow:r,endCol:a,endRow:i};for(var t=r;t<=i;t++){var s=n.tableModel.table[t];if(s)for(var l=o;l<=a;l++){var c=s[l];if(c)if(n.table.helper.isEmptyModelCol(c)){var A=n.tableModel.table[c.parent.row][c.parent.col];if(n.table.helper.isEmptyModelCol(A))continue;if(A.colSpan+c.parent.col-1===o&&c.parent.col<o)return o=c.parent.col,e();if(A.rowSpan+c.parent.row-1===r&&c.parent.row<r)return r=c.parent.row,e();if(A.rowSpan>1&&i<A.rowSpan-1+c.parent.row)return i=A.rowSpan-1+c.parent.row,e();if(A.colSpan>1&&a<A.colSpan-1+c.parent.col)return a=A.colSpan-1+c.parent.col,e()}else{if(l!==o&&c.colSpan+l-1===o)return o=l,e();if(t!==r&&c.rowSpan+t-1===r)return r=t,e();if(c.rowSpan>1&&i<c.rowSpan-1+t)return i=c.rowSpan-1+t,e();if(c.colSpan>1&&a<c.colSpan-1+l)return a=c.colSpan-1+l,e()}}}return{beginCol:o,beginRow:r,endCol:a,endRow:i}};return s()}},{key:"select",value:function(e,t){var n;if(this.tableModel){var r=e.row===t.row&&e.col===t.col;null===(n=this.tableRoot)||void 0===n||n.find("td[table-cell-selection]").removeAttributes("table-cell-selection");var i=this.calcEdge(e,t),o=i.beginRow,a=i.endRow,l=i.beginCol,c=i.endCol,A=0;if(o>=0&&l>=0&&a<this.tableModel.rows&&c<this.tableModel.cols)for(var u=o;u<=a;u++)for(var d=l;d<=c;d++){var h=this.tableModel.table[u];if(h){var p=h[d];p&&(this.table.helper.isEmptyModelCol(p)||(!r&&p.element&&(0,s.$)(p.element).attributes("table-cell-selection","true"),A++))}}if(r&&e.row>-1&&e.col>-1){var f,g=this.tableModel.table[e.row][e.col];g&&!this.table.helper.isEmptyModelCol(g)&&g.element&&!(null===(f=this.prevMouseDownTd)||void 0===f?void 0:f.equal(g.element))&&this.focusCell(g.element)}var m=0===l&&c===this.tableModel.cols-1,v=0===o&&a===this.tableModel.rows-1;m&&!this.beginAllRow?this.beginAllRow=o:!m&&this.beginAllRow&&(this.beginAllRow=void 0),v&&!this.beginAllCol?this.beginAllCol=l:!v&&this.beginAllCol&&(this.beginAllCol=void 0),this.selectArea=0===A||r?void 0:{begin:{row:o,col:l},end:{row:a,col:c},count:A,allCol:m,allRow:v},this.emit("select",this.selectArea)}}},{key:"focusCell",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.editor;if((0,s.iC)(n)){var r=n.change;(0,s.mW)(e)&&(e=(0,s.$)(e));var i,o=r.range.get(),a=e.find(s.Su);if(a.length>0)o.select(a,!0).shrinkToElementNode().shrinkToTextNode().collapse(t),setTimeout((function(){r.range.select(o)}),20),null===(i=a.get())||void 0===i||i.focus(),this.prevMouseDownTd=e,this.selectCell(e,e)}}},{key:"selectCellRange",value:function(e){var t,n=this.editor;if((0,s.iC)(n)){var r=n.change;(0,s.mW)(e)&&(e=(0,s.$)(e));var i=r.range.get(),o=e.find(s.Su);if(0!==o.length){i.select(o,!0).shrinkToElementNode();var a,l=o.children(),c=l.eq(0);if(1===l.length&&"br"===(null===c||void 0===c||null===(t=c.first())||void 0===t?void 0:t.name))i.collapse(!1),r.range.select(i),null===(a=o.get())||void 0===a||a.focus();else r.range.select(i);this.prevMouseDownTd=e,this.selectCell(e,e)}}}},{key:"addDragEvent",value:function(){var e;null===(e=this.tableRoot)||void 0===e||e.addClass("drag-select"),document.addEventListener(s.tq?"touchend":"mouseup",this.removeDragEvent,{passive:!0}),document.addEventListener(s.tq?"touchmove":"mousemove",this.onDragMove,{passive:!0})}},{key:"selectLeft",value:function(e,t){var n,r,i,o=this.editor;if((0,s.iC)(o)){var a=this.getCellPoint(t),l=(0,V.Z)(a,2),c=l[0],A=l[1];if(!(c<0||A<0)){var u=(null===(n=this.selectArea)||void 0===n?void 0:n.count)||0,d=o.change.range.get();if(0===u){if(this.selectRange&&"right"===this.selectRange.type&&d.endOffset!==this.selectRange.startOffset)return;this.selectRange={type:"left",startOffset:d.startOffset,endOffset:d.endOffset};var h=d.startNode;if(0!==d.startOffset)return;if(h.prev())return;var p=h.parent();while(p&&!p.isEditable()){if(p.prev())return;p=p.parent()}}var f=(null===(r=this.selectArea)||void 0===r?void 0:r.begin)||{row:c,col:A},g=(null===(i=this.selectArea)||void 0===i?void 0:i.end)||{row:c,col:A},m=f.col!==A,v=m?f.col-1:g.col-1;v<0||(e.preventDefault(),v===A&&2===u&&(v=-1),m?this.select((0,nn.Z)((0,nn.Z)({},f),{},{col:v}),g):this.select(f,(0,nn.Z)((0,nn.Z)({},g),{},{col:v})))}}}},{key:"selectRigth",value:function(e,t){var n,r,i,o=this.editor;if((0,s.iC)(o)&&this.tableModel){e.stopPropagation();var a=this.getCellPoint(t),l=(0,V.Z)(a,2),c=l[0],A=l[1];if(!(c<0||A<0)){var u=(null===(n=this.selectArea)||void 0===n?void 0:n.count)||0,d=o.change.range.get();if(0===u){var h;if(this.selectRange&&"left"===this.selectRange.type&&d.startOffset!==this.selectRange.endOffset)return;this.selectRange={type:"right",startOffset:d.startOffset,endOffset:d.endOffset};var p=d.endNode;if(p.isText()&&d.endOffset!==p.text().length)return;var f=p.children();if(p.isElement()&&d.endOffset!==f.length&&"br"!==(null===(h=p.last())||void 0===h?void 0:h.name))return;if(p.next())return;var g=p.parent();while(g&&!g.isEditable()){if(g.next())return;g=g.parent()}}var m=this.tableModel.cols,v=(null===(r=this.selectArea)||void 0===r?void 0:r.begin)||{row:c,col:A},b=(null===(i=this.selectArea)||void 0===i?void 0:i.end)||{row:c,col:A},y=v.col!==A,w=y?v.col+1:b.col+1;w>m-1||(e.preventDefault(),w===A&&2===u&&(w=-1),y?this.select((0,nn.Z)((0,nn.Z)({},v),{},{col:w}),b):this.select(v,(0,nn.Z)((0,nn.Z)({},b),{},{col:w})))}}}},{key:"selectUp",value:function(e,t){var n,r,i,o=this.editor;if((0,s.iC)(o)&&this.tableModel){var a=this.getCellPoint(t),l=(0,V.Z)(a,2),c=l[0],A=l[1];if(!(c<0||A<0)){var u=(null===(n=this.selectArea)||void 0===n?void 0:n.count)||0,d=o.change.range.get();if(0===u){if(this.selectRange&&"bottom"===this.selectRange.type&&d.endOffset!==this.selectRange.startOffset)return;this.selectRange={type:"top",startOffset:d.startOffset,endOffset:d.endOffset};var h=d.getBoundingClientRect(),p=t.find(s.Su).getBoundingClientRect();if(0!==h.width&&0===h.height&&h.top-((null===p||void 0===p?void 0:p.top)||0)>10)return}var f=(null===(r=this.selectArea)||void 0===r?void 0:r.begin)||{row:c,col:A},g=(null===(i=this.selectArea)||void 0===i?void 0:i.end)||{row:c,col:A},m=f.row!==c,v=m?f.row-1:g.row-1;e.preventDefault(),v<0||(v===c&&2===u&&(v=-1),m?this.select((0,nn.Z)((0,nn.Z)({},f),{},{row:v}),g):this.select(f,(0,nn.Z)((0,nn.Z)({},g),{},{row:v})))}}}},{key:"selectDown",value:function(e,t){var n,r,i,o=this.editor;if((0,s.iC)(o)&&this.tableModel){var a=this.getCellPoint(t),l=(0,V.Z)(a,2),c=l[0],A=l[1];if(!(c<0||A<0)){var u=(null===(n=this.selectArea)||void 0===n?void 0:n.count)||0,d=o.change.range.get();if(d.shrinkToElementNode(),0===u){if(this.selectRange&&"top"===this.selectRange.type&&d.startOffset!==this.selectRange.endOffset)return;this.selectRange={type:"bottom",startOffset:d.startOffset,endOffset:d.endOffset};var h=d.getBoundingClientRect(),p=t.find(s.Su).getBoundingClientRect();if(0!==h.width&&0===h.height&&((null===p||void 0===p?void 0:p.bottom)||0)-h.bottom>10)return}var f=this.tableModel.rows,g=(null===(r=this.selectArea)||void 0===r?void 0:r.begin)||{row:c,col:A},m=(null===(i=this.selectArea)||void 0===i?void 0:i.end)||{row:c,col:A},v=g.row!==c,b=v?g.row+1:m.row+1;b>f-1||(e.preventDefault(),b===c&&2===u&&(b=-1),v?this.select((0,nn.Z)((0,nn.Z)({},g),{},{row:b}),m):this.select(g,(0,nn.Z)((0,nn.Z)({},m),{},{row:b})))}}}},{key:"getSelectionHtml",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.tableModel,n=this.table.helper;if(!t||!this.tableRoot)return null;var r={row:0,col:0},i={row:t.rows-1,col:t.cols-1};if(!e){var o=this.getSelectArea();r=o.begin,i=o.end}for(var a=this.tableRoot.find("col"),l=[],c=0,A=r.col;A<=i.col;A++){var u,d=null===(u=a.eq(A))||void 0===u?void 0:u.get();d&&(l.push('<col width="'.concat(d.width,'" />')),c+=parseInt(d.width))}for(var h="<colgroup>".concat(l.join(""),"</colgroup>"),p=[],f=r.row;f<=i.row;f++){for(var g=[],m=void 0,v=r.col;v<=i.col;v++){var b=t.table[f][v],y=void 0,w=void 0,x=void 0;if(!n.isEmptyModelCol(b)&&b.element&&(x=b.element.cloneNode(!0),b.element.parentElement&&(m=(0,s.$)(b.element.parentElement).css("height"))),!n.isEmptyModelCol(b)&&b.isMulti&&(y=Math.min(f+b.rowSpan-1,i.row)-f+1,w=Math.min(v+b.colSpan-1,i.col)-v+1),n.isEmptyModelCol(b)){var k=t.table[b.parent.row][b.parent.col];if(b.parent.row===f&&b.parent.col<r.col&&v===r.col){var C,B=r.col-b.parent.col;if(!n.isEmptyModelCol(k))w=Math.min(k.colSpan-B,i.col-r.col+1),y=k.rowSpan,x=null===(C=k.element)||void 0===C?void 0:C.cloneNode(!0)}if(b.parent.col===v&&b.parent.row<r.row&&f===r.row){var _,E=r.row-b.parent.row;if(!n.isEmptyModelCol(k))y=Math.min(k.rowSpan-E,i.row-r.row+1),w=k.colSpan,x=null===(_=k.element)||void 0===_?void 0:_.cloneNode(!0)}}if(x){y&&x.setAttribute("rowspan","".concat(y)),w&&x.setAttribute("colspan","".concat(w));var S=x.firstChild;if(S.classList.contains("table-main-content")){var F=x.cloneNode(!1);F.innerHTML=S.innerHTML,g.push(F.outerHTML)}else g.push(x.outerHTML)}}var T=(0,s.$)("<tr>".concat(g.join(""),"</tr>"));m&&T.css("height",m),p.push(T.get().outerHTML)}return'<body><meta name="aomao" content="table" /><table style="width:'.concat(c,'px">').concat(h).concat(p.join(""),"</table></body>")}},{key:"hasMergeCell",value:function(){var e=this.table,t=this.tableModel;if(!t)return!1;var n=this.getSelectArea(),r=n.begin,i=(n.end,n.count);if(1!==i)return!1;var o=t.table[r.row][r.col];return!e.helper.isEmptyModelCol(o)&&!0===o.isMulti}},{key:"isRowSelected",value:function(){return!!this.selectArea&&this.selectArea.allRow}},{key:"isColSelected",value:function(){return!!this.selectArea&&this.selectArea.allCol}},{key:"isTableSelected",value:function(){return!!this.selectArea&&this.selectArea.allCol&&this.selectArea.allRow}},{key:"showHighlight",value:function(e){var t,n,r,i,o,a,l,c=this.table.helper,A=this.tableModel;if(A){var u=e.begin,d=e.end,h=e.allCol,p=e.allRow;if(!(u.row<0||u.col<0)){var f=u.row,g=d.row;if(h&&!p)for(var m=u.row;m<=d.row;m++){var v=A.table[m][u.col];if(c.isEmptyModelCol(v)){var b=A.table[v.parent.row][v.parent.col];if(c.isEmptyModelCol(b))continue;f=Math.min(v.parent.row,f)}else g=Math.max(m+v.rowSpan-1,g)}var y=u.col,w=d.col;if(p&&!h)for(var x=u.col;x<=d.col;x++){var k=A.table[u.row][x];if(c.isEmptyModelCol(k)){var C=A.table[k.parent.row][k.parent.col];if(c.isEmptyModelCol(C))continue;y=Math.min(k.parent.col,y)}else w=Math.max(x+k.colSpan-1,w)}this.hideHighlight();for(var B,_=null===(t=this.colsHeader)||void 0===t?void 0:t.find(Or.COLS_HEADER_ITEM_CLASS),E=null===(n=this.rowsHeader)||void 0===n?void 0:n.find(Or.ROWS_HEADER_ITEM_CLASS),S=0,F=0,T=p?0:f;T<=(p?A.rows-1:g);T++){var M=A.table[T][y];if(c.isEmptyModelCol(M)){var I,N=A.table[M.parent.row][M.parent.col];if(c.isEmptyModelCol(N))continue;N.element&&p&&(S+=N.element.offsetHeight),null===E||void 0===E||null===(I=E.eq(T))||void 0===I||I.addClass("active")}else{var U;M.element&&(S+=M.element.offsetHeight),null===E||void 0===E||null===(U=E.eq(T))||void 0===U||U.addClass("active")}}for(var L=h?0:y;L<=(h?A.cols-1:w);L++){var Q=A.table[f][L];if(c.isEmptyModelCol(Q)){var D,H=A.table[Q.parent.row][Q.parent.col];if(c.isEmptyModelCol(H))continue;H.element&&h&&(F+=H.element.offsetWidth),null===_||void 0===_||null===(D=_.eq(L))||void 0===D||D.addClass("active")}else{var O;Q.element&&(F+=Q.element.offsetWidth),null===_||void 0===_||null===(O=_.eq(L))||void 0===O||O.addClass("active")}}if(g===A.rows-1&&w===A.cols-1)null===(B=this.tableHeader)||void 0===B||B.addClass("active");var z=A.table[p?0:f][h?0:y],Z=0,R=0;if(!c.isEmptyModelCol(z)&&z.element){var P,q=null===(P=this.tableRoot)||void 0===P?void 0:P.parent(),K=null===q||void 0===q?void 0:q.getBoundingClientRect(),W=z.element.getBoundingClientRect();Z+=W.top-((null===K||void 0===K?void 0:K.top)||0)-13,R+=W.left-((null===K||void 0===K?void 0:K.left)||0)}var j=(0,s.ZQ)((null===(r=this.table.wrapper)||void 0===r||null===(i=r.find(".data-scrollbar"))||void 0===i?void 0:i.css("left"))||"0")+(0,s.ZQ)((null===(o=this.table.wrapper)||void 0===o?void 0:o.css("margin-left"))||"0");R+=j;var V=(null===(a=this.colsHeader)||void 0===a||null===(l=a.find(Or.COLS_HEADER_ITEM_CLASS).get())||void 0===l?void 0:l.offsetHeight)||0;if(Z+=V,S>0&&F>0){var G,$,Y,X,J,ee,te,ne,re;if(null===(G=this.highlight)||void 0===G||G.css("width","".concat(F,"px")),null===($=this.highlight)||void 0===$||$.css("height","".concat(S,"px")),null===(Y=this.highlight)||void 0===Y||Y.css("top","".concat(Z,"px")),null===(X=this.highlight)||void 0===X||X.css("left","".concat(R,"px")),null===(J=this.highlight)||void 0===J||J.show("block"),null===(ee=this.table.wrapper)||void 0===ee||ee.addClass("data-table-highlight"),h)null===(te=this.table.wrapper)||void 0===te||te.addClass("data-table-highlight-row");if(p)null===(ne=this.table.wrapper)||void 0===ne||ne.addClass("data-table-highlight-col");if(h&&p)null===(re=this.table.wrapper)||void 0===re||re.addClass("data-table-highlight-all")}}}}},{key:"hideHighlight",value:function(){var e,t,n,r,i,o,a,s;null===(e=this.highlight)||void 0===e||e.hide(),null===(t=this.colsHeader)||void 0===t||t.find(".active").removeClass("active"),null===(n=this.rowsHeader)||void 0===n||n.find(".active").removeClass("active"),null===(r=this.tableHeader)||void 0===r||r.removeClass("active"),null===(i=this.table.wrapper)||void 0===i||i.removeClass("data-table-highlight"),null===(o=this.table.wrapper)||void 0===o||o.removeClass("data-table-highlight-row"),null===(a=this.table.wrapper)||void 0===a||a.removeClass("data-table-highlight-col"),null===(s=this.table.wrapper)||void 0===s||s.removeClass("data-table-highlight-all")}},{key:"destroy",value:function(){this.unbindEvents()}}]),n}(Ln.EventEmitter2),Wr=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(e,i){var o;return(0,r.Z)(this,n),o=t.call(this),o.editor=void 0,o.table=void 0,o.tableCleared=!1,o.rowCleared=!1,o.colCleared=!1,o.tableRoot=void 0,o.colsHeader=void 0,o.rowsHeader=void 0,o.tableHeader=void 0,o.viewport=void 0,o.clearFormat=function(){var e=o.table,t=e.selection,n=e.helper;t.getSelectArea();t.each((function(e){!n.isEmptyModelCol(e)&&e.element&&e.element.removeAttribute("style")})),o.emit("actioned","clearFormat")},o.hasCopyData=function(){return!!o.table.helper.getCopyData()},o.clearCopyData=function(){o.table.helper.clearCopyData()},o.editor=e,o.table=i,o}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.table.wrapper;e&&(this.tableRoot=e.find(Or.TABLE_CLASS),this.colsHeader=e.find(Or.COLS_HEADER_CLASS),this.rowsHeader=e.find(Or.ROWS_HEADER_CLASS),this.tableHeader=e.find(Or.HEADER_CLASS),this.viewport=e.find(Or.VIEWPORT))}},{key:"insertColAt",value:function(e,t,n,r){var i,o,a=this,l=this.table,c=l.selection,A=l.wrapper,u=c.tableModel;if(A&&u&&this.tableRoot){var d=e,h=n?"after":"before",p=A.find(Or.COLS_HEADER_ITEM_CLASS),f=null===(i=p.eq(d))||void 0===i?void 0:i.get(),g=n?d+1:d,m=A.find(Or.COLS_HEADER_CLASS),v=A.find(Or.TABLE_CLASS);r||(r=f.offsetWidth);var b=this.table.root.width(),y=this.table.colMinWidth,w=[];if(p.each((function(e,t){var n=p.eq(t);n&&w.push((0,s.ZQ)(n.css("width")))})),Array.isArray(r))for(var x=0;x<r.length;x++)w.splice(g+x,0,r[x]);else if("number"===typeof r)for(var k=0;k<t;k++)w.splice(g,0,r);var C=w.reduce((function(e,t){return e+t}),0);while(!this.table.enableScroll&&C>b){for(var B=0,_=0;_<w.length;_++){var E=w[_];if(E>y){if(w[_]=E-1,C--,C<=b)break}else B++}if(B===w.length)break}m.css("width",C+"px"),v.css("width",C+"px");var S=this.tableRoot.find("colgroup"),F=A.find("tr"),T=this.tableRoot.find("col"),M=null===(o=T.eq(d))||void 0===o?void 0:o.clone();if(M){var I=t,N=this.editor.nodeId;while(I>0){var U=(0,s.$)(f.outerHTML);(0,s.$)(f)[h](U);var L=null===M||void 0===M?void 0:M.clone();L.removeAttributes(s.Mr),N.create(L);var Q=T[e];"after"===h?(0,s.$)(Q).after(L):S[0].insertBefore(L[0],Q),I--}p=A.find(Or.COLS_HEADER_ITEM_CLASS),T=this.tableRoot.find("col");for(var D=0;D<w.length;D++){var H,O,z=w[D];null===(H=p.eq(D))||void 0===H||H.css({width:"".concat(z,"px")}),null===(O=T.eq(D))||void 0===O||O.attributes("width",z)}F.each((function(e,n){for(var r=c.getCellIndex(n,g),i=0;i<t;i++){var o=e.insertCell(r);o.innerHTML=a.table.template.getEmptyCell(),(0,s.$)(o).attributes(s.rN,"table-cell-selection"),N.generate(o)}}));for(var Z=arguments.length,R=new Array(Z>4?Z-4:0),P=4;P<Z;P++)R[P-4]=arguments[P];this.emit.apply(this,["actioned","insertCol"].concat(R)),c.selectArea&&c.selectCol(e,e+t-1)}}}},{key:"insertCol",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.table,i=r.selection,o=r.wrapper,a=i.tableModel;if(o&&a){var s=i.getSelectArea(),l="left"===e,c="end"===e||!e,A=o.find(Or.COLS_HEADER_ITEM_CLASS),u=a.cols-1;c||(u=l?s.begin.col:s.end.col);var d=l?u-1:u+1;d<0?(d=0,l=!1):l||u!==a.cols-1||(d--,l=!0);for(var h=null===(t=A.eq(u))||void 0===t?void 0:t.get().offsetWidth,p=arguments.length,f=new Array(p>2?p-2:0),g=2;g<p;g++)f[g-2]=arguments[g];if(this.insertColAt.apply(this,[d,n,l,h].concat(f)),c&&this.table.enableScroll){var m,v=null===(m=this.viewport)||void 0===m?void 0:m.get();if(!v)return;v.scrollLeft=v.scrollWidth-v.offsetWidth}}}},{key:"removeCol",value:function(){var e=this,t=this.table,n=t.selection,r=t.conltrollBar,i=t.helper,o=n.tableModel;if(o&&this.tableRoot){var a=o.table,l=(0,nn.Z)({},n.getSelectArea());l.end.col-l.begin.col===0&&n.each((function(e){i.isEmptyModelCol(e)||(l.end.col+=e.colSpan-1)}));var c=l.end.col-l.begin.col+1,A=this.tableRoot.find("colgroup"),u=this.tableRoot.find("tr"),d=A.find("col");if(l.allCol)this.removeTable();else{for(var h=l.end.col;h>=l.begin.col;h--){var p;r.removeCol(h),null===(p=d.eq(h))||void 0===p||p.remove()}a.forEach((function(t,n){for(var r=l.end.col;r>=l.begin.col;r--){var o=t[r];if(i.isEmptyModelCol(o)){var A=a[o.parent.row][o.parent.col];if(!i.isEmptyModelCol(A)&&o.parent.col<l.begin.col){var d=Math.min(c,o.parent.col+A.colSpan-l.begin.col);A.element&&(A.element.colSpan=A.colSpan-d)}}else{var h;if(o.isMulti){var p=r+o.colSpan-1>l.end.col,f=l.end.col+1-r;if(p){for(var g,m,v=0,b=0;b<=l.end.col;b++)i.isEmptyModelCol(t[b])||v++;var y=null===(g=u.eq(n))||void 0===g||null===(m=g.get())||void 0===m?void 0:m.insertCell(v);if(!y)return;y.setAttribute(s.rN,"table-cell-selection"),y.innerHTML=e.table.template.getEmptyCell(),y.colSpan=o.colSpan-f,y.rowSpan=o.rowSpan,e.editor.nodeId.generate(y)}}null===(h=o.element)||void 0===h||h.remove()}}}));for(var f=arguments.length,g=new Array(f),m=0;m<f;m++)g[m]=arguments[m];this.emit.apply(this,["actioned","removeCol"].concat(g))}}}},{key:"insertColLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.insertCol("left",e)}},{key:"insertColRight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.insertCol("right",e)}},{key:"insertRowAt",value:function(e,t,n){var r=this,i=this.table,o=i.wrapper,a=i.selection,l=i.helper,c=a.tableModel;if(o&&c){var A=n?"after":"before",u=e,d=o.find(Or.ROWS_HEADER_ITEM_CLASS),h=d[u],p=n?u:u+1,f=[],g=c.table[u];g.forEach((function(e,r){if(l.isEmptyModelCol(e)||!e.isMulti)if(l.isEmptyModelCol(e)){var i=c.table[e.parent.row][e.parent.col];!l.isEmptyModelCol(i)&&e.parent.row<p&&e.parent.row+i.rowSpan-1>=p?i.element.rowSpan=i.rowSpan+t:!l.isEmptyModelCol(i)&&e.parent.row<u&&e.parent.col===r&&f.push({tdBase:i.element})}else f.push({tdBase:e.element});else!n&&e.rowSpan>1&&p<=u+e.rowSpan-1?e.element.rowSpan=e.rowSpan+t:f.push({tdBase:e.element})}));var m=t,v=this.editor.nodeId,b=function(){var e,t,n=null===(e=r.tableRoot)||void 0===e||null===(t=e.get())||void 0===t?void 0:t.insertRow(p);n&&(f.forEach((function(e){var t=n.insertCell();t.setAttribute(s.rN,"table-cell-selection"),t.innerHTML=r.table.template.getEmptyCell(),t.colSpan=e.tdBase.colSpan})),(0,s.$)(h)[A]((0,s.$)(h.outerHTML)),v.generate(n),v.generateAll(n),m--)};while(m>0)b();for(var y=arguments.length,w=new Array(y>3?y-3:0),x=3;x<y;x++)w[x-3]=arguments[x];this.emit.apply(this,["actioned","insertRow"].concat(w)),a.selectArea&&a.selectRow(e,e+t-1)}}},{key:"insertRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.table,r=n.selection,i=n.helper,o=r.tableModel;if(o){var a=r.getSelectArea(),s="up"===e,l="end"===e||!e,c=o.rows-1;if(!l){var A=a.end.row;r.each((function(e){i.isEmptyModelCol(e)||(A+=e.rowSpan-1)})),c=s?a.begin.row:A}for(var u=c,d=arguments.length,h=new Array(d>2?d-2:0),p=2;p<d;p++)h[p-2]=arguments[p];this.insertRowAt.apply(this,[u,t,s].concat(h))}}},{key:"insertRowUp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.insertRow("up",e)}},{key:"insertRowDown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.insertRow("down",e)}},{key:"removeRow",value:function(){var e=this,t=this.table,n=t.selection,r=t.conltrollBar,i=t.helper,o=n.tableModel;if(o&&this.tableRoot){var a=o.table,l=(0,nn.Z)({},n.getSelectArea()),c=l.begin,A=l.end;A.row-c.row===0&&n.each((function(e){i.isEmptyModelCol(e)||(A.row+=e.rowSpan-1)}));var u=A.row-c.row+1,d=this.tableRoot.find("tr");if(l.allRow)this.removeTable();else{for(var h=function(t){var r=a[t];r.forEach((function(r,o){if(!i.isEmptyModelCol(r)&&r.isMulti&&r.rowSpan>1&&t+r.rowSpan-1>A.row){var l=n.getCellIndex(A.row+1,o),h=d[A.row+1].insertCell(l),p=A.row-t+1;h.setAttribute(s.rN,"table-cell-selection"),h.innerHTML=e.table.template.getEmptyCell(),h.colSpan=r.colSpan,h.rowSpan=r.rowSpan-p,e.editor.nodeId.generate(h)}if(i.isEmptyModelCol(r)){var f=a[r.parent.row][r.parent.col];if(!i.isEmptyModelCol(f)&&r.parent.row<c.row){var g=Math.min(u,r.parent.row+f.rowSpan-c.row);f.element.rowSpan=f.rowSpan-g}}}))},p=c.row;p<=A.row;p++)h(p);for(var f=A.row;f>=c.row;f--){var g;null===(g=this.tableRoot.get())||void 0===g||g.deleteRow(f),r.removeRow(f)}for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];this.emit.apply(this,["actioned","removeRow"].concat(v))}}}},{key:"removeTable",value:function(){var e=this.editor;(0,s.iC)(e)||this.emit("tableRemoved"),e.card.remove(this.table.id)}},{key:"copy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.table,n=t.selection,r=t.helper,i=n.getSelectionHtml(e);i&&(this.editor.clipboard.copy(i),r.copyHTML(i))}},{key:"mockCopy",value:function(){var e=this.table,t=e.selection,n=e.helper,r=t.getSelectionHtml();r&&n.copyHTML(r)}},{key:"shortcutCopy",value:function(e){var t,n,r,i=this.table,o=i.selection,a=i.helper,l=o.getSelectionHtml();l&&(null===(t=e.clipboardData)||void 0===t||t.clearData(),null===(n=e.clipboardData)||void 0===n||n.setData("text/plain",(0,s.$)(l).html()),null===(r=e.clipboardData)||void 0===r||r.setData("text/html",l),a.copyHTML(l),e.preventDefault())}},{key:"cut",value:function(){this.copy(),this.clear()}},{key:"shortcutCut",value:function(e){this.shortcutCopy(e),this.clear()}},{key:"clear",value:function(){var e=this,t=this.table,n=t.selection,r=t.helper,i=n.getSelectArea();if(i.allCol&&i.allRow){if(this.tableCleared)return this.removeTable(),void(this.tableCleared=!1);this.tableCleared=!0}if(i.allRow){if(this.rowCleared)return this.removeRow(),void(this.rowCleared=!1);this.rowCleared=!0}if(i.allCol){if(this.colCleared)return this.removeCol(),void(this.colCleared=!1);this.colCleared=!0}n.each((function(t){!r.isEmptyModelCol(t)&&t.element&&(t.element.innerHTML=e.table.template.getEmptyCell())})),this.emit("actioned","clear")}},{key:"mockPaste",value:function(){var e=this.table.helper.getCopyData();if(e){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.paste.apply(this,[e].concat(n))}}},{key:"shortcutPaste",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.editor.clipboard.getData(e);this.paste(t)}},{key:"paste",value:function(e){var t=this.table,n=t.selection,r=t.helper,i=n.tableModel;if(i){var o=n.getSelectArea(),a=o.begin,l=o.end,c=a.row===l.row&&a.col===l.col,A=e.html;e.text;if(A){var u=this.editor,d=u.schema,h=u.conversion,p=new s._b(A,u).toValue(d,h),f=r.trimBlankSpan((0,s.$)(p));u.nodeId.generateAll(f,!0);for(var g=arguments.length,m=new Array(g>1?g-1:0),v=1;v<g;v++)m[v-1]=arguments[v];if("table"===f.name){r.normalizeTable(f);var b=r.getTableModel(f),y=b.rows,w=b.cols,x=b.table[0][0],k=i.table[a.row];if(!k)return;var C=k[a.col];if(!C||r.isEmptyModelCol(x)||r.isEmptyModelCol(C))return;var B=x.rowSpan,_=x.colSpan,E=B===y&&_===w;if(E&&!o&&x.element)return r.copyTo(x.element,C.element),void this.emit.apply(this,["actioned","paste"].concat(m));if(c){if(w+a.col>i.cols){var S=w+a.col-i.cols;this.insertCol("end",S,!0)}if(y+a.row>i.rows){var F=y+a.row-i.rows;this.insertRow("end",F,!0)}n.select(a,{row:a.row+y-1,col:a.col+w-1})}var T=n.getSelectArea();m[0]||this.splitCell(!0),n.each((function(e,t,n){var i=(t-T.begin.row)%y,o=(n-T.begin.col)%w,a=b.table[i][o];if(a){if(!r.isEmptyModelCol(a)&&a.isMulti&&!r.isEmptyModelCol(e)){var s=e.element;return s.rowSpan=Math.min(a.rowSpan,T.end.row-t+1),s.colSpan=Math.min(a.colSpan,T.end.col-n+1),void r.copyTo(a.element,s)}var l;if(r.isEmptyModelCol(a))r.isEmptyModelCol(e)||null===(l=e.element)||void 0===l||l.remove();else a.element&&!r.isEmptyModelCol(e)&&e.element&&r.copyTo(a.element,e.element)}}))}else this.mergeCell(!0);this.emit.apply(this,["actioned","paste"].concat(m))}}}},{key:"mergeCell",value:function(){var e=this.table,t=e.selection,n=e.helper,r=t.selectArea,i=t.tableModel;if(r&&i){var o=r.begin,a=r.end,l=a.row-o.row+1,c=a.col-o.col+1,A=[],u=null;if(this.splitCell(),t.select(o,a),t.each((function(e,t,r){if(!n.isEmptyModelCol(e))return r===o.col&&t===o.row?(u=e.element,u.rowSpan=l,void(u.colSpan=c)):void(e.element&&(""!==e.element.innerText.trim()&&A.unshift((0,s.$)(e.element).find(Or.TABLE_TD_CONTENT_CLASS).html()),e.element.remove()))})),u){var d=(0,s.$)(u),h=d.find(Or.TABLE_TD_CONTENT_CLASS);h.html(h.html()+A.join(""));for(var p=arguments.length,f=new Array(p),g=0;g<p;g++)f[g]=arguments[g];this.emit.apply(this,["actioned","mergeCell"].concat(f))}}}},{key:"splitCell",value:function(){var e=this,t=this.table,n=t.selection,r=t.helper,i=n.tableModel;if(i&&this.tableRoot){var o=this.tableRoot.find("tr");n.each((function(t,a,l){if(!r.isEmptyModelCol(t))for(var c=a+t.rowSpan,A=l+t.colSpan,u=c-1;u>=a;u--){u>=o.length&&e.insertRowAt(a,1);for(var d=u>=o.length?e.tableRoot.find("tr")[u]:o[u],h=A-1;h>=l;h--){var p=i.table[u][h];if(!r.isEmptyModelCol(p)&&p.isMulti)p.element=p.element,p.element.colSpan=1,p.element.rowSpan=1;else if(r.isEmptyModelCol(p)){var f=n.getCellIndex(u,h),g=d.insertCell(f);e.editor.nodeId.generate(g),g.setAttribute(s.rN,"table-cell-selection"),g.innerHTML=e.table.template.getEmptyCell()}}}}));for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];this.emit.apply(this,["actioned","splitCell"].concat(l))}}}]),n}(Ln.EventEmitter2),jr=(0,i.Z)((function e(){(0,r.Z)(this,e)}));jr.colors=void 0,jr._map=void 0,jr.getStroke=void 0,jr.getColors=void 0,jr.colors=[["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF"],["#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96"],["#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB"],["#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2"],["#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB"],["#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F"],["#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"]],jr._map=function(){for(var e={},t=jr.colors,n=0,r=t.length;n<r;n++)for(var i=t[n],o=0,a=i.length;o<a;o++){var s=t[n][o];e[s]={y:n,x:o}}return e}(),jr.getStroke=function(e){var t=jr._map[e];return t&&(2===t.y||3===t.y&&t.x>2&&t.x<5)?this.colors[4][t.x]:e},jr.getColors=function(){return this.colors};var Vr=(0,F.Z)("editor"),Gr=(0,F.Z)("options"),$r=(0,F.Z)("color"),Yr=(0,F.Z)("button"),Xr=(0,F.Z)("cardId"),Jr=(0,F.Z)("container"),ei=(0,F.Z)("position"),ti=function(){function e(t,n,i){var o=this;(0,r.Z)(this,e),Object.defineProperty(this,Vr,{writable:!0,value:void 0}),Object.defineProperty(this,Gr,{writable:!0,value:void 0}),Object.defineProperty(this,$r,{writable:!0,value:void 0}),Object.defineProperty(this,Yr,{writable:!0,value:void 0}),Object.defineProperty(this,Xr,{writable:!0,value:void 0}),Object.defineProperty(this,Jr,{writable:!0,value:void 0}),Object.defineProperty(this,ei,{writable:!0,value:void 0}),this.windowClick=function(e){var t=e.target;t&&0===(0,s.$)(t).closest(".data-table-color-tool,.table-color-dropdown-arrow").length&&o.remove()},(0,S.Z)(this,Vr)[Vr]=t,(0,S.Z)(this,Xr)[Xr]=n,(0,S.Z)(this,Gr)[Gr]=i,(0,S.Z)(this,ei)[ei]=new s.Ly((0,S.Z)(this,Vr)[Vr]),(0,S.Z)(this,$r)[$r]=i.defaultColor||"transparent",(0,S.Z)(this,Yr)[Yr]=(0,s.$)('<div class="table-color-dropdown-trigger">\n <button type="button" class="table-color-dropdown-button-text">\n <svg width="16px" height="16px" viewBox="0 0 16 16" style="margin-bottom: '.concat("transparent"===(0,S.Z)(this,$r)[$r]?-5:-3,'">\n <g ="none" strokeWidth="1" fill="none" fillRule="evenodd">\n <path d="M11.9745711,7.921875 C11.9745711,7.921875 13.2147672,9.2863447 13.2147672,10.1226326 C13.2147672,10.8142992 12.6566789,11.3802083 11.9745711,11.3802083 C11.2924632,11.3802083 10.734375,10.8142992 10.734375,10.1226326 C10.734375,9.2863447 11.9745711,7.921875 11.9745711,7.921875 Z M9.07958999,6.47535893 L6.28501575,3.68078468 L3.4904415,6.47535893 L9.07958999,6.47535893 Z M5.3326566,3.04215357 L4.28223263,1.9917296 C4.22692962,1.93642659 4.22692962,1.84676271 4.28223263,1.7914597 L5.03228902,1.0414033 C5.08759203,0.986100299 5.17725591,0.986100299 5.23255892,1.0414033 L6.4546098,2.26345418 C6.46530408,2.27146914 6.4755605,2.28033918 6.48528564,2.29006432 L10.4848531,6.28963174 C10.5954591,6.40023775 10.5954591,6.57956552 10.4848531,6.69017153 L6.4838816,10.691143 C6.37327559,10.801749 6.19394782,10.801749 6.08334181,10.691143 L2.08377439,6.69157557 C1.97316838,6.58096956 1.97316838,6.40164179 2.08377439,6.29103578 L5.3326566,3.04215357 Z" fill="#595959"/>\n <rect stroke="').concat(jr.getStroke((0,S.Z)(this,$r)[$r]),'" fill="').concat((0,S.Z)(this,$r)[$r],'" strokeWidth="0.5" x="2" y="12.75" width="12" height="1.5" rx="0.125" />\n </g>\n </svg>\n </button>\n <button type="button" class="table-color-dropdown-arrow">\n <span class="table-color-dropdown-empty"></span>\n <span class="data-icon data-icon-arrow"></span>\n </button>\n </div>')),(0,S.Z)(this,Yr)[Yr].find(".table-color-dropdown-arrow").on("mousedown",(function(e){e.preventDefault(),void 0!==(0,S.Z)(o,Jr)[Jr]&&(0,S.Z)(o,Jr)[Jr].length>0?o.remove():o.render()})),(0,S.Z)(this,Yr)[Yr].find(".table-color-dropdown-button-text").on("mousedown",(function(e){e.preventDefault();var t=(0,S.Z)(o,Gr)[Gr].onChange;t&&t((0,S.Z)(o,$r)[$r])}))}return(0,i.Z)(e,[{key:"getButton",value:function(){return(0,S.Z)(this,Yr)[Yr]}},{key:"select",value:function(e){var t=jr.getStroke(e),n=(0,S.Z)(this,Yr)[Yr].find("rect");n.attributes("stroke",t),n.attributes("fill",e),(0,S.Z)(this,Yr)[Yr].find("svg").css("margin-bottom","transparent"===e?-5:-3)}},{key:"change",value:function(e){(0,S.Z)(this,$r)[$r]=e,this.select(e);var t=(0,S.Z)(this,Gr)[Gr].onChange;t&&t(e)}},{key:"toState",value:function(e,t){var n,r=null!==(n=e.hex)&&void 0!==n?n:e;"transparent"===r&&(r="rgba(0,0,0,0)");var i=(0,ur.Vi)(r),o=i.toHsl(),a=i.toHsv(),s=i.toRgb(),l=i.toHex();0===o.s&&(o.h=t||0,a.h=t||0);var c="000000"===l&&0===s.a;return{hsl:o,hex:c?"transparent":"#".concat(l),rgb:s,hsv:a,oldHue:e["h"]||t||o.h,source:e["source"]}}},{key:"render",value:function(){var e,t=this;(0,S.Z)(this,Jr)[Jr]=(0,s.$)('<div class="data-table-color-tool'.concat(s.tq?" data-table-color-tool-mobile":"",'" ').concat(s.Zi,'="').concat(s.UI,'" ').concat(s.f4,'="').concat((0,S.Z)(this,Xr)[Xr],'"></div>'));var n=(0,s.$)('<div class="data-table-color-tool-panle"></div>'),r=(0,S.Z)(this,Gr)[Gr].colors,i=function(e,r){var i=t.toState(e.color||"#FFFFFF"),o=["#ffffff","#fafafa","transparent"].indexOf(i.hex)>=0,a=(0,s.$)('<span class="data-table-color-tool-item'.concat(o?" data-table-color-tool-border":"",'"><span style="background-color:').concat(e.color).concat(e.border?";".concat(o?"":"border:1px solid ".concat(e.border)):"",'"><svg\n style="fill: ').concat("#8C8C8C"===e.color.toUpperCase()?"#FFFFFF":"#8C8C8C",";\n display: ").concat(e.color===(0,S.Z)(t,$r)[$r]&&!1!==r?"block":"none",';"\n viewBox="0 0 18 18"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg></span></span>'));return a.on("mousedown",(function(i){i.preventDefault(),i.stopPropagation(),n.find("svg").each((function(e){e.style.display="none"})),!1!==r&&a.find("svg").css("display","block"),t.change(e.color)})),a},o=(0,s.$)('<div class="data-table-color-tool-group data-table-color-tool-default"></div>'),a=i({color:"transparent"},!1);o.append(a),o.on("mousedown",(function(e){e.preventDefault(),n.find("svg").each((function(e){e.style.display="none"})),t.change("transparent")}));var l=(0,S.Z)(this,Vr)[Vr].language.get("table","color","nonFillText");o.append((0,s.$)('<span class="data-table-color-tool-default-text">'.concat(l,"</span>"))),(0,S.Z)(this,Jr)[Jr].append(o),r.forEach((function(e){var t=(0,s.$)('<div class="data-table-color-tool-group"></div>');e.forEach((function(e){var n=i(e);t.append(n)})),n.append(t)})),(0,S.Z)(this,Jr)[Jr].append(n),null===(e=(0,S.Z)(this,ei)[ei])||void 0===e||e.bind((0,S.Z)(this,Jr)[Jr],(0,S.Z)(this,Yr)[Yr]),document.addEventListener("mousedown",this.windowClick,!0)}},{key:"remove",value:function(){var e,t;null===(e=(0,S.Z)(this,Jr)[Jr])||void 0===e||e.remove(),null===(t=(0,S.Z)(this,ei)[ei])||void 0===t||t.destroy(),document.removeEventListener("mousedown",this.windowClick,!0),(0,S.Z)(this,Jr)[Jr]=void 0}},{key:"destroy",value:function(){this.remove();var e=(0,S.Z)(this,Gr)[Gr].onDestroy;e&&e()}}]),e}();function ni(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var ri='.table-color-dropdown-trigger {\r\n display: flex;\r\n}\r\n\r\n.table-color-dropdown-trigger:hover {\r\n background: transparent !important;\r\n}\r\n\r\n.table-color-dropdown-trigger .table-color-dropdown-button-text, .table-color-dropdown-trigger .table-color-dropdown-arrow {\r\n display: inline-block;\r\n width: auto;\r\n margin: 0;\r\n text-align: center;\r\n background-color: transparent;\r\n border: 1px solid transparent;\r\n border-radius: 3px 3px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n color: #595959;\r\n outline: none;\r\n margin-right: 0;\r\n min-width: 26px;\r\n border-radius: 3px 0 0 3px;\r\n padding: 0 4px;\r\n}\r\n\r\n.table-color-dropdown-trigger:hover .table-color-dropdown-button-text, .table-color-dropdown-trigger:hover .table-color-dropdown-arrow\r\n{\r\n border: 1px solid #e8e8e8;\r\n}\r\n\r\n.table-color-dropdown-trigger .table-color-dropdown-button-text:hover, .table-color-dropdown-trigger .table-color-dropdown-arrow:hover {\r\n background-color: #f5f5f5;\r\n}\r\n\r\n.table-color-dropdown-trigger .table-color-dropdown-arrow {\r\n margin-left: -1px;\r\n min-width: 17px;\r\n text-align: center;\r\n border-radius: 0 3px 3px 0;\r\n}\r\n\r\n.table-color-dropdown-trigger .table-color-dropdown-arrow .table-color-dropdown-empty {\r\n display: inline-block;\r\n}\r\n\r\n.table-color-dropdown-trigger .table-color-dropdown-arrow .data-icon-arrow {\r\n position: absolute;\r\n right: 5px;\r\n top: 12px;\r\n width: 8px;\r\n height: 8px;\r\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjhweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCA4IDUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+DQogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1Mi41ICg2NzQ2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+DQogICAgPHRpdGxlPkdyb3VwIENvcHkgNjwvdGl0bGU+DQogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+DQogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9IjAuNDUiPg0KICAgICAgICA8ZyBpZD0idG9vbGJhciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMyOC4wMDAwMDAsIC0xOC4wMDAwMDApIj4NCiAgICAgICAgICAgIDxnIGlkPSJwYXJhZ3JhcGgtc3R5bGUiPg0KICAgICAgICAgICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIyNi4wMDAwMDAsIDQuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC1Db3B5LTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMi4wMDAwMDAsIDEyLjAwMDAwMCkiPg0KICAgICAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjgiIGhlaWdodD0iOCI+PC9yZWN0Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTAuNTk2MDkzNzUsMi41NTcwMzEyNSBMMy43NDUzMTI1LDYuMzc4MTI1IEMzLjg3NzM0Mzc1LDYuNTI1NzgxMjUgNC4xMDg1OTM3NSw2LjUyNTc4MTI1IDQuMjQwNjI1LDYuMzc4MTI1IEw3LjQwNTQ2ODc1LDIuNTU3MDMxMjUgQzcuNTk2MDkzNzUsMi4zNDI5Njg3NSA3LjQ0NDUzMTI1LDIuMDAzOTA2MjUgNy4xNTc4MTI1LDIuMDAzOTA2MjUgTDAuODQ0NTMxMjUsMi4wMDM5MDYyNSBDMC41NTcwMzEyNSwyLjAwMzkwNjI1IDAuNDA0Njg3NSwyLjM0Mjk2ODc1IDAuNTk2MDkzNzUsMi41NTcwMzEyNSBaIiBpZD0iU2hhcGUiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPg0KICAgICAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICA8L2c+DQogICAgPC9nPg0KPC9zdmc+);\r\n background-repeat: no-repeat;\r\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\r\n}\r\n\r\n.data-table-color-tool {\r\n outline: none;\r\n width: auto;\r\n border-radius: 3px 3px;\r\n position: absolute;\r\n border: 1px solid #e8e8e8;\r\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\r\n z-index: 130;\r\n text-indent: 0;\r\n top:0;\r\n padding: 8px 0;\r\n background: #fff;\r\n}\r\n\r\n.data-table-color-tool-mobile {\r\n width: calc(100vw - 20px);\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-panle {\r\n position: relative;\r\n text-align: left;\r\n text-indent: 0;\r\n width: 100%;\r\n height: auto;\r\n margin-top: 8px;\r\n padding: 0 8px;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-group\r\n{\r\n display: flex;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-group > span {\r\n width: 24px;\r\n height: 24px;\r\n display: inline-block;\r\n cursor: pointer;\r\n background-color: rgb(255, 255, 255);\r\n padding: 2px;\r\n border-radius: 3px;\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: transparent;\r\n -o-border-image: initial;\r\n border-image: initial;\r\n flex: 0 0 auto;\r\n position: relative;\r\n}\r\n\r\n.data-table-color-tool span.data-table-color-tool-border > span {\r\n border: 1px solid #e8e8e8 !important;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-group > span > span\r\n{\r\n position: relative;\r\n width: 18px;\r\n height: 18px;\r\n display: block;\r\n border-radius: 2px;\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: transparent;\r\n -o-border-image: initial;\r\n border-image: initial;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-group > span > span > svg {\r\n position: absolute;\r\n top: -1px;\r\n left: 1px;\r\n width: 12px;\r\n height: 12px;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-default {\r\n display: flex;\r\n align-items: center;\r\n margin: 2px 0 8px;\r\n border-radius: 2px;\r\n cursor: pointer;\r\n padding: 2px 8px;\r\n} \r\n\r\n.data-table-color-tool .data-table-color-tool-default:hover {\r\n background: #f5f5f5;\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-default > span:first-child::after {\r\n content: "";\r\n display: block;\r\n position: absolute;\r\n top: 10px;\r\n left: 0px;\r\n width: 22px;\r\n height: 0;\r\n border-bottom: 2px solid #ff5151;\r\n transform: rotate(45deg);\r\n}\r\n\r\n.data-table-color-tool .data-table-color-tool-default .data-table-color-tool-default-text {\r\n width: auto;\r\n margin-left: 8px;\r\n height: auto;\r\n background: transparent;\r\n}';ni(ri);var ii=(0,F.Z)("changeTimeout"),oi=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(e){var i,o;(0,r.Z)(this,n),o=t.call(this,e),o.contenteditable=["div".concat(Or.TABLE_TD_CONTENT_CLASS)],o.colMinWidth=void 0,o.rowMinHeight=void 0,o.maxInsertNum=void 0,o.wrapper=void 0,o.helper=void 0,o.template=void 0,o.selection=void 0,o.conltrollBar=void 0,o.command=void 0,o.scrollbar=void 0,o.viewport=void 0,o.colorTool=void 0,o.noBorderToolButton=void 0,o.alignToolButton=void 0,o.enableScroll=void 0,Object.defineProperty((0,E.Z)(o),ii,{writable:!0,value:void 0}),o.getOptions=function(){var e;return null===(e=o.editor.plugin.findPlugin("table"))||void 0===e?void 0:e.options},o.doChange=function(){o.remoteRefresh(),o.handleChange("local")},o.handleChange=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local",r=o.editor;o.conltrollBar.refresh(),o.selection.render("change");var a,l=(0,d.Z)((i=(0,E.Z)(o),(0,h.Z)(n.prototype)),"getValue",i).call(i);(null===l||void 0===l?void 0:l.noBorder)?null===(a=o.noBorderToolButton)||void 0===a||a.addClass("active"):null===(e=o.noBorderToolButton)||void 0===e||e.removeClass("active");if("local"===t&&(0,s.iC)(r)){var c=o.getValue();c&&o.setValue(c)}},o.onChange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"local",t=o.editor;(0,s.iC)(t)&&"local"===e&&t.model.mutation.isStopped||((0,S.Z)((0,E.Z)(o),ii)[ii]&&clearTimeout((0,S.Z)((0,E.Z)(o),ii)[ii]),(0,S.Z)((0,E.Z)(o),ii)[ii]=setTimeout((function(){o.handleChange(e),"remote"===e&&o.remoteRefresh()}),50))},o.updateScrollbar=function(){var e,t,n,r;if(o.scrollbar&&o.enableScroll){var i=((null===(e=o.wrapper)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.bottom)||0)-((null===(n=o.wrapper)||void 0===n?void 0:n.getViewport().bottom)||0);null===(r=o.wrapper)||void 0===r||r.find(".data-scrollbar-x").css({bottom:"".concat(i>0?i+2:0,"px")})}},o.remoteRefreshTimeout=null;var a=o.getOptions();return o.colMinWidth=(null===a||void 0===a?void 0:a.colMinWidth)||40,o.rowMinHeight=(null===a||void 0===a?void 0:a.rowMinHeight)||35,o.maxInsertNum=(null===a||void 0===a?void 0:a.maxInsertNum)||30,o.helper=new Rr(o.editor),o.template=new Or((0,E.Z)(o)),o.selection=new Kr(o.editor,(0,E.Z)(o)),o.conltrollBar=new qr(o.editor,(0,E.Z)(o),{col_min_width:o.colMinWidth,row_min_height:o.rowMinHeight,max_insert_num:o.maxInsertNum}),o.command=new Wr(o.editor,(0,E.Z)(o)),o.enableScroll=!1!==(null===a||void 0===a?void 0:a.enableScroll),o}return(0,i.Z)(n,[{key:"init",value:function(){var e,t=this;(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var r=this.editor;(0,s.iC)(r)&&(r.event.listeners["keydown:tab"]||(r.event.listeners["keydown:tab"]=[]),r.event.listeners["keydown:tab"].unshift((function(e){if((0,s.iC)(r)&&!r.readonly){var n=r.change,i=r.block,o=r.node,a=r.card,l=n.range.get(),c=l.endNode.closest("td");if(0!==c.length&&c.inEditor()){var A=a.closest(c,!0);if(null===A||void 0===A?void 0:A.equal(t.root)){var u=i.closest(l.endNode);if(c.length>0&&(i.isLastOffset(l,"end")||"li"!==u.name&&o.isEmptyWidthChild(u))){var d=c.next();if(!d){var h,p,f,g=null===(h=c.parent())||void 0===h?void 0:h.next();if(g)d=g.find("td:first-child")||null;else t.command.insertRowDown(),d=(null===(p=c.parent())||void 0===p||null===(f=p.next())||void 0===f?void 0:f.find("td:first-child"))||null}if(d)return e.preventDefault(),t.selection.focusCell(d),!1}c.length>0&&t.enableScroll&&setTimeout((function(){var e;null===(e=t.scrollbar)||void 0===e||e.refresh()}),0)}}}})),r.on("keydown:down",(function(e){if((0,s.iC)(r)&&!r.readonly){var n=r.change,i=r.card,o=n.range.get(),a=o.endNode.closest("td");if(0!==a.length&&a.inEditor()){var l=i.closest(a,!0);if(null===l||void 0===l?void 0:l.equal(t.root)){var c=a.find(".table-main-content");if(c){var A=c.get().getBoundingClientRect(),u=o.getBoundingClientRect();if(a.length>0&&(0===u.bottom||A.bottom-u.bottom<10)){var d,h=a.index(),p=null===(d=a.parent())||void 0===d?void 0:d.next();if(!p){e.preventDefault();var f=o.cloneRange(),g=t.root.next(),m=g?i.find(g):void 0;return(null===m||void 0===m?void 0:m.onSelectDown)?m.onSelectDown(e):(i.focusNextBlock(t,f,!1),n.range.select(f)),!1}var v,b=0,y=p.find("td:last-child");if(null===(v=t.selection.tableModel)||void 0===v||v.table[p.index()].some((function(e){return!t.helper.isEmptyModelCol(e)&&b>=h&&e.element?(y=(0,s.$)(e.element),!0):(b++,!1)})),y)return e.preventDefault(),t.selection.focusCell(y,!0),!1}a.length>0&&t.enableScroll&&setTimeout((function(){var e;null===(e=t.scrollbar)||void 0===e||e.refresh()}),0)}}}}})),r.on("keydown:up",(function(e){if((0,s.iC)(r)&&!r.readonly){var n=r.change,i=r.card,o=n.range.get(),a=o.endNode.closest("td");if(0!==a.length&&a.inEditor()){var l=i.closest(a,!0);if(null===l||void 0===l?void 0:l.equal(t.root)){var c=a.find(".table-main-content");if(c){var A=c.get().getBoundingClientRect(),u=o.getBoundingClientRect();if(a.length>0&&(0===u.top||u.top-A.top<10)){var d,h=a.index(),p=null===(d=a.parent())||void 0===d?void 0:d.prev();if(!p){e.preventDefault();var f=o.cloneRange(),g=t.root.prev(),m=g?i.find(g):void 0;return(null===m||void 0===m?void 0:m.onSelectUp)?m.onSelectUp(e):(i.focusPrevBlock(t,f,!1),n.range.select(f)),!1}var v,b=0,y=p.find("td:first-child");if(null===(v=t.selection.tableModel)||void 0===v||v.table[p.index()].some((function(e){return!t.helper.isEmptyModelCol(e)&&b>=h&&e.element?(y=(0,s.$)(e.element),!0):(b++,!1)})),y)return e.preventDefault(),t.selection.focusCell(y),!1}a.length>0&&t.enableScroll&&setTimeout((function(){var e;null===(e=t.scrollbar)||void 0===e||e.refresh()}),0)}}}}})),r.on("keydown:left",(function(){if((0,s.iC)(r)&&!r.readonly){var e=r.change,n=r.card,i=e.range.get(),o=i.endNode.closest("td");if(0!==o.length&&o.inEditor()){var a=n.closest(o,!0);if(null===a||void 0===a?void 0:a.equal(t.root)){var l=o.find(".table-main-content");l&&o.length>0&&t.enableScroll&&setTimeout((function(){var e;null===(e=t.scrollbar)||void 0===e||e.refresh()}),0)}}}})),r.on("keydown:right",(function(){if((0,s.iC)(r)&&!r.readonly){var e=r.change,n=r.card,i=e.range.get(),o=i.endNode.closest("td");if(0!==o.length&&o.inEditor()){var a=n.closest(o,!0);if(null===a||void 0===a?void 0:a.equal(t.root)){var l=o.find(".table-main-content");l&&o.length>0&&t.enableScroll&&setTimeout((function(){var e;null===(e=t.scrollbar)||void 0===e||e.refresh()}),0)}}}}))),this.colorTool||(this.colorTool=new ti(r,this.id,{colors:n.colors,defaultColor:null===(e=(0,d.Z)((0,h.Z)(n.prototype),"getValue",this).call(this))||void 0===e?void 0:e.color,onChange:function(e){t.conltrollBar.drawBackgroundColor(e);var n=t.getValue();t.setValue((0,nn.Z)((0,nn.Z)({},n),{},{color:e}))}}))}},{key:"toolbar",value:function(){var e=this,t=this.editor,r=function(){var r,i;if(!(0,s.iC)(t)||t.readonly)return[{key:"maximize",type:"maximize"}];var o=t.language.get("table"),a=[{key:"color",type:"node",title:t.language.get("table","color","title"),node:e.colorTool.getButton()},{key:"border",type:"button",title:(null===(r=(0,d.Z)((0,h.Z)(n.prototype),"getValue",e).call(e))||void 0===r?void 0:r.noBorder)?o["showBorder"]:o["noBorder"],content:'<span class="data-icon data-icon-no-border"></span>',didMount:function(t){var r=(0,d.Z)((0,h.Z)(n.prototype),"getValue",e).call(e);!0===(null===r||void 0===r?void 0:r.noBorder)&&t.addClass("active"),e.noBorderToolButton=t},onClick:function(t,r){var i,o=(0,d.Z)((0,h.Z)(n.prototype),"getValue",e).call(e);e.setValue({noBorder:!(null===o||void 0===o?void 0:o.noBorder)});var a=null===(i=e.wrapper)||void 0===i?void 0:i.find(".data-table");!0===(null===o||void 0===o?void 0:o.noBorder)?(null===a||void 0===a||a.removeAttributes("data-table-no-border"),r.removeClass("active")):(null===a||void 0===a||a.attributes("data-table-no-border","true"),r.addClass("active"))}},{key:"align",type:"dropdown",content:'<span class="data-icon data-icon-align-top" />',title:o["verticalAlign"]["title"],didMount:function(t){e.alignToolButton=t.find(".data-toolbar-btn")},items:[{type:"button",content:'<span class="data-icon data-icon-align-top"></span> '.concat(o["verticalAlign"]["top"]),onClick:function(t){return e.updateAlign(t,"top")}},{type:"button",content:'<span class="data-icon data-icon-align-middle"></span> '.concat(o["verticalAlign"]["middle"]),onClick:function(t){return e.updateAlign(t,"middle")}},{type:"button",content:'<span class="data-icon data-icon-align-bottom"></span> '.concat(o["verticalAlign"]["bottom"]),onClick:function(t){return e.updateAlign(t,"bottom")}}]},{key:"merge",type:"button",title:o["mergeCell"],content:'<span class="data-icon data-icon-merge-cells"></span>',disabled:e.conltrollBar.getMenuDisabled("mergeCell"),onClick:function(){e.command.mergeCell()}},{key:"split",type:"button",title:o["splitCell"],content:'<span class="data-icon data-icon-solit-cells"></span>',disabled:e.conltrollBar.getMenuDisabled("splitCell"),onClick:function(){e.command.splitCell()}}];if(e.isMaximize)return a;var l=[{key:"maximize",type:"maximize"},{key:"copy",type:"copy",onClick:function(){e.command.copy(!0),t.messageSuccess("copy",t.language.get("copy","success"))}},{key:"delete",type:"delete"},{key:"separator",type:"separator"}].concat(a);return 0===(0,s.ZQ)((null===(i=e.wrapper)||void 0===i?void 0:i.css("margin-left"))||"0")&&l.unshift({key:"dnd",type:"dnd"}),l},i=this.getOptions();return(null===i||void 0===i?void 0:i.cardToolbars)?i.cardToolbars(r(),this.editor):r()}},{key:"onSelectLeft",value:function(e){var t=this.selection.tableModel;if(t)for(var n=t.rows-1;n>=0;n--)for(var r=t.cols-1;r>=0;r--){var i=t.table[n][r];if(!this.helper.isEmptyModelCol(i)&&i.element)return e.preventDefault(),this.selection.focusCell(i.element,!1),!1}}},{key:"onSelectRight",value:function(e){var t=this.selection.tableModel;if(t)for(var n=0;n<t.rows;n++)for(var r=0;r<t.cols;r++){var i=t.table[n][r];if(!this.helper.isEmptyModelCol(i)&&i.element)return e.preventDefault(),this.selection.focusCell(i.element),!1}}},{key:"onSelectUp",value:function(e){var t=this.selection.tableModel;if(t)for(var n=t.rows-1;n>=0;n--)for(var r=0;r<t.cols;r++){var i=t.table[n][r];if(!this.helper.isEmptyModelCol(i)&&i.element)return e.preventDefault(),this.selection.focusCell(i.element,!1),!1}}},{key:"onSelectDown",value:function(e){var t=this.selection.tableModel;if(t)for(var n=0;n<t.rows;n++)for(var r=0;r<t.cols;r++){var i=t.table[n][r];if(!this.helper.isEmptyModelCol(i)&&i.element)return e.preventDefault(),this.selection.focusCell(i.element),!1}}},{key:"updateAlign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top";e.preventDefault(),this.conltrollBar.setAlign(t),this.onChange("local"),this.updateAlignText(t)}},{key:"updateAlignText",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top",n='<span class="data-icon data-icon-align-'.concat(t,'"></span>');null===(e=this.alignToolButton)||void 0===e||e.html(n)}},{key:"getValue",value:function(){var e=(0,d.Z)((0,h.Z)(n.prototype),"getValue",this).call(this);if(!this.wrapper)return e;var t=this.wrapper.find(Or.TABLE_CLASS);if(!t)return e;var r=this.selection.tableModel;if(!r)return e;var i=this.editor,o=i.schema,a=i.conversion,l=(0,s.$)("<div></div>");l.append(t.clone(!0));var c=new s._b(l,i,(function(e){e.find(Or.TABLE_TD_BG_CLASS).remove(),e.find(s.Su).each((function(e){"TD"===e.nodeName?(0,s.$)(e).removeAttributes(s.Zi):i.node.unwrap((0,s.$)(e))}))})),A=r.rows,u=r.cols,p=r.height,f=r.width,g=c.toValue(o,a,!1,!1);return(0,s.iC)(i)?(0,nn.Z)((0,nn.Z)({},e),{},{rows:A,cols:u,height:p,width:f,html:g}):(0,nn.Z)((0,nn.Z)({},e),{},{html:g})}},{key:"drawBackground",value:function(e,t){var n,r,i=e.get().getBoundingClientRect(),o=new DOMRect(i.x,i.y,0,0),a=t.startContainer,l=t.endContainer,c=(0,s.oq)(a,"td"),A=(0,s.oq)(l,"td");if(c instanceof Element&&A instanceof Element&&"TD"===c.nodeName&&"TD"===(null===A||void 0===A?void 0:A.nodeName)&&c!==A){var u=c.getBoundingClientRect(),d=A.getBoundingClientRect(),h=null===(n=this.viewport)||void 0===n?void 0:n.getBoundingClientRect(),p=((null===h||void 0===h?void 0:h.left)||0)+(this.activated?13:0);return o.x=Math.max(u.left-i.left,p-((null===(r=this.editor.root.getBoundingClientRect())||void 0===r?void 0:r.left)||0)),o.y=u.top-i.top,o.width=(h?Math.min(d.right,h.right):d.right)-u.left,o.height=u.bottom-u.top,o.width<0&&(o.width=0),o.height=d.bottom-u.top,o}}},{key:"activate",value:function(e){var t,r,i;((0,d.Z)((0,h.Z)(n.prototype),"activate",this).call(this,e),e)?(this.conltrollBar.refresh(),null===(r=this.wrapper)||void 0===r||r.addClass("active")):(this.selection.clearSelect(),this.conltrollBar.hideContextMenu(),null===(i=this.wrapper)||void 0===i||i.removeClass("active"));this.enableScroll&&(null===(t=this.scrollbar)||void 0===t||t.refresh())}},{key:"maximize",value:function(){var e;(0,d.Z)((0,h.Z)(n.prototype),"maximize",this).call(this),this.enableScroll&&(null===(e=this.scrollbar)||void 0===e||e.refresh());var t=this.editor;(0,s.iC)(t)&&!s.tq&&this.getCenter().on("scroll",this.updateScrollbar,{passive:!0})}},{key:"minimize",value:function(){var e;(0,d.Z)((0,h.Z)(n.prototype),"minimize",this).call(this),this.enableScroll&&(null===(e=this.scrollbar)||void 0===e||e.refresh()),this.getCenter().off("scroll",this.updateScrollbar)}},{key:"getSelectionNodes",value:function(){var e=this,t=[];return this.selection.each((function(n){!e.helper.isEmptyModelCol(n)&&n.element&&t.push((0,s.$)(n.element).find(s.Su))})),1===t.length&&0===t[0].closest("[table-cell-selection=true]").length?[]:t}},{key:"overflow",value:function(e){var t,n;if(this.enableScroll){var r,i=(null===(t=this.wrapper)||void 0===t||null===(n=t.find(".data-table"))||void 0===n?void 0:n.width())||0,o=this.getCenter().width(),a=i-o;if(a>0&&!this.isMaximize)null===(r=this.wrapper)||void 0===r||r.css("margin-right","-".concat(a>e?e:a,"px"));else if(a<0||this.isMaximize){var s;null===(s=this.wrapper)||void 0===s||s.css("margin-right","")}}}},{key:"initScrollbar",value:function(){var e,t,n,r=this;if(this.viewport){var i=this.editor,o=i.plugin.findPlugin("table"),a=(null===o||void 0===o?void 0:o.options.overflow)||{},l=a.maxLeftWidth?{onScrollX:function(e){var t;r.isMaximize&&(e=0);var n=a.maxLeftWidth();return null===(t=r.wrapper)||void 0===t||t.css("margin-left","-".concat(e>n?n:e,"px")),e>0?i.root.find(".data-card-dnd").hide():i.root.find(".data-card-dnd").show(),e-n},getScrollLeft:function(e){var t;return e-(0,s.ZQ)((null===(t=r.wrapper)||void 0===t?void 0:t.css("margin-left"))||"0")},getOffsetWidth:function(e){var t;return e+(0,s.ZQ)((null===(t=r.wrapper)||void 0===t?void 0:t.css("margin-left"))||"0")}}:void 0;this.enableScroll&&(this.scrollbar=new s.LW(this.viewport,!0,!1,!0,l)),null===(e=this.scrollbar)||void 0===e||e.setContentNode(this.viewport.find(".data-table")),null===(t=this.scrollbar)||void 0===t||t.on("display",(function(e){var t,n;"block"===e?null===(t=r.wrapper)||void 0===t||t.addClass("scrollbar-show"):null===(n=r.wrapper)||void 0===n||n.removeClass("scrollbar-show")}));var c,A={x:0,y:0},u=function(e){var t=e.x,n=e.y;a["maxRightWidth"]&&r.overflow(a["maxRightWidth"]()),A.x===t&&A.y===n||(A={x:t,y:n},(0,s.iC)(i)&&(i.trigger("scroll",r.root,{x:t,y:n}),r.conltrollBar.refresh()))};if(null===(n=this.scrollbar)||void 0===n||n.on("change",u),s.tq||window.addEventListener("scroll",this.updateScrollbar,{passive:!0}),window.addEventListener("resize",this.updateScrollbar),(0,s.iC)(i)&&!s.tq)null===(c=i.scrollNode)||void 0===c||c.on("scroll",this.updateScrollbar,{passive:!0})}}},{key:"didRender",value:function(){var e,t,r,i,o,a=this;(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this);var l=this.editor;l.on("undo",this.doChange),l.on("redo",this.doChange),this.viewport=(0,s.iC)(l)?null===(e=this.wrapper)||void 0===e?void 0:e.find(Or.VIEWPORT):null===(t=this.wrapper)||void 0===t?void 0:t.find(Or.VIEWPORT_READER),this.selection.init(),this.conltrollBar.init(),this.command.init(),!(0,s.iC)(l)||l.readonly?null===(r=this.toolbarModel)||void 0===r||r.setOffset([0,0]):null===(i=this.toolbarModel)||void 0===i||i.setOffset([13,-28,0,-6]);var c=this.getOptions(),A=(null===c||void 0===c?void 0:c.overflow)||{};this.viewport&&(this.selection.refreshModel(),this.enableScroll&&setTimeout((function(){a.initScrollbar()}),0)),this.selection.on("select",(function(){var e,t;if(a.conltrollBar.refresh(!1),(0,s.iC)(l)){var n=null===(e=a.selection.getSingleCell())||void 0===e?void 0:e.css("vertical-align");a.updateAlignText(n),null===(t=a.toolbarModel)||void 0===t||t.update()}})),this.conltrollBar.on("sizeChanged",(function(){var e;a.selection.refreshModel(),a.onChange(),a.enableScroll&&(null===(e=a.scrollbar)||void 0===e||e.refresh())})),this.conltrollBar.on("sizeChanging",(function(){var e;a.enableScroll&&(null===(e=a.scrollbar)||void 0===e||e.refresh()),l.trigger("editor:resize"),a.updateScrollbar()})),this.command.on("actioned",(function(e,t){var n,r;"paste"===e&&l.card.render(a.wrapper),["splitCell","mergeCell","insertCol"].includes(e)&&l.trigger("editor:resize"),a.selection.render(e),null===(n=a.toolbarModel)||void 0===n||n.update(),t||a.onChange(),A.maxRightWidth&&a.overflow(A.maxRightWidth()),a.enableScroll&&(null===(r=a.scrollbar)||void 0===r||r.refresh())}));var u=null===(o=this.wrapper)||void 0===o?void 0:o.find(Or.TABLE_CLASS);if(u){var p=(0,d.Z)((0,h.Z)(n.prototype),"getValue",this).call(this);if(!(null===p||void 0===p?void 0:p.html)){var f=this.getValue();f&&(0,s.iC)(l)&&this.setValue(f),this.onChange()}A.maxRightWidth&&this.overflow(A.maxRightWidth())}}},{key:"remoteRefresh",value:function(){var e,t,r=this;if(this.wrapper&&0!==this.wrapper.length&&(null!==(e=this.wrapper[0].parentElement)&&void 0!==e?e:this.wrapper[0].parentNode)){var i=this.wrapper.find(Or.COLS_HEADER_CLASS),o=(0,d.Z)((0,h.Z)(n.prototype),"getValue",this).call(this),a=i.find(Or.COLS_HEADER_ITEM_CLASS),l=a.length;if(o.cols>l)i.append((0,s.$)(this.template.renderColsHeader(o.cols-l)).find(Or.COLS_HEADER_ITEM_CLASS)),a=i.find(Or.COLS_HEADER_ITEM_CLASS);else if(o.cols<l)for(var c=l;c>o.cols;c--){var A;null===(A=a.eq(c-1))||void 0===A||A.remove()}var u=o.html?(0,s.$)(o.html):this.wrapper.find("table"),p=u.find("col").toArray();p.forEach((function(e,t){var n,i=e.attributes("width")||e.css("width");null===(n=a.eq(t))||void 0===n||n.css("width","".concat(Math.max(parseInt(i),r.colMinWidth),"px"))}));var f=this.wrapper.find(Or.ROWS_HEADER_CLASS),g=f.find(Or.ROWS_HEADER_ITEM_CLASS),m=g.length;if(o.rows>m)f.append((0,s.$)(this.template.renderRowsHeader(o.rows-m)).find(Or.ROWS_HEADER_ITEM_CLASS)),g=f.find(Or.ROWS_HEADER_ITEM_CLASS);else if(o.rows<m)for(var v=m;v>o.rows;v--){var b;null===(b=g.eq(v-1))||void 0===b||b.remove()}var y=u.find("tr").toArray();y.forEach((function(e,t){var n;null===(n=g.eq(t))||void 0===n||n.css("height",Math.max(parseInt(e.css("width")),r.rowMinHeight))})),this.enableScroll&&(null===(t=this.scrollbar)||void 0===t||t.refresh()),this.remoteRefreshTimeout&&clearTimeout(this.remoteRefreshTimeout),this.remoteRefreshTimeout=setTimeout((function(){var e;null===(e=r.wrapper)||void 0===e||e.find(s.Su).each((function(e){var t=e;t.hasAttribute(s.xT)||t.setAttribute(s.xT,r.template.isReadonly?"false":"true")}))}),10)}}},{key:"render",value:function(){var e,t=this.editor;if(this.template.isReadonly=!(0,s.iC)(t)||t.readonly,!(this.wrapper&&this.wrapper.length>0&&(null!==(e=this.wrapper[0].parentElement)&&void 0!==e?e:this.wrapper[0].parentNode))){var n=this.getValue();if(!n)return"Error value";if(n.html){var r=(0,s.$)(n.html);r&&"table"!==r.name&&(r=r.toArray().find((function(e){return"table"===e.name})),r?n.html=r.get().outerHTML:(n.html="<table><tr><td>".concat(n.html,"</td></tr></table>"),r=(0,s.$)(n.html)));var i=this.helper.getTableModel(r);n.rows=i.rows,n.cols=i.cols}if(this.wrapper=(0,s.iC)(t)?(0,s.$)(this.template.htmlEdit(n,Pr(t.language.get("table")))):(0,s.$)(this.template.htmlView(n)),(0,s.iC)(t)||this.wrapper.find("table").addClass("data-table").addClass("data-table-view"),n.rows=this.wrapper.find("tr").length,n.width){var o=this.root.width();this.wrapper.find("table").css("width","".concat(this.enableScroll?n.width:Math.min(n.width,o),"px"))}return this.wrapper}this.remoteRefresh()}},{key:"destroy",value:function(){var e,t;(0,d.Z)((0,h.Z)(n.prototype),"destroy",this).call(this);var r=this.editor;window.removeEventListener("scroll",this.updateScrollbar),window.removeEventListener("resize",this.updateScrollbar),null===(e=r.scrollNode)||void 0===e||e.off("scroll",this.updateScrollbar),this.enableScroll&&(null===(t=this.scrollbar)||void 0===t||t.destroy()),this.command.removeAllListeners();var i=this.selection;i.removeAllListeners(),i.destroy();var o=this.conltrollBar;o.removeAllListeners(),o.destroy(),r.off("undo",this.doChange),r.off("redo",this.doChange)}}],[{key:"cardName",get:function(){return"table"}},{key:"cardType",get:function(){return s.eT.BLOCK}},{key:"selectStyleType",get:function(){return s.dw.BACKGROUND}},{key:"autoSelected",get:function(){return!1}},{key:"lazyRender",get:function(){return!0}}]),n}(s.Zb);oi.colors=jr.getColors().map((function(e){return e.map((function(e){return{color:e,border:jr.getStroke(e)}}))}));var ai={table:{insertColLeft:"Insert column(s) $data left",insertColRight:"Insert column(s) $data right",insertRowUp:"Insert row(s) $data up",insertRowDown:"Insert row(s) $data down",mergeCell:"Merge cells",splitCell:"Unmerge cells",removeCol:"Delete selected column(s)",removeRow:"Delete selected row(s)",removeTable:"Delete table",copy:"Copy",cut:"Cut",paste:"Paste",clear:"Clear",draggingCol:"Moving $data column",draggingRow:"Moving $data row",color:{title:"Cell background color",nonFillText:"No fill color"},noBorder:"Hide border",showBorder:"Show border",verticalAlign:{title:"Vertical align",top:"Align top",middle:"Align middle",bottom:"Align bottom"}}},si={table:{insertColLeft:"左边插入 $data 列",insertColRight:"右边插入 $data 列",insertRowUp:"上方插入 $data 行",insertRowDown:"下方插入 $data 行",mergeCell:"合并单元格",splitCell:"拆分单元格",removeCol:"删除选中列",removeRow:"删除选中行",removeTable:"删除表格",copy:"复制",cut:"剪切",paste:"粘贴",clear:"清空内容",draggingCol:"正在移动 $data 列",draggingRow:"正在移动 $data 行",color:{title:"单元格背景色",nonFillText:"无填充色"},noBorder:"隐藏边框",showBorder:"显示边框",verticalAlign:{title:"垂直对齐",top:"顶对齐",middle:"垂直居中",bottom:"底对齐"}}},li={"en-US":ai,"zh-CN":si},ci='div[dnd-trigger-key="table"], div[toolbar-trigger-key="table"] {\n margin-left: -13px;\n margin-top: -13px;\n}\n\n.data-table {\n border: none;\n position: relative;\n z-index: 1;\n table-layout: fixed;\n white-space: pre-wrap;\n width: 100%;\n border-collapse: collapse;\n background-color: #ffffff;\n}\n\ndiv[data-card-key="table"].card-selected .data-table, div[data-card-key="table"].card-selected-other .data-table {\n background: transparent\n}\n\n.am-engine [data-card-key="table"].card-selected [data-card-element="center"].data-card-background-selected {\n background: transparent;\n}\n\n.am-engine [data-card-key="table"].card-selected [data-card-element="center"].data-card-background-selected .table-wrapper {\n background: rgba(27, 162, 227, 0.2);\n}\n\n.am-engine-mobile div[data-card-key="table"].card-activated {\n margin-left: 20px;\n}\n\n.data-table tr,.data-table td {\n position: relative;\n}\n\n.data-table tr {\n height: 35px;\n}\n\n.data-table tr td {\n border: none;\n vertical-align: top;\n cursor: text;\n}\n\n.data-table tr td[table-cell-selection]:after {\n content: \' \';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(180, 213, 254, 0.5);\n pointer-events: none;\n z-index: 2;\n}\n\n.drag-selecting .data-table, .data-table tr td[table-cell-selection] {\n caret-color:transparent\n}\n\n.data-table tr td[table-cell-selection] ::-moz-selection{\n background: transparent !important;\n}\n\n.data-table tr td[table-cell-selection] ::selection{\n background: transparent !important;\n}\n\n.table-wrapper {\n position: relative;\n cursor: default;\n}\n\n.table-wrapper.active {\n margin-top: -41px;\n width: 100%;\n}\n\n.table-wrapper.scrollbar-show {\n margin-bottom: -10px;\n}\n\n.table-wrapper.data-table-highlight tr td[table-cell-selection]:after {\n background: transparent;\n}\n\n.table-wrapper .table-header {\n position: absolute;\n visibility: hidden;\n left: -13px;\n top: 28px;\n width: 14px;\n height: 14px;\n cursor: pointer;\n z-index: 4;\n background-color: #ffffff;\n}\n\n.table-wrapper .table-header .table-header-item {\n border: 1px solid #dfdfdf;\n background-color: #f2f3f5;\n border-top-left-radius: 50%;\n width: 100%;\n height: 100%;\n}\n\n.table-wrapper .table-header:hover {\n background-color: #ffffff;\n}\n\n.table-wrapper.data-table-highlight-all .table-header .table-header-item {\n background: rgba(255, 77, 79, 0.4) !important;\n}\n\n.table-wrapper .table-header-item:hover{\n background-color: #e2e4e6;\n}\n\n.table-wrapper.active .table-header {\n visibility:visible\n}\n\n.table-wrapper .table-header.selected .table-header-item {\n background: #4daaff;\n border-color: #4daaff;\n}\n\n.table-wrapper .table-cols-header {\n position: relative;\n height: 13px;\n display: none;\n width: 100%;\n cursor: default;\n}\n\n.table-wrapper.active .table-cols-header {\n display: flex;\n}\n\n.table-wrapper .table-cols-header .table-cols-header-item {\n position: relative;\n height: 13px;\n width: auto;\n border: 1px solid #dfdfdf;\n border-bottom: 0 none;\n overflow: visible;\n background: #f2f3f5;\n cursor: pointer;\n border-right: 0 none;\n}\n\n.table-wrapper .table-cols-header .table-cols-header-item.active{\n background-color: #e2e4e6;\n}\n\n.table-wrapper .table-cols-header .table-cols-header-item:first-child {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n}\n.table-wrapper .table-cols-header .table-cols-header-item:last-child {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n border-right: 1px solid #dfdfdf;\n}\n.table-wrapper.data-table-highlight-col .table-cols-header .table-cols-header-item.active, .table-wrapper.data-table-highlight-all .table-cols-header .table-cols-header-item {\n background: rgba(255, 77, 79, 0.4) !important;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.selected {\n background: #fff;\n z-index: 1;\n border-radius: 0;\n border-bottom: 0;\n cursor: move;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.selected .col-dragger {\n display: flex;\n position: absolute;\n left: -1px;\n top: -1px;\n right: -1px;\n bottom: -1px;\n background: #4daaff;\n border-radius: 0;\n z-index: 1;\n justify-content: center;\n align-items: center;\n}\n\n.table-wrapper.data-table-highlight-col .table-cols-header .table-cols-header-item .col-dragger,.table-wrapper.data-table-highlight-all .table-cols-header .table-cols-header-item .col-dragger {\n background: transparent !important;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.selected .col-dragger .drag-info {\n display: none;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.no-dragger .col-dragger .data-icon {\n display: none;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.dragging .col-dragger {\n height: 50px;\n}\n.table-wrapper .table-cols-header .table-cols-header-item.dragging .col-dragger .drag-info {\n display: block;\n color: #fff;\n}\n.table-wrapper .table-cols-header .table-cols-header-item .cols-trigger {\n position: absolute;\n right: -1px;\n top: -1px;\n width: 2px;\n height: 14px;\n z-index: 10;\n}\n\n.am-engine-mobile .table-wrapper .table-cols-header .table-cols-header-item .cols-trigger {\n right: -3px;\n width: 6px;\n}\n\n.am-engine:not(.am-engine-mobile) .table-wrapper .table-cols-header .table-cols-header-item .cols-trigger.active {\n background: #0589f3;\n cursor: col-resize;\n}\n\n.am-engine:not(.am-engine-mobile) .table-wrapper .table-cols-header .table-cols-header-item .cols-trigger.dragging {\n width: 2px;\n background: #0589f3;\n right: -1px;\n}\n\n.table-wrapper .table-cols-header .table-cols-header-item .col-dragger {\n text-align: center;\n display: none;\n}\n.table-wrapper .table-cols-header .table-cols-header-item .col-dragger .data-icon-drag {\n font-size: 10px;\n color: #fff;\n}\n\n.table-wrapper .table-cols-header .table-cols-header-item .col-dragger .data-icon-drag::before {\n transform: rotate(90deg);\n display: inline-block;\n}\n\n.table-wrapper.data-table-highlight-col .table-cols-header .table-cols-header-item .col-dragger .data-icon-drag,.table-wrapper.data-table-highlight-all .table-cols-header .table-cols-header-item .col-dragger .data-icon-drag{\n display: none;\n}\n.table-wrapper .table-cols-header.dragging .table-cols-header-item .cols-trigger,.table-wrapper.drag-selecting .table-cols-header-item .cols-trigger{\n display: none;\n}\n.table-wrapper .table-cols-header.resize .table-cols-header-item {\n cursor: col-resize;\n}\n.table-wrapper .table-rows-header {\n position: absolute;\n left: -13px;\n top: 41px;\n width: 14px;\n z-index: 128;\n border-right: 0;\n display: none;\n}\n\n.table-wrapper.active .table-rows-header {\n display: block;\n}\n\n.table-wrapper .table-rows-header .table-rows-header-item {\n position: relative;\n width: 100%;\n border: 1px solid #dfdfdf;\n border-bottom: 0;\n background: #f2f3f5;\n cursor: pointer;\n}\n\n.table-wrapper .table-rows-header .table-rows-header-item.active\n{\n background-color: #e2e4e6;\n}\n\n/* .table-wrapper .table-rows-header .table-rows-header-item:nth-child(3) {\n border-top: 0 none;\n} */\n\n.table-wrapper .table-rows-header .table-rows-header-item:last-child{\n border-bottom: 1px solid #dfdfdf;\n}\n\n.table-wrapper.data-table-highlight-row .table-rows-header .table-rows-header-item.active,.table-wrapper.data-table-highlight-all .table-rows-header .table-rows-header-item {\n background: rgba(255, 77, 79, 0.4) !important;\n}\n\n.table-wrapper .table-rows-header .table-rows-header-item.selected {\n width: 14px;\n background: #fff;\n cursor: move;\n}\n.table-wrapper .table-rows-header .table-rows-header-item.selected .row-dragger {\n display: flex;\n position: absolute;\n align-items: center;\n text-align: left;\n white-space: nowrap;\n content: \' \';\n left: -1px;\n top: -1px;\n bottom: -1px;\n right: -1px;\n background: #4daaff;\n border-radius: 0;\n z-index: 1;\n}\n.table-wrapper.data-table-highlight-row .table-rows-header .table-rows-header-item .row-dragger,.table-wrapper.data-table-highlight-all .table-rows-header .table-rows-header-item .row-dragger{\n background: transparent !important;\n}\n.table-wrapper .table-rows-header .table-rows-header-item.selected .row-dragger .drag-info {\n display: none;\n}\n.table-wrapper .table-rows-header .table-rows-header-item.no-dragger .row-dragger .data-icon {\n display: none;\n}\n.table-wrapper .table-rows-header .table-rows-header-item.dragging .row-dragger {\n width: 150px;\n}\n.table-wrapper .table-rows-header .table-rows-header-item.dragging .row-dragger .drag-info {\n margin-left: 5px;\n display: flex;\n padding: 10px;\n color: #fff;\n}\n.table-wrapper .table-rows-header .table-rows-header-item .rows-trigger {\n position: absolute;\n bottom: -1px;\n height: 2px;\n width: 14px;\n left: -1px;\n z-index: 10;\n cursor: row-resize;\n}\n\n.am-engine-mobile .table-wrapper .table-rows-header .table-rows-header-item .rows-trigger {\n bottom: -3px;\n height: 6px;\n}\n\n.am-engine:not(.am-engine-mobile) .table-wrapper .table-rows-header .table-rows-header-item .rows-trigger.active {\n background: #0589f3;\n}\n\n.am-engine:not(.am-engine-mobile) .table-wrapper .table-rows-header .table-rows-header-item .rows-trigger.dragging {\n height: 2px;\n background: #0589f3;\n bottom: -1px;\n}\n\n.table-wrapper .table-rows-header .table-rows-header-item .row-dragger {\n display: none;\n}\n.table-wrapper .table-rows-header .table-rows-header-item .row-dragger .data-icon-drag {\n font-size: 10px;\n color: #fff;\n margin-left: 1px;\n}\n\n.table-wrapper.data-table-highlight-row .table-rows-header .table-rows-header-item .row-dragger .data-icon-drag,.table-wrapper.data-table-highlight-all .table-rows-header .table-rows-header-item .row-dragger .data-icon-drag{\n display: none;\n}\n\n.table-wrapper .table-rows-header .table-rows-header-item .row-dragger .drag-info {\n height: 100%;\n display: flex;\n align-items: center;\n}\n.table-wrapper .table-rows-header.dragging .table-rows-header-item .rows-trigger,.table-wrapper.drag-selecting .table-rows-header-item .rows-trigger {\n display: none;\n}\n.table-wrapper .table-rows-header.resize .table-rows-header-item {\n cursor: row-resize;\n}\n\n.table-wrapper .table-viewport {\n position: relative;\n overflow: hidden;\n overflow-y: hidden;\n cursor: text;\n}\n\n.table-wrapper.active .table-viewport{\n padding-top: 28px;\n padding-left: 13px;\n margin-left: -13px;\n}\n\n.table-wrapper .table-viewport .scrollbar-shadow-left {\n top: 0;\n bottom: 10px;\n}\n\n.table-wrapper.active .table-viewport .scrollbar-shadow-left {\n top: 28px;\n margin-left: 14px;\n}\n\n.table-wrapper .table-viewport .scrollbar-shadow-right {\n top: 0;\n bottom: 10px;\n}\n\n.table-wrapper.active .table-viewport .scrollbar-shadow-right {\n top: 28px;\n}\n\n.table-wrapper .table-placeholder {\n position: absolute;\n border: 1px solid #008dff;\n background: #008dff;\n display: none;\n z-index: 126;\n}\n.table-wrapper .table-menubar {\n position: absolute;\n top: -99999px;\n left: -99999px;\n padding: 4px 0;\n border-radius: 4px;\n border: 1px solid #e9e9e9;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.08);\n background: #fff;\n /* \\u4ee3\\u7801\\u5757\\u7684 codemirror \\u9ed8\\u8ba4\\u7ed9\\u6bcf\\u884c\\u4ee3\\u7801\\u7684 pre \\u8bbe\\u7f6e\\u4e86 z-index 2, \\u5982\\u679c\\u8868\\u683c\\u5728\\u4ee3\\u7801\\u5757\\u524d\\u9762\\uff0c\\u9020\\u6210\\u53f3\\u952e\\u83dc\\u5355\\u65e0\\u6cd5\\u70b9\\u51fb */\n z-index: 130;\n min-width: 240px;\n}\n.table-wrapper .table-menubar .table-menubar-item {\n padding: 6px 16px;\n cursor: default;\n}\n.table-wrapper .table-menubar .table-menubar-item:hover {\n background: #f0f0f0;\n}\n\n.table-wrapper .table-menubar .table-menubar-item.disabled {\n color: #aaa;\n display: none;\n}\n\n.table-wrapper .table-menubar .table-menubar-item .table-menubar-item-input {\n width: 46px;\n line-height: 12px;\n font-size: 12px;\n outline: none;\n border: 1px solid #dadada;\n border-radius: 4px;\n text-align: center;\n}\n\n.table-wrapper .table-menubar .table-menubar-item .table-menubar-item-input::-moz-selection {\n color: inherit;\n background:transparent\n}\n\n.table-wrapper .table-menubar .table-menubar-item .table-menubar-item-input::selection {\n color: inherit;\n background:transparent\n}\n\n.table-wrapper .table-menubar .table-menubar-item .table-menubar-item-input:focus::-moz-selection\n{\n color: #fff;\n background: #1890ff;\n}\n\n.table-wrapper .table-menubar .table-menubar-item .table-menubar-item-input:focus::selection\n{\n color: #fff;\n background: #1890ff;\n}\n\n.table-wrapper .table-menubar .split {\n height: 0;\n border-top: 1px solid #e8e8e8;\n margin: 2px 0;\n}\n\n.table-wrapper .table-main-content {\n margin: 2px 2px;\n padding: 4px 4px;\n position: relative;\n z-index: 3;\n}\n\n.table-wrapper .table-main-content [data-card-key] {\n max-width: 100%;\n}\n\n.table-wrapper .table-main-bg {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1;\n bottom: 0;\n pointer-events: none;\n}\n\n.table-wrapper .table-main-bg .table-main-border-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1;\n height: 0;\n border-top: 1px solid rgb(217, 217, 217);\n}\n\n.table-wrapper:not(.active) [data-table-no-border="true"] .table-main-bg .table-main-border-top {\n border-top-color: transparent;\n}\n\n.table-wrapper.active [data-table-no-border="true"] .table-main-bg .table-main-border-top {\n border-top-style: dashed;\n}\n\n.table-wrapper .table-main-bg .table-main-border-right {\n display: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: -1px;\n z-index: 1;\n width: 0;\n border-right: 1px solid rgb(217, 217, 217);\n}\n\n.table-wrapper:not(.active) [data-table-no-border="true"] .table-main-bg .table-main-border-right {\n border-right-color: transparent;\n}\n\n.table-wrapper.active [data-table-no-border="true"] .table-main-bg .table-main-border-right {\n border-right-style: dashed;\n}\n\n.table-wrapper tr td.table-last-row .table-main-bg .table-main-border-right {\n display: block;\n right: 0;\n}\n\n.table-wrapper .table-main-bg .table-main-border-bottom {\n display: none;\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n z-index: 1;\n height: 0;\n border-bottom: 1px solid rgb(217, 217, 217);\n}\n\n.table-wrapper:not(.active) [data-table-no-border="true"] .table-main-bg .table-main-border-bottom {\n border-bottom-color: transparent;\n}\n\n.table-wrapper.active [data-table-no-border="true"] .table-main-bg .table-main-border-bottom {\n border-bottom-style: dashed;\n}\n\n.table-wrapper tr td.table-last-column .table-main-bg .table-main-border-bottom{\n display: block;\n bottom: 0;\n}\n\n.table-wrapper .table-main-bg .table-main-border-left {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 0;\n border-left: 1px solid rgb(217, 217, 217);\n}\n\n.table-wrapper:not(.active) [data-table-no-border="true"] .table-main-bg .table-main-border-left {\n border-left-color: transparent;\n}\n\n.table-wrapper.active [data-table-no-border="true"] .table-main-bg .table-main-border-left {\n border-left-style: dashed;\n}\n\n.table-wrapper .table-highlight {\n background: #ff4d4f;\n opacity: 0.08;\n position: absolute;\n z-index: 2;\n pointer-events: none;\n display: none;\n}\n\n.table-wrapper.scrollbar-show .data-scrollable.scroll-x {\n padding-bottom: 10px;\n}\n\n.table-wrapper .data-scrollable.scroll-x {\n padding-bottom: 0;\n}\n\n.table-wrapper .data-scrollable.scroll-x:hover {\n overflow: hidden;\n}\n\n.table-wrapper.scrollbar-show .data-scrollable.scroll-x .data-scrollbar-x{\n margin-bottom: 2px;\n}\n\n.table-wrapper .data-scrollable .data-scrollbar.data-scrollbar-x {\n height: 6px;\n z-index: 5;\n}\n\n.table-wrapper .data-scrollable .data-scrollbar.data-scrollbar-x .data-scrollbar-trigger {\n height: 6px;\n}\n\n.table-wrapper .table-rows-header .table-row-delete-button,.table-wrapper .table-rows-header .table-row-add-button {\n position: absolute;\n right: 100%;\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 2;\n width: 24px;\n height: 24px;\n border: 1px solid #e4e4e4;\n border-radius: 2px;\n cursor: pointer;\n background-color: #fff;\n background-position: center center;\n background-repeat: no-repeat;\n\n left: 14px;\n margin-left: 2px;\n margin-top: -2px;\n}\n\n.table-wrapper .table-rows-header .table-row-delete-button .data-icon,.table-wrapper .table-rows-header .table-row-add-button .data-icon {\n font-size: 12px;\n}\n\n.table-wrapper .table-rows-header .table-row-add-button {\n left: -30px;\n margin-top: -12px;\n}\n\n.table-wrapper .table-rows-header .table-row-delete-button:hover,.table-wrapper .table-col-delete-button:hover {\n color:#ff4d4f;\n}\n\n.table-wrapper .table-col-delete-button, .table-wrapper .table-col-add-button {\n position: absolute;\n bottom: 100%;\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 128;\n margin-bottom: 4px;\n width: 24px;\n height: 24px;\n border: 1px solid #e4e4e4;\n border-radius: 2px;\n cursor: pointer;\n background: #fff;\n background-position: center center;\n background-repeat: no-repeat;\n margin-left: -12px;\n}\n\n.table-wrapper .table-col-delete-button .data-icon, .table-wrapper .table-col-add-button .data-icon {\n font-size: 12px;\n}\n\n.table-wrapper .table-cols-header .table-col-add-button .table-col-add-split-button {\n position: absolute;\n width: 2px;\n left: 10px;\n top: 22px;\n background: #008dff;\n display: none;\n}\n\n.table-wrapper .table-rows-header .table-row-add-button .table-row-add-split-button {\n position: absolute;\n height: 2px;\n left: 22px;\n background: #008dff;\n display: none;\n}\n\n.table-wrapper .table-col-add-button:hover, .table-wrapper .table-row-add-button:hover {\n color: #008dff;\n}\n\n.table-wrapper .table-col-add-button:hover .table-col-add-split-button{\n display: block;\n}\n\n.table-wrapper .table-row-add-button:hover .table-row-add-split-button{\n display: block;\n}\n\n.data-table-reader .data-table tr td {\n border: 1px solid rgb(217, 217, 217);\n cursor: auto;\n padding: 4px 8px;\n}\n\n.data-table-reader .data-table[data-table-no-border="true"] tr td {\n border:0 none\n}\n\n.data-table-reader.data-scrollable.scroll-x {\n padding-bottom: 10px;\n}\n\n.data-table-reader .scrollbar-shadow-left, .data-table-reader .scrollbar-shadow-right {\n bottom: 10px;\n}\n\n.data-table-reader.scrollbar-show.data-scrollable.scroll-x .data-scrollbar-x{\n margin-bottom: 2px;\n}\n\n.data-table-reader.data-scrollable .data-scrollbar.data-scrollbar-x {\n height: 6px;\n}\n\n.data-table-reader.data-scrollable .data-scrollbar.data-scrollbar-x .data-scrollbar-trigger {\n height: 6px;\n}\n\n[data-card-key="table"].data-card-block-max > [data-card-element="body"] > [data-card-element="center"] {\n padding: 48px;\n margin-top: 4px;\n}\n/**\n表格可溢出样式\n**/\n.table-wrapper.table-overflow {\n width: auto;\n}\n';ni(ci);var Ai=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.onCopy=function(t){var n=e.editor;if(!(0,s.iC)(n))return!0;var r=n.change,i=n.card,o=r.range.get(),a=i.find(o.commonAncestorNode,!0);if(a&&a.name===oi.cardName&&!a.isCursor(o.startNode)){var l=a.getSelectionNodes();if(l.length>1)return t.preventDefault(),a.command.copy(),n.messageSuccess("copy",n.language.get("copy","success")),!1}return!0},e.onCut=function(t){var n=e.editor;if(!(0,s.iC)(n)||n.readonly)return!0;var r=n.change,i=n.card,o=r.range.get(),a=i.find(o.commonAncestorNode,!0);if(a&&a.name===oi.cardName&&!a.isCursor(o.startNode)){var l=a.getSelectionNodes();if(l.length>1)return t.preventDefault(),a.command.cut(),!1}return!0},e.onPaste=function(t){var n=e.editor;if(!(0,s.iC)(n)||n.readonly)return!0;var r=n.change,i=n.card,o=r.range.get(),a=i.find(o.commonAncestorNode,!0);if(a&&a.name===oi.cardName&&!a.isCursor(o.startNode)){var l=n.clipboard.getData(t);if(!l||!/<meta\s+name="aomao"\s+content="table"\s{0,}\/?>/gi.test(l.html||"")){if(l.html&&~l.html.indexOf("<table")){var c=new s._b(l.html,n).toDOM(n.schema,n.conversion),A=function e(t){return t instanceof HTMLElement?"TABLE"===t.tagName?t:1===t.childNodes.length?e(t.firstChild):null:null};if(1===c.childElementCount){var u=A(c.firstChild);return t.preventDefault(),l.html=u.outerHTML,l.text=u.outerText,a.command.paste(l),!1}}return!0}return t.preventDefault(),a.command.paste(l),!1}return!0},e.pasteSchema=function(e){e.data.blocks.forEach((function(e){e.allowIn||(e.allowIn=[]),e.allowIn.indexOf("td")<0&&e.allowIn.push("td")}));var t=e.find((function(e){return"table"===e.name}))[0];t.attributes={class:["data-table"],"data-table-no-border":"*","data-width":"@length",style:{width:"@length",background:"@color","background-color":"@color"}};var n=t.allowIn;n?n.push("div"):t.allowIn=["div"],e.find((function(e){return"div"===e.name}))[0].attributes={class:{required:!0,value:["editor-table-wrapper"]}},e.find((function(e){return"tr"===e.name}))[0].attributes={class:["data-table"],"data-table-no-border":"*",style:{height:"@length",background:"@color","background-color":"@color",display:"*"}},e.find((function(e){return"td"===e.name}))[0].attributes={colspan:"@number",rowspan:"@number",class:["table-last-column","table-last-row","table-last-column","table-cell-selection"],style:{"background-color":"@color",background:"@color","vertical-align":["top","middle","bottom"],valign:["top","middle","bottom"],width:"@length","border-width":"@length","padding-right":"@length","padding-left":"@length"}}},e.pasteEach=function(t){var n;"div"===t.name&&t.hasClass("editor-table-wrapper")&&"table"===(null===(n=t.first())||void 0===n?void 0:n.name)&&e.editor.node.unwrap(t)},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"width",n=e.attributes("data-width"),r=n||e.css(t);r.endsWith("%")&&e.css(t,""),r.endsWith("pt")&&e.css(t,zr(r))},i=t.find("table");if(0!==i.length){var o=new Rr(n),a=n.change,l=a.range.get(),c=function(e){var t=e.find("thead"),r=t.find("th,td").toArray();r.forEach((function(t){e.before(t.children())}));var i=e.find("tr").toArray();i.forEach((function(t){var r=t.find("td").toArray();r.forEach((function(t){n.node.isEmpty(t)||e.before(t.children())}))}));var o=e.find("tfoot"),a=o.find("th,td").toArray();a.forEach((function(t){e.after(t.children())})),e.remove()},A=l.startNode.closest(s.Su).length>0;i.each((function(e,t){var a,l,u,d=i.eq(t);if(d)if(A||"td"===(null===(a=d.parent())||void 0===a?void 0:a.name))c(d);else{var h=d.find("tr");h.each((function(e){var t=(0,s.$)(e),n=t.css("display");"none"===n?t.remove():t.css("display",""),r(t),r(t,"height");var i=t.children();i.each((function(e){var t=(0,s.$)(e);r(t);var n=t.text(),i=t.find("table");if(i.length>0&&(i.after(document.createTextNode(i.text())),i.remove()),"td"!==t.name&&["\n","\r\n"].includes(n.trim())){var o=(0,s.$)("<td></td>");t.before(o),o.append(t)}}))})),r(d),r(d,"height"),d=o.normalizeTable(d);var p=d.find("tbody");if(p.length>1)for(var f=1;f<p.length;f++){var g,m=p.eq(f),v=null===m||void 0===m?void 0:m.find("tr");if(v&&v.length>0)null===(g=p.eq(0))||void 0===g||g.append(v);null===m||void 0===m||m.remove()}var b=d.find("thead");b&&b.length>0&&p.prepend(b.children()),b.remove();var y=d.find("tfoot");y&&y.length>0&&p.append(y.children()),y.remove();var w=d.find("th");w.each((function(e,t){var n=w.eq(t);null===n||void 0===n||n.replaceWith((0,s.$)("<td>".concat(n.html(),"</td>")))}));var x=d.find("td"),k=(0,s.Me)().createDocumentFragment();x.each((function(e,t){k=(0,s.Me)().createDocumentFragment();var i=x.eq(t);if(i){r(i),r(i,"height");var o=i.css("background");o&&i.css("background-color",o);var a=i.attributes("valign");a&&i.attributes("vertical-align",a);for(var l=i.children(),c=0,A=l.length;c<A;c++){var u=l.eq(c);if("p"!==(null===u||void 0===u?void 0:u.name)||0!==u.children().length){if((0===c||c===A-1)&&(null===u||void 0===u?void 0:u.isText())){var d=u.text();if(/^\n(\s)*$/.test(d))continue}u&&k.appendChild(u[0])}}var h=(0,s.$)(k);null===i||void 0===i||i.empty().append(n.node.normalize(h))}}));var C=(null===(l=d)||void 0===l?void 0:l.css("background"))||(null===(u=d)||void 0===u?void 0:u.css("background-color"));C&&x.css("background",C),h=d.find("tr");var B=1;h.each((function(e){var t=(0,s.$)(e),n=null===t||void 0===t?void 0:t.find("td");if(0===(null===n||void 0===n?void 0:n.length)&&B<2&&(null===t||void 0===t||t.remove()),n&&(null===n||void 0===n?void 0:n.length)>0){var i=n.toArray().map((function(e){return e[0].rowSpan}));B=Math.max.apply(Math,(0,lr.Z)(i))}t&&(r(t),r(t,"height"));var o=(null===t||void 0===t?void 0:t.css("background"))||(null===t||void 0===t?void 0:t.css("background-color"));o&&(null===n||void 0===n||n.css("background",o))})),n.nodeId.generateAll(d,!0);var _=d.allChildren();_.forEach((function(e){n.node.isInline(e)&&n.inline.repairCursor(e)}));var E=d.get().outerHTML.replace(/\n|\r\n/g,"").replace(/>\s+</g,"><");n.card.replaceNode(d,oi.cardName,{html:E}),d.remove()}}))}}},e.parseHtml=function(t,n){var r=e.editor,i=[];return t.find("[".concat(s.Jr,'="').concat(oi.cardName,'"],[').concat(s.mV,'="').concat(oi.cardName,'"]')).each((function(t){var o=(0,s.$)(t),a=o.find("table"),l=(0,s.RW)(o.attributes(s.TM));if(0===a.length){if(!l||!l.html)return;if(a=(0,s.$)((0,s.Gg)(l.html)),0===a.length)return void o.remove();r.trigger("parse:html",a)}var c=!1!==e.options.enableScroll,A=a.attributes("width")||a.css("width");a.css({outline:"none","border-collapse":"collapse",width:c?"100%":A}),a.attributes("data-width",A);var u=a.find("td");u.each((function(e,t){var n=u.eq(t);null===n||void 0===n||n.css({"min-width":"auto","white-space":"flat","word-wrap":"break-word",margin:"4px 8px",border:a.attributes("data-table-no-border")?"0 none":"1px solid #d9d9d9",padding:"4px 8px",cursor:"default","vertical-align":n.css("vertical-align")||"top"})})),a.find(Or.TABLE_TD_BG_CLASS).remove(),a.find(Or.TABLE_TD_CONTENT_CLASS).each((function(e){r.node.unwrap((0,s.$)(e))}));var d=a.find("colgroup"),h=(0,s.$)('<tr style="height:0px"></tr>');d.find("col").each((function(e){var t=(0,s.$)(e).attributes("width"),n=(0,s.$)('<td width="'.concat(t,'px"></td>'));h.append(n)})),a.find("tbody").append(h),n&&(a=n(a,l));var p=a.attributes("data-id")+"-table";a=(0,s.$)("<div class=\"editor-table-wrapper\" style='width:100%;overflow:auto;' data-id='".concat(p,"' data-table-no-border='").concat(!!a.attributes("data-table-no-border"),"'>")).append(a),o.replaceWith(a),i.push(a)})),i},e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("table")},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;this.options.colMinWidth||(this.options.colMinWidth=40),this.options.rowMinHeight||(this.options.rowMinHeight=30),e.language.add(li),e.schema.add(this.schema()),e.conversion.add("th","td"),e.on("parse:html",this.parseHtml),e.on("paste:each",this.pasteEach),e.on("paste:each-after",this.pasteHtml),e.on("paste:schema",this.pasteSchema),(0,s.iC)(e)&&(this.editor.on("markdown-it",this.markdownIt),e.change.event.onDocument("copy",this.onCopy,0),e.change.event.onDocument("cut",this.onCut,0),e.change.event.onDocument("paste",this.onPaste,0))}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"schema",value:function(){return[{name:"table",type:"block",attributes:{class:["data-table"],"data-table-no-border":"*",style:{width:"@length"}}},{name:"colgroup",type:"block",allowIn:["table"]},{name:"col",type:"block",isVoid:!0,attributes:{width:"@number",span:"@number"},allowIn:["colgroup"]},{name:"thead",type:"block",allowIn:["table"]},{name:"tbody",type:"block",allowIn:["table"]},{name:"tr",type:"block",attributes:{style:{height:"@length"}},allowIn:["tbody","thead","tfoot"]},{name:"td",type:"block",attributes:{colspan:"@number",rowspan:"@number",class:["table-last-column","table-last-row","table-last-column","table-cell-selection"],style:{"background-color":"@color","vertical-align":["top","middle","bottom"]}},allowIn:["tr"]},{name:"th",type:"block",attributes:{colspan:"@number",rowspan:"@number"},allowIn:["tr"]}]}},{key:"execute",value:function(e,t){var n=this.editor;if((0,s.iC)(n)){var r=n.change,i=r.range.get();i.startNode.closest(s.Su).isCard()||n.card.insert(oi.cardName,{rows:e||3,cols:t||3,overflow:!!this.options.overflow})}}},{key:"destroy",value:function(){var e=this.editor;e.off("parse:html",this.parseHtml),e.off("paste:each-after",this.pasteHtml),e.off("paste:schema",this.pasteSchema),e.off("markdown-it",this.markdownIt)}}],[{key:"pluginName",get:function(){return"table"}}]),n}(s.Sy),ui=Ai,di=n(3336);function hi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var pi='.data-file {\r\n display: flex;\r\n height: 24px;\r\n line-height: 24px;\r\n cursor: pointer;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n .data-file .data-file-icon {\r\n flex: auto;\r\n width: 24px;\r\n height: 24px;\r\n font-size: 16px;\r\n text-align: center;\r\n }\r\n .data-file .data-file-title {\r\n flex: auto;\r\n font-size: 14px;\r\n margin-right: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n .data-file .data-file-size {\r\n flex: auto;\r\n font-size: 12px;\r\n }\r\n .data-file-done {\r\n color: #096DD9;\r\n }\r\n .data-file-uploading,\r\n .data-file-error {\r\n color: #595959;\r\n }\r\n .data-file-uploading .data-file-size,\r\n .data-file-error .data-file-size {\r\n color: #8C8C8C;\r\n }\r\n .data-file-error {\r\n padding: 2px 4px;\r\n background: #f5f5f5;\r\n display: flex;\r\n border-radius: 4px;\r\n max-width: 200px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n font-size: 12px;\r\n align-items: center;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n user-select: none;\r\n cursor: pointer;\r\n}\r\n\r\n.am-engine [data-card-key="file"].card-selected [data-card-element=center].data-card-background-selected {\r\n border-radius: 4px;\r\n}\r\n\r\n.data-file-error .data-icon {\r\n font-size: 12px;\r\n}\r\n\r\n.data-file-error .data-icon-error {\r\n color: red;\r\n margin-right: 8px;\r\n}\r\n\r\n.data-file-error .data-icon-copy {\r\n margin-left: 8px;\r\n cursor: pointer;\r\n}';hi(pi);var fi=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e,i;(0,r.Z)(this,n);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),i.container=void 0,i.getMaxWidth=function(){var e,t=i.editor.block.closest(i.root),n=i.root.find(".data-file-size");return t.get().clientWidth-36-((null===n||void 0===n||null===(e=n.get())||void 0===e?void 0:e.clientWidth)||0)},i.onWindowResize=function(){i.updateMaxWidth()},i.updateMaxWidth=function(){var e=i.getMaxWidth();i.root.find(".data-file-title").css("max-width",Math.max(e,0)+"px")},i.onBeforeRender=function(e,t){var n=i.editor.plugin.findPlugin("file");if(n){var r=n.options||{},o=r.onBeforeRender;if(o)return o(e,t,i.editor)}return t},i.destroy=function(){(0,d.Z)((e=(0,E.Z)(i),(0,h.Z)(n.prototype)),"destroy",e).call(e),i.container=void 0,window.removeEventListener("resize",i.onWindowResize),i.editor.off("editor:resize",i.onWindowResize)},i}return(0,i.Z)(n,[{key:"getLocales",value:function(){return this.editor.language.get("file")}},{key:"toolbar",value:function(){var e,t,n=this,r=this.editor,i=null!==(e=null===(t=r.plugin.findPlugin("file"))||void 0===t?void 0:t.options)&&void 0!==e?e:{},o=function(){var e=[],t=n.getValue();if(!t)return e;var o=t.status,a=t.preview,l=t.download,c=n.getLocales();if("done"===o){if(a){var A=function(){i.onPreview&&i.onPreview(a,t)};e.push({key:"preview",type:"button",content:'<span class="data-icon data-icon-preview" />',title:c.preview,link:i.onPreview?void 0:(0,s.Nm)(n.onBeforeRender("preview",a)),onClick:i.onPreview?A:void 0})}if(l){var u=function(){i.onDownload&&i.onDownload(l,t)};e.push({key:"download",type:"button",content:'<span class="data-icon data-icon-download" />',title:c.download,link:i.onDownload?void 0:(0,s.Nm)(n.onBeforeRender("download",l)),onClick:i.onDownload?u:void 0})}(0,s.iC)(r)&&!r.readonly&&e.length>0&&e.push({key:"separator",type:"separator"})}return(0,s.iC)(r)&&!r.readonly&&e.push({key:"delete",type:"delete"}),e};return(null===i||void 0===i?void 0:i.cardToolbars)?i.cardToolbars(o(),this.editor):o()}},{key:"renderTemplate",value:function(e){var t=e.name,n=e.status,r=e.message,i=e.percent,o=e.size,a=this.getLocales();if("error"===n)return'<span class="data-file-error"><span class="data-icon data-icon-error"></span>'.concat(r||a["loadError"],'<span class="data-icon data-icon-copy"></span></span>');var l='<span class="data-icon data-icon-attachment"></span>';"uploading"===n&&(l='<i class="data-anticon">\n <svg viewBox="0 0 1024 1024" class="data-anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true">\n <path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path>\n </svg>\n </i>\n ');var c="",A=o?(0,s.hR)(o):"";A&&(c='<span class="data-file-size">('.concat((0,s.YU)(A),")</span>"));var u="";return"uploading"===n&&(u='<span class="percent">'.concat(i||0,"%</span>")),'\n <a class="data-file data-file-'.concat(n,'">\n <span class="data-file-icon">').concat(l,"</span>\n ").concat(u,'\n <span class="data-file-title">').concat((0,s.YU)(t),"</span>\n ").concat(c,"\n </a>\n ")}},{key:"bindErrorEvent",value:function(e){var t=this,n=this.editor,r=e.find(".data-icon-copy");r.on("mouseenter",(function(){s.u.show(r,n.language.get("image","errorMessageCopy").toString())})),r.on("mouseleave",(function(){s.u.hide()})),r.on("click",(function(e){var r;e.stopPropagation(),e.preventDefault(),s.u.hide(),n.clipboard.copy((null===(r=t.getValue())||void 0===r?void 0:r.message)||"Error message"),n.messageSuccess("copy",n.language.get("copy","success").toString())}))}},{key:"setProgressPercent",value:function(e){var t;null===(t=this.container)||void 0===t||t.find(".percent").html("".concat(e,"%")),this.setValue({percent:e})}},{key:"onActivate",value:function(e){var t,n;e?null===(t=this.container)||void 0===t||t.addClass("data-file-active"):null===(n=this.container)||void 0===n||n.removeClass("data-file-active")}},{key:"writeHistoryOnValueChange",value:function(){if(this.loading)return!1}},{key:"render",value:function(){var e,t=this.getValue();if(t){this.container&&0!==this.container.length?this.container=this.getCenter().first():(this.container=(0,s.$)(this.renderTemplate(t)),this.getCenter().empty().append(this.container));var n=this.editor;(0,s.iC)(n)?this.container.attributes("draggable","true"):this.renderView(),"error"===t.status&&this.bindErrorEvent(this.root),null===(e=this.container)||void 0===e||e.find(".percent").html("".concat(t.percent,"%")),this.updateMaxWidth(),window.addEventListener("resize",this.onWindowResize),n.on("editor:resize",this.onWindowResize)}}},{key:"renderView",value:function(){var e,t,n,r,i,o=this.getValue(),a=null!==(e=null===(t=this.editor.plugin.findPlugin("file"))||void 0===t?void 0:t.options)&&void 0!==e?e:{},l=(0,s.Nm)(this.onBeforeRender("download",o.download||""));a.onDownload?null===(n=this.container)||void 0===n||n.on("click",(function(){a.onDownload(l,o)})):(null===(r=this.container)||void 0===r||r.attributes("target","_blank"),null===(i=this.container)||void 0===i||i.attributes("href",l))}},{key:"didUpdate",value:function(){var e,t,r,i=this.getValue();"done"===i.status&&(0,d.Z)((0,h.Z)(n.prototype),"didUpdate",this).call(this),null===(e=this.toolbarModel)||void 0===e||null===(t=e.getContainer())||void 0===t||t.remove(),null===(r=this.toolbarModel)||void 0===r||r.create()}}],[{key:"cardName",get:function(){return"file"}},{key:"cardType",get:function(){return s.eT.INLINE}},{key:"selectStyleType",get:function(){return s.dw.BACKGROUND}},{key:"autoSelected",get:function(){return!1}},{key:"collab",get:function(){return!1}}]),n}(s.Zb),gi="drop:files",mi="paste:event",vi="paste:each",bi=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.cardComponents={},e.extensionNames={"*":"*"},e.dropFiles=function(t){var n=e.editor;if((0,s.iC)(n)&&(t=t.filter((function(t){return e.isFile(t)})),0!==t.length))return n.command.execute("file-uploader",t),!1},e.pasteFiles=function(t){var n=t.files,r=e.editor;if((0,s.iC)(r)&&(n=n.filter((function(t){return e.isFile(t)})),0!==n.length))return r.command.execute("file-uploader",n.filter((function(t){return e.isFile(t)})),n),!1},e.pasteEach=function(e){if(e.isCard()&&e.attributes(s.mV)){if("file"!==e.attributes(s.mV))return;var t=(0,s.RW)(e.attributes(s.TM));return t&&t.url?void("uploading"===t.status&&(t.percent=0,e.attributes(s.TM,(0,s.it)((0,nn.Z)((0,nn.Z)({},t),{},{status:"done"}))))):void e.remove()}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e,t,n,r=this.editor;(0,s.iC)(r)&&(r.on(gi,this.dropFiles),r.on(mi,this.pasteFiles),r.on(vi,this.pasteEach));var i=(null===(e=this.options)||void 0===e?void 0:e.accept)||(null===(t=this.options)||void 0===t||null===(n=t.file)||void 0===n?void 0:n.accept);if("string"===typeof i&&(i=i.split(",")),Array.isArray(i)){var o=[];(i||[]).forEach((function(e){e=e.trim();var t=e.split(".").pop();t&&o.push(t)})),o.length>0&&(this.extensionNames=o)}else"object"===(0,di.Z)(i)&&(this.extensionNames=i)}},{key:"isFile",value:function(e){var t,n=null!==(t=(0,s.Ym)(e))&&void 0!==t?t:"",r=Array.isArray(this.extensionNames)?this.extensionNames:Object.keys(this.extensionNames);return r.indexOf("*")>=0||r.indexOf(n)>=0}},{key:"execute",value:function(){var e=(0,_t.Z)(St().mark((function e(t){var n,r,i,o,a,l,c,A,u,d,h,p,f,g,m,v,b,y=this;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=this.editor,(0,s.iC)(n)){e.next=3;break}return e.abrupt("return");case 3:if(r=n.request,i=n.card,o=n.language,a=this.options,l=a.action,c=a.type,A=a.contentType,u=a.multiple,d=a.crossOrigin,h=a.withCredentials,p=a.headers,f=a.name,g=this.options.data,"function"!==typeof g){e.next=10;break}return e.next=9,g();case 9:g=e.sent;case 10:if(m=this.options.parse,v=this.options.limitSize||5242880,Array.isArray(t)){e.next=17;break}return b=Array.isArray(this.extensionNames)?"."+this.extensionNames.join(",."):Object.values(this.extensionNames).join(","),e.next=16,r.getFiles({event:t,accept:s.Dt?"*":b.length>0?b:"",multiple:u});case 16:t=e.sent;case 17:if(0!==t.length){e.next=19;break}return e.abrupt("return");case 19:return r.upload({url:l,data:g,type:c,contentType:A,crossOrigin:d,withCredentials:h,headers:p,onBefore:function(e){return!(e.size>v)||(n.messageError("upload-limit",o.get("file","uploadLimitError").toString().replace("$size",(v/1024/1024).toFixed(0)+"M")),!1)},onReady:function(e){if((0,s.iC)(n)&&!y.cardComponents[e.uid]){var t=i.insert("file",{status:"uploading",name:e.name,size:e.size});y.cardComponents[e.uid]=t}},onUploading:function(e,t){var n=t.percent,r=y.cardComponents[e.uid||""];r&&r.setProgressPercent(n)},onSuccess:function(e,t){var r=y.cardComponents[t.uid||""];if(r){var a=e.url||e.data&&e.data.url,s=e.preview||e.data&&e.data.preview,l=e.download||e.data&&e.data.download,c={result:!0,data:{status:"done",url:a,preview:s,download:l}};if(m){var A=m(e);if(A.result){var u=c.data;"string"===typeof A.data?c.data=(0,nn.Z)((0,nn.Z)({},u),{},{url:A.data}):(u.url=A.data.url,void 0!==A.data.status&&(u=(0,nn.Z)((0,nn.Z)({},u),{},{status:A.data.status})),void 0!==A.data.preview&&(u=(0,nn.Z)((0,nn.Z)({},u),{},{preview:A.data.preview})),void 0!==A.data.download&&(u=(0,nn.Z)((0,nn.Z)({},u),{},{download:A.data.download})),c.data=(0,nn.Z)({},u))}else c={result:!1,data:A.data.toString()}}else a||(c={result:!1,data:e.data});if(c.result){var d="string"===typeof c.data?{url:c.data}:(0,nn.Z)({},c.data);n.card.update(r.id,d)}else i.update(r.id,{status:"error",message:"string"===typeof c.data?c.data:o.get("file","uploadError")});delete y.cardComponents[t.uid||""]}},onError:function(e,t){var n=y.cardComponents[t.uid||""];n&&(i.update(n.id,{status:"error",message:e.message||o.get("file","uploadError")}),delete y.cardComponents[t.uid||""])}},t,f),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var e=this.editor;(0,s.iC)(e)&&(e.off(gi,this.dropFiles),e.off(mi,this.pasteFiles),e.off(vi,this.pasteEach))}}],[{key:"pluginName",get:function(){return"file-uploader"}}]),n}(s.Sy),yi={file:{errorMessageCopy:"Copy error message",loadError:"The file failed to load!",uploadError:"The picture failed to upload!",uploadLimitError:"Upload file size is limited to $size",download:"Download",preview:"Preview"}},wi={file:{errorMessageCopy:"复制错误信息",loadError:"文件加载失败!",uploadError:"上传文件失败!",uploadLimitError:"上传文件大小限制为 $size",download:"下载",preview:"预览"}},xi={"en-US":yi,"zh-CN":wi},ki="parse:html",Ci="paste:schema",Bi="paste:each",_i=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.pasteSchema=function(e){e.add({type:"inline",name:"span",attributes:{"data-type":{required:!0,value:fi.cardName},"data-value":"*"}})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.isElement()){var r=t.attributes("data-type");if(r===fi.cardName){var i=t.attributes("data-value"),o=(0,s.RW)(i);if(!o.url)return;return n.card.replaceNode(t,fi.cardName,o),t.remove(),!1}}return!0}},e.parseHtml=function(t,n){var r=[];return t.find("[".concat(s.Jr,'="').concat(fi.cardName,'"],[').concat(s.mV,'="').concat(fi.cardName,'"')).each((function(t){var i=(0,s.$)(t),o=e.editor.card.find(i),a=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(i.attributes(s.TM));if((null===a||void 0===a?void 0:a.url)&&"done"===a.status){var l='<span data-type="'.concat(fi.cardName,'" data-value="').concat((0,s.it)(a),'"><a target="_blank" href="').concat(a.url,'" style="word-wrap: break-word;color: #096DD9;touch-action: manipulation;background-color: rgba(0,0,0,0);text-decoration: none;outline: none;cursor: pointer;transition: color .3s;"><span style="font-size: 14px;">📎</span>').concat(a.name,"</a></span>");i.empty();var c=(0,s.$)(l);n&&(c=n(c,a)),i.replaceWith(c),r.push(c)}else i.remove()})),r},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.language.add(xi),e.on(ki,this.parseHtml),e.on(Bi,this.pasteHtml),e.on(Ci,this.pasteSchema)}},{key:"execute",value:function(e,t,n,r,i,o){var a={status:e,url:t,name:n||t,size:r,preview:i,download:o};"error"===e&&(a.url="",a.message=t),this.editor.card.insert("file",a)}},{key:"waiting",value:function(){var e=(0,_t.Z)(St().mark((function e(t){var n,r,i,o,a=this;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this.editor.card,r=function(e){var t;return e.root.inEditor()&&e.name===fi.cardName&&"uploading"===(null===(t=e.getValue())||void 0===t?void 0:t.status)},i=function(){return n.components.find(r)},o=function(e){var n=6e4;return new Promise((function(i,o){if(t){var s=t(a.name,e);if(!1===s)return o({name:a.name,card:e});"number"===typeof s&&(n=s)}var l=(new Date).getTime(),c=(new Date).getTime(),A=function t(){if(c-l>=n)return i();setTimeout((function(){r(e)?t():i()}),10)};A()}))},e.abrupt("return",new Promise(function(){var e=(0,_t.Z)(St().mark((function e(t,n){var r,a;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=i(),a=function e(r){o(r).then((function(){var n=i();n?e(n):t()})).catch(n)},r?a(r):t();case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var e=this.editor;e.off(ki,this.parseHtml),e.off(Bi,this.pasteHtml),e.off(Ci,this.pasteSchema)}}],[{key:"pluginName",get:function(){return"file"}}]),n}(s.Sy),Ei=_i;function Si(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Fi=".data-video {\r\n margin: 0 auto;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n .data-video-content {\r\n position: relative;\r\n height: 420px;\r\n background: #f7f7f7;\r\n }\r\n .data-video-content video {\r\n width: 100%;\r\n height: 100%;\r\n outline: none;\r\n position: relative;\r\n z-index: 1;\r\n background: #000;\r\n }\r\n .data-video-uploading,\r\n .data-video-uploaded,\r\n .data-video-error {\r\n border: 1px solid #e6e6e6;\r\n background: #f6f6f6;\r\n }\r\n .data-video-content .data-video-mask {\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n z-index: 1;\r\n }\r\n .data-video-done {\r\n height: auto;\r\n border: none;\r\n background: none;\r\n line-height: 0;\r\n }\r\n .data-video-active {\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n user-select: none;\r\n }\r\n .data-video-center {\r\n position: absolute;\r\n top: 50%;\r\n margin-top: -48px;\r\n width: 100%;\r\n height: 96px;\r\n }\r\n .data-video-center .data-video-icon,\r\n .data-video-center .data-video-name,\r\n .data-video-center .data-video-message,\r\n .data-video-center .data-video-progress,\r\n .data-video-center .data-video-transcoding {\r\n text-align: center;\r\n }\r\n .data-video-center .data-video-icon {\r\n font-size: 24px;\r\n color: #BFBFBF;\r\n margin-bottom: 12px;\r\n }\r\n .data-video-center .data-video-name {\r\n color: #595959;\r\n margin-bottom: 12px;\r\n }\r\n .data-video-center .data-video-message {\r\n color: #595959;\r\n }\r\n .data-video-center .data-video-anticon {\r\n display: inline-block;\r\n font-style: normal;\r\n vertical-align: -0.125em;\r\n text-align: center;\r\n text-transform: none;\r\n line-height: 0;\r\n text-rendering: optimizeLegibility;\r\n -webkit-font-smoothing: antialiased;\r\n margin-right: 5px;\r\n }\r\n .data-video-center .data-video-anticon .data-video-anticon-spin {\r\n display: inline-block;\r\n -webkit-animation: loadingCircle 1s infinite linear;\r\n animation: loadingCircle 1s infinite linear;\r\n }\r\n .data-video-center .data-error-icon {\r\n width: 16px;\r\n height: 16px;\r\n display: inline-block;\r\n background: #F5222D;\r\n text-align: center;\r\n font-size: 12px;\r\n color: #ffffff;\r\n padding: 1px 0 0 0;\r\n line-height: 16px;\r\n border-radius: 100%;\r\n vertical-align: middle;\r\n margin: -2px 5px 0 0;\r\n }\r\n\r\n.data-video-title {\r\n text-align: center;\r\n}\r\n.data-video-title::-moz-selection {\r\n background: transparent\r\n}\r\n.data-video-title::selection {\r\n background: transparent\r\n}\r\n.data-video .data-resizer {\r\n z-index: inherit;\r\n}\r\n.data-video .data-resizer .data-resizer-holder {\r\n z-index: 2;\r\n}\r\n\r\n.data-video .data-resizing {\r\n z-index: 3;\r\n}";Si(Fi);var Ti=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.maxWidth=0,e.resizer=void 0,e.video=void 0,e.isLoad=!1,e.container=void 0,e.videoContainer=void 0,e.title=void 0,e.mask=void 0,e.rate=1,e._fullWidth=void 0,e._naturalSize={width:0,height:0},e.onBeforeRender=function(t,n){var r=e.editor.plugin.findPlugin("video");if(r){var i=r.options||{},o=i.onBeforeRender;if(o)return o(t,n,e.editor)}return n},e.downloadFile=function(){var t=e.getValue();(null===t||void 0===t?void 0:t.download)&&window.open((0,s.Nm)(e.onBeforeRender("download",t.url)))},e.onWindowResize=function(){var t,n;(0,s.iC)(e.editor)&&(e.maxWidth=e.getMaxWidth(),e.resetSize(),e.resizer&&(e.resizer.maxWidth=e.maxWidth,e.resizer.setSize((null===(t=e.videoContainer)||void 0===t?void 0:t.width())||0,(null===(n=e.videoContainer)||void 0===n?void 0:n.height())||0)))},e.handleClick=function(t){var n=e.editor;(0,s.iC)(n)&&!e.activated&&n.card.activate(e.root,s.Fp.MOUSE_DOWN,t)},e}return(0,i.Z)(n,[{key:"getLocales",value:function(){return this.editor.language.get("video")}},{key:"renderTemplate",value:function(e){var t=e.name,n=e.status,r=e.size,i=e.message,o=e.percent,a=this.getLocales(),l={video:'<div class="data-video-icon">\n <svg width="32px" height="24px" viewBox="0 0 32 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd" fill-opacity="0.25"><g transform="translate(-704.000000, -550.000000)" fill="#000000" fill-rule="nonzero"> <g transform="translate(704.000000, 550.000000)"> <g> <path d="M13.09375,17.30625 L20.65625,12.375 C20.95,12.16875 20.95,11.809375 20.65625,11.603125 L13.09375,6.696875 C12.66875,6.4 12,6.6375 12,7.084375 L12,16.921875 C12,17.365625 12.671875,17.603125 13.09375,17.30625 Z" id="Path"></path> <path d="M30,0 L2,0 C0.896875,0 0,0.896875 0,2 L0,22 C0,23.103125 0.896875,24 2,24 L30,24 C31.103125,24 32,23.103125 32,22 L32,2 C32,0.896875 31.103125,0 30,0 Z M5.25,21.25 C5.25,21.525 5.025,21.75 4.75,21.75 L2.5,21.75 C2.225,21.75 2,21.525 2,21.25 L2,18.5 C2,18.225 2.225,18 2.5,18 L4.75,18 C5.025,18 5.25,18.225 5.25,18.5 L5.25,21.25 Z M5.25,13.375 C5.25,13.65 5.025,13.875 4.75,13.875 L2.5,13.875 C2.225,13.875 2,13.65 2,13.375 L2,10.625 C2,10.35 2.225,10.125 2.5,10.125 L4.75,10.125 C5.025,10.125 5.25,10.35 5.25,10.625 L5.25,13.375 Z M5.25,5.5 C5.25,5.775 5.025,6 4.75,6 L2.5,6 C2.225,6 2,5.775 2,5.5 L2,2.75 C2,2.475 2.225,2.25 2.5,2.25 L4.75,2.25 C5.025,2.25 5.25,2.475 5.25,2.75 L5.25,5.5 Z M24.75,21.75 L7.25,21.75 L7.25,2.25 L24.75,2.25 L24.75,21.75 Z M30,21.25 C30,21.525 29.775,21.75 29.5,21.75 L27.25,21.75 C26.975,21.75 26.75,21.525 26.75,21.25 L26.75,18.5 C26.75,18.225 26.975,18 27.25,18 L29.5,18 C29.775,18 30,18.225 30,18.5 L30,21.25 Z M30,13.375 C30,13.65 29.775,13.875 29.5,13.875 L27.25,13.875 C26.975,13.875 26.75,13.65 26.75,13.375 L26.75,10.625 C26.75,10.35 26.975,10.125 27.25,10.125 L29.5,10.125 C29.775,10.125 30,10.35 30,10.625 L30,13.375 Z M30,5.5 C30,5.775 29.775,6 29.5,6 L27.25,6 C26.975,6 26.75,5.775 26.75,5.5 L26.75,2.75 C26.75,2.475 26.975,2.25 27.25,2.25 L29.5,2.25 C29.775,2.25 30,2.475 30,2.75 L30,5.5 Z" id="Shape"></path> </g> </g></g> </g></svg></div>',spin:'<i class="data-video-anticon"><svg viewBox="0 0 1024 1024" class="data-video-anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"> <path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></i>',warn:'<div class="data-video-icon"><svg width="41px" height="29px" viewBox="0 0 41 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd"><g transform="translate(-704.000000, -550.000000)"> <g id="Group-2" transform="translate(704.000000, 550.000000)"> <g id="video" fill="#000000" fill-rule="nonzero" opacity="0.449999988"> <path d="M13.09375,17.30625 C12.671875,17.603125 12,17.365625 12,16.921875 L12,7.084375 C12,6.6375 12.66875,6.4 13.09375,6.696875 L20.65625,11.603125 C20.95,11.809375 20.95,12.16875 20.65625,12.375 L13.09375,17.30625 Z M30,0 C31.103125,0 32,0.896875 32,2 L32,22 C32,23.103125 31.103125,24 30,24 L2,24 C0.896875,24 0,23.103125 0,22 L0,2 C0,0.896875 0.896875,0 2,0 L30,0 Z M5.25,21.25 L5.25,18.5 C5.25,18.225 5.025,18 4.75,18 L2.5,18 C2.225,18 2,18.225 2,18.5 L2,21.25 C2,21.525 2.225,21.75 2.5,21.75 L4.75,21.75 C5.025,21.75 5.25,21.525 5.25,21.25 Z M5.25,13.375 L5.25,10.625 C5.25,10.35 5.025,10.125 4.75,10.125 L2.5,10.125 C2.225,10.125 2,10.35 2,10.625 L2,13.375 C2,13.65 2.225,13.875 2.5,13.875 L4.75,13.875 C5.025,13.875 5.25,13.65 5.25,13.375 Z M5.25,5.5 L5.25,2.75 C5.25,2.475 5.025,2.25 4.75,2.25 L2.5,2.25 C2.225,2.25 2,2.475 2,2.75 L2,5.5 C2,5.775 2.225,6 2.5,6 L4.75,6 C5.025,6 5.25,5.775 5.25,5.5 Z M24.75,21.75 L24.75,2.25 L7.25,2.25 L7.25,21.75 L24.75,21.75 Z M30,21.25 L30,18.5 C30,18.225 29.775,18 29.5,18 L27.25,18 C26.975,18 26.75,18.225 26.75,18.5 L26.75,21.25 C26.75,21.525 26.975,21.75 27.25,21.75 L29.5,21.75 C29.775,21.75 30,21.525 30,21.25 Z M30,13.375 L30,10.625 C30,10.35 29.775,10.125 29.5,10.125 L27.25,10.125 C26.975,10.125 26.75,10.35 26.75,10.625 L26.75,13.375 C26.75,13.65 26.975,13.875 27.25,13.875 L29.5,13.875 C29.775,13.875 30,13.65 30,13.375 Z M30,5.5 L30,2.75 C30,2.475 29.775,2.25 29.5,2.25 L27.25,2.25 C26.975,2.25 26.75,2.475 26.75,2.75 L26.75,5.5 C26.75,5.775 26.975,6 27.25,6 L29.5,6 C29.775,6 30,5.775 30,5.5 Z" id="Combined-Shape"></path> </g> <g id="error-fill" transform="translate(21.000000, 10.000000)"> <rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="20" height="20"></rect> <path d="M19.0267927,16.510301 L19.0272631,16.5111171 C19.4269215,17.2064579 18.9263267,18.0729167 18.125,18.0729167 L1.875,18.0729167 C1.07367326,18.0729167 0.573078461,17.2064579 0.973207261,16.510301 L9.0970084,2.44988987 C9.28650026,2.11750251 9.63068515,1.92708333 10,1.92708333 C10.368224,1.92708333 10.7098796,2.11659543 10.9017927,2.447801 L19.0267927,16.510301 Z" id="Path" stroke="#FFFFFF" strokeWidth="0.833333333" fill="#FFFFFF"></path> <path d="M18.6660156,16.71875 L10.5410156,2.65625 C10.4199219,2.44726562 10.2109375,2.34375 10,2.34375 C9.7890625,2.34375 9.578125,2.44726562 9.45898438,2.65625 L1.33398438,16.71875 C1.09375,17.1367188 1.39453125,17.65625 1.875,17.65625 L18.125,17.65625 C18.6054688,17.65625 18.90625,17.1367188 18.6660156,16.71875 Z M9.375,8.125 C9.375,8.0390625 9.4453125,7.96875 9.53125,7.96875 L10.46875,7.96875 C10.5546875,7.96875 10.625,8.0390625 10.625,8.125 L10.625,11.71875 C10.625,11.8046875 10.5546875,11.875 10.46875,11.875 L9.53125,11.875 C9.4453125,11.875 9.375,11.8046875 9.375,11.71875 L9.375,8.125 Z M10,15 C9.48242188,15 9.0625,14.5800781 9.0625,14.0625 C9.0625,13.5449219 9.48242188,13.125 10,13.125 C10.5175781,13.125 10.9375,13.5449219 10.9375,14.0625 C10.9375,14.5800781 10.5175781,15 10,15 Z" id="Shape" fill="#FAAD14" fill-rule="nonzero"></path></g></g></g> </g></svg></div>',error:'<span class="data-error-icon">X</span>'};if("error"===n)return'\n <div class="data-video">\n <div class="data-video-content data-video-error">\n <div class="data-video-center">\n <div class="data-video-name">'.concat((0,s.YU)(t),'</div>\n <div class="data-video-message">\n ').concat(l.error,"\n ").concat(i||a["loadError"],"\n </div>\n </div>\n </div>\n </div>");var c=r?(0,s.hR)(r):"",A=t?'<div class="data-video-title">'.concat((0,s.YU)(t),"</div>"):"";if("uploading"===n)return'\n <div class="data-video">\n <div class="data-video-content data-video-uploading">\n <div class="data-video-center">\n '.concat(l.video,'\n <div class="data-video-name">\n ').concat((0,s.YU)(t)," (").concat((0,s.YU)(c),')\n </div>\n <div class="data-video-progress">\n ').concat(l.spin,'\n <span class="percent">').concat(o||0,"%<span>\n </div>\n </div>\n </div>\n </div>");var u="undefined"===typeof n;if("transcoding"===n||u)return'\n <div class="data-video">\n <div class="data-video-content data-video-uploaded">\n <div class="data-video-center">\n '.concat(l.video,'\n <div class="data-video-name">\n ').concat((0,s.YU)(t)," (").concat((0,s.YU)(c),')\n </div>\n <div class="data-video-transcoding">\n ').concat(l.spin,'\n <span class="transcoding">').concat(u?a["loading"]:a["transcoding"],"%<span>\n </div>\n </div>\n </div>\n </div>\n ");var d=this.editor.plugin.components["video"];return'\n <div class="data-video">\n <div class="data-video-content data-video-done"></div>\n\t\t\t'.concat(d&&!1!==d.options.showTitle?A:"","\n </div>\n ")}},{key:"initPlayer",value:function(){var e,t,n,r=this,i=this.getValue();if(i){var o=(0,s.Nm)(this.onBeforeRender("query",i.url)),a=document.createElement("video");a.preload="metadata",a.setAttribute("src",o),a.setAttribute("webkit-playsinline","webkit-playsinline"),a.setAttribute("playsinline","playsinline");var l=i.cover;l&&(a.poster=(0,s.Nm)(this.onBeforeRender("cover",l))),this.maxWidth=this.getMaxWidth();var c=null===(e=this.container)||void 0===e?void 0:e.find(".data-video-content");if(c){c.append(a),this.mask=(0,s.$)('<div class="data-video-mask" />'),c.append(this.mask),this.videoContainer=null===(t=this.container)||void 0===t?void 0:t.find(".data-video-content"),a.oncontextmenu=function(){return!1};var A=this.editor.plugin.findPlugin("video"),u=null===A||void 0===A?void 0:A.options.fullEditor,d=this.editor;a.onloadedmetadata=function(){i.naturalWidth&&i.naturalHeight||(i.naturalWidth=a.videoWidth,i.naturalHeight=a.videoHeight,r.setValue({naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight})),u&&r._fullWidth&&(i.naturalWidth<r._fullWidth||"number"===typeof u)?("boolean"===typeof u?(r.rate=a.videoHeight/a.videoWidth,u=r._fullWidth*r.rate):r.rate=u/r._fullWidth,r._naturalSize={width:r._fullWidth,height:u}):(r._naturalSize={width:i.naturalWidth||a.videoWidth,height:i.naturalHeight||a.videoHeight},r.rate=r._naturalSize.height/r._naturalSize.width),r.resetSize()},this.video=(0,s.$)(a),this.title=null===(n=this.container)||void 0===n?void 0:n.find(".data-video-title"),i.width&&i.height&&(this.rate=i.height/i.width),this._naturalSize={width:i.naturalWidth||a.videoWidth,height:i.naturalHeight||a.videoHeight},this.resetSize(),setTimeout((function(){a.controls=!0,(0,s.iC)(d)||(a["controlsList"]="nodownload")}),0)}}}},{key:"toolbar",value:function(){var e,t=this,n=this.editor,r=function(){var e=[],r=t.getValue();if(!r)return e;var i=r.status,o=r.download,a=t.getLocales();return"done"===i&&(o&&e.push({key:"dropdown",type:"button",content:'<span class="data-icon data-icon-download" />',title:a.download,onClick:t.downloadFile}),(0,s.iC)(n)&&!n.readonly&&(e.push({key:"copy",type:"copy"}),e.push({key:"separator",type:"separator"}))),(0,s.iC)(n)&&!n.readonly&&e.push({key:"delete",type:"delete"}),e},i=null===(e=n.plugin.findPlugin("video"))||void 0===e?void 0:e.options;return(null===i||void 0===i?void 0:i.cardToolbars)?i.cardToolbars(r(),this.editor):r()}},{key:"setProgressPercent",value:function(e){var t;null===(t=this.container)||void 0===t||t.find(".percent").html("".concat(e,"%")),this.setValue({percent:e})}},{key:"getMaxWidth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getCenter(),t=this.editor.block.closest(e).get();return t?t.clientWidth:0}},{key:"resetSize",value:function(){var e,t,n;if(this.videoContainer){var r=this.getValue();if(r){this.videoContainer.css({width:"",height:""}),null===(e=this.container)||void 0===e||e.css({width:""});var i=this.editor.plugin.findPlugin("video"),o=null===i||void 0===i?void 0:i.options.fullEditor,a=null===(t=this.video)||void 0===t?void 0:t.get();if(a){var s=r.width,l=r.height;l?s?s&&l?l=Math.round(this.rate*s):(s=this._naturalSize.width,l=this._naturalSize.height):(l=this._naturalSize.height,s=Math.round(l/this.rate)):(s=this._naturalSize.width,l=Math.round(this.rate*s)),s>this.maxWidth&&(s=this.maxWidth,l=Math.round(s*this.rate)),0!==s&&0!==l&&(null===(n=this.container)||void 0===n||n.css({width:s>0?"".concat(s,"px"):""}),this.videoContainer.css("width",s>0?"".concat(s,"px"):""),"number"===typeof o&&this.videoContainer.css("height",l>0?"".concat(l,"px"):""))}}}}},{key:"changeSize",value:function(e,t){var n,r,i;e<24&&(e=24,t=e*this.rate),e>this.maxWidth&&(e=this.maxWidth,t=e*this.rate),t<24&&(t=24,e=t/this.rate),e=Math.round(e),t=Math.round(t),null===(n=this.videoContainer)||void 0===n||n.css({width:e>0?"".concat(e,"px"):""});var o,a=this.editor.plugin.findPlugin("video"),s=null===a||void 0===a?void 0:a.options.fullEditor;"number"===typeof s&&(null===(o=this.videoContainer)||void 0===o||o.css({height:"".concat(t,"px")}));null===(r=this.container)||void 0===r||r.css({width:e>0?"".concat(e,"px"):""}),this.setValue({width:e,height:t}),null===(i=this.resizer)||void 0===i||i.destroy(),this.initResizer()}},{key:"initResizer",value:function(){var e,t=this,n=this.getValue();if(n){var r=n.status;if("done"===r){var i=n.width,o=n.height,a=n.cover;this.maxWidth=this.getMaxWidth();var l=new s.w_({imgUrl:a,width:i||this._naturalSize.width,height:o||this._naturalSize.height,rate:this.rate,maxWidth:this.maxWidth,onChange:function(e){var n=e.width,r=e.height;return t.changeSize(n,r)}});this.resizer=l;var c=l.render();null===(e=this.videoContainer)||void 0===e||e.append(c)}}}},{key:"onActivate",value:function(e){var t,r,i,o,a;((0,d.Z)((0,h.Z)(n.prototype),"onActivate",this).call(this,e),e)?(null===(t=this.container)||void 0===t||t.addClass("data-video-active"),null===(r=this.mask)||void 0===r||r.hide(),this.initResizer()):(null===(i=this.container)||void 0===i||i.removeClass("data-video-active"),null===(o=this.mask)||void 0===o||o.show(),null===(a=this.resizer)||void 0===a||a.destroy())}},{key:"onSelectByOther",value:function(e,t){var n;null===(n=this.container)||void 0===n||n.css("outline",e?"2px solid "+t.color:"");var r="card-selected-other";return e?this.root.addClass(r):this.root.removeClass(r),this.container}},{key:"writeHistoryOnValueChange",value:function(){if(this.loading)return!1}},{key:"checker",value:function(e,t,n){var r=this.editor.command,i=function i(){r.executeMethod("video-uploader","query",e,(function(e){e&&"done"!==e.status?setTimeout(i,3e3):t(e)}),(function(e){n(e)}))};i()}},{key:"render",value:function(){var e=this,t=this.getValue(),n=this.getCenter(),r=this.editor;if(this._fullWidth=r.container.width()-(0,s.ZQ)(r.container.css("padding-left"))-(0,s.ZQ)(r.container.css("padding-right")),!t||this.container&&this.container.inEditor())return this.container=(0,s.$)(this.renderTemplate((0,nn.Z)({},t))),n.empty(),n.append(this.container),void this.initPlayer();n.empty();var i=r.command,o=r.plugin,a=t.video_id,l=t.status,c=this.getLocales();if(this.maxWidth=this.getMaxWidth(),(0,s.iC)(r)){if("transcoding"===l){if(this.container=(0,s.$)(this.renderTemplate(t)),!a)throw"video id is undefined";return this.checker(a,(function(r){var i=(0,nn.Z)((0,nn.Z)({},t),{},{url:(null===r||void 0===r?void 0:r.url)?r.url:t.url,name:(null===r||void 0===r?void 0:r.name)?r.name:t.name,cover:(null===r||void 0===r?void 0:r.cover)?r.cover:t.cover,download:(null===r||void 0===r?void 0:r.download)?r.download:t.download,status:"done"});e.setValue(i),e.container=(0,s.$)(e.renderTemplate(i)),n.empty(),n.append(e.container),e.initPlayer()}),(function(r){var i=(0,nn.Z)((0,nn.Z)({},t),{},{status:"error",message:r||c["loadError"]});e.setValue(i),e.container=(0,s.$)(e.renderTemplate(i)),n.empty(),n.append(e.container)})),this.container}return"done"===l?(this.container=(0,s.$)(this.renderTemplate((0,nn.Z)((0,nn.Z)({},t),{},{status:void 0}))),i.executeMethod("video-uploader","query",a,(function(r){var i=(0,nn.Z)((0,nn.Z)({},t),{},{url:(null===r||void 0===r?void 0:r.url)?r.url:t.url,name:(null===r||void 0===r?void 0:r.name)?r.name:t.name,cover:(null===r||void 0===r?void 0:r.cover)?r.cover:t.cover,download:(null===r||void 0===r?void 0:r.download)?r.download:t.download});e.container=(0,s.$)(e.renderTemplate(i)),e.video=e.container.find("video"),n.empty(),n.append(e.container),e.initPlayer()}),(function(r){e.container=(0,s.$)(e.renderTemplate((0,nn.Z)((0,nn.Z)({},t),{},{status:"error",message:r||c["loadError"]}))),n.empty(),n.append(e.container)})),this.container):(this.container=(0,s.$)(this.renderTemplate(t)),this.container)}if("done"===l){this.container=(0,s.$)(this.renderTemplate((0,nn.Z)((0,nn.Z)({},t),{},{status:void 0})));var A=function(r){var i=(0,nn.Z)((0,nn.Z)({},t),{},{url:(null===r||void 0===r?void 0:r.url)?r.url:t.url,name:(null===r||void 0===r?void 0:r.name)?r.name:t.name,cover:(null===r||void 0===r?void 0:r.cover)?r.cover:t.cover,download:(null===r||void 0===r?void 0:r.download)?r.download:t.download});e.container=(0,s.$)(e.renderTemplate(i)),n.empty(),n.append(e.container),e.initPlayer()};return o.components["video-uploader"]?i.executeMethod("video-uploader","query",a,(function(e){A(e)}),(function(r){e.container=(0,s.$)(e.renderTemplate((0,nn.Z)((0,nn.Z)({},t),{},{status:"error",message:r||c["loadError"]}))),n.empty(),n.append(e.container)})):A(),this.container}return"error"===l?(0,s.$)(this.renderTemplate((0,nn.Z)((0,nn.Z)({},t),{},{message:t.message||c["loadError"]}))):void 0}},{key:"didUpdate",value:function(){var e;(0,d.Z)((0,h.Z)(n.prototype),"didUpdate",this).call(this),null===(e=this.toolbarModel)||void 0===e||e.setDefaultAlign("top")}},{key:"didRender",value:function(){var e,t,r=this.getValue();"done"===r.status&&(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this),this.onWindowResize();var i,o=this.editor;(window.addEventListener("resize",this.onWindowResize),o.on("editor:resize",this.onWindowResize),null===(e=this.toolbarModel)||void 0===e||e.setDefaultAlign("top"),null===(t=this.container)||void 0===t||t.on("mousedown",this.handleClick),!(0,s.iC)(o)||o.readonly)&&(null===(i=this.mask)||void 0===i||i.hide())}},{key:"destroy",value:function(){var e;(0,d.Z)((0,h.Z)(n.prototype),"destroy",this).call(this),null===(e=this.container)||void 0===e||e.off("mousedown",this.handleClick),window.removeEventListener("resize",this.onWindowResize),this.editor.off("editor:resize",this.onWindowResize)}}],[{key:"cardName",get:function(){return"video"}},{key:"cardType",get:function(){return s.eT.BLOCK}},{key:"autoSelected",get:function(){return!1}}]),n}(s.Zb),Mi="drop:files",Ii="paste:event",Ni="paste:each",Ui=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.cardComponents={},e.extensionNames={mp4:"video/mp4"},e.dropFiles=function(t){var n=e.editor;if((0,s.iC)(n)&&(t=t.filter((function(t){return e.isVideo(t)})),0!==t.length))return n.command.execute("video-uploader",t),!1},e.pasteFiles=function(t){var n=t.files,r=e.editor;if((0,s.iC)(r)&&(n=n.filter((function(t){return e.isVideo(t)})),0!==n.length))return r.command.execute("video-uploader",n.filter((function(t){return e.isVideo(t)})),n),!1},e.pasteEach=function(e){if(e.isCard()&&e.attributes(s.mV)){if("video"!==e.attributes(s.mV))return;var t=(0,s.RW)(e.attributes(s.TM));return t&&t.url?void("uploading"===t.status&&(t.percent=0,e.attributes(s.TM,(0,s.it)((0,nn.Z)((0,nn.Z)({},t),{},{status:"done"}))))):void e.remove()}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;(0,s.iC)(e)&&(e.on(Mi,this.dropFiles),e.on(Ii,this.pasteFiles),e.on(Ni,this.pasteEach));var t=this.options.file||{},n=t.accept;if("string"===typeof n&&(n=n.split(",")),Array.isArray(n)){var r=[];(n||[]).forEach((function(e){e=e.trim();var t=e.split(".").pop();t&&r.push(t)})),r.length>0&&(this.extensionNames=r)}else"object"===(0,di.Z)(n)&&(this.extensionNames=n)}},{key:"isVideo",value:function(e){var t=(0,s.Ym)(e),n=Array.isArray(this.extensionNames)?this.extensionNames:Object.keys(this.extensionNames);return n.indexOf("*")>=0||n.indexOf(t)>=0}},{key:"execute",value:function(){var e=(0,_t.Z)(St().mark((function e(t){var n,r,i,o,a,l,c,A,u,d,h,p,f,g,m,v,b,y=this,w=arguments;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"!==typeof t){e.next=6;break}e.t0=t,e.next="query"===e.t0?4:5;break;case 4:return e.abrupt("return",this.query(w.length<=1?void 0:w[1],w.length<=2?void 0:w[2],w.length<=3?void 0:w[3]));case 5:return e.abrupt("return");case 6:if(n=this.editor,r=n.request,i=n.card,o=n.language,a=this.options,l=a.action,c=a.data,A=a.type,u=a.contentType,d=a.multiple,h=a.crossOrigin,p=a.withCredentials,f=a.headers,g=a.name,m=this.options.parse,v=this.options.limitSize||5242880,Array.isArray(t)){e.next=16;break}return b=Array.isArray(this.extensionNames)?"."+this.extensionNames.join(",."):Object.values(this.extensionNames).join(","),e.next=15,r.getFiles({event:t,accept:s.Dt?"video/*":b.length>0?b:"",multiple:d});case 15:t=e.sent;case 16:if(0!==t.length){e.next=18;break}return e.abrupt("return");case 18:return r.upload({url:l,data:c,type:A,contentType:u,crossOrigin:h,withCredentials:p,headers:f,onBefore:function(e){return!(e.size>v)||(n.messageError("upload-limit",o.get("video","uploadLimitError").toString().replace("$size",(v/1024/1024).toFixed(0)+"M")),!1)},onReady:function(e){if((0,s.iC)(n)&&!y.cardComponents[e.uid]){var t=i.insert("video",{status:"uploading",name:e.name,size:e.size});y.cardComponents[e.uid]=t}},onUploading:function(e,t){var n=t.percent,r=y.cardComponents[e.uid||""];r&&r.setProgressPercent(n)},onSuccess:function(e,t){var r=y.cardComponents[t.uid||""];if(r){var a=e.id||e.data&&e.data.id,s=e.url||e.data&&e.data.url,l=e.cover||e.data&&e.data.cover,c=e.download||e.data&&e.data.download,A=e.width||e.data&&e.data.width,u=e.height||e.data&&e.data.height,d=e.status||e.data&&e.data.status;d="transcoding"===d?"transcoding":"done";var h={result:!0,data:{video_id:a,url:s,cover:l,download:c,status:d,width:A,height:u}};if(m){var p=m(e);if(p.result){var f=h.data;"string"===typeof p.data?h.data=(0,nn.Z)((0,nn.Z)({},f),{},{url:p.data}):(f.url=p.data.url,void 0!==p.data.status&&(f=(0,nn.Z)((0,nn.Z)({},f),{},{status:p.data.status})),void 0!==p.data.id&&(f=(0,nn.Z)((0,nn.Z)({},f),{},{video_id:p.data.id})),void 0!==p.data.cover&&(f=(0,nn.Z)((0,nn.Z)({},f),{},{cover:p.data.cover})),void 0!==p.data.width&&(f=(0,nn.Z)((0,nn.Z)({},f),{},{width:p.data.width})),void 0!==p.data.height&&(f=(0,nn.Z)((0,nn.Z)({},f),{},{height:p.data.height})),h.data=(0,nn.Z)({},f))}else h={result:!1,data:p.data.toString()}}else s||(h={result:!1,data:e.data});h.result?n.card.update(r.id,"string"===typeof h.data?{url:h.data}:(0,nn.Z)((0,nn.Z)({},h.data),{},{naturalWidth:h.data.width,naturalHeight:h.data.height})):i.update(r.id,{status:"error",message:"string"===typeof h.data?h.data:o.get("video","uploadError")}),delete y.cardComponents[t.uid||""]}},onError:function(e,t){var n=y.cardComponents[t.uid||""];n&&(i.update(n.id,{status:"error",message:e.message||o.get("video","uploadError")}),delete y.cardComponents[t.uid||""])}},t,g),e.abrupt("return");case 20:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"query",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=this.editor,i=r.request,o=r.language,a=this.options,s=a.query,l=a.parse;if(!s||!e)return t();var c=s.action,A=s.type,u=s.contentType,d=s.data,h=s.headers;i.ajax({url:c,contentType:u||"",type:void 0===A?"json":A,headers:h,data:"function"===typeof d?(0,_t.Z)(St().mark((function t(){var n;return St().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,d();case 2:return n=t.sent,t.abrupt("return",(0,nn.Z)((0,nn.Z)({},n),{},{id:e}));case 4:case"end":return t.stop()}}),t)}))):(0,nn.Z)((0,nn.Z)({},d),{},{id:e}),success:function(e){var r=e.result,i=e.data;if(r){var a=l?l(e):e;!1===a.result?n(a.data||o.get("video","loadError")):t((0,nn.Z)((0,nn.Z)({},a.data),{},{status:"transcoding"!==a.data.status?"done":"transcoding"}))}else n(i)},error:function(e){n(e.message||o.get("video","loadError"))},method:"GET"})}},{key:"destroy",value:function(){var e=this.editor;e.off(Mi,this.dropFiles),e.off(Ii,this.pasteFiles),e.off(Ni,this.pasteEach)}}],[{key:"pluginName",get:function(){return"video-uploader"}}]),n}(s.Sy),Li={video:{errorMessageCopy:"Copy error message",loadError:"The video failed to load!",uploadError:"The video failed to upload!",uploadLimitError:"Upload video size is limited to $size",download:"Download",preview:"Preview",loading:"Loading...",transcoding:"Transcoding..."}},Qi={video:{errorMessageCopy:"复制错误信息",loadError:"视频加载失败!",uploadError:"上传视频失败!",uploadLimitError:"上传视频大小限制为 $size",download:"下载",preview:"预览",loading:"加载中...",transcoding:"转码中..."}},Di={"en-US":Li,"zh-CN":Qi},Hi="parse:html",Oi="paste:each",zi="paste:schema",Zi=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.pasteSchema=function(e){e.add({type:"block",name:"div",attributes:{"data-value":"*","data-type":{required:!0,value:Ti.cardName}}})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.isElement()){var r=t.attributes("data-type");if(r===Ti.cardName){var i=t.attributes("data-value"),o=(0,s.RW)(i);if(!o.url)return;return n.card.replaceNode(t,Ti.cardName,o),t.remove(),!1}}return!0}},e.parseHtml=function(t,n){var r=[];return t.find("[".concat(s.Jr,'="').concat(Ti.cardName,'"],[').concat(s.mV,'="').concat(Ti.cardName,'"]')).each((function(t){var i=(0,s.$)(t),o=e.editor.card.find(i),a=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(i.attributes(s.TM));if((null===a||void 0===a?void 0:a.url)&&"done"===a.status){var l=e.options.onBeforeRender,c=a.cover,A=a.url,u='<div data-type="'.concat(Ti.cardName,'" data-value="').concat((0,s.it)(a),'"><video controls src="').concat((0,s.Nm)(l?l("query",A,e.editor):A),'" poster="').concat(c?(0,s.Nm)(l?l("cover",c,e.editor):c):"none",'" webkit-playsinline="webkit-playsinline" playsinline="playsinline" style="outline:none;" /></div>');i.empty();var d=(0,s.$)(u);n&&(d=n(d,a)),i.replaceWith(d),r.push(d)}else i.remove()})),r},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.language.add(Di),e.on(Hi,this.parseHtml),e.on(Oi,this.pasteHtml),e.on(zi,this.pasteSchema)}},{key:"execute",value:function(e,t,n,r,i,o,a,s,l,c,A){var u={status:e,video_id:r,cover:i,url:t,name:n||t,size:o,download:a,width:c,height:A,naturalWidth:s,naturalHeight:l};"error"===e&&(u.url="",u.message=t),this.editor.card.insert("video",u)}},{key:"waiting",value:function(){var e=(0,_t.Z)(St().mark((function e(t){var n,r,i,o,a=this;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this.editor.card,r=function(e){var t;return e.root.inEditor()&&e.name===Ti.cardName&&"uploading"===(null===(t=e.getValue())||void 0===t?void 0:t.status)},i=function(){return n.components.find(r)},o=function(e){var n=6e4;return new Promise((function(i,o){if(t){var s=t(a.constructor.pluginName,e);if(!1===s)return o({name:a.constructor.pluginName,card:e});"number"===typeof s&&(n=s)}var l=(new Date).getTime(),c=(new Date).getTime(),A=function t(){if(c-l>=n)return i();setTimeout((function(){r(e)?t():i()}),10)};A()}))},e.abrupt("return",new Promise(function(){var e=(0,_t.Z)(St().mark((function e(t,n){var r,a;return St().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=i(),a=function e(r){o(r).then((function(){var n=i();n?e(n):t()})).catch(n)},r?a(r):t();case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var e=this.editor;e.off(Hi,this.parseHtml),e.off(Oi,this.pasteHtml),e.off(zi,this.pasteSchema)}}],[{key:"pluginName",get:function(){return"video"}}]),n}(s.Sy),Ri=Zi;function Pi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qi(e,t,n){Pi(e,t),t.set(e,n)}function Ki(e,t){return t.get?t.get.call(e):t.value}function Wi(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ji(e,t){var n=Wi(e,t,"get");return Ki(e,n)}function Vi(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Gi(e,t,n){var r=Wi(e,t,"set");return Vi(e,r,n),n}const $i={class:"math-formula"},Yi=["src","width","height"],Xi={key:1},Ji={key:0,class:"math-modal-content"},eo={class:"math-modal-content-left"},to=["onClick"],no={class:"math-modal-content-right"},ro={class:"content-editor-preview"};function io(e,t,n,r,i,o){const a=(0,Ft.up)("TabPane"),s=(0,Ft.up)("Tabs"),l=(0,Ft.up)("Textarea"),c=(0,Ft.up)("Modal");return(0,Ft.wg)(),(0,Ft.iD)("div",$i,[(0,Ft._)("div",{class:(0,Mt.C_)(`math-formula-content ${e.id}`)},[e.mathTextareaValue?((0,Ft.wg)(),(0,Ft.iD)("img",{key:0,src:e.imageUrl,width:e.width,height:e.height},null,8,Yi)):((0,Ft.wg)(),(0,Ft.iD)("span",Xi,"添加公式"))],2),(0,Ft.Wm)(c,{visible:e.visible,"onUpdate:visible":t[1]||(t[1]=t=>e.visible=t),title:"公式编辑器",width:"1000px","wrap-class-name":"math-formula-modal","cancel-text":"取消","ok-text":"保存",onOk:e.handleOk},{default:(0,Ft.w5)((()=>[(0,Ft.Wm)(s,{activeKey:e.activeKey,onChange:e.changePanel},{default:(0,Ft.w5)((()=>[((0,Ft.wg)(!0),(0,Ft.iD)(Ft.HY,null,(0,Ft.Ko)(e.mathTypeList,((e,t)=>((0,Ft.wg)(),(0,Ft.j4)(a,{key:t,tab:e.name},null,8,["tab"])))),128))])),_:1},8,["activeKey","onChange"]),e.visible?((0,Ft.wg)(),(0,Ft.iD)("div",Ji,[(0,Ft._)("div",eo,[((0,Ft.wg)(!0),(0,Ft.iD)(Ft.HY,null,(0,Ft.Ko)(e.mathTypeList[e.activeKey].children,(t=>((0,Ft.wg)(),(0,Ft.iD)("div",{class:"math-model-node",onClick:n=>e.addTextareaValue(t),key:t},"$$"+(0,Mt.zw)(t)+"$$",9,to)))),128))]),(0,Ft._)("div",no,[(0,Ft.Wm)(l,{class:"content-editor-input",value:e.mathTextareaValue,"onUpdate:value":t[0]||(t[0]=t=>e.mathTextareaValue=t),placeholder:"请输入latex公式",onFocus:e.setSelection,onBlur:e.setSelection,onClick:e.setSelection,onInput:e.renderPreview,"auto-size":{minRows:5,maxRows:6},"allow-clear":""},null,8,["value","onFocus","onBlur","onClick","onInput"]),(0,Ft._)("div",ro,(0,Mt.zw)(e.mathPreviewValue),1)])])):(0,Ft.kq)("",!0)])),_:1},8,["visible","onOk"])])}class oo{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new oo(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class ao{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new ao(t,oo.range(this,e))}}class so{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,i="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var a=o.lexer.input;n=o.start,r=o.end,n===a.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var s,l,c=a.slice(n,r).replace(/[^]/g,"$&̲");s=n>15?"…"+a.slice(n-15,n):a.slice(0,n),l=r+15<a.length?a.slice(r,r+15)+"…":a.slice(r),i+=s+c+l}var A=new Error(i);return A.name="ParseError",A.__proto__=so.prototype,A.position=n,null!=n&&null!=r&&(A.length=r-n),A.rawMessage=e,A}}so.prototype.__proto__=Error.prototype;var lo=function(e,t){return-1!==e.indexOf(t)},co=function(e,t){return void 0===e?t:e},Ao=/([A-Z])/g,uo=function(e){return e.replace(Ao,"-$1").toLowerCase()},ho={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},po=/[&><"']/g;function fo(e){return String(e).replace(po,(e=>ho[e]))}var go=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},mo=function(e){var t=go(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},vo=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},bo=function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return null!=t?t[1]:"_relative"},yo={contains:lo,deflt:co,escape:fo,hyphenate:uo,getBaseElem:go,isCharacterBox:mo,protocolFromUrl:bo},wo={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function xo(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!==typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class ko{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},wo)if(wo.hasOwnProperty(t)){var n=wo[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:xo(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"===typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new so("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"===typeof r)try{r=r(e,t,n)}catch(i){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){e.url&&!e.protocol&&(e.protocol=yo.protocolFromUrl(e.url));var t="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class Co{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return No[Uo[this.id]]}sub(){return No[Lo[this.id]]}fracNum(){return No[Qo[this.id]]}fracDen(){return No[Do[this.id]]}cramp(){return No[Ho[this.id]]}text(){return No[Oo[this.id]]}isTight(){return this.size>=2}}var Bo=0,_o=1,Eo=2,So=3,Fo=4,To=5,Mo=6,Io=7,No=[new Co(Bo,0,!1),new Co(_o,0,!0),new Co(Eo,1,!1),new Co(So,1,!0),new Co(Fo,2,!1),new Co(To,2,!0),new Co(Mo,3,!1),new Co(Io,3,!0)],Uo=[Fo,To,Fo,To,Mo,Io,Mo,Io],Lo=[To,To,To,To,Io,Io,Io,Io],Qo=[Eo,So,Fo,To,Mo,Io,Mo,Io],Do=[So,So,To,To,Io,Io,Io,Io],Ho=[_o,_o,So,So,To,To,Io,Io],Oo=[Bo,_o,Eo,So,Eo,So,Eo,So],zo={DISPLAY:No[Bo],TEXT:No[Eo],SCRIPT:No[Fo],SCRIPTSCRIPT:No[Mo]},Zo=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ro(e){for(var t=0;t<Zo.length;t++)for(var n=Zo[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var Po=[];function qo(e){for(var t=0;t<Po.length;t+=2)if(e>=Po[t]&&e<=Po[t+1])return!0;return!1}Zo.forEach((e=>e.blocks.forEach((e=>Po.push(...e)))));var Ko=80,Wo=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},jo=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Vo=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Go=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"},$o=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Yo=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Xo=function(e,t,n){var r=n-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+r+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"},Jo=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=Wo(t,Ko);break;case"sqrtSize1":r=jo(t,Ko);break;case"sqrtSize2":r=Vo(t,Ko);break;case"sqrtSize3":r=Go(t,Ko);break;case"sqrtSize4":r=$o(t,Ko);break;case"sqrtTall":r=Xo(t,Ko,n)}return r},ea=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},ta={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},na=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}};class ra{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return yo.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=e=>e.toText();return this.children.map(e).join("")}}var ia={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},oa={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},aa={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function sa(e,t){ia[e]=t}function la(e,t,n){if(!ia[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=ia[t][r];if(!i&&e[0]in aa&&(r=aa[e[0]].charCodeAt(0),i=ia[t][r]),i||"text"!==n||qo(r)&&(i=ia[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var ca={};function Aa(e){var t;if(t=e>=5?0:e>=3?1:2,!ca[t]){var n=ca[t]={cssEmPerMu:oa.quad[t]/18};for(var r in oa)oa.hasOwnProperty(r)&&(n[r]=oa[r][t])}return ca[t]}var ua=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],da=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],ha=function(e,t){return t.size<2?e:ua[e-1][t.size-1]};class pa{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||pa.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=da[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new pa(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ha(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:da[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=ha(pa.BASESIZE,e);return this.size===t&&this.textSize===pa.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==pa.BASESIZE?["sizing","reset-size"+this.size,"size"+pa.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Aa(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}pa.BASESIZE=6;var fa={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ga={ex:!0,em:!0,mu:!0},ma=function(e){return"string"!==typeof e&&(e=e.unit),e in fa||e in ga||"ex"===e},va=function(e,t){var n;if(e.unit in fa)n=fa[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new so("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ba=function(e){return+e.toFixed(4)+"em"},ya=function(e){return e.filter((e=>e)).join(" ")},wa=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},xa=function(e){var t=document.createElement(e);for(var n in t.className=ya(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},ka=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+yo.escape(ya(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=yo.hyphenate(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+yo.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(i)&&(t+=" "+i+'="'+yo.escape(this.attributes[i])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">",t};class Ca{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,wa.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return yo.contains(this.classes,e)}toNode(){return xa.call(this,"span")}toMarkup(){return ka.call(this,"span")}}class Ba{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,wa.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return yo.contains(this.classes,e)}toNode(){return xa.call(this,"a")}toMarkup(){return ka.call(this,"a")}}class _a{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return yo.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=yo.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+yo.escape(t)+'"'),e+="'/>",e}}var Ea={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class Sa{constructor(e,t,n,r,i,o,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=o||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=Ro(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ea[this.text])}hasClass(e){return yo.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&(t=document.createElement("span"),t.style.marginRight=ba(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=ya(this.classes)),this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=yo.escape(ya(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=yo.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+yo.escape(n)+'"');var i=yo.escape(this.text);return e?(t+=">",t+=i,t+="</span>",t):i}}class Fa{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class Ta{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",ta[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+ta[this.pathName]+"'/>"}}class Ma{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>",e}}function Ia(e){if(e instanceof Sa)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function Na(e){if(e instanceof Ca)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var Ua={bin:1,close:1,inner:1,open:1,punct:1,rel:1},La={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Qa={math:{},text:{}};function Da(e,t,n,r,i,o){Qa[e][i]={font:t,group:n,replace:r},o&&r&&(Qa[e][r]=Qa[e][i])}var Ha="math",Oa="text",za="main",Za="ams",Ra="accent-token",Pa="bin",qa="close",Ka="inner",Wa="mathord",ja="op-token",Va="open",Ga="punct",$a="rel",Ya="spacing",Xa="textord";Da(Ha,za,$a,"≡","\\equiv",!0),Da(Ha,za,$a,"≺","\\prec",!0),Da(Ha,za,$a,"≻","\\succ",!0),Da(Ha,za,$a,"","\\sim",!0),Da(Ha,za,$a,"⊥","\\perp"),Da(Ha,za,$a,"⪯","\\preceq",!0),Da(Ha,za,$a,"⪰","\\succeq",!0),Da(Ha,za,$a,"≃","\\simeq",!0),Da(Ha,za,$a,"","\\mid",!0),Da(Ha,za,$a,"≪","\\ll",!0),Da(Ha,za,$a,"≫","\\gg",!0),Da(Ha,za,$a,"≍","\\asymp",!0),Da(Ha,za,$a,"∥","\\parallel"),Da(Ha,za,$a,"⋈","\\bowtie",!0),Da(Ha,za,$a,"⌣","\\smile",!0),Da(Ha,za,$a,"⊑","\\sqsubseteq",!0),Da(Ha,za,$a,"⊒","\\sqsupseteq",!0),Da(Ha,za,$a,"≐","\\doteq",!0),Da(Ha,za,$a,"⌢","\\frown",!0),Da(Ha,za,$a,"∋","\\ni",!0),Da(Ha,za,$a,"∝","\\propto",!0),Da(Ha,za,$a,"⊢","\\vdash",!0),Da(Ha,za,$a,"⊣","\\dashv",!0),Da(Ha,za,$a,"∋","\\owns"),Da(Ha,za,Ga,".","\\ldotp"),Da(Ha,za,Ga,"⋅","\\cdotp"),Da(Ha,za,Xa,"#","\\#"),Da(Oa,za,Xa,"#","\\#"),Da(Ha,za,Xa,"&","\\&"),Da(Oa,za,Xa,"&","\\&"),Da(Ha,za,Xa,"ℵ","\\aleph",!0),Da(Ha,za,Xa,"∀","\\forall",!0),Da(Ha,za,Xa,"ℏ","\\hbar",!0),Da(Ha,za,Xa,"∃","\\exists",!0),Da(Ha,za,Xa,"∇","\\nabla",!0),Da(Ha,za,Xa,"♭","\\flat",!0),Da(Ha,za,Xa,"","\\ell",!0),Da(Ha,za,Xa,"♮","\\natural",!0),Da(Ha,za,Xa,"♣","\\clubsuit",!0),Da(Ha,za,Xa,"℘","\\wp",!0),Da(Ha,za,Xa,"♯","\\sharp",!0),Da(Ha,za,Xa,"♢","\\diamondsuit",!0),Da(Ha,za,Xa,"","\\Re",!0),Da(Ha,za,Xa,"♡","\\heartsuit",!0),Da(Ha,za,Xa,"","\\Im",!0),Da(Ha,za,Xa,"♠","\\spadesuit",!0),Da(Ha,za,Xa,"§","\\S",!0),Da(Oa,za,Xa,"§","\\S"),Da(Ha,za,Xa,"¶","\\P",!0),Da(Oa,za,Xa,"¶","\\P"),Da(Ha,za,Xa,"†","\\dag"),Da(Oa,za,Xa,"†","\\dag"),Da(Oa,za,Xa,"†","\\textdagger"),Da(Ha,za,Xa,"‡","\\ddag"),Da(Oa,za,Xa,"‡","\\ddag"),Da(Oa,za,Xa,"‡","\\textdaggerdbl"),Da(Ha,za,qa,"⎱","\\rmoustache",!0),Da(Ha,za,Va,"⎰","\\lmoustache",!0),Da(Ha,za,qa,"⟯","\\rgroup",!0),Da(Ha,za,Va,"⟮","\\lgroup",!0),Da(Ha,za,Pa,"∓","\\mp",!0),Da(Ha,za,Pa,"⊖","\\ominus",!0),Da(Ha,za,Pa,"⊎","\\uplus",!0),Da(Ha,za,Pa,"⊓","\\sqcap",!0),Da(Ha,za,Pa,"","\\ast"),Da(Ha,za,Pa,"⊔","\\sqcup",!0),Da(Ha,za,Pa,"◯","\\bigcirc",!0),Da(Ha,za,Pa,"∙","\\bullet",!0),Da(Ha,za,Pa,"‡","\\ddagger"),Da(Ha,za,Pa,"≀","\\wr",!0),Da(Ha,za,Pa,"⨿","\\amalg"),Da(Ha,za,Pa,"&","\\And"),Da(Ha,za,$a,"⟵","\\longleftarrow",!0),Da(Ha,za,$a,"⇐","\\Leftarrow",!0),Da(Ha,za,$a,"⟸","\\Longleftarrow",!0),Da(Ha,za,$a,"⟶","\\longrightarrow",!0),Da(Ha,za,$a,"⇒","\\Rightarrow",!0),Da(Ha,za,$a,"⟹","\\Longrightarrow",!0),Da(Ha,za,$a,"↔","\\leftrightarrow",!0),Da(Ha,za,$a,"⟷","\\longleftrightarrow",!0),Da(Ha,za,$a,"⇔","\\Leftrightarrow",!0),Da(Ha,za,$a,"⟺","\\Longleftrightarrow",!0),Da(Ha,za,$a,"↦","\\mapsto",!0),Da(Ha,za,$a,"⟼","\\longmapsto",!0),Da(Ha,za,$a,"↗","\\nearrow",!0),Da(Ha,za,$a,"↩","\\hookleftarrow",!0),Da(Ha,za,$a,"↪","\\hookrightarrow",!0),Da(Ha,za,$a,"↘","\\searrow",!0),Da(Ha,za,$a,"↼","\\leftharpoonup",!0),Da(Ha,za,$a,"⇀","\\rightharpoonup",!0),Da(Ha,za,$a,"↙","\\swarrow",!0),Da(Ha,za,$a,"↽","\\leftharpoondown",!0),Da(Ha,za,$a,"⇁","\\rightharpoondown",!0),Da(Ha,za,$a,"↖","\\nwarrow",!0),Da(Ha,za,$a,"⇌","\\rightleftharpoons",!0),Da(Ha,Za,$a,"≮","\\nless",!0),Da(Ha,Za,$a,"","\\@nleqslant"),Da(Ha,Za,$a,"","\\@nleqq"),Da(Ha,Za,$a,"⪇","\\lneq",!0),Da(Ha,Za,$a,"≨","\\lneqq",!0),Da(Ha,Za,$a,"","\\@lvertneqq"),Da(Ha,Za,$a,"⋦","\\lnsim",!0),Da(Ha,Za,$a,"⪉","\\lnapprox",!0),Da(Ha,Za,$a,"⊀","\\nprec",!0),Da(Ha,Za,$a,"⋠","\\npreceq",!0),Da(Ha,Za,$a,"⋨","\\precnsim",!0),Da(Ha,Za,$a,"⪹","\\precnapprox",!0),Da(Ha,Za,$a,"≁","\\nsim",!0),Da(Ha,Za,$a,"","\\@nshortmid"),Da(Ha,Za,$a,"∤","\\nmid",!0),Da(Ha,Za,$a,"⊬","\\nvdash",!0),Da(Ha,Za,$a,"⊭","\\nvDash",!0),Da(Ha,Za,$a,"⋪","\\ntriangleleft"),Da(Ha,Za,$a,"⋬","\\ntrianglelefteq",!0),Da(Ha,Za,$a,"⊊","\\subsetneq",!0),Da(Ha,Za,$a,"","\\@varsubsetneq"),Da(Ha,Za,$a,"⫋","\\subsetneqq",!0),Da(Ha,Za,$a,"","\\@varsubsetneqq"),Da(Ha,Za,$a,"≯","\\ngtr",!0),Da(Ha,Za,$a,"","\\@ngeqslant"),Da(Ha,Za,$a,"","\\@ngeqq"),Da(Ha,Za,$a,"⪈","\\gneq",!0),Da(Ha,Za,$a,"≩","\\gneqq",!0),Da(Ha,Za,$a,"","\\@gvertneqq"),Da(Ha,Za,$a,"⋧","\\gnsim",!0),Da(Ha,Za,$a,"⪊","\\gnapprox",!0),Da(Ha,Za,$a,"⊁","\\nsucc",!0),Da(Ha,Za,$a,"⋡","\\nsucceq",!0),Da(Ha,Za,$a,"⋩","\\succnsim",!0),Da(Ha,Za,$a,"⪺","\\succnapprox",!0),Da(Ha,Za,$a,"≆","\\ncong",!0),Da(Ha,Za,$a,"","\\@nshortparallel"),Da(Ha,Za,$a,"∦","\\nparallel",!0),Da(Ha,Za,$a,"⊯","\\nVDash",!0),Da(Ha,Za,$a,"⋫","\\ntriangleright"),Da(Ha,Za,$a,"⋭","\\ntrianglerighteq",!0),Da(Ha,Za,$a,"","\\@nsupseteqq"),Da(Ha,Za,$a,"⊋","\\supsetneq",!0),Da(Ha,Za,$a,"","\\@varsupsetneq"),Da(Ha,Za,$a,"⫌","\\supsetneqq",!0),Da(Ha,Za,$a,"","\\@varsupsetneqq"),Da(Ha,Za,$a,"⊮","\\nVdash",!0),Da(Ha,Za,$a,"⪵","\\precneqq",!0),Da(Ha,Za,$a,"⪶","\\succneqq",!0),Da(Ha,Za,$a,"","\\@nsubseteqq"),Da(Ha,Za,Pa,"⊴","\\unlhd"),Da(Ha,Za,Pa,"⊵","\\unrhd"),Da(Ha,Za,$a,"↚","\\nleftarrow",!0),Da(Ha,Za,$a,"↛","\\nrightarrow",!0),Da(Ha,Za,$a,"⇍","\\nLeftarrow",!0),Da(Ha,Za,$a,"⇏","\\nRightarrow",!0),Da(Ha,Za,$a,"↮","\\nleftrightarrow",!0),Da(Ha,Za,$a,"⇎","\\nLeftrightarrow",!0),Da(Ha,Za,$a,"△","\\vartriangle"),Da(Ha,Za,Xa,"ℏ","\\hslash"),Da(Ha,Za,Xa,"▽","\\triangledown"),Da(Ha,Za,Xa,"◊","\\lozenge"),Da(Ha,Za,Xa,"Ⓢ","\\circledS"),Da(Ha,Za,Xa,"®","\\circledR"),Da(Oa,Za,Xa,"®","\\circledR"),Da(Ha,Za,Xa,"∡","\\measuredangle",!0),Da(Ha,Za,Xa,"∄","\\nexists"),Da(Ha,Za,Xa,"℧","\\mho"),Da(Ha,Za,Xa,"Ⅎ","\\Finv",!0),Da(Ha,Za,Xa,"⅁","\\Game",!0),Da(Ha,Za,Xa,"","\\backprime"),Da(Ha,Za,Xa,"▲","\\blacktriangle"),Da(Ha,Za,Xa,"▼","\\blacktriangledown"),Da(Ha,Za,Xa,"■","\\blacksquare"),Da(Ha,Za,Xa,"⧫","\\blacklozenge"),Da(Ha,Za,Xa,"★","\\bigstar"),Da(Ha,Za,Xa,"∢","\\sphericalangle",!0),Da(Ha,Za,Xa,"∁","\\complement",!0),Da(Ha,Za,Xa,"ð","\\eth",!0),Da(Oa,za,Xa,"ð","ð"),Da(Ha,Za,Xa,"","\\diagup"),Da(Ha,Za,Xa,"╲","\\diagdown"),Da(Ha,Za,Xa,"□","\\square"),Da(Ha,Za,Xa,"□","\\Box"),Da(Ha,Za,Xa,"◊","\\Diamond"),Da(Ha,Za,Xa,"¥","\\yen",!0),Da(Oa,Za,Xa,"¥","\\yen",!0),Da(Ha,Za,Xa,"✓","\\checkmark",!0),Da(Oa,Za,Xa,"✓","\\checkmark"),Da(Ha,Za,Xa,"ℶ","\\beth",!0),Da(Ha,Za,Xa,"ℸ","\\daleth",!0),Da(Ha,Za,Xa,"ℷ","\\gimel",!0),Da(Ha,Za,Xa,"ϝ","\\digamma",!0),Da(Ha,Za,Xa,"ϰ","\\varkappa"),Da(Ha,Za,Va,"┌","\\@ulcorner",!0),Da(Ha,Za,qa,"┐","\\@urcorner",!0),Da(Ha,Za,Va,"└","\\@llcorner",!0),Da(Ha,Za,qa,"┘","\\@lrcorner",!0),Da(Ha,Za,$a,"≦","\\leqq",!0),Da(Ha,Za,$a,"⩽","\\leqslant",!0),Da(Ha,Za,$a,"⪕","\\eqslantless",!0),Da(Ha,Za,$a,"≲","\\lesssim",!0),Da(Ha,Za,$a,"⪅","\\lessapprox",!0),Da(Ha,Za,$a,"≊","\\approxeq",!0),Da(Ha,Za,Pa,"⋖","\\lessdot"),Da(Ha,Za,$a,"⋘","\\lll",!0),Da(Ha,Za,$a,"≶","\\lessgtr",!0),Da(Ha,Za,$a,"⋚","\\lesseqgtr",!0),Da(Ha,Za,$a,"⪋","\\lesseqqgtr",!0),Da(Ha,Za,$a,"≑","\\doteqdot"),Da(Ha,Za,$a,"≓","\\risingdotseq",!0),Da(Ha,Za,$a,"≒","\\fallingdotseq",!0),Da(Ha,Za,$a,"∽","\\backsim",!0),Da(Ha,Za,$a,"⋍","\\backsimeq",!0),Da(Ha,Za,$a,"⫅","\\subseteqq",!0),Da(Ha,Za,$a,"⋐","\\Subset",!0),Da(Ha,Za,$a,"⊏","\\sqsubset",!0),Da(Ha,Za,$a,"≼","\\preccurlyeq",!0),Da(Ha,Za,$a,"⋞","\\curlyeqprec",!0),Da(Ha,Za,$a,"≾","\\precsim",!0),Da(Ha,Za,$a,"⪷","\\precapprox",!0),Da(Ha,Za,$a,"⊲","\\vartriangleleft"),Da(Ha,Za,$a,"⊴","\\trianglelefteq"),Da(Ha,Za,$a,"⊨","\\vDash",!0),Da(Ha,Za,$a,"⊪","\\Vvdash",!0),Da(Ha,Za,$a,"⌣","\\smallsmile"),Da(Ha,Za,$a,"⌢","\\smallfrown"),Da(Ha,Za,$a,"≏","\\bumpeq",!0),Da(Ha,Za,$a,"≎","\\Bumpeq",!0),Da(Ha,Za,$a,"≧","\\geqq",!0),Da(Ha,Za,$a,"⩾","\\geqslant",!0),Da(Ha,Za,$a,"⪖","\\eqslantgtr",!0),Da(Ha,Za,$a,"≳","\\gtrsim",!0),Da(Ha,Za,$a,"⪆","\\gtrapprox",!0),Da(Ha,Za,Pa,"⋗","\\gtrdot"),Da(Ha,Za,$a,"⋙","\\ggg",!0),Da(Ha,Za,$a,"≷","\\gtrless",!0),Da(Ha,Za,$a,"⋛","\\gtreqless",!0),Da(Ha,Za,$a,"⪌","\\gtreqqless",!0),Da(Ha,Za,$a,"≖","\\eqcirc",!0),Da(Ha,Za,$a,"≗","\\circeq",!0),Da(Ha,Za,$a,"≜","\\triangleq",!0),Da(Ha,Za,$a,"","\\thicksim"),Da(Ha,Za,$a,"≈","\\thickapprox"),Da(Ha,Za,$a,"⫆","\\supseteqq",!0),Da(Ha,Za,$a,"⋑","\\Supset",!0),Da(Ha,Za,$a,"⊐","\\sqsupset",!0),Da(Ha,Za,$a,"≽","\\succcurlyeq",!0),Da(Ha,Za,$a,"⋟","\\curlyeqsucc",!0),Da(Ha,Za,$a,"≿","\\succsim",!0),Da(Ha,Za,$a,"⪸","\\succapprox",!0),Da(Ha,Za,$a,"⊳","\\vartriangleright"),Da(Ha,Za,$a,"⊵","\\trianglerighteq"),Da(Ha,Za,$a,"⊩","\\Vdash",!0),Da(Ha,Za,$a,"","\\shortmid"),Da(Ha,Za,$a,"∥","\\shortparallel"),Da(Ha,Za,$a,"≬","\\between",!0),Da(Ha,Za,$a,"⋔","\\pitchfork",!0),Da(Ha,Za,$a,"∝","\\varpropto"),Da(Ha,Za,$a,"◀","\\blacktriangleleft"),Da(Ha,Za,$a,"∴","\\therefore",!0),Da(Ha,Za,$a,"∍","\\backepsilon"),Da(Ha,Za,$a,"▶","\\blacktriangleright"),Da(Ha,Za,$a,"∵","\\because",!0),Da(Ha,Za,$a,"⋘","\\llless"),Da(Ha,Za,$a,"⋙","\\gggtr"),Da(Ha,Za,Pa,"⊲","\\lhd"),Da(Ha,Za,Pa,"⊳","\\rhd"),Da(Ha,Za,$a,"≂","\\eqsim",!0),Da(Ha,za,$a,"⋈","\\Join"),Da(Ha,Za,$a,"≑","\\Doteq",!0),Da(Ha,Za,Pa,"∔","\\dotplus",!0),Da(Ha,Za,Pa,"","\\smallsetminus"),Da(Ha,Za,Pa,"⋒","\\Cap",!0),Da(Ha,Za,Pa,"⋓","\\Cup",!0),Da(Ha,Za,Pa,"⩞","\\doublebarwedge",!0),Da(Ha,Za,Pa,"⊟","\\boxminus",!0),Da(Ha,Za,Pa,"⊞","\\boxplus",!0),Da(Ha,Za,Pa,"⋇","\\divideontimes",!0),Da(Ha,Za,Pa,"⋉","\\ltimes",!0),Da(Ha,Za,Pa,"⋊","\\rtimes",!0),Da(Ha,Za,Pa,"⋋","\\leftthreetimes",!0),Da(Ha,Za,Pa,"⋌","\\rightthreetimes",!0),Da(Ha,Za,Pa,"⋏","\\curlywedge",!0),Da(Ha,Za,Pa,"⋎","\\curlyvee",!0),Da(Ha,Za,Pa,"⊝","\\circleddash",!0),Da(Ha,Za,Pa,"⊛","\\circledast",!0),Da(Ha,Za,Pa,"⋅","\\centerdot"),Da(Ha,Za,Pa,"⊺","\\intercal",!0),Da(Ha,Za,Pa,"⋒","\\doublecap"),Da(Ha,Za,Pa,"⋓","\\doublecup"),Da(Ha,Za,Pa,"⊠","\\boxtimes",!0),Da(Ha,Za,$a,"⇢","\\dashrightarrow",!0),Da(Ha,Za,$a,"⇠","\\dashleftarrow",!0),Da(Ha,Za,$a,"⇇","\\leftleftarrows",!0),Da(Ha,Za,$a,"⇆","\\leftrightarrows",!0),Da(Ha,Za,$a,"⇚","\\Lleftarrow",!0),Da(Ha,Za,$a,"↞","\\twoheadleftarrow",!0),Da(Ha,Za,$a,"↢","\\leftarrowtail",!0),Da(Ha,Za,$a,"↫","\\looparrowleft",!0),Da(Ha,Za,$a,"⇋","\\leftrightharpoons",!0),Da(Ha,Za,$a,"↶","\\curvearrowleft",!0),Da(Ha,Za,$a,"↺","\\circlearrowleft",!0),Da(Ha,Za,$a,"↰","\\Lsh",!0),Da(Ha,Za,$a,"⇈","\\upuparrows",!0),Da(Ha,Za,$a,"↿","\\upharpoonleft",!0),Da(Ha,Za,$a,"⇃","\\downharpoonleft",!0),Da(Ha,za,$a,"⊶","\\origof",!0),Da(Ha,za,$a,"⊷","\\imageof",!0),Da(Ha,Za,$a,"⊸","\\multimap",!0),Da(Ha,Za,$a,"↭","\\leftrightsquigarrow",!0),Da(Ha,Za,$a,"⇉","\\rightrightarrows",!0),Da(Ha,Za,$a,"⇄","\\rightleftarrows",!0),Da(Ha,Za,$a,"↠","\\twoheadrightarrow",!0),Da(Ha,Za,$a,"↣","\\rightarrowtail",!0),Da(Ha,Za,$a,"↬","\\looparrowright",!0),Da(Ha,Za,$a,"↷","\\curvearrowright",!0),Da(Ha,Za,$a,"↻","\\circlearrowright",!0),Da(Ha,Za,$a,"↱","\\Rsh",!0),Da(Ha,Za,$a,"⇊","\\downdownarrows",!0),Da(Ha,Za,$a,"↾","\\upharpoonright",!0),Da(Ha,Za,$a,"⇂","\\downharpoonright",!0),Da(Ha,Za,$a,"⇝","\\rightsquigarrow",!0),Da(Ha,Za,$a,"⇝","\\leadsto"),Da(Ha,Za,$a,"⇛","\\Rrightarrow",!0),Da(Ha,Za,$a,"↾","\\restriction"),Da(Ha,za,Xa,"","`"),Da(Ha,za,Xa,"$","\\$"),Da(Oa,za,Xa,"$","\\$"),Da(Oa,za,Xa,"$","\\textdollar"),Da(Ha,za,Xa,"%","\\%"),Da(Oa,za,Xa,"%","\\%"),Da(Ha,za,Xa,"_","\\_"),Da(Oa,za,Xa,"_","\\_"),Da(Oa,za,Xa,"_","\\textunderscore"),Da(Ha,za,Xa,"∠","\\angle",!0),Da(Ha,za,Xa,"∞","\\infty",!0),Da(Ha,za,Xa,"","\\prime"),Da(Ha,za,Xa,"△","\\triangle"),Da(Ha,za,Xa,"Γ","\\Gamma",!0),Da(Ha,za,Xa,"Δ","\\Delta",!0),Da(Ha,za,Xa,"Θ","\\Theta",!0),Da(Ha,za,Xa,"Λ","\\Lambda",!0),Da(Ha,za,Xa,"Ξ","\\Xi",!0),Da(Ha,za,Xa,"Π","\\Pi",!0),Da(Ha,za,Xa,"Σ","\\Sigma",!0),Da(Ha,za,Xa,"Υ","\\Upsilon",!0),Da(Ha,za,Xa,"Φ","\\Phi",!0),Da(Ha,za,Xa,"Ψ","\\Psi",!0),Da(Ha,za,Xa,"Ω","\\Omega",!0),Da(Ha,za,Xa,"A","Α"),Da(Ha,za,Xa,"B","Β"),Da(Ha,za,Xa,"E","Ε"),Da(Ha,za,Xa,"Z","Ζ"),Da(Ha,za,Xa,"H","Η"),Da(Ha,za,Xa,"I","Ι"),Da(Ha,za,Xa,"K","Κ"),Da(Ha,za,Xa,"M","Μ"),Da(Ha,za,Xa,"N","Ν"),Da(Ha,za,Xa,"O","Ο"),Da(Ha,za,Xa,"P","Ρ"),Da(Ha,za,Xa,"T","Τ"),Da(Ha,za,Xa,"X","Χ"),Da(Ha,za,Xa,"¬","\\neg",!0),Da(Ha,za,Xa,"¬","\\lnot"),Da(Ha,za,Xa,"","\\top"),Da(Ha,za,Xa,"⊥","\\bot"),Da(Ha,za,Xa,"∅","\\emptyset"),Da(Ha,Za,Xa,"∅","\\varnothing"),Da(Ha,za,Wa,"α","\\alpha",!0),Da(Ha,za,Wa,"β","\\beta",!0),Da(Ha,za,Wa,"γ","\\gamma",!0),Da(Ha,za,Wa,"δ","\\delta",!0),Da(Ha,za,Wa,"ϵ","\\epsilon",!0),Da(Ha,za,Wa,"ζ","\\zeta",!0),Da(Ha,za,Wa,"η","\\eta",!0),Da(Ha,za,Wa,"θ","\\theta",!0),Da(Ha,za,Wa,"ι","\\iota",!0),Da(Ha,za,Wa,"κ","\\kappa",!0),Da(Ha,za,Wa,"λ","\\lambda",!0),Da(Ha,za,Wa,"μ","\\mu",!0),Da(Ha,za,Wa,"ν","\\nu",!0),Da(Ha,za,Wa,"ξ","\\xi",!0),Da(Ha,za,Wa,"ο","\\omicron",!0),Da(Ha,za,Wa,"π","\\pi",!0),Da(Ha,za,Wa,"ρ","\\rho",!0),Da(Ha,za,Wa,"σ","\\sigma",!0),Da(Ha,za,Wa,"τ","\\tau",!0),Da(Ha,za,Wa,"υ","\\upsilon",!0),Da(Ha,za,Wa,"ϕ","\\phi",!0),Da(Ha,za,Wa,"χ","\\chi",!0),Da(Ha,za,Wa,"ψ","\\psi",!0),Da(Ha,za,Wa,"ω","\\omega",!0),Da(Ha,za,Wa,"ε","\\varepsilon",!0),Da(Ha,za,Wa,"ϑ","\\vartheta",!0),Da(Ha,za,Wa,"ϖ","\\varpi",!0),Da(Ha,za,Wa,"ϱ","\\varrho",!0),Da(Ha,za,Wa,"ς","\\varsigma",!0),Da(Ha,za,Wa,"φ","\\varphi",!0),Da(Ha,za,Pa,"","*",!0),Da(Ha,za,Pa,"+","+"),Da(Ha,za,Pa,"","-",!0),Da(Ha,za,Pa,"⋅","\\cdot",!0),Da(Ha,za,Pa,"∘","\\circ",!0),Da(Ha,za,Pa,"÷","\\div",!0),Da(Ha,za,Pa,"±","\\pm",!0),Da(Ha,za,Pa,"×","\\times",!0),Da(Ha,za,Pa,"∩","\\cap",!0),Da(Ha,za,Pa,"","\\cup",!0),Da(Ha,za,Pa,"","\\setminus",!0),Da(Ha,za,Pa,"∧","\\land"),Da(Ha,za,Pa,"","\\lor"),Da(Ha,za,Pa,"∧","\\wedge",!0),Da(Ha,za,Pa,"","\\vee",!0),Da(Ha,za,Xa,"√","\\surd"),Da(Ha,za,Va,"⟨","\\langle",!0),Da(Ha,za,Va,"","\\lvert"),Da(Ha,za,Va,"∥","\\lVert"),Da(Ha,za,qa,"?","?"),Da(Ha,za,qa,"!","!"),Da(Ha,za,qa,"⟩","\\rangle",!0),Da(Ha,za,qa,"","\\rvert"),Da(Ha,za,qa,"∥","\\rVert"),Da(Ha,za,$a,"=","="),Da(Ha,za,$a,":",":"),Da(Ha,za,$a,"≈","\\approx",!0),Da(Ha,za,$a,"≅","\\cong",!0),Da(Ha,za,$a,"≥","\\ge"),Da(Ha,za,$a,"≥","\\geq",!0),Da(Ha,za,$a,"←","\\gets"),Da(Ha,za,$a,">","\\gt",!0),Da(Ha,za,$a,"∈","\\in",!0),Da(Ha,za,$a,"","\\@not"),Da(Ha,za,$a,"⊂","\\subset",!0),Da(Ha,za,$a,"⊃","\\supset",!0),Da(Ha,za,$a,"⊆","\\subseteq",!0),Da(Ha,za,$a,"⊇","\\supseteq",!0),Da(Ha,Za,$a,"⊈","\\nsubseteq",!0),Da(Ha,Za,$a,"⊉","\\nsupseteq",!0),Da(Ha,za,$a,"⊨","\\models"),Da(Ha,za,$a,"←","\\leftarrow",!0),Da(Ha,za,$a,"≤","\\le"),Da(Ha,za,$a,"≤","\\leq",!0),Da(Ha,za,$a,"<","\\lt",!0),Da(Ha,za,$a,"→","\\rightarrow",!0),Da(Ha,za,$a,"→","\\to"),Da(Ha,Za,$a,"≱","\\ngeq",!0),Da(Ha,Za,$a,"≰","\\nleq",!0),Da(Ha,za,Ya," ","\\ "),Da(Ha,za,Ya," ","\\space"),Da(Ha,za,Ya," ","\\nobreakspace"),Da(Oa,za,Ya," ","\\ "),Da(Oa,za,Ya," "," "),Da(Oa,za,Ya," ","\\space"),Da(Oa,za,Ya," ","\\nobreakspace"),Da(Ha,za,Ya,null,"\\nobreak"),Da(Ha,za,Ya,null,"\\allowbreak"),Da(Ha,za,Ga,",",","),Da(Ha,za,Ga,";",";"),Da(Ha,Za,Pa,"⊼","\\barwedge",!0),Da(Ha,Za,Pa,"⊻","\\veebar",!0),Da(Ha,za,Pa,"⊙","\\odot",!0),Da(Ha,za,Pa,"⊕","\\oplus",!0),Da(Ha,za,Pa,"⊗","\\otimes",!0),Da(Ha,za,Xa,"∂","\\partial",!0),Da(Ha,za,Pa,"⊘","\\oslash",!0),Da(Ha,Za,Pa,"⊚","\\circledcirc",!0),Da(Ha,Za,Pa,"⊡","\\boxdot",!0),Da(Ha,za,Pa,"△","\\bigtriangleup"),Da(Ha,za,Pa,"▽","\\bigtriangledown"),Da(Ha,za,Pa,"†","\\dagger"),Da(Ha,za,Pa,"⋄","\\diamond"),Da(Ha,za,Pa,"⋆","\\star"),Da(Ha,za,Pa,"◃","\\triangleleft"),Da(Ha,za,Pa,"▹","\\triangleright"),Da(Ha,za,Va,"{","\\{"),Da(Oa,za,Xa,"{","\\{"),Da(Oa,za,Xa,"{","\\textbraceleft"),Da(Ha,za,qa,"}","\\}"),Da(Oa,za,Xa,"}","\\}"),Da(Oa,za,Xa,"}","\\textbraceright"),Da(Ha,za,Va,"{","\\lbrace"),Da(Ha,za,qa,"}","\\rbrace"),Da(Ha,za,Va,"[","\\lbrack",!0),Da(Oa,za,Xa,"[","\\lbrack",!0),Da(Ha,za,qa,"]","\\rbrack",!0),Da(Oa,za,Xa,"]","\\rbrack",!0),Da(Ha,za,Va,"(","\\lparen",!0),Da(Ha,za,qa,")","\\rparen",!0),Da(Oa,za,Xa,"<","\\textless",!0),Da(Oa,za,Xa,">","\\textgreater",!0),Da(Ha,za,Va,"⌊","\\lfloor",!0),Da(Ha,za,qa,"⌋","\\rfloor",!0),Da(Ha,za,Va,"⌈","\\lceil",!0),Da(Ha,za,qa,"⌉","\\rceil",!0),Da(Ha,za,Xa,"\\","\\backslash"),Da(Ha,za,Xa,"","|"),Da(Ha,za,Xa,"","\\vert"),Da(Oa,za,Xa,"|","\\textbar",!0),Da(Ha,za,Xa,"∥","\\|"),Da(Ha,za,Xa,"∥","\\Vert"),Da(Oa,za,Xa,"∥","\\textbardbl"),Da(Oa,za,Xa,"~","\\textasciitilde"),Da(Oa,za,Xa,"\\","\\textbackslash"),Da(Oa,za,Xa,"^","\\textasciicircum"),Da(Ha,za,$a,"↑","\\uparrow",!0),Da(Ha,za,$a,"⇑","\\Uparrow",!0),Da(Ha,za,$a,"↓","\\downarrow",!0),Da(Ha,za,$a,"⇓","\\Downarrow",!0),Da(Ha,za,$a,"↕","\\updownarrow",!0),Da(Ha,za,$a,"⇕","\\Updownarrow",!0),Da(Ha,za,ja,"∐","\\coprod"),Da(Ha,za,ja,"","\\bigvee"),Da(Ha,za,ja,"⋀","\\bigwedge"),Da(Ha,za,ja,"⨄","\\biguplus"),Da(Ha,za,ja,"⋂","\\bigcap"),Da(Ha,za,ja,"","\\bigcup"),Da(Ha,za,ja,"∫","\\int"),Da(Ha,za,ja,"∫","\\intop"),Da(Ha,za,ja,"∬","\\iint"),Da(Ha,za,ja,"∭","\\iiint"),Da(Ha,za,ja,"∏","\\prod"),Da(Ha,za,ja,"∑","\\sum"),Da(Ha,za,ja,"⨂","\\bigotimes"),Da(Ha,za,ja,"⨁","\\bigoplus"),Da(Ha,za,ja,"⨀","\\bigodot"),Da(Ha,za,ja,"∮","\\oint"),Da(Ha,za,ja,"∯","\\oiint"),Da(Ha,za,ja,"∰","\\oiiint"),Da(Ha,za,ja,"⨆","\\bigsqcup"),Da(Ha,za,ja,"∫","\\smallint"),Da(Oa,za,Ka,"…","\\textellipsis"),Da(Ha,za,Ka,"…","\\mathellipsis"),Da(Oa,za,Ka,"…","\\ldots",!0),Da(Ha,za,Ka,"…","\\ldots",!0),Da(Ha,za,Ka,"⋯","\\@cdots",!0),Da(Ha,za,Ka,"⋱","\\ddots",!0),Da(Ha,za,Xa,"⋮","\\varvdots"),Da(Ha,za,Ra,"ˊ","\\acute"),Da(Ha,za,Ra,"ˋ","\\grave"),Da(Ha,za,Ra,"¨","\\ddot"),Da(Ha,za,Ra,"~","\\tilde"),Da(Ha,za,Ra,"ˉ","\\bar"),Da(Ha,za,Ra,"˘","\\breve"),Da(Ha,za,Ra,"ˇ","\\check"),Da(Ha,za,Ra,"^","\\hat"),Da(Ha,za,Ra,"⃗","\\vec"),Da(Ha,za,Ra,"˙","\\dot"),Da(Ha,za,Ra,"˚","\\mathring"),Da(Ha,za,Wa,"","\\@imath"),Da(Ha,za,Wa,"","\\@jmath"),Da(Ha,za,Xa,"ı","ı"),Da(Ha,za,Xa,"ȷ","ȷ"),Da(Oa,za,Xa,"ı","\\i",!0),Da(Oa,za,Xa,"ȷ","\\j",!0),Da(Oa,za,Xa,"ß","\\ss",!0),Da(Oa,za,Xa,"æ","\\ae",!0),Da(Oa,za,Xa,"œ","\\oe",!0),Da(Oa,za,Xa,"ø","\\o",!0),Da(Oa,za,Xa,"Æ","\\AE",!0),Da(Oa,za,Xa,"Œ","\\OE",!0),Da(Oa,za,Xa,"Ø","\\O",!0),Da(Oa,za,Ra,"ˊ","\\'"),Da(Oa,za,Ra,"ˋ","\\`"),Da(Oa,za,Ra,"ˆ","\\^"),Da(Oa,za,Ra,"˜","\\~"),Da(Oa,za,Ra,"ˉ","\\="),Da(Oa,za,Ra,"˘","\\u"),Da(Oa,za,Ra,"˙","\\."),Da(Oa,za,Ra,"¸","\\c"),Da(Oa,za,Ra,"˚","\\r"),Da(Oa,za,Ra,"ˇ","\\v"),Da(Oa,za,Ra,"¨",'\\"'),Da(Oa,za,Ra,"˝","\\H"),Da(Oa,za,Ra,"◯","\\textcircled");var Ja={"--":!0,"---":!0,"``":!0,"''":!0};Da(Oa,za,Xa,"","--",!0),Da(Oa,za,Xa,"","\\textendash"),Da(Oa,za,Xa,"—","---",!0),Da(Oa,za,Xa,"—","\\textemdash"),Da(Oa,za,Xa,"","`",!0),Da(Oa,za,Xa,"","\\textquoteleft"),Da(Oa,za,Xa,"","'",!0),Da(Oa,za,Xa,"","\\textquoteright"),Da(Oa,za,Xa,"“","``",!0),Da(Oa,za,Xa,"“","\\textquotedblleft"),Da(Oa,za,Xa,"”","''",!0),Da(Oa,za,Xa,"”","\\textquotedblright"),Da(Ha,za,Xa,"°","\\degree",!0),Da(Oa,za,Xa,"°","\\degree"),Da(Oa,za,Xa,"°","\\textdegree",!0),Da(Ha,za,Xa,"£","\\pounds"),Da(Ha,za,Xa,"£","\\mathsterling",!0),Da(Oa,za,Xa,"£","\\pounds"),Da(Oa,za,Xa,"£","\\textsterling",!0),Da(Ha,Za,Xa,"✠","\\maltese"),Da(Oa,Za,Xa,"✠","\\maltese");for(var es='0123456789/@."',ts=0;ts<es.length;ts++){var ns=es.charAt(ts);Da(Ha,za,Xa,ns,ns)}for(var rs='0123456789!@*()-=+";:?/.,',is=0;is<rs.length;is++){var os=rs.charAt(is);Da(Oa,za,Xa,os,os)}for(var as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ss=0;ss<as.length;ss++){var ls=as.charAt(ss);Da(Ha,za,Wa,ls,ls),Da(Oa,za,Xa,ls,ls)}Da(Ha,Za,Xa,"C",""),Da(Oa,Za,Xa,"C",""),Da(Ha,Za,Xa,"H",""),Da(Oa,Za,Xa,"H",""),Da(Ha,Za,Xa,"N",""),Da(Oa,Za,Xa,"N",""),Da(Ha,Za,Xa,"P",""),Da(Oa,Za,Xa,"P",""),Da(Ha,Za,Xa,"Q",""),Da(Oa,Za,Xa,"Q",""),Da(Ha,Za,Xa,"R",""),Da(Oa,Za,Xa,"R",""),Da(Ha,Za,Xa,"Z",""),Da(Oa,Za,Xa,"Z",""),Da(Ha,za,Wa,"h",""),Da(Oa,za,Wa,"h","");for(var cs="",As=0;As<as.length;As++){var us=as.charAt(As);cs=String.fromCharCode(55349,56320+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56372+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56424+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56580+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56736+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56788+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56840+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56944+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),As<26&&(cs=String.fromCharCode(55349,56632+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs),cs=String.fromCharCode(55349,56476+As),Da(Ha,za,Wa,us,cs),Da(Oa,za,Xa,us,cs))}cs=String.fromCharCode(55349,56668),Da(Ha,za,Wa,"k",cs),Da(Oa,za,Xa,"k",cs);for(var ds=0;ds<10;ds++){var hs=ds.toString();cs=String.fromCharCode(55349,57294+ds),Da(Ha,za,Wa,hs,cs),Da(Oa,za,Xa,hs,cs),cs=String.fromCharCode(55349,57314+ds),Da(Ha,za,Wa,hs,cs),Da(Oa,za,Xa,hs,cs),cs=String.fromCharCode(55349,57324+ds),Da(Ha,za,Wa,hs,cs),Da(Oa,za,Xa,hs,cs),cs=String.fromCharCode(55349,57334+ds),Da(Ha,za,Wa,hs,cs),Da(Oa,za,Xa,hs,cs)}for(var ps="ÐÞþ",fs=0;fs<ps.length;fs++){var gs=ps.charAt(fs);Da(Ha,za,Wa,gs,gs),Da(Oa,za,Xa,gs,gs)}var ms=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],vs=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],bs=function(e,t){var n=e.charCodeAt(0),r=e.charCodeAt(1),i=1024*(n-55296)+(r-56320)+65536,o="math"===t?0:1;if(119808<=i&&i<120484){var a=Math.floor((i-119808)/26);return[ms[a][2],ms[a][o]]}if(120782<=i&&i<=120831){var s=Math.floor((i-120782)/10);return[vs[s][2],vs[s][o]]}if(120485===i||120486===i)return[ms[0][2],ms[0][o]];if(120486<i&&i<120782)return["",""];throw new so("Unsupported character: "+e)},ys=function(e,t,n){return Qa[n][e]&&Qa[n][e].replace&&(e=Qa[n][e].replace),{value:e,metrics:la(e,t,n)}},ws=function(e,t,n,r,i){var o,a=ys(e,t,n),s=a.metrics;if(e=a.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new Sa(e,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new Sa(e,0,0,0,0,0,i);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},xs=function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&ys(e,"Main-Bold",t).metrics?ws(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Qa[t][e].font?ws(e,"Main-Regular",t,n,r):ws(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},ks=function(e,t,n,r,i){return"textord"!==i&&ys(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Cs=function(e,t,n){var r=e.mode,i=e.text,o=["mord"],a="math"===r||"text"===r&&t.font,s=a?t.font:t.fontFamily;if(55349===i.charCodeAt(0)){var[l,c]=bs(i,r);return ws(i,l,r,t,o.concat(c))}if(s){var A,u;if("boldsymbol"===s){var d=ks(i,r,t,o,n);A=d.fontName,u=[d.fontClass]}else a?(A=Hs[s].fontName,u=[s]):(A=Ds(s,t.fontWeight,t.fontShape),u=[s,t.fontWeight,t.fontShape]);if(ys(i,A,r).metrics)return ws(i,A,r,t,o.concat(u));if(Ja.hasOwnProperty(i)&&"Typewriter"===A.slice(0,10)){for(var h=[],p=0;p<i.length;p++)h.push(ws(i[p],A,r,t,o.concat(u)));return Is(h)}}if("mathord"===n)return ws(i,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var f=Qa[r][i]&&Qa[r][i].font;if("ams"===f){var g=Ds("amsrm",t.fontWeight,t.fontShape);return ws(i,g,r,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var m=Ds(f,t.fontWeight,t.fontShape);return ws(i,m,r,t,o.concat(m,t.fontWeight,t.fontShape))}var v=Ds("textrm",t.fontWeight,t.fontShape);return ws(i,v,r,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},Bs=(e,t)=>{if(ya(e.classes)!==ya(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},_s=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Sa&&r instanceof Sa&&Bs(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},Es=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var o=e.children[i];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ss=function(e,t,n,r){var i=new Ca(e,t,n,r);return Es(i),i},Fs=(e,t,n,r)=>new Ca(e,t,n,r),Ts=function(e,t,n){var r=Ss([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ba(r.height),r.maxFontSize=1,r},Ms=function(e,t,n,r){var i=new Ba(e,t,n,r);return Es(i),i},Is=function(e){var t=new ra(e);return Es(t),t},Ns=function(e,t){return e instanceof ra?Ss([],[e],t):e},Us=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,o=1;o<t.length;o++){var a=-t[o].shift-i-t[o].elem.depth,s=a-(t[o-1].elem.height+t[o-1].elem.depth);i+=a,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,A=0;A<e.children.length;A++){var u=e.children[A];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var d=e.children[0];if("elem"!==d.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-d.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-d.elem.depth}}return{children:e.children,depth:l}},Ls=function(e,t){for(var{children:n,depth:r}=Us(e),i=0,o=0;o<n.length;o++){var a=n[o];if("elem"===a.type){var s=a.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var l=Ss(["pstrut"],[]);l.style.height=ba(i);for(var c=[],A=r,u=r,d=r,h=0;h<n.length;h++){var p=n[h];if("kern"===p.type)d+=p.size;else{var f=p.elem,g=p.wrapperClasses||[],m=p.wrapperStyle||{},v=Ss(g,[l,f],void 0,m);v.style.top=ba(-i-d-f.depth),p.marginLeft&&(v.style.marginLeft=p.marginLeft),p.marginRight&&(v.style.marginRight=p.marginRight),c.push(v),d+=f.height+f.depth}A=Math.min(A,d),u=Math.max(u,d)}var b,y=Ss(["vlist"],c);if(y.style.height=ba(u),A<0){var w=Ss([],[]),x=Ss(["vlist"],[w]);x.style.height=ba(-A);var k=Ss(["vlist-s"],[new Sa("")]);b=[Ss(["vlist-r"],[y,k]),Ss(["vlist-r"],[x])]}else b=[Ss(["vlist-r"],[y])];var C=Ss(["vlist-t"],b);return 2===b.length&&C.classes.push("vlist-t2"),C.height=u,C.depth=-A,C},Qs=(e,t)=>{var n=Ss(["mspace"],[],t),r=va(e,t);return n.style.marginRight=ba(r),n},Ds=function(e,t,n){var r,i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return r="textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",i+"-"+r},Hs={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Os={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},zs=function(e,t){var[n,r,i]=Os[e],o=new Ta(n),a=new Fa([o],{width:ba(r),height:ba(i),style:"width:"+ba(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),s=Fs(["overlay"],[a],t);return s.height=i,s.style.height=ba(i),s.style.width=ba(r),s},Zs={fontMap:Hs,makeSymbol:ws,mathsym:xs,makeSpan:Ss,makeSvgSpan:Fs,makeLineSpan:Ts,makeAnchor:Ms,makeFragment:Is,wrapFragment:Ns,makeVList:Ls,makeOrd:Cs,makeGlue:Qs,staticSvg:zs,svgData:Os,tryCombineChars:_s},Rs={number:3,unit:"mu"},Ps={number:4,unit:"mu"},qs={number:5,unit:"mu"},Ks={mord:{mop:Rs,mbin:Ps,mrel:qs,minner:Rs},mop:{mord:Rs,mop:Rs,mrel:qs,minner:Rs},mbin:{mord:Ps,mop:Ps,mopen:Ps,minner:Ps},mrel:{mord:qs,mop:qs,mopen:qs,minner:qs},mopen:{},mclose:{mop:Rs,mbin:Ps,mrel:qs,minner:Rs},mpunct:{mord:Rs,mop:Rs,mrel:qs,mopen:Rs,mclose:Rs,mpunct:Rs,minner:Rs},minner:{mord:Rs,mop:Rs,mbin:Ps,mrel:qs,mopen:Rs,mpunct:Rs,minner:Rs}},Ws={mord:{mop:Rs},mop:{mord:Rs,mop:Rs},mbin:{},mrel:{},mopen:{},mclose:{mop:Rs},mpunct:{},minner:{mop:Rs}},js={},Vs={},Gs={};function $s(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:o,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)js[n[l]]=s;t&&(o&&(Vs[t]=o),a&&(Gs[t]=a))}function Ys(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;$s({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Xs=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Js=function(e){return"ordgroup"===e.type?e.body:[e]},el=Zs.makeSpan,tl=["leftmost","mbin","mopen","mrel","mop","mpunct"],nl=["rightmost","mrel","mclose","mpunct"],rl={display:zo.DISPLAY,text:zo.TEXT,script:zo.SCRIPT,scriptscript:zo.SCRIPTSCRIPT},il={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ol=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var i=[],o=0;o<e.length;o++){var a=ul(e[o],t);if(a instanceof ra){var s=a.children;i.push(...s)}else i.push(a)}if(Zs.tryCombineChars(i),!n)return i;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(rl[c.style]))}var A=el([r[0]||"leftmost"],[],t),u=el([r[1]||"rightmost"],[],t),d="root"===n;return al(i,((e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&yo.contains(nl,r)?t.classes[0]="mord":"mbin"===r&&yo.contains(tl,n)&&(e.classes[0]="mord")}),{node:A},u,d),al(i,((e,t)=>{var n=cl(t),r=cl(e),i=n&&r?e.hasClass("mtight")?Ws[n][r]:Ks[n][r]:null;if(i)return Zs.makeGlue(i,l)}),{node:A},u,d),i},al=function e(t,n,r,i,o){i&&t.push(i);for(var a=0;a<t.length;a++){var s=t[a],l=sl(s);if(l)e(l.children,n,r,null,o);else{var c=!s.hasClass("mspace");if(c){var A=n(s,r.node);A&&(r.insertAfter?r.insertAfter(A):(t.unshift(A),a++))}c?r.node=s:o&&s.hasClass("newline")&&(r.node=el(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),a++})(a)}}i&&t.pop()},sl=function(e){return e instanceof ra||e instanceof Ba||e instanceof Ca&&e.hasClass("enclosing")?e:null},ll=function e(t,n){var r=sl(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},cl=function(e,t){return e?(t&&(e=ll(e,t)),il[e.classes[0]]||null):null},Al=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return el(t.concat(n))},ul=function(e,t,n){if(!e)return el();if(Vs[e.type]){var r=Vs[e.type](e,t);if(n&&t.size!==n.size){r=el(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new so("Got group of unknown type: '"+e.type+"'")};function dl(e,t){var n=el(["base"],e,t),r=el(["strut"]);return r.style.height=ba(n.height+n.depth),n.depth&&(r.style.verticalAlign=ba(-n.depth)),n.children.unshift(r),n}function hl(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=ol(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var o,a=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){var c=!1;while(l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline"))l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(a.push(dl(s,t)),s=[])}else i[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(dl(s,t)),s=[]),a.push(i[l]));s.length>0&&a.push(dl(s,t)),n?(o=dl(ol(n,t,!0)),o.classes=["tag"],a.push(o)):r&&a.push(r);var A=el(["katex-html"],a);if(A.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=ba(A.height+A.depth),A.depth&&(u.style.verticalAlign=ba(-A.depth))}return A}function pl(e){return new ra(e)}class fl{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=ya(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=yo.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+yo.escape(ya(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e=>e.toText())).join("")}}class gl{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return yo.escape(this.toText())}toText(){return this.text}}class ml{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"":e>=.1666&&e<=.1667?"":e>=.2222&&e<=.2223?"":e>=.2777&&e<=.2778?"":e>=-.05556&&e<=-.05555?"":e>=-.1667&&e<=-.1666?"":e>=-.2223&&e<=-.2222?"":e>=-.2778&&e<=-.2777?"":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ba(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ba(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var vl={MathNode:fl,TextNode:gl,SpaceNode:ml,newDocumentFragment:pl},bl=function(e,t,n){return!Qa[t][e]||!Qa[t][e].replace||55349===e.charCodeAt(0)||Ja.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Qa[t][e].replace),new vl.TextNode(e)},yl=function(e){return 1===e.length?e[0]:new vl.MathNode("mrow",e)},wl=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;if(yo.contains(["\\imath","\\jmath"],i))return null;Qa[r][i]&&Qa[r][i].replace&&(i=Qa[r][i].replace);var o=Zs.fontMap[n].fontName;return la(i,o,r)?Zs.fontMap[n].variant:null},xl=function(e,t,n){if(1===e.length){var r=Cl(e[0],t);return n&&r instanceof fl&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,o=[],a=0;a<e.length;a++){var s=Cl(e[a],t);if(s instanceof fl&&i instanceof fl){if("mtext"===s.type&&"mtext"===i.type&&s.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...s.children);continue}if("mn"===s.type&&"mn"===i.type){i.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===i.type){var l=s.children[0];if(l instanceof gl&&"."===l.text){i.children.push(...s.children);continue}}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof gl&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var A=s.children[0];A instanceof gl&&A.text.length>0&&(A.text=A.text.slice(0,1)+"̸"+A.text.slice(1),o.pop())}}}o.push(s),i=s}return o},kl=function(e,t,n){return yl(xl(e,t,n))},Cl=function(e,t){if(!e)return new vl.MathNode("mrow");if(Gs[e.type]){var n=Gs[e.type](e,t);return n}throw new so("Got group of unknown type: '"+e.type+"'")};function Bl(e,t,n,r,i){var o,a=xl(e,n);o=1===a.length&&a[0]instanceof fl&&yo.contains(["mrow","mtable"],a[0].type)?a[0]:new vl.MathNode("mrow",a);var s=new vl.MathNode("annotation",[new vl.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new vl.MathNode("semantics",[o,s]),c=new vl.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var A=i?"katex":"katex-mathml";return Zs.makeSpan([A],[c])}var _l=function(e){return new pa({style:e.displayMode?zo.DISPLAY:zo.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},El=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Zs.makeSpan(n,[e])}return e},Sl=function(e,t,n){var r,i=_l(n);if("mathml"===n.output)return Bl(e,t,i,n.displayMode,!0);if("html"===n.output){var o=hl(e,i);r=Zs.makeSpan(["katex"],[o])}else{var a=Bl(e,t,i,n.displayMode,!1),s=hl(e,i);r=Zs.makeSpan(["katex"],[a,s])}return El(r,n)},Fl=function(e,t,n){var r=_l(n),i=hl(e,r),o=Zs.makeSpan(["katex"],[i]);return El(o,n)},Tl={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Ml=function(e){var t=new vl.MathNode("mo",[new vl.TextNode(Tl[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Il={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Nl=function(e){return"ordgroup"===e.type?e.body.length:1},Ul=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(yo.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,o,a,s=e,l=Nl(s.base);if(l>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,a=.42,o=r+"4"):(i=312,n=2340,a=.34,o="tilde4");else{var c=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],a=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],a=[0,.26,.286,.3,.306,.34][c],o="tilde"+c)}var A=new Ta(o),u=new Fa([A],{width:"100%",height:ba(a),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Zs.makeSvgSpan([],[u],t),minWidth:0,height:a}}var d,h,p=[],f=Il[r],[g,m,v]=f,b=v/1e3,y=g.length;if(1===y){var w=f[3];d=["hide-tail"],h=[w]}else if(2===y)d=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==y)throw new Error("Correct katexImagesData or update code here to support\n "+y+" children.");d=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<y;x++){var k=new Ta(g[x]),C=new Fa([k],{width:"400em",height:ba(b),viewBox:"0 0 "+n+" "+v,preserveAspectRatio:h[x]+" slice"}),B=Zs.makeSvgSpan([d[x]],[C],t);if(1===y)return{span:B,minWidth:m,height:b};B.style.height=ba(b),p.push(B)}return{span:Zs.makeSpan(["stretchy"],p,t),minWidth:m,height:b}}var{span:r,minWidth:i,height:o}=n();return r.height=o,r.style.height=ba(o),i>0&&(r.style.minWidth=ba(i)),r},Ll=function(e,t,n,r,i){var o,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Zs.makeSpan(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Ma({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Ma({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Fa(l,{width:"100%",height:ba(a)});o=Zs.makeSvgSpan([],[c],i)}return o.height=a,o.style.height=ba(a),o},Ql={encloseSpan:Ll,mathMLnode:Ml,svgSpan:Ul};function Dl(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Hl(e){var t=Ol(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ol(e){return e&&("atom"===e.type||La.hasOwnProperty(e.type))?e:null}var zl=(e,t)=>{var n,r,i;e&&"supsub"===e.type?(r=Dl(e.base,"accent"),n=r.base,e.base=n,i=Na(ul(e,t)),e.base=r):(r=Dl(e,"accent"),n=r.base);var o=ul(n,t.havingCrampedStyle()),a=r.isShifty&&yo.isCharacterBox(n),s=0;if(a){var l=yo.getBaseElem(n),c=ul(l,t.havingCrampedStyle());s=Ia(c).skew}var A,u="\\c"===r.label,d=u?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)A=Ql.svgSpan(r,t),A=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:A,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+ba(2*s)+")",marginLeft:ba(2*s)}:void 0}]},t);else{var h,p;"\\vec"===r.label?(h=Zs.staticSvg("vec",t),p=Zs.svgData.vec[1]):(h=Zs.makeOrd({mode:r.mode,text:r.label},t,"textord"),h=Ia(h),h.italic=0,p=h.width,u&&(d+=h.depth)),A=Zs.makeSpan(["accent-body"],[h]);var f="\\textcircled"===r.label;f&&(A.classes.push("accent-full"),d=o.height);var g=s;f||(g-=p/2),A.style.left=ba(g),"\\textcircled"===r.label&&(A.style.top=".2em"),A=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:A}]},t)}var m=Zs.makeSpan(["mord","accent"],[A],t);return i?(i.children[0]=m,i.height=Math.max(m.height,i.height),i.classes[0]="mord",i):m},Zl=(e,t)=>{var n=e.isStretchy?Ql.mathMLnode(e.label):new vl.MathNode("mo",[bl(e.label,e.mode)]),r=new vl.MathNode("mover",[Cl(e.base,t),n]);return r.setAttribute("accent","true"),r},Rl=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));$s({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Xs(t[0]),r=!Rl.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:zl,mathmlBuilder:Zl}),$s({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:zl,mathmlBuilder:Zl}),$s({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=ul(e.base,t),r=Ql.svgSpan(e,t),i="\\utilde"===e.label?.12:0,o=Zs.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return Zs.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=Ql.mathMLnode(e.label),r=new vl.MathNode("munder",[Cl(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Pl=e=>{var t=new vl.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};$s({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),o=Zs.wrapFragment(ul(e.body,i,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(a+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),n=Zs.wrapFragment(ul(e.below,i,t),t),n.classes.push(a+"-arrow-pad"));var s,l=Ql.svgSpan(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,A=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(A-=o.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:A},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:u}]},t)}else s=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:A},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Zs.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=Ql.mathMLnode(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=Pl(Cl(e.body,t));if(e.below){var o=Pl(Cl(e.below,t));n=new vl.MathNode("munderover",[r,o,i])}else n=new vl.MathNode("mover",[r,i])}else if(e.below){var a=Pl(Cl(e.below,t));n=new vl.MathNode("munder",[r,a])}else n=Pl(),n=new vl.MathNode("mover",[r,n]);return n}});var ql=Zs.makeSpan;function Kl(e,t){var n=ol(e.body,t,!0);return ql([e.mclass],n,t)}function Wl(e,t){var n,r=xl(e.body,t);return"minner"===e.mclass?n=new vl.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0],n.type="mi"):n=new vl.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new vl.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}$s({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Js(i),isCharacterBox:yo.isCharacterBox(i)}},htmlBuilder:Kl,mathmlBuilder:Wl});var jl=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};$s({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:jl(t[0]),body:Js(t[1]),isCharacterBox:yo.isCharacterBox(t[1])}}}),$s({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:i}=e,o=t[1],a=t[0];n="\\stackrel"!==i?jl(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:Js(o)},l={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===i?null:a,sub:"\\underset"===i?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:yo.isCharacterBox(l)}},htmlBuilder:Kl,mathmlBuilder:Wl}),$s({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:jl(t[0]),body:Js(t[0])}},htmlBuilder(e,t){var n=ol(e.body,t,!0),r=Zs.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=xl(e.body,t),r=new vl.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Vl={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Gl=()=>({type:"styling",body:[],mode:"math",style:"display"}),$l=e=>"textord"===e.type&&"@"===e.text,Yl=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function Xl(e,t,n){var r=Vl[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i=n.callFunction("\\\\cdleft",[t[0]],[]),o={type:"atom",text:r,mode:"math",family:"rel"},a=n.callFunction("\\Big",[o],[]),s=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,s]};return n.callFunction("\\\\cdparent",[l],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Jl(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(1){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new so("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],i=[r],o=0;o<t.length;o++){for(var a=t[o],s=Gl(),l=0;l<a.length;l++)if($l(a[l])){r.push(s),l+=1;var c=Hl(a[l]).text,A=new Array(2);if(A[0]={type:"ordgroup",mode:"math",body:[]},A[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(c)>-1);else{if(!("<>AV".indexOf(c)>-1))throw new so('Expected one of "<>AV=|." after @',a[l]);for(var u=0;u<2;u++){for(var d=!0,h=l+1;h<a.length;h++){if(Yl(a[h],c)){d=!1,l=h;break}if($l(a[h]))throw new so("Missing a "+c+" character to complete a CD arrow.",a[h]);A[u].body.push(a[h])}if(d)throw new so("Missing a "+c+" character to complete a CD arrow.",a[l])}}var p=Xl(c,A,e),f={type:"styling",body:[p],mode:"math",style:"display"};r.push(f),s=Gl()}else s.body.push(a[l]);o%2===0?r.push(s):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var g=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:g,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}$s({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Zs.wrapFragment(ul(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ba(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new vl.MathNode("mrow",[Cl(e.label,t)]);return n=new vl.MathNode("mpadded",[n]),n.setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new vl.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),$s({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Zs.wrapFragment(ul(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new vl.MathNode("mrow",[Cl(e.fragment,t)])}}),$s({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=Dl(t[0],"ordgroup"),i=r.body,o="",a=0;a<i.length;a++){var s=Dl(i[a],"textord");o+=s.text}var l,c=parseInt(o);if(isNaN(c))throw new so("\\@char has non-numeric argument "+o);if(c<0||c>=1114111)throw new so("\\@char with invalid code point "+o);return c<=65535?l=String.fromCharCode(c):(c-=65536,l=String.fromCharCode(55296+(c>>10),56320+(1023&c))),{type:"textord",mode:n.mode,text:l}}});var ec=(e,t)=>{var n=ol(e.body,t.withColor(e.color),!1);return Zs.makeFragment(n)},tc=(e,t)=>{var n=xl(e.body,t.withColor(e.color)),r=new vl.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};$s({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=Dl(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Js(i)}},htmlBuilder:ec,mathmlBuilder:tc}),$s({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=Dl(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:o}},htmlBuilder:ec,mathmlBuilder:tc}),$s({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:i&&Dl(i,"size").value}},htmlBuilder(e,t){var n=Zs.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ba(va(e.size,t)))),n},mathmlBuilder(e,t){var n=new vl.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ba(va(e.size,t)))),n}});var nc={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rc=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new so("Expected a control sequence",e);return t},ic=e=>{var t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t},oc=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};$s({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(nc[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=nc[r.text]),Dl(t.parseFunction(),"internal");throw new so("Invalid token after macro prefix",r)}}),$s({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new so("Expected a control sequence",r);var o,a=0,s=[[]];while("{"!==t.gullet.future().text)if(r=t.gullet.popToken(),"#"===r.text){if("{"===t.gullet.future().text){o=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new so('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new so('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new so("Expected a macro definition");s[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},n===nc[n]),{type:"internal",mode:t.mode}}}),$s({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=rc(t.gullet.popToken());t.gullet.consumeSpaces();var i=ic(t);return oc(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),$s({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=rc(t.gullet.popToken()),i=t.gullet.popToken(),o=t.gullet.popToken();return oc(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var ac=function(e,t,n){var r=Qa.math[e]&&Qa.math[e].replace,i=la(r||e,t,n);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return i},sc=function(e,t,n,r){var i=n.havingBaseStyle(t),o=Zs.makeSpan(r.concat(i.sizingClasses(n)),[e],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},lc=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ba(i),e.height-=i,e.depth+=i},cc=function(e,t,n,r,i,o){var a=Zs.makeSymbol(e,"Main-Regular",i,r),s=sc(a,t,r,o);return n&&lc(s,r,t),s},Ac=function(e,t,n,r){return Zs.makeSymbol(e,"Size"+t+"-Regular",n,r)},uc=function(e,t,n,r,i,o){var a=Ac(e,t,i,r),s=sc(Zs.makeSpan(["delimsizing","size"+t],[a],r),zo.TEXT,r,o);return n&&lc(s,r,zo.TEXT),s},dc=function(e,t,n){var r;r="Size1-Regular"===t?"delim-size1":"delim-size4";var i=Zs.makeSpan(["delimsizinginner",r],[Zs.makeSpan([],[Zs.makeSymbol(e,t,n)])]);return{type:"elem",elem:i}},hc=function(e,t,n){var r=ia["Size4-Regular"][e.charCodeAt(0)]?ia["Size4-Regular"][e.charCodeAt(0)][4]:ia["Size1-Regular"][e.charCodeAt(0)][4],i=new Ta("inner",ea(e,Math.round(1e3*t))),o=new Fa([i],{width:ba(r),height:ba(t),style:"width:"+ba(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=Zs.makeSvgSpan([],[o],n);return a.height=t,a.style.height=ba(t),a.style.width=ba(r),{type:"elem",elem:a}},pc=.008,fc={type:"kern",size:-1*pc},gc=["|","\\lvert","\\rvert","\\vert"],mc=["\\|","\\lVert","\\rVert","\\Vert"],vc=function(e,t,n,r,i,o){var a,s,l,c,A="",u=0;a=l=c=e,s=null;var d="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?a=l="⏐":"\\Downarrow"===e?a=l="‖":"\\updownarrow"===e?(a="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",l="‖",c="\\Downarrow"):yo.contains(gc,e)?(l="",A="vert",u=333):yo.contains(mc,e)?(l="∥",A="doublevert",u=556):"["===e||"\\lbrack"===e?(a="⎡",l="⎢",c="⎣",d="Size4-Regular",A="lbrack",u=667):"]"===e||"\\rbrack"===e?(a="⎤",l="⎥",c="⎦",d="Size4-Regular",A="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=a="⎢",c="⎣",d="Size4-Regular",A="lfloor",u=667):"\\lceil"===e||"⌈"===e?(a="⎡",l=c="⎢",d="Size4-Regular",A="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=a="⎥",c="⎦",d="Size4-Regular",A="rfloor",u=667):"\\rceil"===e||"⌉"===e?(a="⎤",l=c="⎥",d="Size4-Regular",A="rceil",u=667):"("===e||"\\lparen"===e?(a="⎛",l="⎜",c="⎝",d="Size4-Regular",A="lparen",u=875):")"===e||"\\rparen"===e?(a="⎞",l="⎟",c="⎠",d="Size4-Regular",A="rparen",u=875):"\\{"===e||"\\lbrace"===e?(a="⎧",s="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",s="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",c="⎩",l="⎪",d="Size4-Regular");var h=ac(a,d,i),p=h.height+h.depth,f=ac(l,d,i),g=f.height+f.depth,m=ac(c,d,i),v=m.height+m.depth,b=0,y=1;if(null!==s){var w=ac(s,d,i);b=w.height+w.depth,y=2}var x=p+v+b,k=Math.max(0,Math.ceil((t-x)/(y*g))),C=x+k*y*g,B=r.fontMetrics().axisHeight;n&&(B*=r.sizeMultiplier);var _=C/2-B,E=[];if(A.length>0){var S=C-p-v,F=Math.round(1e3*C),T=na(A,Math.round(1e3*S)),M=new Ta(A,T),I=(u/1e3).toFixed(3)+"em",N=(F/1e3).toFixed(3)+"em",U=new Fa([M],{width:I,height:N,viewBox:"0 0 "+u+" "+F}),L=Zs.makeSvgSpan([],[U],r);L.height=F/1e3,L.style.width=I,L.style.height=N,E.push({type:"elem",elem:L})}else{if(E.push(dc(c,d,i)),E.push(fc),null===s){var Q=C-p-v+2*pc;E.push(hc(l,Q,r))}else{var D=(C-p-v-b)/2+2*pc;E.push(hc(l,D,r)),E.push(fc),E.push(dc(s,d,i)),E.push(fc),E.push(hc(l,D,r))}E.push(fc),E.push(dc(a,d,i))}var H=r.havingBaseStyle(zo.TEXT),O=Zs.makeVList({positionType:"bottom",positionData:_,children:E},H);return sc(Zs.makeSpan(["delimsizing","mult"],[O],H),zo.TEXT,r,o)},bc=80,yc=.08,wc=function(e,t,n,r,i){var o=Jo(e,r,n),a=new Ta(e,o),s=new Fa([a],{width:"400em",height:ba(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Zs.makeSvgSpan(["hide-tail"],[s],i)},xc=function(e,t){var n,r,i=t.havingBaseSizing(),o=Ic("\\surd",e*i.sizeMultiplier,Tc,i),a=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,A=0;return"small"===o.type?(A=1e3+1e3*s+bc,e<1?a=1:e<1.4&&(a=.7),l=(1+s+yc)/a,c=(1+s)/a,n=wc("sqrtMain",l,A,s,t),n.style.minWidth="0.853em",r=.833/a):"large"===o.type?(A=(1e3+bc)*_c[o.size],c=(_c[o.size]+s)/a,l=(_c[o.size]+s+yc)/a,n=wc("sqrtSize"+o.size,l,A,s,t),n.style.minWidth="1.02em",r=1/a):(l=e+s+yc,c=e+s,A=Math.floor(1e3*e+s)+bc,n=wc("sqrtTall",l,A,s,t),n.style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=ba(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},kc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Cc=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Bc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],_c=[0,1.2,1.8,2.4,3],Ec=function(e,t,n,r,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),yo.contains(kc,e)||yo.contains(Bc,e))return uc(e,t,!1,n,r,i);if(yo.contains(Cc,e))return vc(e,_c[t],!1,n,r,i);throw new so("Illegal delimiter: '"+e+"'")},Sc=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Fc=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"stack"}],Tc=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Mc=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Ic=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size),o=i;o<n.length;o++){if("stack"===n[o].type)break;var a=ac(e,Mc(n[o]),"math"),s=a.height+a.depth;if("small"===n[o].type){var l=r.havingBaseStyle(n[o].style);s*=l.sizeMultiplier}if(s>t)return n[o]}return n[n.length-1]},Nc=function(e,t,n,r,i,o){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=yo.contains(Bc,e)?Sc:yo.contains(kc,e)?Tc:Fc;var s=Ic(e,t,a,r);return"small"===s.type?cc(e,s.style,n,r,i,o):"large"===s.type?uc(e,s.size,n,r,i,o):vc(e,t,n,r,i,o)},Uc=function(e,t,n,r,i,o){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,l=5/r.fontMetrics().ptPerEm,c=Math.max(t-a,n+a),A=Math.max(c/500*s,2*c-l);return Nc(e,A,!0,r,i,o)},Lc={sqrtImage:xc,sizedDelim:Ec,sizeToMaxHeight:_c,customSizedDelim:Nc,leftRightDelim:Uc},Qc={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Dc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Hc(e,t){var n=Ol(e);if(n&&yo.contains(Dc,n.text))return n;throw new so(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Oc(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}$s({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Hc(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Qc[e.funcName].size,mclass:Qc[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Zs.makeSpan([e.mclass]):Lc.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(bl(e.delim,e.mode));var n=new vl.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=ba(Lc.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),$s({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!==typeof n)throw new so("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Hc(t[0],e).text,color:n}}}),$s({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Hc(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Dl(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{Oc(e);for(var n,r,i=ol(e.body,t,!0,["mopen","mclose"]),o=0,a=0,s=!1,l=0;l<i.length;l++)i[l].isMiddle?s=!0:(o=Math.max(i[l].height,o),a=Math.max(i[l].depth,a));if(o*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?Al(t,["mopen"]):Lc.leftRightDelim(e.left,o,a,t,e.mode,["mopen"]),i.unshift(n),s)for(var c=1;c<i.length;c++){var A=i[c],u=A.isMiddle;u&&(i[c]=Lc.leftRightDelim(u.delim,o,a,u.options,e.mode,[]))}if("."===e.right)r=Al(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=Lc.leftRightDelim(e.right,o,a,d,e.mode,["mclose"])}return i.push(r),Zs.makeSpan(["minner"],i,t)},mathmlBuilder:(e,t)=>{Oc(e);var n=xl(e.body,t);if("."!==e.left){var r=new vl.MathNode("mo",[bl(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new vl.MathNode("mo",[bl(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return yl(n)}}),$s({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Hc(t[0],e);if(!e.parser.leftrightDepth)throw new so("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=Al(t,[]);else{n=Lc.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?bl("|","text"):bl(e.delim,e.mode),r=new vl.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var zc=(e,t)=>{var n,r,i=Zs.wrapFragment(ul(e.body,t),t),o=e.label.slice(1),a=t.sizeMultiplier,s=0,l=yo.isCharacterBox(e.body);if("sout"===o)n=Zs.makeSpan(["stretchy","sout"]),n.height=t.fontMetrics().defaultRuleThickness/a,s=-.5*t.fontMetrics().xHeight;else if("phase"===o){var c=va({number:.6,unit:"pt"},t),A=va({number:.35,unit:"ex"},t),u=t.havingBaseSizing();a/=u.sizeMultiplier;var d=i.height+i.depth+c+A;i.style.paddingLeft=ba(d/2+c);var h=Math.floor(1e3*d*a),p=Yo(h),f=new Fa([new Ta("phase",p)],{width:"400em",height:ba(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});n=Zs.makeSvgSpan(["hide-tail"],[f],t),n.style.height=ba(d),s=i.depth+c+A}else{/cancel/.test(o)?l||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var g=0,m=0,v=0;/box/.test(o)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=t.fontMetrics().fboxsep+("colorbox"===o?0:v),m=g):"angl"===o?(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),g=4*v,m=Math.max(0,.25-i.depth)):(g=l?.2:0,m=g),n=Ql.encloseSpan(i,o,g,m,t),/fbox|boxed|fcolorbox/.test(o)?(n.style.borderStyle="solid",n.style.borderWidth=ba(v)):"angl"===o&&.049!==v&&(n.style.borderTopWidth=ba(v),n.style.borderRightWidth=ba(v)),s=i.depth+m,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)r=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:i,shift:0}]},t);else{var b=/cancel|phase/.test(o)?["svg-align"]:[];r=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:b}]},t)}return/cancel/.test(o)&&(r.height=i.height,r.depth=i.depth),/cancel/.test(o)&&!l?Zs.makeSpan(["mord","cancel-lap"],[r],t):Zs.makeSpan(["mord"],[r],t)},Zc=(e,t)=>{var n=0,r=new vl.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Cl(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};$s({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,o=Dl(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,body:a}},htmlBuilder:zc,mathmlBuilder:Zc}),$s({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,o=Dl(t[0],"color-token").color,a=Dl(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:o,body:s}},htmlBuilder:zc,mathmlBuilder:Zc}),$s({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),$s({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:zc,mathmlBuilder:Zc}),$s({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var Rc={};function Pc(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:o,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)Rc[n[l]]=s;o&&(Vs[t]=o),a&&(Gs[t]=a)}var qc={};function Kc(e,t){qc[e]=t}function Wc(e){var t=[];e.consumeSpaces();var n=e.fetch().text;"\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);while("\\hline"===n||"\\hdashline"===n)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var jc=e=>{var t=e.parser.settings;if(!t.displayMode)throw new so("{"+e.envName+"} can be used only in display mode.")};function Vc(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Gc(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:o,arraystretch:a,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:A,maxNumCols:u,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var h=e.gullet.expandMacroAsText("\\arraystretch");if(null==h)a=1;else if(a=parseFloat(h),!a||a<0)throw new so("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var p=[],f=[p],g=[],m=[],v=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function y(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new ao("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}b(),m.push(Wc(e));while(1){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},n&&(w={type:"styling",mode:e.mode,style:n,body:[w]}),p.push(w);var x=e.fetch().text;if("&"===x){if(u&&p.length===u){if(c||s)throw new so("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===x){y(),1===p.length&&"styling"===w.type&&0===w.body[0].body.length&&(f.length>1||!A)&&f.pop(),m.length<f.length+1&&m.push([]);break}if("\\\\"!==x)throw new so("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),g.push(k?k.value:null),y(),m.push(Wc(e)),p=[],f.push(p),b()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:f,cols:o,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:m,colSeparationType:s,tags:v,leqno:d}}function $c(e){return"d"===e.slice(0,1)?"display":"text"}var Yc=function(e,t){var n,r,i=e.body.length,o=e.hLinesBeforeRow,a=0,s=new Array(i),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),A=1/t.fontMetrics().ptPerEm,u=5*A;if(e.colSeparationType&&"small"===e.colSeparationType){var d=t.havingStyle(zo.SCRIPT).sizeMultiplier;u=d/t.sizeMultiplier*.2778}var h="CD"===e.colSeparationType?va({number:3,unit:"ex"},t):12*A,p=3*A,f=e.arraystretch*h,g=.7*f,m=.3*f,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(b(o[0]),n=0;n<e.body.length;++n){var y=e.body[n],w=g,x=m;a<y.length&&(a=y.length);var k=new Array(y.length);for(r=0;r<y.length;++r){var C=ul(y[r],t);x<C.depth&&(x=C.depth),w<C.height&&(w=C.height),k[r]=C}var B=e.rowGaps[n],_=0;B&&(_=va(B,t),_>0&&(_+=m,x<_&&(x=_),_=0)),e.addJot&&(x+=p),k.height=w,k.depth=x,v+=w,k.pos=v,v+=x+_,s[n]=k,b(o[n+1])}var E,S,F=v/2+t.fontMetrics().axisHeight,T=e.cols||[],M=[],I=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n<i;++n){var N=s[n],U=N.pos-F,L=e.tags[n],Q=void 0;Q=!0===L?Zs.makeSpan(["eqn-num"],[],t):!1===L?Zs.makeSpan([],[],t):Zs.makeSpan([],ol(L,t,!0),t),Q.depth=N.depth,Q.height=N.height,I.push({type:"elem",elem:Q,shift:U})}for(r=0,S=0;r<a||S<T.length;++r,++S){var D=T[S]||{},H=!0;while("separator"===D.type){if(H||(E=Zs.makeSpan(["arraycolsep"],[]),E.style.width=ba(t.fontMetrics().doubleRuleSep),M.push(E)),"|"!==D.separator&&":"!==D.separator)throw new so("Invalid separator type: "+D.separator);var O="|"===D.separator?"solid":"dashed",z=Zs.makeSpan(["vertical-separator"],[],t);z.style.height=ba(v),z.style.borderRightWidth=ba(c),z.style.borderRightStyle=O,z.style.margin="0 "+ba(-c/2);var Z=v-F;Z&&(z.style.verticalAlign=ba(-Z)),M.push(z),S++,D=T[S]||{},H=!1}if(!(r>=a)){var R=void 0;(r>0||e.hskipBeforeAndAfter)&&(R=yo.deflt(D.pregap,u),0!==R&&(E=Zs.makeSpan(["arraycolsep"],[]),E.style.width=ba(R),M.push(E)));var P=[];for(n=0;n<i;++n){var q=s[n],K=q[r];if(K){var W=q.pos-F;K.depth=q.depth,K.height=q.height,P.push({type:"elem",elem:K,shift:W})}}P=Zs.makeVList({positionType:"individualShift",children:P},t),P=Zs.makeSpan(["col-align-"+(D.align||"c")],[P]),M.push(P),(r<a-1||e.hskipBeforeAndAfter)&&(R=yo.deflt(D.postgap,u),0!==R&&(E=Zs.makeSpan(["arraycolsep"],[]),E.style.width=ba(R),M.push(E)))}}if(s=Zs.makeSpan(["mtable"],M),l.length>0){var j=Zs.makeLineSpan("hline",t,c),V=Zs.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:s,shift:0}];while(l.length>0){var $=l.pop(),Y=$.pos-F;$.isDashed?G.push({type:"elem",elem:V,shift:Y}):G.push({type:"elem",elem:j,shift:Y})}s=Zs.makeVList({positionType:"individualShift",children:G},t)}if(0===I.length)return Zs.makeSpan(["mord"],[s],t);var X=Zs.makeVList({positionType:"individualShift",children:I},t);return X=Zs.makeSpan(["tag"],[X],t),Zs.makeFragment([s,X])},Xc={c:"center ",l:"left ",r:"right "},Jc=function(e,t){for(var n=[],r=new vl.MathNode("mtd",[],["mtr-glue"]),i=new vl.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var a=e.body[o],s=[],l=0;l<a.length;l++)s.push(new vl.MathNode("mtd",[Cl(a[l],t)]));e.tags&&e.tags[o]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new vl.MathNode("mtr",s))}var c=new vl.MathNode("mtable",n),A=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",ba(A));var u="",d="";if(e.cols&&e.cols.length>0){var h=e.cols,p="",f=!1,g=0,m=h.length;"separator"===h[0].type&&(u+="top ",g=1),"separator"===h[h.length-1].type&&(u+="bottom ",m-=1);for(var v=g;v<m;v++)"align"===h[v].type?(d+=Xc[h[v].align],f&&(p+="none "),f=!0):"separator"===h[v].type&&f&&(p+="|"===h[v].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",d.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],y="",w=1;w<b.length;w++)y+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",y.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var x="",k=e.hLinesBeforeRow;u+=k[0].length>0?"left ":"",u+=k[k.length-1].length>0?"right ":"";for(var C=1;C<k.length-1;C++)x+=0===k[C].length?"none ":k[C][0]?"dashed ":"solid ";return/[sd]/.test(x)&&c.setAttribute("rowlines",x.trim()),""!==u&&(c=new vl.MathNode("menclose",[c]),c.setAttribute("notation",u.trim())),e.arraystretch&&e.arraystretch<1&&(c=new vl.MathNode("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},eA=function(e,t){-1===e.envName.indexOf("ed")&&jc(e);var n,r=[],i=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,a=Gc(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:Vc(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",A=0;A<t[0].body.length;A++){var u=Dl(t[0].body[A],"textord");c+=u.text}n=Number(c),s=2*n}var d=!s;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=Dl(e[t],"styling"),i=Dl(r.body[0],"ordgroup");i.body.unshift(l)}if(d)s<e.length&&(s=e.length);else{var o=e.length/2;if(n<o)throw new so("Too many math in a row: expected "+n+", but got "+o,e[0])}}));for(var h=0;h<s;++h){var p="r",f=0;h%2===1?p="l":h>0&&d&&(f=1),r[h]={type:"align",align:p,pregap:f,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};Pc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Ol(t[0]),r=n?[t[0]]:Dl(t[0],"ordgroup").body,i=r.map((function(e){var t=Hl(e),n=t.text;if(-1!=="lcr".indexOf(n))return{type:"align",align:n};if("|"===n)return{type:"separator",separator:"|"};if(":"===n)return{type:"separator",separator:":"};throw new so("Unknown column alignment: "+n,e)})),o={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Gc(e.parser,o,$c(e.envName))},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,-1==="lcr".indexOf(n))throw new so("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var o=Gc(e.parser,r,$c(e.envName)),a=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Gc(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Ol(t[0]),r=n?[t[0]]:Dl(t[0],"ordgroup").body,i=r.map((function(e){var t=Hl(e),n=t.text;if(-1!=="lc".indexOf(n))return{type:"align",align:n};throw new so("Unknown column alignment: "+n,e)}));if(i.length>1)throw new so("{subarray} can contain only one column");var o={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Gc(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new so("{subarray} can contain only one column");return o},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Gc(e.parser,t,$c(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:eA,htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){yo.contains(["gather","gather*"],e.envName)&&jc(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Vc(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Gc(e.parser,t,"display")},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:eA,htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){jc(e);var t={autoTag:Vc(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Gc(e.parser,t,"display")},htmlBuilder:Yc,mathmlBuilder:Jc}),Pc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return jc(e),Jl(e.parser)},htmlBuilder:Yc,mathmlBuilder:Jc}),Kc("\\nonumber","\\gdef\\@eqnsw{0}"),Kc("\\notag","\\nonumber"),$s({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new so(e.funcName+" valid only within array environment")}});var tA=Rc;$s({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if("ordgroup"!==i.type)throw new so("Invalid environment name",i);for(var o="",a=0;a<i.body.length;++a)o+=Dl(i.body[a],"textord").text;if("\\begin"===r){if(!tA.hasOwnProperty(o))throw new so("No such environment: "+o,i);var s=tA[o],{args:l,optArgs:c}=n.parseArguments("\\begin{"+o+"}",s),A={mode:n.mode,envName:o,parser:n},u=s.handler(A,l,c);n.expect("\\end",!1);var d=n.nextToken,h=Dl(n.parseFunction(),"environment");if(h.name!==o)throw new so("Mismatch: \\begin{"+o+"} matched by \\end{"+h.name+"}",d);return u}return{type:"environment",mode:n.mode,name:o,nameGroup:i}}});var nA=(e,t)=>{var n=e.font,r=t.withFont(n);return ul(e.body,r)},rA=(e,t)=>{var n=e.font,r=t.withFont(n);return Cl(e.body,r)},iA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};$s({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=Xs(t[0]),o=r;return o in iA&&(o=iA[o]),{type:"font",mode:n.mode,font:o.slice(1),body:i}},htmlBuilder:nA,mathmlBuilder:rA}),$s({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=yo.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:jl(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),$s({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:o}=n,a=n.parseExpression(!0,i),s="math"+r.slice(1);return{type:"font",mode:o,font:s,body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:nA,mathmlBuilder:rA});var oA=(e,t)=>{var n=t;return"display"===e?n=n.id>=zo.SCRIPT.id?n.text():zo.DISPLAY:"text"===e&&n.size===zo.DISPLAY.size?n=zo.TEXT:"script"===e?n=zo.SCRIPT:"scriptscript"===e&&(n=zo.SCRIPTSCRIPT),n},aA=(e,t)=>{var n,r=oA(e.size,t.style),i=r.fracNum(),o=r.fracDen();n=t.havingStyle(i);var a=ul(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<l?l:a.depth}n=t.havingStyle(o);var c,A,u,d,h,p,f,g,m,v,b=ul(e.denom,n,t);if(e.hasBarLine?(e.barSize?(A=va(e.barSize,t),c=Zs.makeLineSpan("frac-line",t,A)):c=Zs.makeLineSpan("frac-line",t),A=c.height,u=c.height):(c=null,A=0,u=t.fontMetrics().defaultRuleThickness),r.size===zo.DISPLAY.size||"display"===e.size?(d=t.fontMetrics().num1,h=A>0?3*u:7*u,p=t.fontMetrics().denom1):(A>0?(d=t.fontMetrics().num2,h=u):(d=t.fontMetrics().num3,h=3*u),p=t.fontMetrics().denom2),c){var y=t.fontMetrics().axisHeight;d-a.depth-(y+.5*A)<h&&(d+=h-(d-a.depth-(y+.5*A))),y-.5*A-(b.height-p)<h&&(p+=h-(y-.5*A-(b.height-p)));var w=-(y-.5*A);f=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:c,shift:w},{type:"elem",elem:a,shift:-d}]},t)}else{var x=d-a.depth-(b.height-p);x<h&&(d+=.5*(h-x),p+=.5*(h-x)),f=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:a,shift:-d}]},t)}return n=t.havingStyle(r),f.height*=n.sizeMultiplier/t.sizeMultiplier,f.depth*=n.sizeMultiplier/t.sizeMultiplier,g=r.size===zo.DISPLAY.size?t.fontMetrics().delim1:r.size===zo.SCRIPTSCRIPT.size?t.havingStyle(zo.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,m=null==e.leftDelim?Al(t,["mopen"]):Lc.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?Zs.makeSpan([]):null==e.rightDelim?Al(t,["mclose"]):Lc.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),Zs.makeSpan(["mord"].concat(n.sizingClasses(t)),[m,Zs.makeSpan(["mfrac"],[f]),v],t)},sA=(e,t)=>{var n=new vl.MathNode("mfrac",[Cl(e.numer,t),Cl(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=va(e.barSize,t);n.setAttribute("linethickness",ba(r))}}else n.setAttribute("linethickness","0px");var i=oA(e.size,t.style);if(i.size!==t.style.size){n=new vl.MathNode("mstyle",[n]);var o=i.size===zo.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new vl.MathNode("mo",[new vl.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var l=new vl.MathNode("mo",[new vl.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return yl(a)}return n};$s({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:i}=e,o=t[0],a=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:a,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:aA,mathmlBuilder:sA}),$s({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],o=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),$s({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var lA=["display","text","script","scriptscript"],cA=function(e){var t=null;return e.length>0&&(t=e,t="."===t?null:t),t};$s({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,i=t[4],o=t[5],a=Xs(t[0]),s="atom"===a.type&&"open"===a.family?cA(a.text):null,l=Xs(t[1]),c="atom"===l.type&&"close"===l.family?cA(l.text):null,A=Dl(t[2],"size"),u=null;A.isBlank?n=!0:(u=A.value,n=u.number>0);var d="auto",h=t[3];if("ordgroup"===h.type){if(h.body.length>0){var p=Dl(h.body[0],"textord");d=lA[Number(p.text)]}}else h=Dl(h,"textord"),d=lA[Number(h.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:n,barSize:u,leftDelim:s,rightDelim:c,size:d}},htmlBuilder:aA,mathmlBuilder:sA}),$s({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Dl(t[0],"size").value,token:i}}}),$s({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],o=vo(Dl(t[1],"infix").size),a=t[2],s=o.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:aA,mathmlBuilder:sA});var AA=(e,t)=>{var n,r,i=t.style;"supsub"===e.type?(n=e.sup?ul(e.sup,t.havingStyle(i.sup()),t):ul(e.sub,t.havingStyle(i.sub()),t),r=Dl(e.base,"horizBrace")):r=Dl(e,"horizBrace");var o,a=ul(r.base,t.havingBaseStyle(zo.DISPLAY)),s=Ql.svgSpan(r,t);if(r.isOver?(o=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t),o.children[0].children[0].children[1].classes.push("svg-align")):(o=Zs.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=Zs.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Zs.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Zs.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)},uA=(e,t)=>{var n=Ql.mathMLnode(e.label);return new vl.MathNode(e.isOver?"mover":"munder",[Cl(e.base,t),n])};$s({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:AA,mathmlBuilder:uA}),$s({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=Dl(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Js(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=ol(e.body,t,!1);return Zs.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=kl(e.body,t);return n instanceof fl||(n=new fl("mrow",[n])),n.setAttribute("href",e.href),n}}),$s({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Dl(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],o=0;o<r.length;o++){var a=r[o];"~"===a&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:Js(s)}}}),$s({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Js(t[0])}},htmlBuilder(e,t){var n=ol(e.body,t,!1);return Zs.makeFragment(n)},mathmlBuilder(e,t){return new vl.MathNode("mrow",xl(e.body,t))}}),$s({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:i,token:o}=e,a=Dl(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=a,n={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,n={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,n={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var c=a.split(","),A=0;A<c.length;A++){var u=c[A].split("=");if(2!==u.length)throw new so("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:Js(s)}:r.formatUnsupportedCmd(i)},htmlBuilder:(e,t)=>{var n=ol(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Zs.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&i.setAttribute(o,e.attributes[o]);return i},mathmlBuilder:(e,t)=>kl(e.body,t)}),$s({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Js(t[0]),mathml:Js(t[1])}},htmlBuilder:(e,t)=>{var n=ol(e.html,t,!1);return Zs.makeFragment(n)},mathmlBuilder:(e,t)=>kl(e.mathml,t)});var dA=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new so("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!ma(n))throw new so("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};$s({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(n[0])for(var l=Dl(n[0],"raw").string,c=l.split(","),A=0;A<c.length;A++){var u=c[A].split("=");if(2===u.length){var d=u[1].trim();switch(u[0].trim()){case"alt":s=d;break;case"width":i=dA(d);break;case"height":o=dA(d);break;case"totalheight":a=dA(d);break;default:throw new so("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var h=Dl(t[0],"url").url;return""===s&&(s=h,s=s.replace(/^.*[\\/]/,""),s=s.substring(0,s.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:s,width:i,height:o,totalheight:a,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=va(e.height,t),r=0;e.totalheight.number>0&&(r=va(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=va(e.width,t));var o={height:ba(n+r)};i>0&&(o.width=ba(i)),r>0&&(o.verticalAlign=ba(-r));var a=new _a(e.src,e.alt,o);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new vl.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=va(e.height,t),i=0;if(e.totalheight.number>0&&(i=va(e.totalheight,t)-r,n.setAttribute("valign",ba(-i))),n.setAttribute("height",ba(r+i)),e.width.number>0){var o=va(e.width,t);n.setAttribute("width",ba(o))}return n.setAttribute("src",e.src),n}}),$s({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=Dl(t[0],"size");if(n.settings.strict){var o="m"===r[1],a="mu"===i.value.unit;o?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Zs.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=va(e.dimension,t);return new vl.SpaceNode(n)}}),$s({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Zs.makeSpan([],[ul(e.body,t)]),n=Zs.makeSpan(["inner"],[n],t)):n=Zs.makeSpan(["inner"],[ul(e.body,t)]);var r=Zs.makeSpan(["fix"],[]),i=Zs.makeSpan([e.alignment],[n,r],t),o=Zs.makeSpan(["strut"]);return o.style.height=ba(i.height+i.depth),i.depth&&(o.style.verticalAlign=ba(-i.depth)),i.children.unshift(o),i=Zs.makeSpan(["thinbox"],[i],t),Zs.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new vl.MathNode("mpadded",[Cl(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),$s({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",a=r.parseExpression(!1,o);return r.expect(o),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}}),$s({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new so("Mismatched "+e.funcName)}});var hA=(e,t)=>{switch(t.style.size){case zo.DISPLAY.size:return e.display;case zo.TEXT.size:return e.text;case zo.SCRIPT.size:return e.script;case zo.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};$s({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Js(t[0]),text:Js(t[1]),script:Js(t[2]),scriptscript:Js(t[3])}},htmlBuilder:(e,t)=>{var n=hA(e,t),r=ol(n,t,!1);return Zs.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=hA(e,t);return kl(n,t)}});var pA=(e,t,n,r,i,o,a)=>{e=Zs.makeSpan([],[e]);var s,l,c,A=n&&yo.isCharacterBox(n);if(t){var u=ul(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=ul(n,r.havingStyle(i.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&s){var h=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;c=Zs.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:ba(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:ba(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var p=e.height-a;c=Zs.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:ba(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var f=e.depth+a;c=Zs.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:ba(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(s&&0!==o&&!A){var m=Zs.makeSpan(["mspace"],[],r);m.style.marginRight=ba(o),g.unshift(m)}return Zs.makeSpan(["mop","op-limits"],g,r)},fA=["\\smallint"],gA=(e,t)=>{var n,r,i,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=Dl(e.base,"op"),o=!0):i=Dl(e,"op");var a,s=t.style,l=!1;if(s.size===zo.DISPLAY.size&&i.symbol&&!yo.contains(fA,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",A="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(A=i.name.slice(1),i.name="oiint"===A?"\\iint":"\\iiint"),a=Zs.makeSymbol(i.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),A.length>0){var u=a.italic,d=Zs.staticSvg(A+"Size"+(l?"2":"1"),t);a=Zs.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},t),i.name="\\"+A,a.classes.unshift("mop"),a.italic=u}}else if(i.body){var h=ol(i.body,t,!0);1===h.length&&h[0]instanceof Sa?(a=h[0],a.classes[0]="mop"):a=Zs.makeSpan(["mop"],h,t)}else{for(var p=[],f=1;f<i.name.length;f++)p.push(Zs.mathsym(i.name[f],i.mode,t));a=Zs.makeSpan(["mop"],p,t)}var g=0,m=0;return(a instanceof Sa||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(g=(a.height-a.depth)/2-t.fontMetrics().axisHeight,m=a.italic),o?pA(a,n,r,t,s,m,g):(g&&(a.style.position="relative",a.style.top=ba(g)),a)},mA=(e,t)=>{var n;if(e.symbol)n=new fl("mo",[bl(e.name,e.mode)]),yo.contains(fA,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new fl("mo",xl(e.body,t));else{n=new fl("mi",[new gl(e.name.slice(1))]);var r=new fl("mo",[bl("","text")]);n=e.parentIsSupSub?new fl("mrow",[n,r]):pl([n,r])}return n},vA={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};$s({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return 1===i.length&&(i=vA[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:gA,mathmlBuilder:mA}),$s({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Js(r)}},htmlBuilder:gA,mathmlBuilder:mA});var bA={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};$s({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gA,mathmlBuilder:mA}),$s({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gA,mathmlBuilder:mA}),$s({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=bA[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:gA,mathmlBuilder:mA});var yA=(e,t)=>{var n,r,i,o,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=Dl(e.base,"operatorname"),a=!0):i=Dl(e,"operatorname"),i.body.length>0){for(var s=i.body.map((e=>{var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ol(s,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var A=l[c];A instanceof Sa&&(A.text=A.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Zs.makeSpan(["mop"],l,t)}else o=Zs.makeSpan(["mop"],[],t);return a?pA(o,n,r,t,t.style,0,0):o},wA=(e,t)=>{for(var n=xl(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var o=n[i];if(o instanceof vl.SpaceNode);else if(o instanceof vl.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=o.children[0];1===o.children.length&&a instanceof vl.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((e=>e.toText())).join("");n=[new vl.TextNode(s)]}var l=new vl.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new vl.MathNode("mo",[bl("","text")]);return e.parentIsSupSub?new vl.MathNode("mrow",[l,c]):vl.newDocumentFragment([l,c])};function xA(e,t,n){for(var r=ol(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var a=r[o].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[a+1]==="reset-size"+t.size&&(r[o].classes[a+1]="reset-size"+n.size),r[o].height*=i,r[o].depth*=i}return Zs.makeFragment(r)}$s({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Js(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:yA,mathmlBuilder:wA}),Kc("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ys({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Zs.makeFragment(ol(e.body,t,!1)):Zs.makeSpan(["mord"],ol(e.body,t,!0),t)},mathmlBuilder(e,t){return kl(e.body,t,!0)}}),$s({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=ul(e.body,t.havingCrampedStyle()),r=Zs.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,o=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Zs.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new vl.MathNode("mo",[new vl.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new vl.MathNode("mover",[Cl(e.body,t),n]);return r.setAttribute("accent","true"),r}}),$s({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Js(r)}},htmlBuilder:(e,t)=>{var n=ol(e.body,t.withPhantom(),!1);return Zs.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=xl(e.body,t);return new vl.MathNode("mphantom",n)}}),$s({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Zs.makeSpan([],[ul(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Zs.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=xl(Js(e.body),t),r=new vl.MathNode("mphantom",n),i=new vl.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),$s({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Zs.makeSpan(["inner"],[ul(e.body,t.withPhantom())]),r=Zs.makeSpan(["fix"],[]);return Zs.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=xl(Js(e.body),t),r=new vl.MathNode("mphantom",n),i=new vl.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),$s({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Dl(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=ul(e.body,t),r=va(e.dy,t);return Zs.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new vl.MathNode("mpadded",[Cl(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),$s({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),$s({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],o=Dl(t[0],"size"),a=Dl(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&Dl(i,"size").value,width:o.value,height:a.value}},htmlBuilder(e,t){var n=Zs.makeSpan(["mord","rule"],[],t),r=va(e.width,t),i=va(e.height,t),o=e.shift?va(e.shift,t):0;return n.style.borderRightWidth=ba(r),n.style.borderTopWidth=ba(i),n.style.bottom=ba(o),n.width=r,n.height=i+o,n.depth=-o,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=va(e.width,t),r=va(e.height,t),i=e.shift?va(e.shift,t):0,o=t.color&&t.getColor()||"black",a=new vl.MathNode("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",ba(n)),a.setAttribute("height",ba(r));var s=new vl.MathNode("mpadded",[a]);return i>=0?s.setAttribute("height",ba(i)):(s.setAttribute("height",ba(i)),s.setAttribute("depth",ba(-i))),s.setAttribute("voffset",ba(i)),s}});var kA=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],CA=(e,t)=>{var n=t.havingSize(e.size);return xA(e.body,n,t)};$s({type:"sizing",names:kA,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,o=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:kA.indexOf(r)+1,body:o}},htmlBuilder:CA,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=xl(e.body,n),i=new vl.MathNode("mstyle",r);return i.setAttribute("mathsize",ba(n.sizeMultiplier)),i}}),$s({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,o=!1,a=n[0]&&Dl(n[0],"ordgroup");if(a)for(var s="",l=0;l<a.body.length;++l){var c=a.body[l];if(s=c.text,"t"===s)i=!0;else{if("b"!==s){i=!1,o=!1;break}o=!0}}else i=!0,o=!0;var A=t[0];return{type:"smash",mode:r.mode,body:A,smashHeight:i,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Zs.makeSpan([],[ul(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var i=0;i<n.children.length;i++)n.children[i].depth=0;var o=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Zs.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var n=new vl.MathNode("mpadded",[Cl(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),$s({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:i}},htmlBuilder(e,t){var n=ul(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Zs.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,o=i;t.style.id<zo.TEXT.id&&(o=t.fontMetrics().xHeight);var a=i+o/4,s=n.height+n.depth+a+i,{span:l,ruleWidth:c,advanceWidth:A}=Lc.sqrtImage(s,t),u=l.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=l.height-n.height-a-c;n.style.paddingLeft=ba(A);var h=Zs.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var p=t.havingStyle(zo.SCRIPTSCRIPT),f=ul(e.index,p,t),g=.6*(h.height-h.depth),m=Zs.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),v=Zs.makeSpan(["root"],[m]);return Zs.makeSpan(["mord","sqrt"],[v,h],t)}return Zs.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new vl.MathNode("mroot",[Cl(n,t),Cl(r,t)]):new vl.MathNode("msqrt",[Cl(n,t)])}});var BA={display:zo.DISPLAY,text:zo.TEXT,script:zo.SCRIPT,scriptscript:zo.SCRIPTSCRIPT};$s({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,o=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:o}},htmlBuilder(e,t){var n=BA[e.style],r=t.havingStyle(n).withFont("");return xA(e.body,r,t)},mathmlBuilder(e,t){var n=BA[e.style],r=t.havingStyle(n),i=xl(e.body,r),o=new vl.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=a[e.style];return o.setAttribute("scriptlevel",s[0]),o.setAttribute("displaystyle",s[1]),o}});var _A=function(e,t){var n=e.base;if(n){if("op"===n.type){var r=n.limits&&(t.style.size===zo.DISPLAY.size||n.alwaysHandleSupSub);return r?gA:null}if("operatorname"===n.type){var i=n.alwaysHandleSupSub&&(t.style.size===zo.DISPLAY.size||n.limits);return i?yA:null}if("accent"===n.type)return yo.isCharacterBox(n.base)?zl:null;if("horizBrace"===n.type){var o=!e.sub;return o===n.isOver?AA:null}return null}return null};Ys({type:"supsub",htmlBuilder(e,t){var n=_A(e,t);if(n)return n(e,t);var r,i,o,{base:a,sup:s,sub:l}=e,c=ul(a,t),A=t.fontMetrics(),u=0,d=0,h=a&&yo.isCharacterBox(a);if(s){var p=t.havingStyle(t.style.sup());r=ul(s,p,t),h||(u=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());i=ul(l,f,t),h||(d=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===zo.DISPLAY?A.sup1:t.style.cramped?A.sup3:A.sup2;var g,m=t.sizeMultiplier,v=ba(.5/A.ptPerEm/m),b=null;if(i){var y=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Sa||y)&&(b=ba(-c.italic))}if(r&&i){u=Math.max(u,o,r.depth+.25*A.xHeight),d=Math.max(d,A.sub2);var w=A.defaultRuleThickness,x=4*w;if(u-r.depth-(i.height-d)<x){d=x-(u-r.depth)+i.height;var k=.8*A.xHeight-(u-r.depth);k>0&&(u+=k,d-=k)}var C=[{type:"elem",elem:i,shift:d,marginRight:v,marginLeft:b},{type:"elem",elem:r,shift:-u,marginRight:v}];g=Zs.makeVList({positionType:"individualShift",children:C},t)}else if(i){d=Math.max(d,A.sub1,i.height-.8*A.xHeight);var B=[{type:"elem",elem:i,marginLeft:b,marginRight:v}];g=Zs.makeVList({positionType:"shift",positionData:d,children:B},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,r.depth+.25*A.xHeight),g=Zs.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:v}]},t)}var _=cl(c,"right")||"mord";return Zs.makeSpan([_],[c,Zs.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r,i=!1;e.base&&"horizBrace"===e.base.type&&(r=!!e.sup,r===e.base.isOver&&(i=!0,n=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,a=[Cl(e.base,t)];if(e.sub&&a.push(Cl(e.sub,t)),e.sup&&a.push(Cl(e.sup,t)),i)o=n?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===zo.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===zo.DISPLAY||s.limits)?"munderover":"msubsup"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===zo.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===zo.DISPLAY)?"munder":"msub"}else{var c=e.base;o=c&&"op"===c.type&&c.limits&&(t.style===zo.DISPLAY||c.alwaysHandleSupSub)||c&&"operatorname"===c.type&&c.alwaysHandleSupSub&&(c.limits||t.style===zo.DISPLAY)?"mover":"msup"}return new vl.MathNode(o,a)}}),Ys({type:"atom",htmlBuilder(e,t){return Zs.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new vl.MathNode("mo",[bl(e.text,e.mode)]);if("bin"===e.family){var r=wl(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var EA={mi:"italic",mn:"normal",mtext:"normal"};Ys({type:"mathord",htmlBuilder(e,t){return Zs.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new vl.MathNode("mi",[bl(e.text,e.mode,t)]),r=wl(e,t)||"italic";return r!==EA[n.type]&&n.setAttribute("mathvariant",r),n}}),Ys({type:"textord",htmlBuilder(e,t){return Zs.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n,r=bl(e.text,e.mode,t),i=wl(e,t)||"normal";return n="text"===e.mode?new vl.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new vl.MathNode("mn",[r]):"\\prime"===e.text?new vl.MathNode("mo",[r]):new vl.MathNode("mi",[r]),i!==EA[n.type]&&n.setAttribute("mathvariant",i),n}});var SA={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},FA={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ys({type:"spacing",htmlBuilder(e,t){if(FA.hasOwnProperty(e.text)){var n=FA[e.text].className||"";if("text"===e.mode){var r=Zs.makeOrd(e,t,"textord");return r.classes.push(n),r}return Zs.makeSpan(["mspace",n],[Zs.mathsym(e.text,e.mode,t)],t)}if(SA.hasOwnProperty(e.text))return Zs.makeSpan(["mspace",SA[e.text]],[],t);throw new so('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var n;if(!FA.hasOwnProperty(e.text)){if(SA.hasOwnProperty(e.text))return new vl.MathNode("mspace");throw new so('Unknown type of space "'+e.text+'"')}return n=new vl.MathNode("mtext",[new vl.TextNode(" ")]),n}});var TA=()=>{var e=new vl.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ys({type:"tag",mathmlBuilder(e,t){var n=new vl.MathNode("mtable",[new vl.MathNode("mtr",[TA(),new vl.MathNode("mtd",[kl(e.body,t)]),TA(),new vl.MathNode("mtd",[kl(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var MA={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},IA={"\\textbf":"textbf","\\textmd":"textmd"},NA={"\\textit":"textit","\\textup":"textup"},UA=(e,t)=>{var n=e.font;return n?MA[n]?t.withTextFontFamily(MA[n]):IA[n]?t.withTextFontWeight(IA[n]):t.withTextFontShape(NA[n]):t};$s({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Js(i),font:r}},htmlBuilder(e,t){var n=UA(e,t),r=ol(e.body,n,!0);return Zs.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=UA(e,t);return kl(e.body,n)}}),$s({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ul(e.body,t),r=Zs.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,o=Zs.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return Zs.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new vl.MathNode("mo",[new vl.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new vl.MathNode("munder",[Cl(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),$s({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=ul(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Zs.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new vl.MathNode("mpadded",[Cl(e.body,t)],["vcenter"])}}),$s({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new so("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=LA(e),r=[],i=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var a=n[o];"~"===a&&(a="\\textasciitilde"),r.push(Zs.makeSymbol(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Zs.makeSpan(["mord","text"].concat(i.sizingClasses(t)),Zs.tryCombineChars(r),i)},mathmlBuilder(e,t){var n=new vl.TextNode(LA(e)),r=new vl.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var LA=e=>e.body.replace(/ /g,e.star?"␣":" "),QA=js,DA="[ \r\n\t]",HA="\\\\[a-zA-Z@]+",OA="\\\\[^\ud800-\udfff]",zA="("+HA+")"+DA+"*",ZA="\\\\(\n|[ \r\t]+\n?)[ \r\t]*",RA="[̀-ͯ]",PA=new RegExp(RA+"+$"),qA="("+DA+"+)|"+ZA+"|([!-\\[\\]-‧‪-퟿豈-￿]"+RA+"*|[\ud800-\udbff][\udc00-\udfff]"+RA+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+zA+"|"+OA+")";class KA{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(qA,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ao("EOF",new oo(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new so("Unexpected character: '"+e[t]+"'",new ao(e[t],new oo(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new ao(r,new oo(this,t,this.tokenRegex.lastIndex))}}class WA{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new so("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var jA=qc;Kc("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Kc("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Kc("\\@firstoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}})),Kc("\\@secondoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}})),Kc("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Kc("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Kc("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var VA={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Kc("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if(n=e.popToken(),"\\"===n.text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new so("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=VA[n.text],null==r||r>=t)throw new so("Invalid base-"+t+" digit "+n.text);var i;while(null!=(i=VA[e.future().text])&&i<t)r*=t,r+=i,e.popToken()}return"\\@char{"+r+"}"}));var GA=(e,t,n)=>{var r=e.consumeArg().tokens;if(1!==r.length)throw new so("\\newcommand's first argument must be a macro name");var i=r[0].text,o=e.isDefined(i);if(o&&!t)throw new so("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!n)throw new so("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(r=e.consumeArg().tokens,1===r.length&&"["===r[0].text){var s="",l=e.expandNextToken();while("]"!==l.text&&"EOF"!==l.text)s+=l.text,l=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new so("Invalid number of arguments: "+s);a=parseInt(s),r=e.consumeArg().tokens}return e.macros.set(i,{tokens:r,numArgs:a}),""};Kc("\\newcommand",(e=>GA(e,!1,!0))),Kc("\\renewcommand",(e=>GA(e,!0,!1))),Kc("\\providecommand",(e=>GA(e,!0,!0))),Kc("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Kc("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Kc("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),QA[n],Qa.math[n],Qa.text[n]),""})),Kc("\\bgroup","{"),Kc("\\egroup","}"),Kc("~","\\nobreakspace"),Kc("\\lq","`"),Kc("\\rq","'"),Kc("\\aa","\\r a"),Kc("\\AA","\\r A"),Kc("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Kc("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Kc("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Kc("","\\mathscr{B}"),Kc("","\\mathscr{E}"),Kc("","\\mathscr{F}"),Kc("","\\mathscr{H}"),Kc("","\\mathscr{I}"),Kc("","\\mathscr{L}"),Kc("","\\mathscr{M}"),Kc("","\\mathscr{R}"),Kc("","\\mathfrak{C}"),Kc("","\\mathfrak{H}"),Kc("","\\mathfrak{Z}"),Kc("\\Bbbk","\\Bbb{k}"),Kc("·","\\cdotp"),Kc("\\llap","\\mathllap{\\textrm{#1}}"),Kc("\\rlap","\\mathrlap{\\textrm{#1}}"),Kc("\\clap","\\mathclap{\\textrm{#1}}"),Kc("\\mathstrut","\\vphantom{(}"),Kc("\\underbar","\\underline{\\text{#1}}"),Kc("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Kc("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Kc("\\ne","\\neq"),Kc("≠","\\neq"),Kc("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Kc("∉","\\notin"),Kc("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Kc("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Kc("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Kc("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Kc("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Kc("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Kc("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Kc("⟂","\\perp"),Kc("‼","\\mathclose{!\\mkern-0.8mu!}"),Kc("∌","\\notni"),Kc("⌜","\\ulcorner"),Kc("⌝","\\urcorner"),Kc("⌞","\\llcorner"),Kc("⌟","\\lrcorner"),Kc("©","\\copyright"),Kc("®","\\textregistered"),Kc("","\\textregistered"),Kc("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Kc("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Kc("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Kc("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Kc("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Kc("⋮","\\vdots"),Kc("\\varGamma","\\mathit{\\Gamma}"),Kc("\\varDelta","\\mathit{\\Delta}"),Kc("\\varTheta","\\mathit{\\Theta}"),Kc("\\varLambda","\\mathit{\\Lambda}"),Kc("\\varXi","\\mathit{\\Xi}"),Kc("\\varPi","\\mathit{\\Pi}"),Kc("\\varSigma","\\mathit{\\Sigma}"),Kc("\\varUpsilon","\\mathit{\\Upsilon}"),Kc("\\varPhi","\\mathit{\\Phi}"),Kc("\\varPsi","\\mathit{\\Psi}"),Kc("\\varOmega","\\mathit{\\Omega}"),Kc("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Kc("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Kc("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Kc("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Kc("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Kc("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var $A={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Kc("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in $A?t=$A[n]:("\\not"===n.slice(0,4)||n in Qa.math&&yo.contains(["bin","rel"],Qa.math[n].group))&&(t="\\dotsb"),t}));var YA={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Kc("\\dotso",(function(e){var t=e.future().text;return t in YA?"\\ldots\\,":"\\ldots"})),Kc("\\dotsc",(function(e){var t=e.future().text;return t in YA&&","!==t?"\\ldots\\,":"\\ldots"})),Kc("\\cdots",(function(e){var t=e.future().text;return t in YA?"\\@cdots\\,":"\\@cdots"})),Kc("\\dotsb","\\cdots"),Kc("\\dotsm","\\cdots"),Kc("\\dotsi","\\!\\cdots"),Kc("\\dotsx","\\ldots\\,"),Kc("\\DOTSI","\\relax"),Kc("\\DOTSB","\\relax"),Kc("\\DOTSX","\\relax"),Kc("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Kc("\\,","\\tmspace+{3mu}{.1667em}"),Kc("\\thinspace","\\,"),Kc("\\>","\\mskip{4mu}"),Kc("\\:","\\tmspace+{4mu}{.2222em}"),Kc("\\medspace","\\:"),Kc("\\;","\\tmspace+{5mu}{.2777em}"),Kc("\\thickspace","\\;"),Kc("\\!","\\tmspace-{3mu}{.1667em}"),Kc("\\negthinspace","\\!"),Kc("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Kc("\\negthickspace","\\tmspace-{5mu}{.277em}"),Kc("\\enspace","\\kern.5em "),Kc("\\enskip","\\hskip.5em\\relax"),Kc("\\quad","\\hskip1em\\relax"),Kc("\\qquad","\\hskip2em\\relax"),Kc("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Kc("\\tag@paren","\\tag@literal{({#1})}"),Kc("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new so("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Kc("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Kc("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Kc("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Kc("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Kc("\\newline","\\\\\\relax"),Kc("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var XA=ba(ia["Main-Regular"]["T".charCodeAt(0)][1]-.7*ia["Main-Regular"]["A".charCodeAt(0)][1]);Kc("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+XA+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Kc("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+XA+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Kc("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Kc("\\@hspace","\\hskip #1\\relax"),Kc("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Kc("\\ordinarycolon",":"),Kc("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Kc("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Kc("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Kc("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Kc("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Kc("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Kc("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Kc("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Kc("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Kc("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Kc("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Kc("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Kc("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Kc("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Kc("∷","\\dblcolon"),Kc("∹","\\eqcolon"),Kc("≔","\\coloneqq"),Kc("≕","\\eqqcolon"),Kc("⩴","\\Coloneqq"),Kc("\\ratio","\\vcentcolon"),Kc("\\coloncolon","\\dblcolon"),Kc("\\colonequals","\\coloneqq"),Kc("\\coloncolonequals","\\Coloneqq"),Kc("\\equalscolon","\\eqqcolon"),Kc("\\equalscoloncolon","\\Eqqcolon"),Kc("\\colonminus","\\coloneq"),Kc("\\coloncolonminus","\\Coloneq"),Kc("\\minuscolon","\\eqcolon"),Kc("\\minuscoloncolon","\\Eqcolon"),Kc("\\coloncolonapprox","\\Colonapprox"),Kc("\\coloncolonsim","\\Colonsim"),Kc("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Kc("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Kc("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Kc("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Kc("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Kc("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Kc("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Kc("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Kc("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Kc("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Kc("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Kc("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Kc("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Kc("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Kc("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Kc("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Kc("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Kc("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Kc("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Kc("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Kc("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Kc("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Kc("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Kc("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Kc("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Kc("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Kc("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Kc("\\imath","\\html@mathml{\\@imath}{ı}"),Kc("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Kc("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Kc("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Kc("⟦","\\llbracket"),Kc("⟧","\\rrbracket"),Kc("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Kc("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Kc("⦃","\\lBrace"),Kc("⦄","\\rBrace"),Kc("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Kc("⦵","\\minuso"),Kc("\\darr","\\downarrow"),Kc("\\dArr","\\Downarrow"),Kc("\\Darr","\\Downarrow"),Kc("\\lang","\\langle"),Kc("\\rang","\\rangle"),Kc("\\uarr","\\uparrow"),Kc("\\uArr","\\Uparrow"),Kc("\\Uarr","\\Uparrow"),Kc("\\N","\\mathbb{N}"),Kc("\\R","\\mathbb{R}"),Kc("\\Z","\\mathbb{Z}"),Kc("\\alef","\\aleph"),Kc("\\alefsym","\\aleph"),Kc("\\Alpha","\\mathrm{A}"),Kc("\\Beta","\\mathrm{B}"),Kc("\\bull","\\bullet"),Kc("\\Chi","\\mathrm{X}"),Kc("\\clubs","\\clubsuit"),Kc("\\cnums","\\mathbb{C}"),Kc("\\Complex","\\mathbb{C}"),Kc("\\Dagger","\\ddagger"),Kc("\\diamonds","\\diamondsuit"),Kc("\\empty","\\emptyset"),Kc("\\Epsilon","\\mathrm{E}"),Kc("\\Eta","\\mathrm{H}"),Kc("\\exist","\\exists"),Kc("\\harr","\\leftrightarrow"),Kc("\\hArr","\\Leftrightarrow"),Kc("\\Harr","\\Leftrightarrow"),Kc("\\hearts","\\heartsuit"),Kc("\\image","\\Im"),Kc("\\infin","\\infty"),Kc("\\Iota","\\mathrm{I}"),Kc("\\isin","\\in"),Kc("\\Kappa","\\mathrm{K}"),Kc("\\larr","\\leftarrow"),Kc("\\lArr","\\Leftarrow"),Kc("\\Larr","\\Leftarrow"),Kc("\\lrarr","\\leftrightarrow"),Kc("\\lrArr","\\Leftrightarrow"),Kc("\\Lrarr","\\Leftrightarrow"),Kc("\\Mu","\\mathrm{M}"),Kc("\\natnums","\\mathbb{N}"),Kc("\\Nu","\\mathrm{N}"),Kc("\\Omicron","\\mathrm{O}"),Kc("\\plusmn","\\pm"),Kc("\\rarr","\\rightarrow"),Kc("\\rArr","\\Rightarrow"),Kc("\\Rarr","\\Rightarrow"),Kc("\\real","\\Re"),Kc("\\reals","\\mathbb{R}"),Kc("\\Reals","\\mathbb{R}"),Kc("\\Rho","\\mathrm{P}"),Kc("\\sdot","\\cdot"),Kc("\\sect","\\S"),Kc("\\spades","\\spadesuit"),Kc("\\sub","\\subset"),Kc("\\sube","\\subseteq"),Kc("\\supe","\\supseteq"),Kc("\\Tau","\\mathrm{T}"),Kc("\\thetasym","\\vartheta"),Kc("\\weierp","\\wp"),Kc("\\Zeta","\\mathrm{Z}"),Kc("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Kc("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Kc("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Kc("\\bra","\\mathinner{\\langle{#1}|}"),Kc("\\ket","\\mathinner{|{#1}\\rangle}"),Kc("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Kc("\\Bra","\\left\\langle#1\\right|"),Kc("\\Ket","\\left|#1\\right\\rangle");var JA=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",a),i.length&&n.macros.set("\\|",s));var o=t;if(!t&&i.length){var l=n.future();"|"===l.text&&(n.popToken(),o=!0)}return{tokens:o?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,A=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:A.reverse(),numArgs:0}};Kc("\\bra@ket",JA(!1)),Kc("\\bra@set",JA(!0)),Kc("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Kc("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Kc("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Kc("\\angln","{\\angl n}"),Kc("\\blue","\\textcolor{##6495ed}{#1}"),Kc("\\orange","\\textcolor{##ffa500}{#1}"),Kc("\\pink","\\textcolor{##ff00af}{#1}"),Kc("\\red","\\textcolor{##df0030}{#1}"),Kc("\\green","\\textcolor{##28ae7b}{#1}"),Kc("\\gray","\\textcolor{gray}{#1}"),Kc("\\purple","\\textcolor{##9d38bd}{#1}"),Kc("\\blueA","\\textcolor{##ccfaff}{#1}"),Kc("\\blueB","\\textcolor{##80f6ff}{#1}"),Kc("\\blueC","\\textcolor{##63d9ea}{#1}"),Kc("\\blueD","\\textcolor{##11accd}{#1}"),Kc("\\blueE","\\textcolor{##0c7f99}{#1}"),Kc("\\tealA","\\textcolor{##94fff5}{#1}"),Kc("\\tealB","\\textcolor{##26edd5}{#1}"),Kc("\\tealC","\\textcolor{##01d1c1}{#1}"),Kc("\\tealD","\\textcolor{##01a995}{#1}"),Kc("\\tealE","\\textcolor{##208170}{#1}"),Kc("\\greenA","\\textcolor{##b6ffb0}{#1}"),Kc("\\greenB","\\textcolor{##8af281}{#1}"),Kc("\\greenC","\\textcolor{##74cf70}{#1}"),Kc("\\greenD","\\textcolor{##1fab54}{#1}"),Kc("\\greenE","\\textcolor{##0d923f}{#1}"),Kc("\\goldA","\\textcolor{##ffd0a9}{#1}"),Kc("\\goldB","\\textcolor{##ffbb71}{#1}"),Kc("\\goldC","\\textcolor{##ff9c39}{#1}"),Kc("\\goldD","\\textcolor{##e07d10}{#1}"),Kc("\\goldE","\\textcolor{##a75a05}{#1}"),Kc("\\redA","\\textcolor{##fca9a9}{#1}"),Kc("\\redB","\\textcolor{##ff8482}{#1}"),Kc("\\redC","\\textcolor{##f9685d}{#1}"),Kc("\\redD","\\textcolor{##e84d39}{#1}"),Kc("\\redE","\\textcolor{##bc2612}{#1}"),Kc("\\maroonA","\\textcolor{##ffbde0}{#1}"),Kc("\\maroonB","\\textcolor{##ff92c6}{#1}"),Kc("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Kc("\\maroonD","\\textcolor{##ca337c}{#1}"),Kc("\\maroonE","\\textcolor{##9e034e}{#1}"),Kc("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Kc("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Kc("\\purpleC","\\textcolor{##aa87ff}{#1}"),Kc("\\purpleD","\\textcolor{##7854ab}{#1}"),Kc("\\purpleE","\\textcolor{##543b78}{#1}"),Kc("\\mintA","\\textcolor{##f5f9e8}{#1}"),Kc("\\mintB","\\textcolor{##edf2df}{#1}"),Kc("\\mintC","\\textcolor{##e0e5cc}{#1}"),Kc("\\grayA","\\textcolor{##f6f7f7}{#1}"),Kc("\\grayB","\\textcolor{##f0f1f2}{#1}"),Kc("\\grayC","\\textcolor{##e3e5e6}{#1}"),Kc("\\grayD","\\textcolor{##d6d8da}{#1}"),Kc("\\grayE","\\textcolor{##babec2}{#1}"),Kc("\\grayF","\\textcolor{##888d93}{#1}"),Kc("\\grayG","\\textcolor{##626569}{#1}"),Kc("\\grayH","\\textcolor{##3b3e40}{#1}"),Kc("\\grayI","\\textcolor{##21242c}{#1}"),Kc("\\kaBlue","\\textcolor{##314453}{#1}"),Kc("\\kaGreen","\\textcolor{##71B307}{#1}");var eu={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class tu{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new WA(jA,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new KA(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ao("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(" "!==e.text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,i=this.future(),o=0,a=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(--o,-1===o)throw new so("Extra }",r)}else if("EOF"===r.text)throw new so("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[a])&&r.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(0!==o||n);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new so("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new so("Use of the macro doesn't match its definition",i)}}for(var o=[],a=0;a<e;a++)o.push(this.consumeArg(t&&t[a+1]).tokens);return o}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new so("Undefined control sequence: "+n);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new so("Too many expansions: infinite loop or need to increase maxExpand setting");var i=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var a=i.length-1;a>=0;--a){var s=i[a];if("#"===s.text){if(0===a)throw new so("Incomplete placeholder at end of macro body",s);if(s=i[--a],"#"===s.text)i.splice(a+1,1);else{if(!/^[1-9]$/.test(s.text))throw new so("Not a valid argument number",s);i.splice(a,2,...o[+s.text-1])}}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ao(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;this.pushTokens(e);while(this.stack.length>n)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"===typeof t?t(this):t;if("string"===typeof r){var i=0;if(-1!==r.indexOf("#")){var o=r.replace(/##/g,"");while(-1!==o.indexOf("#"+(i+1)))++i}var a=new KA(r,this.settings),s=[],l=a.lex();while("EOF"!==l.text)s.push(l),l=a.lex();s.reverse();var c={tokens:s,numArgs:i};return c}return r}isDefined(e){return this.macros.has(e)||QA.hasOwnProperty(e)||Qa.math.hasOwnProperty(e)||Qa.text.hasOwnProperty(e)||eu.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:QA.hasOwnProperty(e)&&!QA[e].primitive}}var nu=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ru=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),iu={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ou={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class au{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new tu(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new so("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ao("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){var n=[];while(1){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==au.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&QA[r.text]&&QA[r.text].infix)break;var i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new so("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var i,o,a,s=e.slice(0,n),l=e.slice(n+1);return i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},a="\\\\abovefrac"===t?this.callFunction(t,[i,e[n],o],[]):this.callFunction(t,[i,o],[]),[a]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new so("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return i}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("text"===this.mode)return r;while(1){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(r&&"op"===r.type){var o="\\limits"===i.text;r.limits=o,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new so("Limit controls must follow a math operator",i);r.alwaysHandleSupSub&&(r.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(t)throw new so("Double superscript",i);t=this.handleSupSubscript("superscript")}else if("_"===i.text){if(n)throw new so("Double subscript",i);n=this.handleSupSubscript("subscript")}else if("'"===i.text){if(t)throw new so("Double superscript",i);var a={type:"textord",mode:this.mode,text:"\\prime"},s=[a];this.consume();while("'"===this.fetch().text)s.push(a),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:s}}else{if(!ru[i.text])break;var l=ru[i.text],c=nu.test(i.text);this.consume();while(1){var A=this.fetch().text;if(!ru[A])break;if(nu.test(A)!==c)break;this.consume(),l+=ru[A]}var u=new au(l,this.settings).parse();c?n={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,i=QA[r];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new so("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!i.allowedInText)throw new so("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===i.allowedInMath)throw new so("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:a}=this.parseArguments(r,i);return this.callFunction(r,o,a,n,e)}callFunction(e,t,n,r,i){var o={funcName:e,parser:this,token:r,breakOnTokenText:i},a=QA[e];if(a&&a.handler)return a.handler(o,t,n);throw new so("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],i=[],o=0;o<n;o++){var a=t.argTypes&&t.argTypes[o],s=o<t.numOptionalArgs;(t.primitive&&null==a||"sqrt"===t.type&&1===o&&null==i[0])&&(a="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",a,s);if(s)i.push(l);else{if(null==l)throw new so("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",n);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(n)throw new so("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new so("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new so("Unknown group type as "+e,this.fetch())}}consumeSpaces(){while(" "===this.fetch().text)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;var r,i="";while("EOF"!==(r=this.fetch()).text)i+=r.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,t){var n,r=this.fetch(),i=r,o="";while("EOF"!==(n=this.fetch()).text&&e.test(o+n.text))i=n,o+=i.text,this.consume();if(""===o)throw new so("Invalid "+t+": '"+r.text+"'",r);return r.range(i,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new so("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"),!t)return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new so("Invalid size: '"+t.text+"'",t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!ma(i))throw new so("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),i=r.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,o),s=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:oo.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(n=this.parseFunction(t,e)||this.parseSymbol(),null==n&&"\\"===i[0]&&!eu.hasOwnProperty(i)){if(this.settings.throwOnError)throw new so("Undefined control sequence: "+i,r);n=this.formatUnsupportedCmd(i),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],i=r.text;"-"===i&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:oo.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:oo.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[n+1].text!==i||(e.splice(n,2,{type:"textord",mode:"text",loc:oo.range(r,e[n+1]),text:i+i}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new so("\\verb assertion failed --\n please report what input caused this bug");return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}ou.hasOwnProperty(t[0])&&!Qa[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ou[t[0]]+t.slice(1));var i,o=PA.exec(t);if(o&&(t=t.substring(0,o.index),"i"===t?t="ı":"j"===t&&(t="ȷ")),Qa[this.mode][t]){this.settings.strict&&"math"===this.mode&&ps.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,s=Qa[this.mode][t].group,l=oo.range(e);if(Ua.hasOwnProperty(s)){var c=s;a={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else a={type:s,mode:this.mode,loc:l,text:t};i=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(qo(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:oo.range(e),text:t}}if(this.consume(),o)for(var A=0;A<o[0].length;A++){var u=o[0][A];if(!iu[u])throw new so("Unknown accent ' "+u+"'",e);var d=iu[u][this.mode]||iu[u].text;if(!d)throw new so("Accent "+u+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:oo.range(e),label:d,isStretchy:!1,isShifty:!0,base:i}}return i}}au.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var su=function(e,t){if(!("string"===typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new au(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new so("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new ao("\\df@tag")])}]}return r},lu=function(e,t,n){t.textContent="";var r=du(e,n).toNode();t.appendChild(r)};"undefined"!==typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!==typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),lu=function(){throw new so("KaTeX doesn't work in quirks mode.")});var cu=function(e,t){var n=du(e,t).toMarkup();return n},Au=function(e,t){var n=new ko(t);return su(e,n)},uu=function(e,t,n){if(n.throwOnError||!(e instanceof so))throw e;var r=Zs.makeSpan(["katex-error"],[new Sa(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},du=function(e,t){var n=new ko(t);try{var r=su(e,n);return Sl(r,e,n)}catch(i){return uu(i,e,n)}},hu=function(e,t){var n=new ko(t);try{var r=su(e,n);return Fl(r,e,n)}catch(i){return uu(i,e,n)}},pu={version:"0.16.8",render:lu,renderToString:cu,ParseError:so,SETTINGS_SCHEMA:wo,__parse:Au,__renderToDomTree:du,__renderToHTMLTree:hu,__setFontMetrics:sa,__defineSymbol:Da,__defineFunction:$s,__defineMacro:Kc,__domTree:{Span:Ca,Anchor:Ba,SymbolNode:Sa,SvgNode:Fa,PathNode:Ta,LineNode:Ma}};const fu=function(e,t,n){let r=n,i=0;const o=e.length;while(r<t.length){const n=t[r];if(i<=0&&t.slice(r,r+o)===e)return r;"\\"===n?r++:"{"===n?i++:"}"===n&&i--,r++}return-1},gu=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},mu=/^\\begin{/,vu=function(e,t){let n;const r=[],i=new RegExp("("+t.map((e=>gu(e.left))).join("|")+")");while(1){if(n=e.search(i),-1===n)break;n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));const o=t.findIndex((t=>e.startsWith(t.left)));if(n=fu(t[o].right,e,t[o].left.length),-1===n)break;const a=e.slice(0,n+t[o].right.length),s=mu.test(a)?a:e.slice(t[o].left.length,n);r.push({type:"math",data:s,rawData:a,display:t[o].display}),e=e.slice(n+t[o].right.length)}return""!==e&&r.push({type:"text",data:e}),r};var bu=vu;const yu=function(e,t){const n=bu(e,t.delimiters);if(1===n.length&&"text"===n[0].type)return null;const r=document.createDocumentFragment();for(let o=0;o<n.length;o++)if("text"===n[o].type)r.appendChild(document.createTextNode(n[o].data));else{const e=document.createElement("span");let a=n[o].data;t.displayMode=n[o].display;try{t.preProcess&&(a=t.preProcess(a)),pu.render(a,e,t)}catch(i){if(!(i instanceof pu.ParseError))throw i;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[o].data+"` with ",i),r.appendChild(document.createTextNode(n[o].rawData));continue}r.appendChild(e)}return r},wu=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let i=r.textContent,o=r.nextSibling,a=0;while(o&&o.nodeType===Node.TEXT_NODE)i+=o.textContent,o=o.nextSibling,a++;const s=yu(i,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ",n=-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")));n&&wu(r,t)}}},xu=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},wu(e,n)};var ku=xu,Cu=n(40521),Bu=n(47922),_u=n(18914),Eu=n(54587);const Su=[{name:"积分",children:["a^2","a_2","a^{2+2}","a_{i,j}","{}_1^2\\!X_3^4","\\overset{\\frown} {AB}","\\overline{hij}","\\underline{klm}","\\overbrace{1+2+\\cdots+100}","\\begin{matrix} 5050 \\\\ \\overbrace{ 1+2+\\cdots+100 }\\end{matrix}","\\underbrace{a+b+\\cdots+z}","\\sum_{k=1}^N k^2","\\begin{matrix} \\sum_{k=1}^N k^2 \\end{matrix}","\\prod_{i=1}^N x_i","\\begin{matrix} \\prod_{i=1}^N x_i \\end{matrix}","\\coprod_{i=1}^N x_i","\\begin{matrix} \\coprod_{i=1}^N x_i \\end{matrix}","\\lim_{n \\to \\infty}x_n","\\begin{matrix} \\ lim_{n \\to \\infty}x_n \\end{matrix}","\\int_{-N}^{N} e^x\\, \\mathrm{d}x","\\begin{matrix} \\int_{_N}^{N} e^x\\, \\mathrm{d}x \\end{matrix}","\\iint_{D}^{W} \\, \\mathrm{d}x\\,\\mathrm{d}y","\\iiint_{E}^{V} \\,\\mathrm{d}x\\,\\mathrm{d}y,\\mathrm{d}z","\\oint_{C} x^3\\, \\mathrm{d}x + 4y^2\\, \\mathrm{d}y","\\bigcap_1^{n} p","\\bigcup_1^{k} p"]},{name:"分隔符",children:["\\left(\\frac{a}{b} \\right)","\\left[\\frac{a}{b} \\right]","\\left\\{\\frac{a}{b} \\right\\}","\\left \\langle \\frac{a}{b} \\right \\rangle","\\left|\\frac{a}{b} \\right|","\\left \\lceil \\frac{c}{d} \\right \\rceil","\\left / \\frac{a}{b} \\right \\backslash","\\left \\Uparrow \\frac{a}{b} \\right \\Downarrow","\\left \\updownarrow \\frac{a}{b} \\right \\Updownarrow","\\left [ 0,1 \\right ) \\left \\langle \\psi \\right |","\\left \\{ \\frac{a}{b} \\right.","\\left . \\frac{a}{b} \\right \\}","\\langle","\\rangle","\\lceil","\\rceil","\\lfloor","\\rfloor","\\lbrace","\\rbrace","\\lvert","\\rvert"]},{name:"函数",children:["\\sin\\theta","\\cos\\theta","\\tan\\theta","\\arcsin\\frac{L}{r}","\\arccos\\frac{T}{r}","\\arctan\\frac{L}{T}","\\sinh g","\\cosh h","\\tanh i","\\coth j","\\operatorname{sh}j","\\operatorname{ch}h","\\operatorname{th}i","\\operatorname{argsh}k","\\operatorname{argch}l","\\operatorname{argth}m","\\limsup S","\\liminf I","\\max H","\\min L","\\inf s","\\sup t","\\exp\\!t","\\ln X","\\lg X","\\log X","\\log_\\alpha X","\\ker x","\\deg x","\\gcd(T,U,V,W,X)","\\Pr x","\\det x","\\hom x","\\arg x","\\dim x","\\lim_{t\\to n}T"]},{name:"微分导数",children:["\\nabla\\psi","\\partial x","\\mathrm{d}x","\\dot x","\\ddot y","X^\\prime","\\backprime","f^{(3)}"]},{name:"运算符",children:["\\pm","\\times","\\div","\\mid","\\nmid","\\cdot","\\circ","\\ast","\\bigodot","\\bigoplus","\\leq","\\geq","\\leqq","\\geqq","=","\\neq","\\approx","\\equiv","\\not\\equiv","\\sum","\\prod","\\coprod","\\backslash","\\sim","\\backsim","\\simeq","\\cong","\\dot=","\\ggg","\\gg",">","<","\\ll","\\lll","\\propto"]},{name:"逻辑符号",children:["、emptyset","\\varnothing","\\in","\\not\\in","\\subset","\\supset","\\subseteq","\\sqsupseteq","\\cap","\\cup","\\bigcup","\\sqcap","\\sqcup","\\uplus","\\biguplus","\\bigsqcup","\\top","\\bot","\\complement","\\vee","\\wedge","\\bigvee","\\bigwedge","\\forall","\\exists","\\not\\subset","\\not=","\\not<","\\not>","\\because","\\therefore","\\neg","\\bar{q} \\to p","\\setminus","\\smallsetminus"]},{name:"几何符号",children:["\\Diamond","\\Box","\\triangle","\\perp","\\angle\\Alpha\\Beta\\Gamma","60^\\circ"]},{name:"戴帽符号",children:["\\vec{c}","\\overleftarrow{ab}","\\overrightarrow{cd}","\\overleftrightarrow{ab}","\\widehat{efg}","\\overset{\\frown} {AB}","\\hat{xyz}","\\tilde{xy}","\\bar{y}","\\widetilde{xyz}","\\acute{y}","\\breve{y}","\\check{y}","\\grave{y}"]},{name:"箭头符号",children:["\\to","\\mapsto","\\underrightarrow{1^circ/min}","\\implies","\\impliedby","\\iff","\\downarrow","\\Uparrow","\\Downarrow","\\leftarrow","\\rightarrow","\\leftrightarrow","\\Leftarrow","\\Rightarrow","\\Leftrightarrow","\\longleftarrow","\\longrightarrow","\\longleftrightarrow","\\Longleftarrow","\\Longrightarrow","\\Longleftrightarrow"]},{name:"特殊符号",children:["\\eth","\\%","\\dagger","\\ddagger","\\star","*","\\ldots","\\smile","\\frown","\\wr"]},{name:"分数多行",children:["\\frac{2}{4}=0.5","{2 \\over 3}","{{a+b} \\over {a-b}}","\\tfrac{2}{4} = 0.5","\\cfrac{2}{c + \\cfrac{2}{d + \\cfrac{2}{4}}} = a","\\begin{matrix}x & y \\\\z & v\\end{matrix}","\\begin{Vmatrix}x & y \\\\z & v\\end{Vmatrix}","\\begin{bmatrix}0& \\cdots & 0\\\\\\vdots & \\ddots & \\vdots \\\\0& \\cdots & 0\\end{bmatrix}","\\begin{Bmatrix}x & y \\\\z & v\\end{Bmatrix}","\\begin{pmatrix}x & y \\\\z & v\\end{pmatrix}","\\begin{cases}3x + 5y + z \\\\7x - 2y + 4z \\\\-6x + 3y + 2z\\end{cases}","\\begin{array}{|c|c||c|} a & b & S \\\\\\hline0&0&1\\\\0&1&1\\\\1&0&1\\\\1&1&0\\\\\\end{array}"]},{name:"希腊字母",children:["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\epsilon","\\zeta","\\eta","\\theta","\\iota","\\kappa","\\lambda","\\mu","\\nu","\\xi","o","\\pi","\\rho","\\sigma","\\tau","\\upsilon","\\phi"]}],Fu={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1};var Tu=n(92269),Mu=n.n(Tu),Iu=(0,Ft.aZ)({name:"math-comp",components:{Modal:Cu.Z,Tabs:Bu.Z,TabPane:_u.Z,Textarea:Eu.Z},props:{value:{type:Object,required:!0},defaultVisible:{type:Boolean,required:!1},change:{type:Function}},setup(e){const{defaultVisible:t,value:n,change:r}={...e},i=(0,Tt.iH)(n.id),o=(0,Tt.iH)(n.width),a=(0,Tt.iH)(n.height),s=(0,Tt.iH)(n.imageUrl),l=(0,Tt.iH)(t),c=(0,Tt.iH)(0);let A=(0,Tt.iH)(Su);const u=(0,Tt.iH)(n.code||""),d=(0,Tt.iH)(""),h=(0,Tt.qj)({start:-1,end:-1});(0,Ft.bv)((()=>{f(0),v()}));const p=e=>{console.log("mathTextareaValue",u.value),(0,Ft.Y3)((()=>{const e=document.querySelector(".content-editor-preview span.katex");Mu()(e,{scale:2}).then((t=>{let n=t.toDataURL("image/svg+xml");s.value=n,o.value=1.2*e.offsetWidth,a.value=1.2*e.offsetHeight,l.value=!1,r&&r({code:u.value,width:o.value,height:a.value,imageUrl:s.value})}))}))},f=e=>{c.value=e,(0,Ft.Y3)((()=>{let e=document.getElementsByClassName("math-model-node");for(let t=0;t<e.length;t++)ku(e[t],Fu)}))},g=e=>{let t=u.value,n=h.start,r=h.end;-1===n&&-1===r&&(n=t.length,r=t.length);const i=t.substring(0,n),o=t.substring(r);u.value=`${i}${e}${o}`,console.log("addTextareaValue",n,r),v()},m=()=>{const e=document.querySelector("textarea.ant-input.content-editor-input");if(!e)return;console.log("setSelection",e.selectionStart,e.selectionEnd);let t=u.value,n=h.start,r=h.end;t.length===n&&t.length===r?(h.start=-1,h.end=-1):(h.start=e.selectionStart,h.end=e.selectionEnd)},v=()=>{if(u.value){const e=document.querySelector(".content-editor-preview");if(!e)return;e.innerHTML=`$$${u.value}$$`,(0,Ft.Y3)((()=>{ku(e,Fu)}))}},b=()=>{m(),v()};return{id:i,width:o,height:a,imageUrl:s,visible:l,activeKey:c,mathTypeList:A,mathTextareaValue:u,mathPreviewValue:d,changePanel:f,addTextareaValue:g,setSelection:m,renderPreview:b,handleOk:p}}}),Nu=n(40089);const Uu=(0,Nu.Z)(Iu,[["render",io]]);var Lu=Uu;const Qu='<span class="draw-icon-edit">\n <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1777" width="16" height="16">\n <path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" fill="#595959"></path>\n </svg>\n</span>';var Du=new WeakMap;class Hu extends s.Zb{constructor(...e){super(...e),qi(this,Du,{writable:!0,value:void 0}),(0,Fe.Z)(this,"vm",void 0),(0,Fe.Z)(this,"defaultVisible",!1)}static get cardName(){return"math"}static get cardType(){return s.eT.INLINE}toolbar(){return!(0,s.iC)(this.editor)||this.editor.readonly?[]:[{type:"node",node:(0,s.$)(Qu),didMount:e=>{e.on("click",(()=>{this.defaultVisible=!0,this.didRender()}))}},{type:"copy"},{type:"delete"}]}render(e){return Gi(this,Du,(0,s.$)("<div>Loading</div>")),this.defaultVisible=e??!1,ji(this,Du)}didRender(){super.didRender();const e=this.getValue();setTimeout((()=>{this.vm=(0,It.ri)(Lu,{value:e,defaultVisible:this.defaultVisible,change:t=>{this.setValue({...e,...t})}}),this.vm.mount(ji(this,Du)?.get())}),20)}destroy(){super.destroy(),this.vm?.unmount()}}var Ou=Hu,zu=class extends s.Sy{static get pluginName(){return"math"}init(){this.editor.on("paser:html",(e=>this.parseHtml(e))),this.editor.on("paste:schema",(e=>this.pasteSchema(e))),this.editor.on("paste:each",(e=>this.pasteHtml(e)))}execute(){if(!(0,s.iC)(this.editor))return;const{card:e}=this.editor;e.insert(Ou.cardName,{code:""},!0)}hotkey(){return this.options.hotkey||"mod+shift+0"}pasteSchema(e){e.add({type:"block",name:"div",attributes:{"data-type":{required:!0,value:Ou.cardName},"data-value":"*"}})}pasteHtml(e){if((0,s.iC)(this.editor)){if(e.isElement()){const t=e.attributes("data-type");if(t===Ou.cardName){const t=e.attributes("data-value"),n=(0,s.RW)(t);return this.editor.card.replaceNode(e,Ou.cardName,n),e.remove(),!1}}return!0}}parseHtml(e){e.find(`[${s.Jr}=${Ou.cardName}`).each((e=>{const t=(0,s.$)(e),n=this.editor.card.find(t),r=n?.getValue();if(r){t.empty();const e=(0,s.$)(`<div \n data-type="${Ou.cardName}"\n data-value="${(0,s.it)(r)}"\n ></div>`);t.replaceWith(e)}else t.remove()}))}},Zu="paste:each",Ru=(0,F.Z)("styleName"),Pu=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.tagName="span",Object.defineProperty((0,E.Z)(e),Ru,{writable:!0,value:"font-family"}),e.style=(0,Fe.Z)({},(0,S.Z)((0,E.Z)(e),Ru)[Ru],"@var0"),e.variable={"@var0":{required:!0,value:"*"}},e.pasteEach=function(t){if(t.name===e.tagName){var n=t.css(),r=n[(0,S.Z)((0,E.Z)(e),Ru)[Ru]];if(!r)return;var i=e.options.filter;if(i){var o=i(r);!1===o?t.css((0,S.Z)((0,E.Z)(e),Ru)[Ru],""):"string"===typeof o&&t.css((0,S.Z)((0,E.Z)(e),Ru)[Ru],o)}else t.css((0,S.Z)((0,E.Z)(e),Ru)[Ru],"");var a=e.editor.node;a.isMark(t)||a.unwrap(t)}},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var e=this.editor;(0,s.iC)(e)&&e.on(Zu,this.pasteEach)}},{key:"isTrigger",value:function(e){var t=this.queryState();return!t||!!e}},{key:"execute",value:function(e){var t=this.editor;if((0,s.iC)(t)){var n=t.change,r=t.mark,i=(0,s.$)("<".concat(this.tagName," />")),o=this.queryState();if(!e||o&&e===o[0])o&&(this.setStyle(i,o[0]),r.unwrap(i));else{if(this.setStyle(i,e),!this.followStyle&&n.range.get().collapsed)return;r.wrap(i)}}}},{key:"hotkey",value:function(){return this.options.hotkey||[]}},{key:"destroy",value:function(){var e=this.editor;(0,s.iC)(e)&&e.off(Zu,this.pasteEach)}}],[{key:"pluginName",get:function(){return"fontfamily"}}]),n}(s.Rw),qu=Pu,Ku=(0,F.Z)("color"),Wu=(0,F.Z)("value"),ju=function(){function e(t){(0,r.Z)(this,e),this.options=void 0,this.container=void 0,Object.defineProperty(this,Ku,{writable:!0,value:void 0}),Object.defineProperty(this,Wu,{writable:!0,value:void 0}),this.options=t}return(0,i.Z)(e,[{key:"focus",value:function(){var e,t;null===(e=this.container)||void 0===e||null===(t=e.find("input").get())||void 0===t||t.focus()}},{key:"change",value:function(){var e=this.options.onChange;e&&e((0,S.Z)(this,Wu)[Wu],(0,S.Z)(this,Ku)[Ku])}},{key:"updateActive",value:function(e){var t,n=null===(t=this.container)||void 0===t?void 0:t.find("svg");null===n||void 0===n||n.css("display","none");var r,i=this.options.colors.findIndex((function(t){return t.background===e.background&&t.color===e.color}));i>-1?null===n||void 0===n||null===(r=n.eq(i))||void 0===r||r.css("display","block"):(0,S.Z)(this,Ku)[Ku]=void 0}},{key:"render",value:function(e,t,n){var r=this;this.destroy(),(0,S.Z)(this,Wu)[Wu]=t,(0,S.Z)(this,Ku)[Ku]=n,this.container=(0,s.$)('<div class="data-card-status-editor'.concat(s.tq?" data-card-status-editor-mobile":"",'" ').concat(s.Zi,'="').concat(s.UI,'" ').concat(s.f4,'="').concat(e,'"></div>'));var i=this.options,o=i.colors,a=i.onBlur,l=i.onFocus,c=i.onOk,A=(0,s.$)('<input value="'.concat(t,'" />'));A.on("focus",(function(){l&&l()})),A.on("blur",(function(){a&&a()})),A.on("input",(function(e){(0,S.Z)(r,Wu)[Wu]=e.target.value,r.change()})),A.on(s.tq?"touchstart":"mousedown",(function(e){}),{passive:!0}),c&&A.on("keydown",(function(e){-1!==[13,27].indexOf(e.keyCode)&&c(e)})),this.container.append(A);var u=(0,s.$)('<div class="data-status-editor-color-panle"></div>');return o.forEach((function(e){var t=(0,s.$)('<span><span style="background-color:'.concat(e.background,'"><svg\n style="fill: ').concat("#8C8C8C"===e.background.toUpperCase()?"#FFFFFF":"#8C8C8C",";\n display: ").concat(e.background===n.background&&e.color===n.color?"block":"none",';"\n viewBox="0 0 18 18"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg></span></span>'));t.on("mousedown",(function(t){t.preventDefault(),(0,S.Z)(r,Ku)[Ku]=e,r.change()})),u.append(t)})),this.container.append(u),this.container}},{key:"destroy",value:function(){var e;null===(e=this.container)||void 0===e||e.remove();var t=this.options.onDestroy;t&&t()}}]),e}();function Vu(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Gu='.am-engine [data-card-key="status"].card-selected:not(.card-activated) [data-card-element="center"] .data-label-container::before\r\n{\r\n content: "";\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background: #1890FF;\r\n opacity: 0.2;\r\n border-radius: 2px;\r\n}\r\n\r\n.am-engine [data-card-key="status"].card-activated ::-moz-selection {\r\n background: transparent !important;\r\n}\r\n\r\n.am-engine [data-card-key="status"].card-activated ::selection {\r\n background: transparent !important;\r\n}\r\n\r\n.data-label-container {\r\n overflow: hidden;\r\n max-width: 200px;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n cursor: pointer;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n user-select: none;\r\n display: inline-block;\r\n border-radius: 4px;\r\n vertical-align: top;\r\n}\r\n\r\n.data-label-container * {\r\n display: inline-block;\r\n}\r\n\r\n.data-label-container .data-label-background {\r\n padding: 0 3px;\r\n}\r\n\r\n.data-label-container.data-label-empty {\r\n opacity: 0.45;\r\n}\r\n\r\n.data-card-status-editor {\r\n outline: none;\r\n width: 162px;\r\n border-radius: 3px 3px;\r\n position: absolute;\r\n border: 1px solid #e8e8e8;\r\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\r\n z-index: 125;\r\n text-indent: 0;\r\n top:0;\r\n padding: 8px;\r\n background: #fff;\r\n}\r\n\r\n.data-card-status-editor-mobile {\r\n width: calc(100vw - 40px);\r\n}\r\n \r\n.data-card-status-editor input {\r\n box-sizing: border-box;\r\n margin: 0;\r\n font-variant: tabular-nums;\r\n list-style: none;\r\n font-feature-settings: "tnum","tnum";\r\n position: relative;\r\n display: inline-block;\r\n width: 100%;\r\n min-width: 0;\r\n padding: 4px 11px;\r\n color: #595959;\r\n font-size: 14px;\r\n line-height: 24px;\r\n background-color: #fff;\r\n background-image: none;\r\n border: 1px solid #d9d9d9;\r\n border-radius: 2px;\r\n transition: all .3s;\r\n}\r\n\r\n.data-card-status-editor input:focus\r\n{\r\n border-color: #5c9dff;\r\n border-right-width: 1px!important;\r\n outline: 0;\r\n box-shadow: 0 0 0 2px rgba(52,126,255,.2)\r\n}\r\n\r\n.data-card-status-editor-mobile input{\r\n min-width:auto;\r\n}\r\n\r\n.data-card-status-editor .data-status-editor-color-panle {\r\n position: relative;\r\n text-align: left;\r\n text-indent: 0;\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: auto;\r\n margin-top: 8px;\r\n}\r\n\r\n.data-status-editor-color-panle > span {\r\n width: 24px;\r\n height: 24px;\r\n display: inline-block;\r\n cursor: pointer;\r\n background-color: rgb(255, 255, 255);\r\n padding: 2px;\r\n border-radius: 3px;\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: transparent;\r\n -o-border-image: initial;\r\n border-image: initial;\r\n flex: 0 0 auto;\r\n}\r\n\r\n.data-status-editor-color-panle > span > span\r\n{\r\n position: relative;\r\n width: 18px;\r\n height: 18px;\r\n display: block;\r\n border-radius: 2px;\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: transparent;\r\n -o-border-image: initial;\r\n border-image: initial;\r\n}\r\n\r\n.data-status-editor-color-panle > span > span > svg {\r\n position: absolute;\r\n top: -1px;\r\n left: 1px;\r\n width: 12px;\r\n height: 12px;\r\n}';Vu(Gu);var $u=(0,F.Z)("position"),Yu=(0,F.Z)("container"),Xu=(0,F.Z)("editorContainer"),Ju=(0,F.Z)("statusEditor"),ed=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),Object.defineProperty((0,E.Z)(e),$u,{writable:!0,value:void 0}),e.defaultColors=[{background:"#FFE8E6",color:"#820014"},{background:"#FCFCCA",color:"#614700"},{background:"#E4F7D2",color:"#135200"},{background:"#E9E9E9",color:"#595959"},{background:"#D4EEFC",color:"#003A8C"},{background:"#DEE8FC",color:"#061178"}],Object.defineProperty((0,E.Z)(e),Yu,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Xu,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Ju,{writable:!0,value:void 0}),e.getMaxWidth=function(){var t=e.editor.block.closest(e.root);return t.get().clientWidth-4},e.onWindowResize=function(){e.updateMaxWidth()},e.updateMaxWidth=function(){var t=e.getMaxWidth();e.root.find(".data-label-container").css("max-width",Math.max(t,0)+"px")},e}return(0,i.Z)(n,[{key:"getColors",value:function(){var e=this.editor.plugin.findPlugin("status");return(null===e||void 0===e?void 0:e.options.colors)||this.defaultColors}},{key:"init",value:function(){var e=this;(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var t=this.editor,r=t.card;(0,S.Z)(this,$u)[$u]||((0,S.Z)(this,$u)[$u]=new s.Ly(t)),(0,S.Z)(this,Ju)[Ju]||((0,S.Z)(this,Ju)[Ju]=new ju({colors:this.getColors(),onChange:function(t,n){n&&e.setColor(n),e.setValue({text:t}),e.updateContent()},onOk:function(t){t.stopPropagation(),t.preventDefault(),r.activate((0,s.$)(document.body)),r.focus(e)},onDestroy:function(){var t;null===(t=(0,S.Z)(e,$u)[$u])||void 0===t||t.destroy()}}))}},{key:"setColor",value:function(e){var t=this.editor.plugin,n=t.findMarkPlugin("backcolor");if(n){var r=n.createElement(e.background);this.executeMark(r,!0)}var i=t.findMarkPlugin("fontcolor");if(i){var o=i.createElement(e.color);this.executeMark(o,!0)}}},{key:"getColor",value:function(){var e,t,n=this.editor.mark,r=this.queryMarks(),i=(null===(e=r.find((function(e){var t;return"backcolor"===(null===(t=n.findPlugin(e))||void 0===t?void 0:t.name)})))||void 0===e?void 0:e.css("background-color"))||"",o=(null===(t=r.find((function(e){var t;return"fontcolor"===(null===(t=n.findPlugin(e))||void 0===t?void 0:t.name)})))||void 0===t?void 0:t.css("color"))||"";return{background:(0,s.NC)(i),color:(0,s.NC)(o)}}},{key:"updateContent",value:function(){var e=this;if((0,S.Z)(this,Yu)[Yu]){var t=this.getValue(),n=t||{text:"",marks:[]},r=n.text,i=n.marks;(0,S.Z)(this,Yu)[Yu].removeClass("data-label-empty"),r||(r=this.editor.language.get("status")["defaultValue"],(0,S.Z)(this,Yu)[Yu].addClass("data-label-empty")),(0,S.Z)(this,Yu)[Yu].html(r);var o=this.getDefaultColor();this.setColor(o),(i||[]).forEach((function(t){e.executeMark((0,s.$)(t),!0)}))}}},{key:"getDefaultColor",value:function(){var e=this.getColors();return e.length>0?e[0]:{background:"#FFFFFF",color:"#222222"}}},{key:"getSelectionNodes",value:function(){return(0,S.Z)(this,Yu)[Yu]?[(0,S.Z)(this,Yu)[Yu]]:[]}},{key:"executeMark",value:function(e,t){var n;if((0,S.Z)(this,Yu)[Yu]){var r=this.editor.mark,i=(0,S.Z)(this,Yu)[Yu].children();if(e)if(t){var o=r.findPlugin(e);"backcolor"===(null===o||void 0===o?void 0:o.name)&&e.addClass("data-label-background"),i.each((function(t,n){var o=i.eq(n);o&&r.wrapByNode(o,e)}));var a=this.queryMarks().map((function(e){var t;return(null===(t=e.clone().get())||void 0===t?void 0:t.outerHTML)||""}));this.setValue({marks:a})}else{var s=r.findPlugin(e);if("backcolor"===(null===s||void 0===s?void 0:s.name))return;r.unwrapByNodes(this.queryMarks(!1),e);var l=this.queryMarks().map((function(e){var t;return(null===(t=e.get())||void 0===t?void 0:t.outerHTML)||""}));this.setValue({marks:l})}else{var c=this.queryMarks(!1),A=!1;r.unwrapByNodes(c.filter((function(e){if(A)return!0;var t=r.findPlugin(e);return"backcolor"!==(null===t||void 0===t?void 0:t.name)||(A=!0,!1)}))),this.setValue({marks:[]})}null===(n=(0,S.Z)(this,Ju)[Ju])||void 0===n||n.updateActive(this.getColor())}}},{key:"queryMarks",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(0,S.Z)(this,Yu)[Yu]?(0,S.Z)(this,Yu)[Yu].allChildren().filter((function(t){return t.isElement()&&e.editor.node.isMark(t)})).map((function(e){if(t){var n=e.clone();return n.removeClass("data-label-background"),n}return e})):[]}},{key:"focusEditor",value:function(){var e;null===(e=(0,S.Z)(this,Ju)[Ju])||void 0===e||e.focus()}},{key:"onActivate",value:function(e){var t;(0,d.Z)((0,h.Z)(n.prototype),"onActivate",this).call(this,e);var r=this.editor;(0,s.iC)(r)&&!r.readonly&&(e?this.renderEditor():null===(t=(0,S.Z)(this,Ju)[Ju])||void 0===t||t.destroy())}},{key:"renderEditor",value:function(){var e,t;if((0,S.Z)(this,Ju)[Ju]){var n=this.getValue();if(n&&n.id){null===(e=(0,S.Z)(this,$u)[$u])||void 0===e||e.destroy();var r=this.getDefaultColor(),i=this.getColor();(0,S.Z)(this,Xu)[Xu]=(0,S.Z)(this,Ju)[Ju].render(n.id,n.text||"",(0,nn.Z)((0,nn.Z)({},r),i)),(0,S.Z)(this,Yu)[Yu]&&(null===(t=(0,S.Z)(this,$u)[$u])||void 0===t||t.bind((0,S.Z)(this,Xu)[Xu],(0,S.Z)(this,Yu)[Yu]))}}}},{key:"render",value:function(){if(!(0,S.Z)(this,Yu)[Yu])return(0,S.Z)(this,Yu)[Yu]=(0,s.$)('<span class="data-label-container"></span>'),this.updateContent(),(0,s.iC)(this.editor)&&(0,S.Z)(this,Yu)[Yu].attributes("draggable","true"),(0,S.Z)(this,Yu)[Yu];this.updateContent()}},{key:"didRender",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this),this.updateMaxWidth(),window.addEventListener("resize",this.onWindowResize),this.editor.on("editor:resize",this.onWindowResize)}},{key:"destroy",value:function(){var e,t;null===(e=(0,S.Z)(this,Ju)[Ju])||void 0===e||e.destroy(),null===(t=(0,S.Z)(this,$u)[$u])||void 0===t||t.destroy(),window.removeEventListener("resize",this.onWindowResize),this.editor.off("editor:resize",this.onWindowResize)}}],[{key:"cardName",get:function(){return"status"}},{key:"cardType",get:function(){return s.eT.INLINE}},{key:"autoSelected",get:function(){return!1}},{key:"selectStyleType",get:function(){return s.dw.NONE}}]),n}(s.Zb),td={status:{defaultValue:"SET A STATUS"}},nd={status:{defaultValue:"设置状态"}},rd={"en-US":td,"zh-CN":nd},id="parse:html",od="paste:each",ad="paste:schema",sd=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.pasteSchema=function(e){e.add({type:"inline",name:"span",attributes:{"data-type":{required:!0,value:ed.cardName},"data-value":"*"}})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.isElement()){var r=t.attributes(),i=r["data-type"];if(i&&i===ed.cardName){var o=r["data-value"],a=(0,s.RW)(o);return n.card.replaceNode(t,ed.cardName,a),t.remove(),!1}}return!0}},e.parseHtml=function(t,n){var r=e.editor,i=[];return t.find("[".concat(s.Jr,'="').concat(ed.cardName,'"],[').concat(s.mV,'="').concat(ed.cardName,'"]')).each((function(e){var t=(0,s.$)(e),o=r.card.find(t),a=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(t.attributes(s.TM));if(null===a||void 0===a?void 0:a.text){var l='<span data-type="'.concat(ed.cardName,'" data-value="').concat((0,s.it)(a),'"></span>'),c=a.marks||[],A=(0,s.$)("<div>".concat(a.text,"</div>")),u=A.first();c.forEach((function(e){var t=(0,s.$)(e);u=r.node.wrap(u,t)})),t.empty();var d=(0,s.$)(l);d.append(u),d.css({"font-weight":400,overflow:"hidden","max-width":"200px","white-space":"nowrap","border-radius":"4px",border:"2px solid transparent",padding:"0 3px","text-overflow":"ellipsis"}),n&&(d=n(d,a)),t.replaceWith(d),i.push(d)}else t.remove()})),i},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.language.add(rd),e.on(id,this.parseHtml),e.on(od,this.pasteHtml),e.on(ad,this.pasteSchema)}},{key:"execute",value:function(){var e=this.editor;if((0,s.iC)(e)){var t=e.card,n=t.insert(ed.cardName);t.activate(n.root),setTimeout((function(){n.focusEditor()}),50)}}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"destroy",value:function(){var e=this.editor;e.off(id,this.parseHtml),e.off(od,this.pasteHtml),e.off(ad,this.pasteSchema)}}],[{key:"pluginName",get:function(){return"status"}}]),n}(s.Sy),ld=sd,cd="paste:each",Ad=(0,F.Z)("styleName"),ud=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),Object.defineProperty((0,E.Z)(e),Ad,{writable:!0,value:"line-height"}),e.pasteEach=function(t){var n=e.editor;if(!t.isCard()&&n.node.isBlock(t)){var r=t.css((0,S.Z)((0,E.Z)(e),Ad)[Ad]);if(!r)return;var i=e.convertToPX(r);r.endsWith("pt")&&t.css((0,S.Z)((0,E.Z)(e),Ad)[Ad],i);var o=e.options.filter;if(o){var a=o(i);!1===a?t.css((0,S.Z)((0,E.Z)(e),Ad)[Ad],""):"string"===typeof a&&t.css((0,S.Z)((0,E.Z)(e),Ad)[Ad],a)}else t.css((0,S.Z)((0,E.Z)(e),Ad)[Ad],"");var s=n.node;s.isBlock(t)||s.unwrap(t)}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.schema.add(this.schema()),(0,s.iC)(e)&&e.on(cd,this.pasteEach)}},{key:"execute",value:function(e){var t=this,n=this.editor;if((0,s.iC)(n)){"default"===e&&(e="");var r=n.change,i=n.block,o=r.range.get(),a=i.findBlocks(o);a&&a.forEach((function(n){t.addLineHeight(n,e)}))}}},{key:"queryState",value:function(){var e=this,t=this.editor;if((0,s.iC)(t)){var n=t.change,r=t.node,i=n.range.get();if(!i.startNode.inEditor())return["default"];var o=n.blocks,a=[];return o.forEach((function(t){if(r.isNestedBlock(t)){var n,i=(null===(n=t.get())||void 0===n?void 0:n.style.lineHeight)||"";if(!i)return;var o=e.convertToPX(i),s=e.options.filter;if(s){var l=s(o);if(!1===l)return;"string"===typeof l?a.push(l):a.push(o)}}})),0===a.length?["default"]:a}}},{key:"addLineHeight",value:function(e,t){var n=this.editor.node;n.isNestedBlock(e)&&(e.css((0,S.Z)(this,Ad)[Ad],t||""),(0,s.iC)(this.editor)&&this.editor.change.apply())}},{key:"schema",value:function(){return{type:"block",attributes:{style:(0,Fe.Z)({},(0,S.Z)(this,Ad)[Ad],"@length")}}}},{key:"convertToPX",value:function(e){var t=/([\d\.]+)(pt|px)$/i.exec(e);return t&&"pt"===t[2]?String(Math.round(96*parseInt(t[1],10)/72))+"px":e}},{key:"destroy",value:function(){this.editor.off(cd,this.pasteEach)}}],[{key:"pluginName",get:function(){return"line-height"}}]),n}(s.Sy),dd=ud,hd=n(62078),pd=n(29662),fd=n.n(pd),gd=(0,F.Z)("position"),md=function(){function e(t,n){var i=this;(0,r.Z)(this,e),this.engine=void 0,this.root=void 0,this.target=void 0,this.otpions=void 0,this.SCOPE_NAME="data-mention-component",Object.defineProperty(this,gd,{writable:!0,value:void 0}),this.renderEmpty=function(){return'<div class="data-mention-item"><span class="data-mention-item-text">Empty Data</span></div>'},this.getPluginOptions=function(){var e=i.engine.plugin.findPlugin("mention");return null===e||void 0===e?void 0:e.options},this.handlePreventDefault=function(e){var t;if(0!==(null===(t=i.root)||void 0===t?void 0:t.closest("body").length))return e.preventDefault(),!1},this.bindItem=function(e,t){var n=i.otpions.onSelect;e.addClass("data-mention-item");var r=t.key,o=t.name;return r?e.attributes({"data-key":(0,s.YU)(r)}):e.removeAttributes("data-key"),e.attributes({"data-name":(0,s.YU)(o)}),e.removeAllEvents(),e.on("click",(function(e){r&&(e.stopPropagation(),e.preventDefault(),n&&n(e,t))}),{once:!0}),e.on("mouseenter",(function(){var t;r&&(null===(t=i.root)||void 0===t||t.find(".data-mention-item-active").removeClass("data-mention-item-active"),e.addClass("data-mention-item-active"))})),e},this.otpions=n,this.engine=t,(0,S.Z)(this,gd)[gd]=new s.Ly(this.engine)}return(0,i.Z)(e,[{key:"select",value:function(e){var t,n,r;null===(t=this.root)||void 0===t||t.find(".data-mention-item-active").removeClass("data-mention-item-active"),null===(n=this.root)||void 0===n||null===(r=n.find(".data-mention-item").eq(e))||void 0===r||r.addClass("data-mention-item-active")}},{key:"scroll",value:function(e){var t;if(this.root){var n=this.root.find(".data-mention-item").toArray();if(0!==n.length){var r=n.find((function(e){return e.hasClass("data-mention-item-active")}))||n[0],i=r;r="up"===e?r.prev():r.next();while(1){if(r||(r="up"===e?n[n.length-1]:n[0]),r.attributes("data-key")||i.equal(r))break;r="up"===e?r.prev():r.next()}r&&r.attributes("data-key")?(this.select(n.findIndex((function(e){return e.equal(r)}))),null===(t=r.get())||void 0===t||t.scrollIntoView({block:"nearest"})):this.select(-1)}}}},{key:"unbindEvents",value:function(){var e;(0,pd.deleteScope)(this.SCOPE_NAME),(0,pd.unbind)("enter",this.SCOPE_NAME),(0,pd.unbind)("up",this.SCOPE_NAME),(0,pd.unbind)("down",this.SCOPE_NAME),(0,pd.unbind)("esc",this.SCOPE_NAME),this.engine.off("keydown:enter",this.handlePreventDefault),null===(e=(0,S.Z)(this,gd)[gd])||void 0===e||e.destroy()}},{key:"bindEvents",value:function(){var e,t=this;this.unbindEvents(),(0,pd.setScope)(this.SCOPE_NAME),fd()("enter",this.SCOPE_NAME,(function(e){var n,r,i;if(0!==(null===(n=t.root)||void 0===n?void 0:n.closest("body").length)){e.preventDefault(),e.stopImmediatePropagation();var o=null===(r=t.root)||void 0===r?void 0:r.find(".data-mention-item-active");null===o||void 0===o||null===(i=o.get())||void 0===i||i.click()}})),fd()("up",this.SCOPE_NAME,(function(e){var n;0!==(null===(n=t.root)||void 0===n?void 0:n.closest("body").length)&&(e.preventDefault(),t.scroll("up"))})),fd()("down",this.SCOPE_NAME,(function(e){var n;0!==(null===(n=t.root)||void 0===n?void 0:n.closest("body").length)&&(e.preventDefault(),t.scroll("down"))})),fd()("esc",this.SCOPE_NAME,(function(e){e.preventDefault(),t.unbindEvents();var n=t.otpions.onCancel;n&&n()})),this.engine.on("keydown:enter",this.handlePreventDefault),this.root&&this.target&&0!==this.target.length&&(null===(e=(0,S.Z)(this,gd)[gd])||void 0===e||e.bind(this.root,this.target))}},{key:"remove",value:function(){this.root&&0!==this.root.length&&(this.unbindEvents(),this.root.remove(),this.root=void 0)}},{key:"renderTemplate",value:function(e){var t=e.name,n=e.avatar;return'<div class="data-mention-item">\n '.concat(n?'<span class="data-mention-item-avatar"><img src="'.concat(n,'" /></span>'):"",'\n <span class="data-mention-item-text">').concat((0,s.AK)(t),"</span>\n </div>")}},{key:"getBody",value:function(){var e;return null===(e=this.root)||void 0===e?void 0:e.find(".data-mention-component-body")}},{key:"createRoot",value:function(){this.root=(0,s.$)('<div class="data-mention-component-list" '.concat(s.Zi,'="').concat(s.UI,'"><div class="data-mention-component-body"></div></div>'))}},{key:"renderRootEmpty",value:function(){var e,t,n,r=this.getBody(),i=null===r||void 0===r?void 0:r.children();r&&r.length>0&&(0===(null===i||void 0===i?void 0:i.length)||1===(null===i||void 0===i?void 0:i.length)&&(null===(e=i.eq(0))||void 0===e?void 0:e.hasClass("data-scrollbar")))?null===(t=this.root)||void 0===t||t.addClass("data-mention-component-empty"):null===(n=this.root)||void 0===n||n.removeClass("data-mention-component-empty")}},{key:"render",value:function(e,t){var n=this;if(this.root||this.createRoot(),this.root){this.target=e;var r,i=this.getBody(),o=null,a=this.getPluginOptions();if("boolean"===typeof t&&!0===t)o=(null===a||void 0===a?void 0:a.onLoading)?a.onLoading(this.root):this.engine.trigger("mention:loading",this.root),i=this.getBody(),o&&(null===(r=i)||void 0===r||r.empty().append(o));else if(0===t.filter((function(e){return!!e.key})).length){var l,c=this.engine.trigger("mention:empty",this.root)||((null===a||void 0===a?void 0:a.onEmpty)?null===a||void 0===a?void 0:a.onEmpty(this.root):this.renderEmpty(this.root));i=this.getBody(),c&&(null===(l=i)||void 0===l||l.empty().append(c))}else{if((null===a||void 0===a?void 0:a.onRender)||(o=this.engine.trigger("mention:render",this.root,t,this.bindItem)))return((null===a||void 0===a?void 0:a.onRender)?a.onRender(this.root,t,this.bindItem):o).then((function(e){var t=n.getBody();e&&(null===t||void 0===t||t.empty().append(e)),n.select(0),n.bindEvents()})),void this.renderRootEmpty();var A;i&&0!==i.length||(this.createRoot(),i=this.getBody()),null===(A=i)||void 0===A||A.empty(),t.forEach((function(e){var t,r=n.engine.trigger("mention:render-item",e,n.root),o=r||((null===a||void 0===a?void 0:a.onRenderItem)?a.onRenderItem(e,n.root):n.renderTemplate(e));o&&(null===(t=i)||void 0===t||t.append(n.bindItem((0,s.$)(o),e)))})),this.select(0)}this.renderRootEmpty(),this.bindEvents()}}}]),e}();function vd(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var bd='.am-engine .data-mention-component, .am-engine-view .data-mention-component {\n color: #1890ff !important;\n cursor: pointer;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n display: inline-block;\n vertical-align: top;\n}\n\n.am-engine [data-card-key="mention"].card-selected [data-card-element="center"].data-card-border-selected {\n outline: 0 none;\n}\n\n.am-engine [data-card-key="mention"].card-activated ::-moz-selection {\n background: transparent !important;\n}\n\n.am-engine [data-card-key="mention"].card-activated ::selection {\n background: transparent !important;\n}\n\n.data-mention-component-list {\n position: absolute;\n font-size: 12px;\n background: #ffffff;\n border: 1px solid #e8e8e8;\n border-radius: 3px 3px;\n box-shadow: 0 2px 10px rgb(0 0 0 / 12%);\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n z-index: 999;\n overflow: hidden;\n padding: 5px 0;\n max-width: 250px;\n}\n\n.data-mention-component-empty {\n padding: 0;\n box-shadow: none;\n border: none;\n}\n\n.data-mention-component-body {\n max-height: calc(40vh);\n overflow-y: auto;\n}\n\n.data-mention-component-placeholder {\n color: rgba(0,0,0,0.25);\n pointer-events: none;\n min-width: 78px;\n}\n\n.data-mention-item {\n display: flex;\n cursor: pointer;\n padding: 4px 16px;\n min-width: 160px;\n align-items: center;\n}\n\n.data-mention-item .data-mention-item-text {\n display: block;\n text-align: left;\n margin-left: 8px;\n color: #595959;\n line-height: 24px;\n font-size: 14px;\n font-weight: normal;\n}\n\n.data-mention-item.data-mention-item-active {\n background-color: #f4f4f4;\n}\n\n.data-mention-item-avatar img {\n max-width: 38px;\n}\n\n.data-mention-component-body.data-scrollable.scroll-y {\n padding-right: 0 !important;\n}\n\n.data-mention-hover-layout {\n position: absolute;\n font-size: 12px;\n background: #ffffff;\n border: 1px solid #e8e8e8;\n border-radius: 3px 3px;\n box-shadow: 0 2px 10px rgb(0 0 0 / 12%);\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n z-index: 999;\n}\n';vd(bd);var yd=["id","key","name","marks","type"],wd=["id","key","name"],xd=(0,F.Z)("container"),kd=(0,F.Z)("keyword"),Cd=(0,F.Z)("placeholder"),Bd=(0,F.Z)("position"),_d=(0,F.Z)("showTimeout"),Ed=(0,F.Z)("hideTimeout"),Sd=(0,F.Z)("enterLayout"),Fd=(0,F.Z)("request"),Td=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.component=void 0,Object.defineProperty((0,E.Z)(e),xd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),kd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Cd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Bd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),_d,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Ed,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Sd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(e),Fd,{writable:!0,value:void 0}),e.getMaxWidth=function(){var t=e.editor.block.closest(e.root);return t.get().clientWidth-4},e.onWindowResize=function(){e.updateMaxWidth()},e.updateMaxWidth=function(){var t,n=e.getMaxWidth();null===(t=(0,S.Z)((0,E.Z)(e),xd)[xd])||void 0===t||t.css("max-width",Math.max(n,0)+"px")},e.getPluginOptions=function(){var t=e.editor.plugin.findPlugin("mention");return null===t||void 0===t?void 0:t.options},e.search=function(t){var n=e.getPluginOptions(),r=e.editor;if(n&&n.onSearch)return n.onSearch(t);var i=r.trigger("mention:search",t);if(void 0!==i)return i;var o=r.request;return new Promise((function(r){if(null===n||void 0===n?void 0:n.action){var i,a=n.type,s=n.contentType,l=n.parse,c=n.headers;null===(i=(0,S.Z)((0,E.Z)(e),Fd)[Fd])||void 0===i||i.abort(),(0,S.Z)((0,E.Z)(e),Fd)[Fd]=o.ajax({url:n.action,contentType:s||"",type:void 0===a?"json":a,data:{keyword:t},headers:c,success:function(e){var t=l?l(e):e,n=t.result,i=t.data;n&&r(i)},method:"GET"})}else r([])}))},e.hideEnter=function(){(0,S.Z)((0,E.Z)(e),Ed)[Ed]=setTimeout((function(){var t,n;null===(t=(0,S.Z)((0,E.Z)(e),Bd)[Bd])||void 0===t||t.destroy(),null===(n=(0,S.Z)((0,E.Z)(e),Sd)[Sd])||void 0===n||n.remove()}),200)},e.showEnter=function(){var t=e.getPluginOptions();if((0,S.Z)((0,E.Z)(e),xd)[xd]&&(null===t||void 0===t?void 0:t.onMouseEnter)){var n=e.getValue();if(null===n||void 0===n?void 0:n.name){n.id;var r=n.key,i=n.name,o=(n.marks,n.type,(0,hd.Z)(n,yd));(0,S.Z)((0,E.Z)(e),Ed)[Ed]&&clearTimeout((0,S.Z)((0,E.Z)(e),Ed)[Ed]),(0,S.Z)((0,E.Z)(e),_d)[_d]&&clearTimeout((0,S.Z)((0,E.Z)(e),_d)[_d]),(0,S.Z)((0,E.Z)(e),Sd)[Sd]&&(0,S.Z)((0,E.Z)(e),Sd)[Sd].length>0||((0,S.Z)((0,E.Z)(e),_d)[_d]=setTimeout((function(){(0,S.Z)((0,E.Z)(e),xd)[xd]&&((0,S.Z)((0,E.Z)(e),Sd)[Sd]=(0,s.$)('<div class="data-mention-hover-layout" '.concat(s.Zi,'="').concat(s.UI,'"></div>')),(0,S.Z)((0,E.Z)(e),Sd)[Sd].on("mouseenter",(function(){(0,S.Z)((0,E.Z)(e),Ed)[Ed]&&clearTimeout((0,S.Z)((0,E.Z)(e),Ed)[Ed])})),(0,S.Z)((0,E.Z)(e),Sd)[Sd].on("mouseleave",e.hideEnter),e.editor.trigger("mention:enter",(0,S.Z)((0,E.Z)(e),Sd)[Sd],(0,nn.Z)({key:(0,s.AK)(r||""),name:(0,s.AK)(i)},o)),t.onMouseEnter((0,S.Z)((0,E.Z)(e),Sd)[Sd],(0,nn.Z)({key:(0,s.AK)(r||""),name:(0,s.AK)(i)},o)),setTimeout((function(){var t;null===(t=(0,S.Z)((0,E.Z)(e),Bd)[Bd])||void 0===t||t.bind((0,S.Z)((0,E.Z)(e),Sd)[Sd],(0,S.Z)((0,E.Z)(e),xd)[xd])}),10))}),200))}}},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this,t=this.editor;if((0,S.Z)(this,Bd)[Bd]||((0,S.Z)(this,Bd)[Bd]=new s.Ly(t)),(0,s.iC)(t)&&!s.sk&&((0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this),!this.component)){var r=this.getPluginOptions();this.component=new md(t,{onCancel:function(){e.changeToText()},onSelect:function(i,o){var a,l,c=t.trigger("mention:select",o)||{};delete c["id"],(null===r||void 0===r?void 0:r.onSelect)&&(c=r.onSelect(o)||{},delete c["id"]);var A=t.card,u=e.getValue();null===(a=e.component)||void 0===a||a.remove(),e.component=void 0,null===(l=(0,S.Z)(e,kd)[kd])||void 0===l||l.remove(),A.focus(e,!1);var d=A.insert(n.cardName,(0,nn.Z)((0,nn.Z)({},o),{},{marks:u.marks},c));if(A.removeNode(e),t.trigger("mention:insert",d),(null===r||void 0===r?void 0:r.onInsert)&&r.onInsert(d),(0,s.iC)(t)){var h=t.change,p=h.range.get().cloneRange();p.setStartAfter(d.root.get()),p.collapse(!0),h.range.select(p)}else A.focus(d,!1)}})}}},{key:"remove",value:function(){var e,t,n=this.editor;(0,s.iC)(n)&&(null===(e=this.component)||void 0===e||e.remove(),null===(t=(0,S.Z)(this,kd)[kd])||void 0===t||t.remove(),n.card.remove(this.id))}},{key:"changeToText",value:function(){var e,t,n=this.editor;if(this.root.inEditor()&&(0,s.iC)(n)){var r=(null===(e=(0,S.Z)(this,kd)[kd])||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText)||"";this.remove(),n.node.insertText(r)}}},{key:"activate",value:function(e){var t;((0,d.Z)((0,h.Z)(n.prototype),"activate",this).call(this,e),!e&&(0,S.Z)(this,kd)[kd]&&(0,S.Z)(this,kd)[kd].length>0)&&(null===(t=this.component)||void 0===t||t.unbindEvents(),this.changeToText())}},{key:"handleInput",value:function(){var e,t,n,r,i=this,o=this.editor;if((0,s.iC)(o)){var a=o.change,l=o.card;if(!a.isComposing()){var c,A=(null===(e=(0,S.Z)(this,kd)[kd])||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText.replace(/[\r\n]/g,""))||"";if(""===A)return null===(c=this.component)||void 0===c||c.remove(),void l.remove(this.id);var u=A.substr(1),d=o.trigger("mention:default")||(null===(n=this.getPluginOptions())||void 0===n?void 0:n.defaultData);if(""===u&&d){var h;null===(h=this.component)||void 0===h||h.render(this.root,d)}else{null===(r=this.component)||void 0===r||r.render(this.root,!0);o.trigger("mention:search",u);this.search(u).then((function(e){var t;null===(t=i.component)||void 0===t||t.render(i.root,e)}))}}}}},{key:"resetPlaceHolder",value:function(){var e,t,n,r;"@"===(null===(e=(0,S.Z)(this,kd)[kd])||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText)?null===(n=(0,S.Z)(this,Cd)[Cd])||void 0===n||n.css("visibility","visible"):null===(r=(0,S.Z)(this,Cd)[Cd])||void 0===r||r.css("visibility","hidden")}},{key:"executeMark",value:function(e,t){if((0,S.Z)(this,xd)[xd]){var n=this.editor.mark,r=(0,S.Z)(this,xd)[xd].children();if(e)if(t){r.each((function(t,i){var o=r.eq(i);o&&n.wrapByNode(o,e)}));var i=this.queryMarks().map((function(e){var t;return(null===(t=e.clone().get())||void 0===t?void 0:t.outerHTML)||""}));this.setValue({marks:i})}else{n.unwrapByNodes(this.queryMarks(!1),e);var o=this.queryMarks().map((function(e){var t;return(null===(t=e.get())||void 0===t?void 0:t.outerHTML)||""}));this.setValue({marks:o})}else n.unwrapByNodes(this.queryMarks(!1)),this.setValue({marks:[]})}}},{key:"queryMarks",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(0,S.Z)(this,xd)[xd]?(0,S.Z)(this,xd)[xd].allChildren().filter((function(t){return t.isElement()&&e.editor.node.isMark(t)})).map((function(e){return t?e.clone():e})):[]}},{key:"toolbar",value:function(){var e,t=null===(e=this.editor.plugin.findPlugin("mention"))||void 0===e?void 0:e.options;return(null===t||void 0===t?void 0:t.cardToolbars)?t.cardToolbars([],this.editor):[]}},{key:"render",value:function(){var e=this,t=this.getValue(),n=this.editor;if((null===t||void 0===t?void 0:t.name)&&!(0,S.Z)(this,xd)[xd]){t.id;var r=t.key,i=t.name,o=(0,hd.Z)(t,wd);(0,S.Z)(this,xd)[xd]=(0,s.$)('<span class="data-mention-component">@'.concat((0,s.AK)(i),"</span>")),(t.marks||[]).forEach((function(t){e.executeMark((0,s.$)(t),!0)})),(0,S.Z)(this,xd)[xd].on("click",(function(){(0,S.Z)(e,xd)[xd]&&(n.trigger("mention:item-click",(0,S.Z)(e,xd)[xd],(0,nn.Z)({key:(0,s.AK)(r||""),name:(0,s.AK)(i)},o)),(null===d||void 0===d?void 0:d.itemClick)&&(null===d||void 0===d||d.itemClick((0,S.Z)(e,xd)[xd],(0,nn.Z)({key:(0,s.AK)(r||""),name:(0,s.AK)(i)},o))))})),(0,S.Z)(this,xd)[xd].on("mouseenter",this.showEnter),(0,S.Z)(this,xd)[xd].on("mouseleave",this.hideEnter)}else if((0,S.Z)(this,xd)[xd])return void(t&&((0,S.Z)(this,xd)[xd].html("@".concat((0,s.AK)(t.name||""))),((null===t||void 0===t?void 0:t.marks)||[]).forEach((function(t){e.executeMark((0,s.$)(t),!0)}))));if(!(0,s.iC)(n))return(0,S.Z)(this,xd)[xd];var a,l,c,A=n.language.get("mention"),u=void 0,d=this.getPluginOptions();if((0,S.Z)(this,xd)[xd])return null===(a=this.component)||void 0===a||a.remove(),(0,S.Z)(this,xd)[xd];(0,S.Z)(this,xd)[xd]=(0,s.$)('<span class="data-mention-component-keyword data-mention-component" '.concat(s.xT,'="true">@</span><span class="data-mention-component-placeholder">').concat(A["placeholder"],"</span>")),(0,S.Z)(this,kd)[kd]=(0,S.Z)(this,xd)[xd].eq(0),(0,S.Z)(this,Cd)[Cd]=(0,S.Z)(this,xd)[xd].eq(1),null===(l=(0,S.Z)(this,kd)[kd])||void 0===l||l.on("keydown",(function(e){(0,s.P6)("enter",e)&&e.preventDefault()}));var h,p=Date.now();null===(c=(0,S.Z)(this,kd)[kd])||void 0===c||c.on("input",(function(){if(e.resetPlaceHolder(),Date.now()-p<200){var t,n=null===(t=(0,S.Z)(e,kd)[kd])||void 0===t?void 0:t.allChildren().find((function(e){return e.isText()}));if(n&&n.isText()&&"@@"===n[0].nodeValue){var r,i=null===(r=n.get())||void 0===r?void 0:r.splitText(1);null===i||void 0===i||i.remove()}}u&&clearTimeout(u),u=setTimeout((function(){e.handleInput()}),100)})),this.getCenter().append((0,S.Z)(this,xd)[xd]),setTimeout((function(){if((0,s.iC)(n)){var t,r=n.change.range.get();(0,S.Z)(e,kd)[kd]=null===(t=(0,S.Z)(e,xd)[xd])||void 0===t?void 0:t.eq(0),r.select((0,S.Z)(e,kd)[kd],!0).collapse(!1);var i=window.getSelection();null===i||void 0===i||i.removeAllRanges(),null===i||void 0===i||i.addRange(r.toRange())}}),10),((null===d||void 0===d?void 0:d.defaultData)?null===d||void 0===d?void 0:d.defaultData:n.trigger("mention:default"))?null===(h=this.component)||void 0===h||h.render(this.root,n.trigger("mention:default")||(null===d||void 0===d?void 0:d.defaultData)||[]):setTimeout((function(){e.handleInput()}),50)}},{key:"didRender",value:function(){(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this),this.updateMaxWidth(),window.addEventListener("resize",this.onWindowResize),this.editor.on("editor:resize",this.onWindowResize)}},{key:"destroy",value:function(){var e,t;null===(e=this.component)||void 0===e||e.remove(),null===(t=(0,S.Z)(this,Bd)[Bd])||void 0===t||t.destroy(),window.removeEventListener("resize",this.onWindowResize),this.editor.off("editor:resize",this.onWindowResize)}}],[{key:"cardName",get:function(){return"mention"}},{key:"cardType",get:function(){return s.eT.INLINE}},{key:"autoSelected",get:function(){return!1}},{key:"selectStyleType",get:function(){return s.dw.NONE}}]),n}(s.Zb),Md={mention:{placeholder:"User name"}},Id={mention:{placeholder:"用户名"}},Nd={"en-US":Md,"zh-CN":Id},Ud=["key","name"],Ld="parse:value",Qd="parse:node",Dd="parse:html",Hd="paste:schema",Od="paste:each",zd="keydown:at",Zd=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.paserValue=function(e){if(e.isCard()&&e.attributes("name")===Td.cardName){var t=e.attributes("value"),n=(0,s.RW)(t);if(!n||!n["name"])return!1}return!0},e.paserNode=function(e){if(s.W_.isElement(e)&&e[s.Jr]===Td.cardName){var t=e[s.TM],n=(0,s.RW)(t);if(!n||!n["name"])return!1}return!0},e.renderTime=Date.now(),e.onAt=function(t){var n=e.editor;if((0,s.iC)(n)){if(Date.now()-e.renderTime<200)return!1;var r=n.change,i=r.range.get();if(e.options.spaceTrigger){var o=i.createSelection();if(o.anchor){var a=(0,s.$)(o.anchor).prev(),l=a&&a.isText()?a[0].nodeValue:"";if(o.move(),l&&/[^\s@]$/.test(l))return}}if(t.preventDefault(),i.collapsed){t.preventDefault();var c=n.card.insert(Td.cardName);c.root.attributes(s.Cj,"true"),n.card.activate(c.root),i=r.range.get();var A=c.find(".data-mention-component-keyword");i.select(A,!0),i.collapse(!1),r.range.select(i)}return e.renderTime=Date.now(),!1}},e.pasteSchema=function(e){e.add({type:"inline",name:"span",attributes:{"data-type":{required:!0,value:Td.cardName},"data-value":"*"}})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.isElement()){var r=t.attributes(),i=r["data-type"];if(i&&i===Td.cardName){var o=r["data-value"],a=(0,s.RW)(o);if(!a.name)return;return n.card.replaceNode(t,Td.cardName,a),t.remove(),!1}}return!0}},e.parseHtml=function(t,n){var r=e.editor,i=[];return t.find("[".concat(s.Jr,'="').concat(Td.cardName,'"],[').concat(s.mV,'="').concat(Td.cardName,'"]')).each((function(e){var t=(0,s.$)(e),o=r.card.find(t),a=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(t.attributes(s.TM));if((null===a||void 0===a?void 0:a.id)&&a.name){var l='<span data-type="'.concat(Td.cardName,'" data-value="').concat((0,s.it)(a),'" style="color:#1890ff"></span>'),c=a.marks||[],A=(0,s.$)("<div>@".concat(a.name,"</div>")),u=A.first();c.forEach((function(e){var t=(0,s.$)(e);u=r.node.wrap(u,t)})),t.empty();var d=(0,s.$)(l);d.append(u),n&&(d=n(d,a)),t.replaceWith(d),i.push(d)}else t.remove()})),i},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.on(Ld,this.paserValue),e.on(Qd,this.paserNode),e.on(Dd,this.parseHtml),e.on(Od,this.pasteHtml),e.on(Hd,this.pasteSchema),(0,s.iC)(e)&&e.on(zd,this.onAt),e.language.add(Nd)}},{key:"getList",value:function(){var e=[];return this.editor.card.each((function(t){if(t.name===Td.cardName){var n=t.getValue()||{},r=n.key,i=n.name,o=(0,hd.Z)(n,Ud);i&&r&&e.push((0,nn.Z)({key:(0,s.AK)(r),name:(0,s.AK)(i)},o))}})),e}},{key:"execute",value:function(){}},{key:"destroy",value:function(){var e=this.editor;e.off(Ld,this.paserValue),e.off(Qd,this.paserNode),e.off(Dd,this.parseHtml),e.off(Od,this.pasteHtml),e.off(Hd,this.pasteSchema),(0,s.iC)(e)&&e.off(zd,this.onAt)}}],[{key:"pluginName",get:function(){return"mention"}}]),n}(s.Sy),Rd=Zd;function Pd(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var qd=".data-embed-form {\n position: relative;\n border-radius: 2px;\n border: 1px solid #e8e8e8;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 8px;\n}\n\n.data-embed-icon {\n flex: 1 0;\n}\n\n.data-embed-editor {\n flex: 1 0;\n}\n\n.data-embed-input {\n border: 0;\n height: 32px;\n line-height: 32px;\n font-size: 14px;\n outline: none;\n width: 100%;\n}\n\n.data-embed-button {\n margin-left: 12px;\n}\n\n.data-embed-ui-button {\n line-height: 1.499;\n display: inline-block;\n font-weight: 400;\n text-align: center;\n cursor: pointer;\n white-space: nowrap;\n padding: 0 15px;\n font-size: 14px;\n border-radius: 4px;\n height: 30px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n transition: all .3s cubic-bezier(.645,.045,.355,1);\n position: relative;\n box-shadow: 0 2px 0 rgba(0,0,0,.015);\n color: rgba(0,0,0,.65);\n background-color: #fff;\n color: #fff;\n background-color: #347eff;\n border: 1px solid #347eff;\n text-shadow: 0 -1px 0 rgba(0,0,0,.12);\n outline: 0\n}\n\n.data-embed-ui-button:hover {\n background-color: #466fb6;\n border-color: #466fb6\n}\n\n.data-embed-collapse, .data-embed-header {\n background: #fafafa;\n position: relative;\n border-radius: 2px;\n border: 1px solid #e8e8e8;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 8px;\n}\n\n.data-embed-collapse a, .data-embed-header a {\n color: rgba(0,0,0,.65);\n}\n\n.data-embed-collapse a:hover, .data-embed-header a:hover {\n color: #347eff;\n}\n\n.data-embed-title {\n flex: 1 0;\n margin: 0 8px;\n}\n\n.data-embed .data-embed-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n.data-embed .data-embed-mask {\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n z-index: 3;\n display: block;\n transition: all .3s cubic-bezier(.3,1.2,.2,1)\n}\n\n.data-embed .data-embed-mask:hover {\n cursor: pointer\n}\n\n.data-embed-content-bg {\n width: 80px;\n height: 80px;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -40px;\n margin-left: -40px;\n text-align: center;\n line-height: 80px;\n color: #666;\n font-size: 36px;\n z-index: 1;\n visibility: visible;\n opacity: 1;\n transition: all .3s linear;\n -webkit-animation: loading .8s linear infinite;\n animation: loading .8s linear infinite\n}\n\n.data-embed-header {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.data-embed-body {\n border: 1px solid #e8e8e8;\n border-top: 0;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n\n.data-embed-body iframe {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 2;\n}";Pd(qd);var Kd=(0,F.Z)("mask"),Wd=(0,F.Z)("iframe"),jd=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e,i;(0,r.Z)(this,n);for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return i=t.call.apply(t,[this].concat(a)),i.renderBefore=void 0,Object.defineProperty((0,E.Z)(i),Kd,{writable:!0,value:void 0}),Object.defineProperty((0,E.Z)(i),Wd,{writable:!0,value:void 0}),i.resize=function(){var e,t=i.getValue();if(null===t||void 0===t?void 0:t.isResize)return null===(e=(0,S.Z)((0,E.Z)(i),Wd)[Wd])||void 0===e?void 0:e.parent()},i.handleSubmit=function(){var t,r=i.editor,o=r.language.get("embed"),a=i.getCenter(),l=(0,s.Nm)((null===(t=a.find('[data-role="url"]').get())||void 0===t?void 0:t.value)||"");if(l){var c={url:l,title:l,ico:'<span class="data-icon data-icon-website"></span>',isResize:!0};if(i.renderBefore){var A=i.renderBefore(l);c=(0,nn.Z)((0,nn.Z)({},c),A)}i.setValue(c),i.render(),(0,d.Z)((e=(0,E.Z)(i),(0,h.Z)(n.prototype)),"didRender",e).call(e)}else r.messageError("embed",o["addressInvalid"])},i}return(0,i.Z)(n,[{key:"onActivate",value:function(e){var t,r;(0,d.Z)((0,h.Z)(n.prototype),"onActivate",this).call(this,e),e?null===(t=(0,S.Z)(this,Kd)[Kd])||void 0===t||t.hide():(0,s.iC)(this.editor)&&(null===(r=(0,S.Z)(this,Kd)[Kd])||void 0===r||r.show())}},{key:"collapse",value:function(){var e=this.getValue();(null===e||void 0===e?void 0:e.collapsed)||(this.setValue({collapsed:!0}),this.render(),(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this))}},{key:"expand",value:function(){var e=this.getValue();(null===e||void 0===e?void 0:e.collapsed)&&(this.setValue({collapsed:!1}),this.render(),(0,d.Z)((0,h.Z)(n.prototype),"didRender",this).call(this))}},{key:"toolbar",value:function(){var e,t=this,n=this.editor,r=function(){if((0,s.iC)(n)){var e=[],r=t.getValue();return(null===r||void 0===r?void 0:r.url)&&e.push({key:"expand",type:"button",content:'<span class="data-icon data-icon-expand" />',title:n.language.get("embed","expand"),onClick:function(){return t.expand()}},{key:"collapse",type:"button",content:'<span class="data-icon data-icon-compact-display" />',title:n.language.get("embed","collapse"),onClick:function(){return t.collapse()}}),n.readonly||e.unshift({key:"dnd",type:"dnd"},{key:"copy",type:"copy"},{key:"delete",type:"delete"},{key:"separator",type:"separator"}),e}return[]},i=null===(e=n.plugin.findPlugin("embed"))||void 0===e?void 0:e.options;return(null===i||void 0===i?void 0:i.cardToolbars)?i.cardToolbars(r(),this.editor):r()}},{key:"handleInputKeydown",value:function(e){(0,s.P6)("enter",e)&&this.handleSubmit()}},{key:"renderEdit",value:function(e){var t=this,n=this.editor.language.get("embed"),r=(0,s.$)('<div class="data-embed data-embed-active">\n <div class="data-embed-form">\n <span class="data-embed-editor">\n <input data-role="url" placeholder="'.concat(e||n["placeholder"],'" spellcheck="false" class="data-embed-input" value="" autocomplete="off"/>\n </span>\n <span class="data-embed-button">\n <button type="button" class="data-embed-ui-button" data-role="submit">\n <span>').concat(n["submit"],"</span>\n </button>\n </span>\n </div>\n </div>")),i=r.find('[data-role="url"]');i.on("keydown",(function(e){return t.handleInputKeydown(e)}));var o=r.find('[data-role="submit"]');return o.on("click",this.handleSubmit),r}},{key:"renderCollapse",value:function(){var e=this.getValue(),t=(null===e||void 0===e?void 0:e.url)||"",n='<div class="data-embed data-embed-collapse">\n <span class="data-embed-ico">'.concat(null===e||void 0===e?void 0:e.ico,'</span>\n <span class="data-embed-title"><a target="_blank" href="').concat(t,'">').concat((0,s.YU)((null===e||void 0===e?void 0:e.title)||""),'</a></span>\n <a target="_blank" class="data-icon data-icon-preview" href="').concat(t,'" />\n </div>\n ');return(0,s.$)(n)}},{key:"renderExpand",value:function(){var e=this.getValue(),t=(null===e||void 0===e?void 0:e.url)||"",n=(null===e||void 0===e?void 0:e.height)||"auto",r=(0,s.$)('\n <div class="data-embed data-embed-expand">\n <div class="data-embed-header">\n '.concat(null===e||void 0===e?void 0:e.ico,'\n <span class="data-embed-title"><a target="_blank" href="').concat(t,'">').concat((0,s.YU)((null===e||void 0===e?void 0:e.title)||""),'</a></span>\n <a target="_blank" class="data-icon data-icon-preview" href="').concat(t,'"></a>\n </div>\n <div class="data-embed-body" style="height:').concat(n).concat("auto"===n?"":"px",'">\n <div class="data-embed-content-bg">\n <svg viewBox="0 0 1024 1024" class="data-embed-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"> <path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg>\n </div>\n <iframe frameborder="0" allowfullscreen="true"></iframe>\n <div class="data-embed-mask"></div>\n </div>\n </div>\n ')),i=r.find("iframe");return i.on("load",(function(){r.find(".data-embed-content-bg").hide()})),(0,S.Z)(this,Kd)[Kd]=r.find(".data-embed-mask"),this.activated&&(0,S.Z)(this,Kd)[Kd].hide(),(null===e||void 0===e?void 0:e.height)&&i.attributes("data-height",e.height),i.attributes("src",t),(0,S.Z)(this,Wd)[Wd]=i,r}},{key:"render",value:function(e){this.renderBefore=e;var t=this.getValue(),n=(null===t||void 0===t?void 0:t.url)||"",r=this.getCenter();r.empty(),n&&t?t.collapsed?r.append(this.renderCollapse()):r.append(this.renderExpand()):r.append(this.renderEdit())}}],[{key:"cardName",get:function(){return"embed"}},{key:"cardType",get:function(){return s.eT.BLOCK}},{key:"lazyRender",get:function(){return!0}},{key:"singleSelectable",get:function(){return!1}},{key:"autoSelected",get:function(){return!1}}]),n}(s.Zb),Vd={embed:{placeholder:"Please paste the link here",submit:"submit",addressInvalid:"Link error, please check and re-enter",validUrl:"Illegal link, can't be embedded",canNotShowCard:"Card cannot be displayed",expand:"Expand",collapse:"Collapse"}},Gd={embed:{placeholder:"请在此粘贴链接",submit:"确定",addressInvalid:"链接错误,请检查后重新输入",validUrl:"非法链接,无法嵌入",canNotShowCard:"Card无法展示",expand:"嵌入预览",collapse:"紧凑展示"}},$d={"en-US":Vd,"zh-CN":Gd},Yd="parse:html",Xd="paste:schema",Jd="paste:each",eh=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.pasteSchema=function(e){e.add({type:"block",name:"div",attributes:{"data-type":{required:!0,value:jd.cardName},"data-value":"*"}})},e.pasteHtml=function(t){var n=e.editor;if((0,s.iC)(n)){if(t.isElement()){var r=t.attributes(),i=r["data-type"];if(i&&i===jd.cardName){var o=r["data-value"],a=(0,s.RW)(o);if(!a.url)return;return n.card.replaceNode(t,jd.cardName,a),t.remove(),!1}}return!0}},e.parseHtml=function(t,n){var r=[];return t.find("[".concat(s.Jr,'="').concat(jd.cardName,'"],[').concat(s.mV,'="').concat(jd.cardName,'"]')).each((function(t){var i=(0,s.$)(t),o=e.editor.card.find(i),a=(null===o||void 0===o?void 0:o.getValue())||(0,s.RW)(i.attributes(s.TM));if(a&&a.url){var l=(0,s.$)('<iframe frameborder="0" allowfullscreen="true" style="height: '.concat(null===a||void 0===a?void 0:a.height,'px;width: 100%;margin:0;padding:0;"></iframe>'));i.empty();var c=(null===a||void 0===a?void 0:a.url)||"",A=(0,s.$)('<div style="background: #fafafa;border-bottom-left-radius: 0; border-bottom-right-radius: 0;position: relative;border-radius: 2px;border: 1px solid #e8e8e8;display: flex;justify-content: space-between;align-items: center;padding: 4px 8px;">\n \t\t<span style="flex: 1 0;;margin: 0 8px;"><a target="_blank" href="'.concat(c,'">').concat((0,s.YU)(a.title||""),"</a></span>\n </div>")),u=(0,s.$)('<div data-type="'.concat(jd.cardName,'" data-value="').concat((0,s.it)(a),'"></span>'));l.attributes("src",c),u.append(A);var d=(0,s.$)('<div style="border: 1px solid #e8e8e8; border-top: 0; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px;"></div>');d.append(l),a.collapsed||u.append(d),n&&(u=n(u,a)),i.replaceWith(u),r.push(u)}else i.remove()})),r},e}return(0,i.Z)(n,[{key:"init",value:function(){var e=this.editor;e.language.add($d),e.on(Yd,this.parseHtml),e.on(Xd,this.pasteSchema),e.on(Jd,this.pasteHtml)}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"execute",value:function(){var e=this.options.renderBefore,t=this.editor.card,n=t.insert(jd.cardName,{url:(arguments.length<=0?void 0:arguments[0])||"",ico:arguments.length<=1?void 0:arguments[1],title:arguments.length<=2?void 0:arguments[2],collapsed:arguments.length<=3?void 0:arguments[3],isResize:arguments.length<=4?void 0:arguments[4]},e);t.activate(n.root)}},{key:"destroy",value:function(){var e=this.editor;e.off(Yd,this.parseHtml),e.off(Xd,this.pasteSchema),e.off(Jd,this.pasteHtml)}}],[{key:"pluginName",get:function(){return"embed"}}]),n}(s.Sy),th=eh,nh="mark-range",rh=(0,F.Z)("isRevoke"),ih=(0,F.Z)("isPreview"),oh=(0,F.Z)("isApply"),ah=(0,F.Z)("isCreateting"),sh=(0,F.Z)("previewAwating"),lh=function(e){(0,o.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.range=void 0,e.executeBySelf=!1,e.MARK_KEY="data-mark-key",e.MARK_UUID="data-mark-uuid",e.ids={},e.m_uuid=(0,s.Vj)(),e.followStyle=!1,e.copyOnEnter=!1,Object.defineProperty((0,E.Z)(e),rh,{writable:!0,value:!1}),Object.defineProperty((0,E.Z)(e),ih,{writable:!0,value:!1}),Object.defineProperty((0,E.Z)(e),oh,{writable:!0,value:!1}),Object.defineProperty((0,E.Z)(e),ah,{writable:!0,value:!1}),Object.defineProperty((0,E.Z)(e),sh,{writable:!0,value:void 0}),e.tagName="span",e.combineValueByWrap=!0,e.handelSelectionChange=function(){e.onSelectionChange()},e.onBeforeCommandExecute=function(t){e.executeBySelf=t===nh},e.onAfterCommandExecute=function(t){e.executeBySelf=!1},e.onChange=function(t){e.triggerChange("local"!==t)},e.parseValue=function(t,n){var r=t.attributes(e.MARK_KEY);r&&(n[s.rN]=e.getPreviewName(r))},e.parseNode=function(t){var n=t[e.MARK_KEY];n&&(t[s.rN]=e.getPreviewName(n))},e.onAfterSetValue=function(){var t=e.editor;(0,s.iC)(t)&&(e.range=t.change.range.get(),e.ids=e.getIds())},e.onSelectionChange=function(t){if(!e.executeBySelf){var n=e.editor;if(!t){var r=n.container.window,i=null===r||void 0===r?void 0:r.getSelection();if(!i)return;t=s.e6.from(n,i)}if(t&&(!(0,s.D1)(n)||t.commonAncestorNode.inEditor(n.container)||t.commonAncestorNode.isRoot())){if(!(0,s.$)(t.getStartOffsetNode()).inEditor(n.container)||!(0,s.$)(t.getEndOffsetNode()).inEditor(n.container))return n.trigger("".concat(nh,":select"),t),void(e.range=void 0);e.triggerChange();for(var o=e.options.keys,a=0;a<o.length;a++){var l=o[a],c=e.getPreviewName(l),A=t,u=A.startNode,d=A.endNode,h=A.commonAncestorNode,p=h.parent();if((0,S.Z)((0,E.Z)(e),ah)[ah]&&(u.attributes(c)||d.attributes(c)||h.attributes(c)||!t.commonAncestorNode.inEditor()||(null===p||void 0===p?void 0:p.attributes(c))))return void(e.range=t)}var f=e.getSelectInfo(t,!0);n.trigger("".concat(nh,":select"),t,f),e.range=t}}},e}return(0,i.Z)(n,[{key:"getIdName",value:function(e){return"data-".concat(e,"-id")}},{key:"getPreviewName",value:function(e){return"data-".concat(e,"-preview")}},{key:"init",value:function(){var e,t=this;(0,d.Z)((0,h.Z)(n.prototype),"init",this).call(this);var r=[],i=(null===(e=this.options)||void 0===e?void 0:e.keys)||[];i.forEach((function(e){var n,i=(n={},(0,Fe.Z)(n,t.getIdName(e),"*"),(0,Fe.Z)(n,t.MARK_KEY,e),(0,Fe.Z)(n,t.MARK_UUID,"*"),n);r.push({type:"mark",attributes:(0,nn.Z)({},i)},{type:"inline",attributes:(0,nn.Z)({},i)},{type:"block",attributes:(0,nn.Z)({},i)})}));var o=this.editor;if(o.schema.add(r),o.on("beforeCommandExecute",this.onBeforeCommandExecute),o.on("afterCommandExecute",this.onAfterCommandExecute),(0,s.iC)(o)){o.on("change",this.onChange),o.on("select",this.onSelectionChange),o.on("parse:value",this.parseValue),o.on("parse:node",this.parseNode),o.on("afterSetValue",this.onAfterSetValue);var a=i.map((function(e){return t.getPreviewName(e)}));o.history.onFilter((function(e){return!("set_node"!==e.type||!a.some((function(t){return!!e.newProperties[t]})))})),o.history.onSelf((function(){if((0,S.Z)(t,ih)[ih]&&!(0,S.Z)(t,sh)[sh])return new Promise((function(e){(0,S.Z)(t,sh)[sh]=e,(0,S.Z)(t,ih)[ih]=!1}));(0,S.Z)(t,rh)[rh]&&(0,S.Z)(t,sh)[sh]?(0,S.Z)(t,sh)[sh](!1):(0,S.Z)(t,oh)[oh]&&(0,S.Z)(t,sh)[sh]&&(0,S.Z)(t,sh)[sh](!0)}))}else if((0,s.D1)(o)){var l;o.on("".concat(nh,":set-range"),this.onSelectionChange),null===(l=o.container.document)||void 0===l||l.addEventListener("selectionchange",this.handelSelectionChange)}}},{key:"schema",value:function(){var e,t=this,n=((null===(e=this.options)||void 0===e?void 0:e.keys)||[]).map((function(e){var n;return{name:"span",type:"mark",attributes:(n={},(0,Fe.Z)(n,t.MARK_KEY,{required:!0,value:e}),(0,Fe.Z)(n,t.MARK_UUID,"*"),(0,Fe.Z)(n,t.getIdName(e),"*"),n)}}));return n}},{key:"getSelectInfo",value:function(e,t){var n,r,i,o=this,a=this.editor,l=a.card,c=e.cloneRange().shrinkToElementNode().shrinkToTextNode(),A=c.startNode,u=c.startOffset,d=c.endNode,h=c.endOffset,p=c.collapsed,f=A.closest("[".concat(this.MARK_KEY,"]")),g=A.isElement()?A.children().eq(u):A;if(A.type===Node.ELEMENT_NODE&&(null===g||void 0===g?void 0:g.isBlockCard()))f=g;else if(r=l.find(0==f.length&&g?g:f),null===(i=r)||void 0===i?void 0:i.queryMarks){var m=r.queryMarks(!1).find((function(e){return!!e.attributes(o.MARK_KEY)}));m&&(f=m)}else r&&!r.isEditable&&r.root.isBlockCard()&&(f=r.root);var v=f.attributes(this.MARK_KEY),b=f.attributes(this.getIdName(v)),y=b||void 0;if(!p&&b&&!f.isBlockCard()&&!(null===(n=r)||void 0===n?void 0:n.queryMarks)){var w=d.closest("[".concat(this.MARK_KEY,"]")),x=w.attributes(this.MARK_KEY),k=d.children().eq(h);d.type===Node.ELEMENT_NODE&&(null===k||void 0===k?void 0:k.isBlockCard())&&(w=k);var C=w.attributes(this.getIdName(v));if(v===x&&b===C){if(y=b,t){var B,_,E,S,F=null===(B=s.e6.from(a))||void 0===B?void 0:B.cloneRange();null===F||void 0===F||F.setStart(f,0),null===F||void 0===F||F.setEnd(w,w.isText()?w.text().length:null!==(_=null===(E=w.get())||void 0===E?void 0:E.childNodes.length)&&void 0!==_?_:0),(null===F||void 0===F||null===(S=F.shrinkToElementNode().shrinkToTextNode())||void 0===S?void 0:S.equal(c))||(y=void 0)}}else y=void 0}return y?{key:v,id:y.split(",")[0]}:void 0}},{key:"findElements",value:function(e,t){var n=this,r=this.editor.container,i=[];return r.find("[".concat(this.getIdName(e),"]")).each((function(r){var o=(0,s.$)(r),a=o.attributes(n.getIdName(e)).trim().split(",");a.indexOf(t)>-1&&i.push(o)})),i}},{key:"preview",value:function(e,t){var n=this,r=this.editor;if(t){var i=this.findElements(e,t);i.forEach((function(t){t.attributes(s.rN,n.getPreviewName(e)),t.attributes(n.getPreviewName(e),"true")}))}else if(this.range){this.startMutation();var o=r.block,a=r.node,l=r.card,c=this.range;if(c.collapsed){var A=o.closest(c.startNode);if(!a.isBlock(A))return;c.select(A,!0);var u=window.getSelection();null===u||void 0===u||u.removeAllRanges(),null===u||void 0===u||u.addRange(c.toRange())}var d=this.getSelectInfo(c,!0);if(d&&d.key===e)return void r.trigger("".concat(nh,":select"),c,d);r.mark.wrap("<".concat(this.tagName," ").concat(this.MARK_KEY,'="').concat(e,'" ').concat(s.rN,'="').concat(this.getPreviewName(e),'" ').concat(this.MARK_UUID,'="').concat(this.m_uuid,'" ').concat(this.getPreviewName(e),'="true" />'),c);var h="",p=c.getSubRanges(!0,!1);return p.forEach((function(t){var r=l.find(t.startNode);if(r&&!r.executeMark){if(h+="[card:".concat(r.constructor.cardName,",").concat(r.id,"]"),r.root.attributes(n.getIdName(e)))return;r.root.attributes(n.MARK_KEY,e),r.root.attributes(n.getPreviewName(e),"true")}else h+=t.getText()})),(0,S.Z)(this,ah)[ah]=!0,(0,S.Z)(this,ih)[ih]=!0,h}}},{key:"apply",value:function(e,t){var n=this,r=this.editor;r.container.find("[".concat(this.getPreviewName(e),"]")).each((function(i){var o=(0,s.$)(i),a=o.attributes(n.getIdName(e)).trim().split(","),l=[];if(""===a[0]&&a.splice(0,1),a.length>0){for(var c=0;c<a.length;c++){var A=a[c],u=i.parentElement;if(u&&a.indexOf(t)<0&&l.indexOf(t)<0){var d,h=n.findElements(e,A),p=null===(d=s.e6.from(r))||void 0===d?void 0:d.cloneRange();if(!p||0===h.length)continue;var f=p.select(h[0],!0).collapse(!0).cloneRange(),g=p.select(h[h.length-1],!0).collapse(!1).cloneRange();p.setStart(f.startContainer,f.startOffset),p.setEnd(g.endContainer,g.endOffset);var m=p.comparePoint(u,o.index());if(m>=0){l.push(t),l=l.concat(a.slice(c));break}}l.push(A)}l.length===a.length&&a.indexOf(t)<0&&l.push(t)}else l.push(t);o.attributes(s.rN,n.getPreviewName(e)),o.attributes(n.getIdName(e),l.join(",")),o.removeAttributes(n.getPreviewName(e));var v=o.closest(s.Su);if(v.length>0){var b=r.card.find(v,!0);b&&b.onChange&&b.onChange("local",b.root)}var y=r.card.find(o);y&&y.executeMark&&y.executeMark(o.clone(),!0)})),(0,S.Z)(this,oh)[oh]=!0,(0,S.Z)(this,ah)[ah]=!1}},{key:"revoke",value:function(e,t){var n=this,r=this.editor,i=r.node,o=[];o=t?this.findElements(e,t):r.container.find("[".concat(this.getPreviewName(e),"]")).toArray();var a=[];o.forEach((function(t){var r=(0,s.$)(t),o=r.attributes(n.getIdName(e)).trim().split(",");""===o[0]&&o.splice(0,1),0===o.length?r.isCard()?(r.removeAttributes(n.MARK_KEY),r.removeAttributes(n.getPreviewName(e))):i.unwrap(r):(r.removeAttributes(n.getPreviewName(e)),a.push(r))})),!t&&o.length>0&&(0,s.iC)(r)&&((0,S.Z)(this,rh)[rh]=!0,(0,S.Z)(this,ah)[ah]=!1,a.length>0&&r.mark.mergeMarks(a))}},{key:"remove",value:function(e,t){var n=this,r=this.editor,i=r.node,o=this.findElements(e,t);o.forEach((function(o){var a=(0,s.$)(o),l=a.attributes(n.getIdName(e)).trim().split(",");""===l[0]&&l.splice(0,1);var c=a.closest(s.Su);if(1===l.length&&l.find((function(e){return e===t})))a.isCard()?(a.removeAttributes(n.MARK_KEY),a.removeAttributes(n.getIdName(e)),a.removeAttributes(n.getPreviewName(e))):i.unwrap(a);else{a.removeAttributes(n.getPreviewName(e));var A=l.findIndex((function(e){return e===t}));l.splice(A,1),a.attributes(n.getIdName(e),l.join(","))}if(c.length>0){var u=r.card.find(c,!0);u&&u.onChange&&u.onChange("local",u.root)}}))}},{key:"hotkey",value:function(){return this.options.hotkey||""}},{key:"execute",value:function(){}},{key:"startMutation",value:function(){var e=this.editor;(0,s.iC)(e)&&e.model.mutation.isStopped&&e.model.mutation.start()}},{key:"stopMutation",value:function(){var e=this.editor;setTimeout((function(){(0,s.iC)(e)&&e.readonly&&!e.model.mutation.isStopped&&e.model.mutation.stop()}),10)}},{key:"action",value:function(e,t){var n=arguments.length<=2?void 0:arguments[2];switch(t){case"preview":var r=this.preview(e,n);return r;case"apply":if(!n)return;this.apply(e,n),this.stopMutation();break;case"revoke":this.revoke(e,n),this.stopMutation();break;case"find":return n?this.findElements(e,n):[];case"remove":if(!n)return;this.remove(e,n),this.stopMutation();break;case"filter":return this.filterValue(e,n);case"wrap":var i=arguments.length<=3?void 0:arguments[3];return this.wrapFromPath(e,n,i)}}},{key:"getIds",value:function(){var e=this,t={};return this.editor.container.find("[".concat(this.MARK_KEY,"]")).each((function(n){var r=(0,s.$)(n),i=r.attributes(e.MARK_KEY),o=r.attributes(e.getIdName(i)).split(",");o.forEach((function(e){e&&(t[i]||(t[i]=[]),t[i].indexOf(e)<0&&t[i].push(e))}))})),t}},{key:"triggerChange",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.editor,r={},i={},o=this.getIds();if(this.options.keys.forEach((function(t){var n=e.ids[t]||[],a=o[t]||[];a.forEach((function(e){n.indexOf(e)<0&&(r[t]||(r[t]=[]),r[t].push(e))})),n.forEach((function(e){a.indexOf(e)<0&&(i[t]||(i[t]=[]),i[t].push(e))}))})),t){var a=n.container.find("[".concat(this.MARK_UUID,'="').concat(this.m_uuid,'"]'));a.each((function(t,n){var r=a.eq(n),i=(null===r||void 0===r?void 0:r.attributes())||{},o=i[e.MARK_KEY],s=e.getPreviewName(o);!o||i[e.getIdName(o)]||i[s]||r.attributes(s,"true")}))}this.ids=o,n.trigger("".concat(nh,":change"),r,i,o)}},{key:"filterValue",value:function(e,t){var n,r,i=this,o=this.editor,a=o.container.clone(!t);a.css({position:"fixed",top:"-999px",width:o.container.css("width")||"100%",clip:"rect(0, 0, 0, 0)"}),(0,s.$)(document.body).append(a);var l=new s.G7(a,o.options),c=l.node,A=l.card;t&&a.html((0,s.Gg)(t)),A.render(a,void 0,!1);var u=null===(n=a.window)||void 0===n?void 0:n.getSelection(),d=(u&&s.e6.from(l,u)||s.e6.create(l)).cloneRange(),h=new s._b(a,l,void 0,!1),p=l.schema,f=l.conversion;if(!d){var g,m=null!==(g=t)&&void 0!==g?g:h.toValue(p,f);return l.destroy(),a.remove(),{value:m,paths:[]}}d.select(a,!0).collapse(!0);var v=[];a.traverse((function(t){var n=t.attributes(i.getIdName(e));if(n){var r=d.cloneRange();if(t.isCard()){var o=A.find(t);if(o&&o.executeMark){var s=i.getIdName(e),l=o.root.find("[".concat(s,'="').concat(n,'"]'));o.executeMark(l.clone(),!1)}else t.removeAttributes(i.getIdName(e));r.select(t)}else{r.select(t,!0);var u=r.createSelection();c.unwrap(t),u.move()}var h=r.shrinkToElementNode().shrinkToTextNode().toPath(void 0,a);v.unshift({id:n.split(","),path:h?[h.start.path,h.end.path]:[]})}}),!1,"editable");var b=a.find(s.Am);return b.each((function(e,t){var n=b.eq(t);if(null===n||void 0===n?void 0:n.isEditableCard()){var r=l.card.find(n);if(r){var i=r.getValue();r.setValue(i||{})}}})),t=null!==(r=t)&&void 0!==r?r:h.toValue(p,f),l.destroy(),a.remove(),{value:t,paths:v}}},{key:"wrapFromPath",value:function(e,t,n){var r,i=this,o=this.editor,a=o.container.clone(!n);n&&(n=s.Y1.removeTags(n)),a.css({position:"fixed",top:"-999px",width:o.container.css("width")||"100%",clip:"rect(0, 0, 0, 0)"}),(0,s.$)(document.body).append(a);var l=new s.G7(a,o.options),c=l.card;n&&a.html((0,s.Gg)(n)),c.render(a,void 0,!1);var A=null===(r=a.window)||void 0===r?void 0:r.getSelection(),u=(A&&s.e6.from(l,A)||s.e6.create(l)).cloneRange(),d=new s._b(a,l,void 0,!1),h=l.schema,p=l.conversion;if(!u){var f=n||d.toValue(h,p);return l.destroy(),a.remove(),f}u.select(a,!0).collapse(!0),(t||[]).forEach((function(t){var n=t.id,r=t.path,o=s.e6.fromPath(l,{start:{path:r[0],id:"",bi:-1},end:{path:r[1],id:"",bi:-1}},void 0,a),A=o.findElements();A.forEach((function(t){var r=(0,s.$)(t);if(r.isCard()){var o=c.find(r);o&&o.executeMark?o.executeMark((0,s.$)("<".concat(i.tagName," ").concat(i.MARK_KEY,'="').concat(e,'" ').concat(i.getIdName(e),'="').concat(n.join(","),'" />')),!0):r.attributes(i.getIdName(e),n.join(","))}})),l.mark.wrap("<".concat(i.tagName," ").concat(i.MARK_KEY,'="').concat(e,'" ').concat(i.getIdName(e),'="').concat(n.join(","),'" />'),o)}));var g=a.find(s.Am);return g.each((function(e,t){var n=g.eq(t);if(null===n||void 0===n?void 0:n.isEditableCard()){var r=l.card.find(n);if(r){var i=r.getValue();r.setValue(i||{})}}})),n=d.toValue(h,p),l.destroy(),a.remove(),n}},{key:"destroy",value:function(){var e=this.editor;if(e.off("beforeCommandExecute",this.onBeforeCommandExecute),e.off("afterCommandExecute",this.onAfterCommandExecute),(0,s.iC)(e))e.off("change",this.onChange),e.off("select",this.onSelectionChange),e.off("parse:value",this.parseValue),e.off("parse:node",this.parseNode),e.off("afterSetValue",this.onAfterSetValue);else if((0,s.D1)(e)){var t;e.off("".concat(nh,":set-range"),this.onSelectionChange),null===(t=e.container.document)||void 0===t||t.removeEventListener("selectionchange",this.handelSelectionChange)}}}],[{key:"pluginName",get:function(){return nh}}]),n}(s.Rw),ch=lh;const Ah={class:"lightblock-icon-theme"},uh=(0,Ft._)("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1777",width:"16",height:"16"},[(0,Ft._)("path",{d:"M515.100444 911.758222c-161.393778 0-260.494222-23.495111-302.990222-71.793778-22.442667-25.486222-21.333333-49.521778-20.48-56.291555 0.455111-6.030222 15.530667-189.923556 28.216889-275.655111-4.608-3.128889-14.392889-7.054222-20.053333-9.329778a229.831111 229.831111 0 0 1-13.880889-5.888c-18.716444-8.789333-57.571556-28.046222-57.571556-28.046222-48.298667-22.186667-76.942222-50.403556-83.996444-83.399111-5.660444-26.424889 3.982222-49.180444 14.876444-61.696 1.308444-1.479111 2.702222-2.872889 4.181334-4.124445l227.072-193.735111a39.907556 39.907556 0 0 1 63.800889 17.607111c24.888889 73.699556 97.024 84.736 137.841777 84.736 10.865778 0 17.777778-0.853333 17.834667-0.881778 3.441778-0.426667 7.111111-0.426667 10.552889 0.028445 0 0 6.769778 0.824889 17.265778 0.824889 40.021333 0 110.791111-10.979556 135.253333-84.565334a39.964444 39.964444 0 0 1 64.085333-17.607111l223.800889 193.735111c1.479111 1.28 2.872889 2.673778 4.124445 4.152889 10.780444 12.515556 20.280889 35.299556 14.592 61.639111-7.054222 32.824889-35.299556 60.984889-83.939556 83.626667 0 0.028444-37.489778 18.887111-55.694222 27.562667-4.096 1.934222-8.760889 3.868444-13.710222 5.888-5.518222 2.247111-15.104 6.144-19.598223 9.244444 12.572444 86.471111 27.392 269.880889 28.017778 277.703111 0.682667 5.006222 1.735111 29.184-20.878222 54.812445-42.325333 48.099556-140.032 71.452444-298.723556 71.452444z m-243.541333-125.354666c6.712889 7.936 48.952889 45.425778 243.541333 45.425777 192.227556 0 233.187556-37.575111 239.530667-45.312-2.986667-35.925333-16.384-195.242667-27.249778-268.686222-9.102222-61.582222 47.530667-84.593778 68.835556-93.240889 3.413333-1.393778 6.656-2.673778 9.472-4.010666 17.92-8.533333 55.096889-27.249778 55.153778-27.278223 24.462222-11.434667 34.474667-20.565333 38.4-25.287111l-175.36-151.779555c-52.792889 78.193778-144.355556 87.808-186.083556 87.808-9.927111 0-17.834667-0.540444-22.698667-0.967111a255.601778 255.601778 0 0 1-22.983111 0.967111c-42.325333 0-135.253333-9.671111-188.643555-88.291556l-178.488889 152.291556c4.067556 4.750222 14.108444 13.710222 37.831111 24.604444 1.137778 0.540444 38.855111 19.285333 57.059556 27.818667 2.872889 1.336889 6.172444 2.645333 9.642666 4.039111 21.589333 8.647111 78.904889 31.601778 69.660445 93.411555-11.178667 74.24-24.945778 236.344889-27.619556 268.487112z",fill:"#595959","p-id":"1778"})],-1),dh={class:"lightblock-theme-contain"},hh={class:"lightblock-theme-content",ref:"themeContent"},ph=(0,Ft._)("span",{class:"data-icon icon-reload"},"",-1),fh=(0,Ft._)("div",{class:"lightblock-theme-title"},"边框颜色",-1),gh={class:"lightblock-theme-box"},mh=["onClick"],vh=(0,Ft._)("div",{style:{height:"8px"}},null,-1),bh=(0,Ft._)("div",{class:"lightblock-theme-title"},"背景颜色",-1),yh={class:"lightblock-theme-box"},wh=["onClick"];function xh(e,t,n,r,i,o){return(0,Ft.wg)(),(0,Ft.iD)("span",Ah,[uh,(0,Ft._)("div",dh,[(0,Ft._)("div",hh,[(0,Ft._)("div",{class:"lightblock-theme-random",onClick:t[0]||(t[0]=(...t)=>e.randomColor&&e.randomColor(...t))},[ph,(0,Ft.Uk)(" 随机 ")]),fh,(0,Ft._)("div",gh,[((0,Ft.wg)(!0),(0,Ft.iD)(Ft.HY,null,(0,Ft.Ko)(e.border,((t,n)=>((0,Ft.wg)(),(0,Ft.iD)("span",{key:t,class:(0,Mt.C_)("lightblock-theme-box-item "+(e.bdColor===t?"active":"")),onClick:()=>e.changeColor("border",t,n)},[(0,Ft._)("span",{style:(0,Mt.j5)({background:t})},null,4)],10,mh)))),128))]),vh,bh,(0,Ft._)("div",yh,[((0,Ft.wg)(!0),(0,Ft.iD)(Ft.HY,null,(0,Ft.Ko)(e.background,(t=>((0,Ft.wg)(),(0,Ft.iD)("span",{key:t,class:(0,Mt.C_)("lightblock-theme-box-item "+(e.bgColor===t?"active":"")),onClick:()=>e.changeColor("background",t)},[(0,Ft._)("span",{style:(0,Mt.j5)({background:t})},null,4)],10,wh)))),128))])],512)])])}const kh={border:["#eff0f1","#fbbfbc","#fed4a4","#fff67a","#b7edb1","#bacefd","#cdb2fa"],background:["#f2f3f5","#fef1f1","#fff5eb","#fefff0","#f0fbef","#f0f4ff","#f6f1fe"]};var Ch=(0,Ft.aZ)({name:"lightblock-theme",props:{value:{type:Object,default:()=>({})},change:{type:Function,default:null}},setup(e){const{value:t,change:n}={...e},r=(0,Tt.iH)(null),{border:i,background:o}=kh,{borderColor:a,backgroundColor:s}=t,l=(0,Tt.iH)(a),c=(0,Tt.iH)(s),A=()=>{const e=Math.floor(Math.random()*i.length),t=i[e],r=o[e];l.value=t,c.value=r,n&&n({background:r,border:t})},u=(e,t,r)=>{"border"===e&&void 0!==r&&(l.value=t,c.value=o[r]),"background"===e&&(c.value=t),n&&n({border:l.value,background:c.value})};return{themeContent:r,border:i,background:o,bdColor:l,bgColor:c,randomColor:A,changeColor:u}}});const Bh=(0,Nu.Z)(Ch,[["render",xh]]);var _h=Bh;const Eh='<span class="lightblock-icon-theme">\n\t<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1777" width="16" height="16">\n\t\t<path d="M515.100444 911.758222c-161.393778 0-260.494222-23.495111-302.990222-71.793778-22.442667-25.486222-21.333333-49.521778-20.48-56.291555 0.455111-6.030222 15.530667-189.923556 28.216889-275.655111-4.608-3.128889-14.392889-7.054222-20.053333-9.329778a229.831111 229.831111 0 0 1-13.880889-5.888c-18.716444-8.789333-57.571556-28.046222-57.571556-28.046222-48.298667-22.186667-76.942222-50.403556-83.996444-83.399111-5.660444-26.424889 3.982222-49.180444 14.876444-61.696 1.308444-1.479111 2.702222-2.872889 4.181334-4.124445l227.072-193.735111a39.907556 39.907556 0 0 1 63.800889 17.607111c24.888889 73.699556 97.024 84.736 137.841777 84.736 10.865778 0 17.777778-0.853333 17.834667-0.881778 3.441778-0.426667 7.111111-0.426667 10.552889 0.028445 0 0 6.769778 0.824889 17.265778 0.824889 40.021333 0 110.791111-10.979556 135.253333-84.565334a39.964444 39.964444 0 0 1 64.085333-17.607111l223.800889 193.735111c1.479111 1.28 2.872889 2.673778 4.124445 4.152889 10.780444 12.515556 20.280889 35.299556 14.592 61.639111-7.054222 32.824889-35.299556 60.984889-83.939556 83.626667 0 0.028444-37.489778 18.887111-55.694222 27.562667-4.096 1.934222-8.760889 3.868444-13.710222 5.888-5.518222 2.247111-15.104 6.144-19.598223 9.244444 12.572444 86.471111 27.392 269.880889 28.017778 277.703111 0.682667 5.006222 1.735111 29.184-20.878222 54.812445-42.325333 48.099556-140.032 71.452444-298.723556 71.452444z m-243.541333-125.354666c6.712889 7.936 48.952889 45.425778 243.541333 45.425777 192.227556 0 233.187556-37.575111 239.530667-45.312-2.986667-35.925333-16.384-195.242667-27.249778-268.686222-9.102222-61.582222 47.530667-84.593778 68.835556-93.240889 3.413333-1.393778 6.656-2.673778 9.472-4.010666 17.92-8.533333 55.096889-27.249778 55.153778-27.278223 24.462222-11.434667 34.474667-20.565333 38.4-25.287111l-175.36-151.779555c-52.792889 78.193778-144.355556 87.808-186.083556 87.808-9.927111 0-17.834667-0.540444-22.698667-0.967111a255.601778 255.601778 0 0 1-22.983111 0.967111c-42.325333 0-135.253333-9.671111-188.643555-88.291556l-178.488889 152.291556c4.067556 4.750222 14.108444 13.710222 37.831111 24.604444 1.137778 0.540444 38.855111 19.285333 57.059556 27.818667 2.872889 1.336889 6.172444 2.645333 9.642666 4.039111 21.589333 8.647111 78.904889 31.601778 69.660445 93.411555-11.178667 74.24-24.945778 236.344889-27.619556 268.487112z" fill="#595959" p-id="1778"></path>\n\t</svg>\n</span>';var Sh=new WeakMap,Fh=new WeakMap;class Th extends s.Zb{constructor(...e){super(...e),(0,Fe.Z)(this,"contenteditable",["div.lightblock-editor-container"]),qi(this,Sh,{writable:!0,value:void 0}),qi(this,Fh,{writable:!0,value:void 0}),(0,Fe.Z)(this,"updateColor",((e=this.getValue())=>{ji(this,Sh)?.css({borderColor:e.borderColor,backgroundColor:e.backgroundColor})})),(0,Fe.Z)(this,"onChange",((e="local")=>{const t=this.editor;(0,s.iC)(t)&&"local"===e&&t.model.mutation.isStopped||(ji(this,Fh)&&clearTimeout(ji(this,Fh)),Gi(this,Fh,setTimeout((()=>{const n=this.getValue();this.updateColor(n),"local"===e&&(0,s.iC)(t)&&n&&this.setValue(n)}),50)))}))}static get cardName(){return"lightblock"}static get cardType(){return s.eT.BLOCK}static get autoSelected(){return!1}static get singleSelectable(){return!1}toolbar(){if(!(0,s.iC)(this.editor)||this.editor.readonly)return[];const e=this.getValue();return[{type:"dnd"},{type:"copy"},{type:"node",title:"主题",node:(0,s.$)(Eh),didMount:t=>{console.log("node?.get",e,t?.get()),t?.get()&&(0,It.ri)(_h,{value:e,change:t=>{this.setValue({...e,backgroundColor:t.background,borderColor:t.border}),this.updateColor()}}).mount(t.get())}},{type:"separator"},{type:"delete"}]}getValue(){const e=super.getValue(),t=ji(this,Sh)?.find(this.contenteditable.join(","));if(!t)return e;const n=this.editor,{schema:r,conversion:i}=n,o=(0,s.$)("<div></div>");o.append(t.clone(!0).children());const a=new s._b(o,n),l=a.toValue(r,i,!1,!1);return(0,s.iC)(n),{...e,html:l}}render(e){const t=this.getValue(),{borderColor:n,backgroundColor:r}=t,i=t.html?new s._b(t.html,this.editor).toValue():"<br />";return Gi(this,Sh,(0,s.$)(`<div class="lightblock-container" style="border-color: ${n};background-color:${r};">\n\t\t\t\t<div class="lightblock-icon">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tviewBox="0 0 1024 1024"\n\t\t\t\t\t\tversion="1.1"\n\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\tp-id="13148"\n\t\t\t\t\t\twidth="24"\n\t\t\t\t\t\theight="24"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M833.5 330.5C833.5 153 689.6 7.6 512 7.6S190.5 153 190.5 330.5c0 70.3 37.3 161 97.2 227.9 59.4 66.3 103.5 177.9 103.5 266.9v34.9h241.6v-34.6c0-89 44.1-200.4 103.2-266.9 60.1-67.6 97.5-166.4 97.5-228.2z"\n\t\t\t\t\t\t\tfill="#FFC807"\n\t\t\t\t\t\t\tp-id="13149"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M636.5 790.6l-193.9-268L596.4 202l199.2 266.4c-17.4 36.4-39.3 67.4-63.9 95.2C685.3 621 664.1 671.1 644 741l-7.5 49.6z"\n\t\t\t\t\t\t\tfill="#FFB300"\n\t\t\t\t\t\t\tp-id="13150"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M499.5 378.3h-82.7c-12.6 0-21.4-12.7-16.8-24.5l59.2-153c2.7-6.9 9.4-11.5 16.8-11.5h105c13.6 0 22.3 14.5 15.9 26.5l-81.5 153c-3.2 5.8-9.3 9.5-15.9 9.5z"\n\t\t\t\t\t\t\tfill="#FFF8E1"\n\t\t\t\t\t\t\tp-id="13151"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M466.2 518.3l160-171c12-12.8 2.9-33.7-14.6-33.7h-105c-8.7 0-16.4 5.6-19.1 13.9l-55 171c-6.6 20.4 19.1 35.5 33.7 19.8z"\n\t\t\t\t\t\t\tfill="#FFF8E1"\n\t\t\t\t\t\t\tp-id="13152"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M593.6 1016.4H430.4c-5.7 0-10.9-3.7-14-9.8l-22.2-44.2h235.6l-22.2 44.2c-3.1 6.1-8.3 9.8-14 9.8z"\n\t\t\t\t\t\t\tfill="#455A64"\n\t\t\t\t\t\t\tp-id="13153"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M625.7 980.4H398.3c-22.1 0-40.1-17.9-40.1-40.1V776.7c0-22.1 17.9-40.1 40.1-40.1h227.5c22.1 0 40.1 17.9 40.1 40.1v163.7c-0.1 22.1-18 40-40.2 40z"\n\t\t\t\t\t\t\tfill="#ECEFF1"\n\t\t\t\t\t\t\tp-id="13154"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td="M539.8 808.6H359v-36h180.8c9.9 0 18 8.1 18 18 0 10-8.1 18-18 18zM359 840.1h306v36H359zM665 943.6H494.8c-9.9 0-18-8.1-18-18s8.1-18 18-18H665v36z"\n\t\t\t\t\t\t\tfill="#CFD8DC"\n\t\t\t\t\t\t\tp-id="13155"\n\t\t\t\t\t\t></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<div class="lightblock-editor-container">${i}</div>\n\t\t\t</div>`)),e&&setTimeout((()=>{ji(this,Sh)?.find(".lightblock-editor-container")?.get()?.focus?.()}),0),ji(this,Sh)}didRender(){super.didRender(),this.updateColor()}}var Mh=Th,Ih=n(60041),Nh=n.n(Ih);function Uh(e){const t={borderColor:"#fed4a4",backgroundColor:"#fff5eb",text:"light-block"};e.use(Nh(),"tip",{render(e,n){return 1===e[n].nesting?`<div data-type="lightblock" data-value="${(0,s.it)(t)}">`:"</div>"}})}var Lh=class extends s.Sy{constructor(...e){super(...e),(0,Fe.Z)(this,"markdownIt",(e=>{!1!==this.options.markdown&&Uh(e)})),(0,Fe.Z)(this,"pasteSchema",(e=>{e.add({type:"block",name:"div",attributes:{"data-type":{required:!0,value:Mh.cardName},"data-value":"*"}})})),(0,Fe.Z)(this,"pasteHtml",(e=>{const t=this.editor,n=Mh.cardName;if((0,s.iC)(t)&&!t.readonly){if(e.isElement()){const r=e.attributes("data-type");if(r===n){const r=e.attributes("data-value"),i=(0,s.RW)(r);return t.card.replaceNode(e,n,i),e.remove(),!1}}return!0}})),(0,Fe.Z)(this,"parseHtml",(e=>{const t=Mh.cardName;e.find(`[${s.Jr}="${t}"],[${s.mV}="${t}"]`).each((e=>{const n=(0,s.$)(e),r=this.editor.card.find(n),i=r?.getValue();if(i){n.empty();const e=this.renderHtml(i,t);n.replaceWith(e)}else n.remove()}))})),(0,Fe.Z)(this,"renderHtml",((e,t)=>{const n=new s._b(e.html||e.text,this.editor).toHTML();return(0,s.$)(`<div data-type="${t}" data-value="${(0,s.it)(e)}">${n}</div>`)}))}static get pluginName(){return"lightblock"}init(){const e=this.editor;e.on("parse:html",this.parseHtml),e.on("paste:schema",this.pasteSchema),e.on("paste:each",this.pasteHtml),(0,s.iC)(e)&&e.on("markdown-it",this.markdownIt)}execute(){const e=this.editor;if(!(0,s.iC)(e)||e.readonly)return;const{card:t}=e;t.insert(Mh.cardName,{borderColor:"#fed4a4",backgroundColor:"#fff5eb",text:"light-block"},!0)}destroy(){const e=this.editor;e.off("parse:html",this.parseHtml),e.off("paste:schema",this.pasteSchema),e.off("paste:each",this.pasteHtml)}};class Qh extends s.Zb{constructor(...e){super(...e),(0,Fe.Z)(this,"container",void 0),(0,Fe.Z)(this,"onBeforeRender",((e,t)=>{const n=this.editor.plugin.components["audio"];if(n){const{onBeforeRender:r}=n["options"]||{};if(r)return r(e,t)}return t})),(0,Fe.Z)(this,"downloadFile",(()=>{const e=this.getValue();e?.download&&window.open((0,s.Nm)(this.onBeforeRender("download",e.url)))}))}static get cardName(){return"audio"}static get cardType(){return s.eT.BLOCK}static get autoSelected(){return!1}getLocales(){return this.editor.language.get("audio")}renderTemplate(e){const{name:t,status:n,size:r,message:i,percent:o}=e,a=this.getLocales(),l={audio:'<div class="data-audio-icon">\n <svg width="32px" height="24px" viewBox="0 0 32 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.25"><g transform="translate(-704.000000, -550.000000)" fill="#000000" fill-rule="nonzero"> <g transform="translate(704.000000, 550.000000)"> <g> <path d="M13.09375,17.30625 L20.65625,12.375 C20.95,12.16875 20.95,11.809375 20.65625,11.603125 L13.09375,6.696875 C12.66875,6.4 12,6.6375 12,7.084375 L12,16.921875 C12,17.365625 12.671875,17.603125 13.09375,17.30625 Z" id="Path"></path> <path d="M30,0 L2,0 C0.896875,0 0,0.896875 0,2 L0,22 C0,23.103125 0.896875,24 2,24 L30,24 C31.103125,24 32,23.103125 32,22 L32,2 C32,0.896875 31.103125,0 30,0 Z M5.25,21.25 C5.25,21.525 5.025,21.75 4.75,21.75 L2.5,21.75 C2.225,21.75 2,21.525 2,21.25 L2,18.5 C2,18.225 2.225,18 2.5,18 L4.75,18 C5.025,18 5.25,18.225 5.25,18.5 L5.25,21.25 Z M5.25,13.375 C5.25,13.65 5.025,13.875 4.75,13.875 L2.5,13.875 C2.225,13.875 2,13.65 2,13.375 L2,10.625 C2,10.35 2.225,10.125 2.5,10.125 L4.75,10.125 C5.025,10.125 5.25,10.35 5.25,10.625 L5.25,13.375 Z M5.25,5.5 C5.25,5.775 5.025,6 4.75,6 L2.5,6 C2.225,6 2,5.775 2,5.5 L2,2.75 C2,2.475 2.225,2.25 2.5,2.25 L4.75,2.25 C5.025,2.25 5.25,2.475 5.25,2.75 L5.25,5.5 Z M24.75,21.75 L7.25,21.75 L7.25,2.25 L24.75,2.25 L24.75,21.75 Z M30,21.25 C30,21.525 29.775,21.75 29.5,21.75 L27.25,21.75 C26.975,21.75 26.75,21.525 26.75,21.25 L26.75,18.5 C26.75,18.225 26.975,18 27.25,18 L29.5,18 C29.775,18 30,18.225 30,18.5 L30,21.25 Z M30,13.375 C30,13.65 29.775,13.875 29.5,13.875 L27.25,13.875 C26.975,13.875 26.75,13.65 26.75,13.375 L26.75,10.625 C26.75,10.35 26.975,10.125 27.25,10.125 L29.5,10.125 C29.775,10.125 30,10.35 30,10.625 L30,13.375 Z M30,5.5 C30,5.775 29.775,6 29.5,6 L27.25,6 C26.975,6 26.75,5.775 26.75,5.5 L26.75,2.75 C26.75,2.475 26.975,2.25 27.25,2.25 L29.5,2.25 C29.775,2.25 30,2.475 30,2.75 L30,5.5 Z" id="Shape"></path> </g> </g></g> </g></svg></div>',spin:'<i class="data-audio-anticon"><svg viewBox="0 0 1024 1024" class="data-audio-anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"> <path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></i>',warn:'<div class="data-audio-icon"><svg width="41px" height="29px" viewBox="0 0 41 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-704.000000, -550.000000)"> <g id="Group-2" transform="translate(704.000000, 550.000000)"> <g id="audio" fill="#000000" fill-rule="nonzero" opacity="0.449999988"> <path d="M13.09375,17.30625 C12.671875,17.603125 12,17.365625 12,16.921875 L12,7.084375 C12,6.6375 12.66875,6.4 13.09375,6.696875 L20.65625,11.603125 C20.95,11.809375 20.95,12.16875 20.65625,12.375 L13.09375,17.30625 Z M30,0 C31.103125,0 32,0.896875 32,2 L32,22 C32,23.103125 31.103125,24 30,24 L2,24 C0.896875,24 0,23.103125 0,22 L0,2 C0,0.896875 0.896875,0 2,0 L30,0 Z M5.25,21.25 L5.25,18.5 C5.25,18.225 5.025,18 4.75,18 L2.5,18 C2.225,18 2,18.225 2,18.5 L2,21.25 C2,21.525 2.225,21.75 2.5,21.75 L4.75,21.75 C5.025,21.75 5.25,21.525 5.25,21.25 Z M5.25,13.375 L5.25,10.625 C5.25,10.35 5.025,10.125 4.75,10.125 L2.5,10.125 C2.225,10.125 2,10.35 2,10.625 L2,13.375 C2,13.65 2.225,13.875 2.5,13.875 L4.75,13.875 C5.025,13.875 5.25,13.65 5.25,13.375 Z M5.25,5.5 L5.25,2.75 C5.25,2.475 5.025,2.25 4.75,2.25 L2.5,2.25 C2.225,2.25 2,2.475 2,2.75 L2,5.5 C2,5.775 2.225,6 2.5,6 L4.75,6 C5.025,6 5.25,5.775 5.25,5.5 Z M24.75,21.75 L24.75,2.25 L7.25,2.25 L7.25,21.75 L24.75,21.75 Z M30,21.25 L30,18.5 C30,18.225 29.775,18 29.5,18 L27.25,18 C26.975,18 26.75,18.225 26.75,18.5 L26.75,21.25 C26.75,21.525 26.975,21.75 27.25,21.75 L29.5,21.75 C29.775,21.75 30,21.525 30,21.25 Z M30,13.375 L30,10.625 C30,10.35 29.775,10.125 29.5,10.125 L27.25,10.125 C26.975,10.125 26.75,10.35 26.75,10.625 L26.75,13.375 C26.75,13.65 26.975,13.875 27.25,13.875 L29.5,13.875 C29.775,13.875 30,13.65 30,13.375 Z M30,5.5 L30,2.75 C30,2.475 29.775,2.25 29.5,2.25 L27.25,2.25 C26.975,2.25 26.75,2.475 26.75,2.75 L26.75,5.5 C26.75,5.775 26.975,6 27.25,6 L29.5,6 C29.775,6 30,5.775 30,5.5 Z" id="Combined-Shape"></path> </g> <g id="error-fill" transform="translate(21.000000, 10.000000)"> <rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="20" height="20"></rect> <path d="M19.0267927,16.510301 L19.0272631,16.5111171 C19.4269215,17.2064579 18.9263267,18.0729167 18.125,18.0729167 L1.875,18.0729167 C1.07367326,18.0729167 0.573078461,17.2064579 0.973207261,16.510301 L9.0970084,2.44988987 C9.28650026,2.11750251 9.63068515,1.92708333 10,1.92708333 C10.368224,1.92708333 10.7098796,2.11659543 10.9017927,2.447801 L19.0267927,16.510301 Z" id="Path" stroke="#FFFFFF" stroke-width="0.833333333" fill="#FFFFFF"></path> <path d="M18.6660156,16.71875 L10.5410156,2.65625 C10.4199219,2.44726562 10.2109375,2.34375 10,2.34375 C9.7890625,2.34375 9.578125,2.44726562 9.45898438,2.65625 L1.33398438,16.71875 C1.09375,17.1367188 1.39453125,17.65625 1.875,17.65625 L18.125,17.65625 C18.6054688,17.65625 18.90625,17.1367188 18.6660156,16.71875 Z M9.375,8.125 C9.375,8.0390625 9.4453125,7.96875 9.53125,7.96875 L10.46875,7.96875 C10.5546875,7.96875 10.625,8.0390625 10.625,8.125 L10.625,11.71875 C10.625,11.8046875 10.5546875,11.875 10.46875,11.875 L9.53125,11.875 C9.4453125,11.875 9.375,11.8046875 9.375,11.71875 L9.375,8.125 Z M10,15 C9.48242188,15 9.0625,14.5800781 9.0625,14.0625 C9.0625,13.5449219 9.48242188,13.125 10,13.125 C10.5175781,13.125 10.9375,13.5449219 10.9375,14.0625 C10.9375,14.5800781 10.5175781,15 10,15 Z" id="Shape" fill="#FAAD14" fill-rule="nonzero"></path></g></g></g> </g></svg></div>',error:'<span class="data-error-icon">X</span>'};if("error"===n)return`\n <div class="data-audio">\n <div class="data-audio-content data-audio-error">\n <div class="data-audio-center">\n <div class="data-audio-name">${(0,s.YU)(t)}</div>\n <div class="data-audio-message">\n ${l.error}\n ${i||a["loadError"]}\n </div>\n </div>\n </div>\n </div>`;const c=r?(0,s.hR)(r):"";if("uploading"===n)return`\n <div class="data-audio">\n <div class="data-audio-content data-audio-uploading">\n <div class="data-audio-center">\n ${l.audio}\n <div class="data-audio-name">\n ${(0,s.YU)(t)} (${(0,s.YU)(c)})\n </div>\n <div class="data-audio-progress">\n ${l.spin}\n <span class="percent">${o||0}%<span>\n </div>\n </div>\n </div>\n </div>`;const A="undefined"===typeof n;return"transcoding"===n||A?`\n <div class="data-audio">\n <div class="data-audio-content data-audio-uploaded">\n <div class="data-audio-center">\n ${l.audio}\n <div class="data-audio-name">\n ${(0,s.YU)(t)} (${(0,s.YU)(c)})\n </div>\n <div class="data-audio-transcoding">\n ${l.spin}\n <span class="transcoding">${A?a["loading"]:a["transcoding"]}%<span>\n </div>\n </div>\n </div>\n </div>\n `:'\n <div class="data-audio">\n <div class="data-audio-content data-audio-done"></div>\n </div>\n '}initPlayer(){const e=this.getValue();if(!e)return;const t=(0,s.Nm)(this.onBeforeRender("query",e.url)),n=document.createElement("audio");n.preload="none",n.setAttribute("src",t),n.setAttribute("webkit-playsinline","webkit-playsinline"),n.setAttribute("playsinline","playsinline"),this.container?.find(".data-audio-content").append(n),n.oncontextmenu=function(){return!1},setTimeout((()=>{n.controls=!0}),0)}toolbar(){const e=[],t=this.getValue();if(!t)return e;const{status:n,download:r}=t,i=this.getLocales();return"done"===n&&(r&&e.push({type:"button",content:'<span class="data-icon data-icon-download" />',title:i.download,onClick:this.downloadFile}),(0,s.iC)(this.editor)&&!this.editor.readonly&&(e.push({type:"copy"}),e.push({type:"separator"}))),(0,s.iC)(this.editor)&&!this.editor.readonly&&e.push({type:"delete"}),e}setProgressPercent(e){this.container?.find(".percent").html(`${e}%`)}onActivate(e){e?this.container?.addClass("data-audio-active"):this.container?.removeClass("data-audio-active")}checker(e,t,n){const{command:r}=this.editor,i=()=>{r.executeMethod("audio-uploader","query",e,(e=>{e&&"done"!==e.status?setTimeout(i,3e3):t(e)}),(e=>{n(e)}))};i()}render(){const e=this.getValue();if(!e)return;const t=this.getCenter();t.empty();const{command:n,plugin:r}=this.editor,{audio_id:i,status:o}=e,a=this.getLocales();if((0,s.iC)(this.editor)){if("transcoding"===o){if(this.container=(0,s.$)(this.renderTemplate(e)),!i)throw"audio id is undefined";return this.checker(i,(n=>{const r={...e,url:n?.url?n.url:e.url,name:n?.name?n.name:e.name,download:n?.download?n.download:e.download,status:"done"};this.setValue(r),this.container=(0,s.$)(this.renderTemplate(r)),t.empty(),t.append(this.container),this.initPlayer()}),(n=>{const r={...e,status:"error",message:n||a["loadError"]};this.setValue(r),this.container=(0,s.$)(this.renderTemplate(r)),t.empty(),t.append(this.container)})),this.container}return"done"===o?(this.container=(0,s.$)(this.renderTemplate({...e,status:void 0})),n.executeMethod("audio-uploader","query",i,(n=>{const r={...e,url:n?.url?n.url:e.url,name:n?.name?n.name:e.name,download:n?.download?n.download:e.download};this.container=(0,s.$)(this.renderTemplate(r)),t.empty(),t.append(this.container),this.initPlayer()}),(n=>{this.container=(0,s.$)(this.renderTemplate({...e,status:"error",message:n||a["loadError"]})),t.empty(),t.append(this.container)})),this.container):(0,s.$)(this.renderTemplate(e))}if("done"===o){this.container=(0,s.$)(this.renderTemplate({...e,status:void 0}));const o=n=>{const r={...e,url:n?.url?n.url:e.url,name:n?.name?n.name:e.name,download:n?.download?n.download:e.download};this.container=(0,s.$)(this.renderTemplate(r)),t.empty(),t.append(this.container),this.initPlayer()};return r.components["audio-uploader"]?n.executeMethod("audio-uploader","query",i,(e=>{o(e)}),(n=>{this.container=(0,s.$)(this.renderTemplate({...e,status:"error",message:n||a["loadError"]})),t.empty(),t.append(this.container)})):o(),this.container}return"error"===o?(0,s.$)(this.renderTemplate({...e,message:e.message||a["loadError"]})):void 0}didRender(){super.didRender(),this.container?.on(s.tq?"touchstart":"click",(()=>{(0,s.iC)(this.editor)&&!this.activated&&this.editor.card.activate(this.root)}))}}var Dh=Qh,Hh=class extends s.Sy{constructor(...e){super(...e),(0,Fe.Z)(this,"cardComponents",{}),(0,Fe.Z)(this,"extensionNames",["mp3"])}static get pluginName(){return"audio-uploader"}init(){(0,s.iC)(this.editor)&&(this.editor.on("drop:files",(e=>this.dropFiles(e))),this.editor.on("paste:event",(({files:e})=>this.pasteFiles(e))),this.editor.on("paste:each",(e=>this.pasteEach(e))));let{accept:e}=this.options;const t=[];"string"===typeof e&&(e=e.split(",")),(e||[]).forEach((e=>{e=e.trim();const n=e.split(".").pop();n&&t.push(n)})),t.length>0&&(this.extensionNames=t)}isAudio(e){const t=(0,s.Ym)(e);return this.extensionNames.indexOf(t)>=0}async execute(e,...t){if("string"===typeof e){switch(e){case"query":return this.query(t[0],t[1],t[2])}return}const{request:n,card:r,language:i}=this.editor,{action:o,data:a,type:l,contentType:c,multiple:A,crossOrigin:u,headers:d,name:h}=this.options,{parse:p}=this.options,f=this.options.limitSize||5242880;Array.isArray(e)||(e=await n.getFiles({event:e,accept:s.Dt?"audio/*":this.extensionNames.length>0?"."+this.extensionNames.join(",."):"",multiple:A})),0!==e.length&&n.upload({url:o,data:a,type:l,contentType:c,crossOrigin:u,headers:d,onBefore:e=>!(e.size>f)||(this.editor.messageError("upload-limit",i.get("audio","uploadLimitError").toString().replace("$size",(f/1024/1024).toFixed(0)+"M")),!1),onReady:e=>{if(!(0,s.iC)(this.editor)||this.cardComponents[e.uid])return;const t=r.insert("audio",{status:"uploading",name:e.name,size:e.size});this.cardComponents[e.uid]=t},onUploading:(e,{percent:t})=>{const n=this.cardComponents[e.uid||""];n&&n.setProgressPercent(t)},onSuccess:(e,t)=>{const n=this.cardComponents[t.uid||""];if(!n)return;const i=e.id||e.data&&e.data.id,o=e.url||e.data&&e.data.url,a=e.cover||e.data&&e.data.cover,s=e.download||e.data&&e.data.download;let l=e.status||e.data&&e.data.status;l="transcoding"===l?"transcoding":"done";let c={result:!0,data:{audio_id:i,url:o,cover:a,download:s,status:l}};if(p){const t=p(e);if(t.result){let e=c.data;"string"===typeof t.data?c.data={...e,url:t.data}:(e.url=t.data.url,void 0!==t.data.status&&(e={...e,status:t.data.status}),void 0!==t.data.id&&(e={...e,audio_id:t.data.id}),c.data={...e})}else c={result:!1,data:t.data.toString()}}else o||(c={result:!1,data:e.data});c.result?this.editor.card.update(n.id,"string"===typeof c.data?{url:c.data}:{...c.data}):r.update(n.id,{status:"error",message:c.data||this.editor.language.get("audio","uploadError")}),delete this.cardComponents[t.uid||""]},onError:(e,t)=>{const n=this.cardComponents[t.uid||""];n&&(r.update(n.id,{status:"error",message:e.message||this.editor.language.get("audio","uploadError")}),delete this.cardComponents[t.uid||""])}},e,h)}query(e,t,n=(()=>{})){const{request:r}=this.editor,{query:i,parse:o}=this.options;if(!i||!e)return t();const{action:a,type:s,contentType:l,data:c}=i;r.ajax({url:a,contentType:l||"",type:void 0===s?"json":s,data:"function"===typeof c?async()=>{const t=c();return{...t,id:e}}:{...c,id:e},success:e=>{const{result:r,data:i}=e;if(r){const r=o?o(e):e;!1===r.result?n(r.data||this.editor.language.get("audio","loadError")):t({...r.data,status:"transcoding"!==r.data.status?"done":"transcoding"})}else n(i)},error:e=>{n(e.message||this.editor.language.get("audio","loadError"))},method:"GET"})}dropFiles(e){if((0,s.iC)(this.editor)&&(e=e.filter((e=>this.isAudio(e))),0!==e.length))return this.editor.command.execute("audio-uploader",e),!1}pasteFiles(e){if((0,s.iC)(this.editor)&&(e=e.filter((e=>this.isAudio(e))),0!==e.length))return this.editor.command.execute("audio-uploader",e.filter((e=>this.isAudio(e))),e),!1}pasteEach(e){if(e.isCard()&&e.attributes(s.mV)){if("audio"!==e.attributes(s.mV))return;const t=(0,s.RW)(e.attributes(s.TM));return t&&t.url?void("uploading"===t.status&&(t.percent=0,e.attributes(s.TM,(0,s.it)({...t,status:"done"})))):void e.remove()}}},Oh={audio:{errorMessageCopy:"Copy error message",loadError:"The audio failed to load!",uploadError:"The audio failed to upload!",uploadLimitError:"Upload audio size is limited to $size",download:"Download",preview:"Preview",loading:"Loading...",transcoding:"Transcoding..."}},zh={audio:{errorMessageCopy:"复制错误信息",loadError:"音频加载失败!",uploadError:"上传音频失败!",uploadLimitError:"上传音频大小限制为 $size",download:"下载",preview:"预览",loading:"加载中...",transcoding:"转码中..."}},Zh={"en-US":Oh,"zh-CN":zh};class Rh extends s.Sy{static get pluginName(){return"audio"}init(){this.editor.language.add(Zh),(0,s.iC)(this.editor)&&(this.editor.on("parse:html",(e=>this.parseHtml(e))),this.editor.on("paste:each",(e=>this.pasteHtml(e))),this.editor.on("paste:schema",(e=>this.pasteSchema(e))))}execute(e,t,n,r,i,o){const a={status:e,audio_id:r,url:t,name:n||t,size:i,download:o};"error"===e&&(a.url="",a.message=t),this.editor.card.insert("audio",a)}async waiting(e){const{card:t}=this.editor,n=e=>e.root.inEditor()&&e.constructor.cardName===Dh.cardName&&"uploading"===e.getValue()?.status,r=()=>t.components.find(n),i=t=>{let r=6e4;return new Promise(((i,o)=>{if(e){const n=e(this.constructor.pluginName,t);if(!1===n)return o({name:this.constructor.pluginName,card:t});"number"===typeof n&&(r=n)}const a=(new Date).getTime(),s=(new Date).getTime(),l=()=>{if(s-a>=r)return i();setTimeout((()=>{n(t)?l():i()}),10)};l()}))};return new Promise(((e,t)=>{const n=r(),o=n=>{i(n).then((()=>{const t=r();t?o(t):e()})).catch(t)};n?o(n):e()}))}pasteSchema(e){e.add({type:"block",name:"div",attributes:{"data-value":"*","data-type":{required:!0,value:Dh.cardName}}})}pasteHtml(e){if((0,s.iC)(this.editor)){if(e.isElement()){const t=e.attributes("data-type");if(t===Dh.cardName){const t=e.attributes("data-value"),n=(0,s.RW)(t);if(!n.url)return;return this.editor.card.replaceNode(e,Dh.cardName,n),e.remove(),!1}}return!0}}parseHtml(e){e.find(`[${s.Jr}=${Dh.cardName}`).each((e=>{const t=(0,s.$)(e),n=this.editor.card.find(t),r=n?.getValue();if(r?.url&&"done"===r.status){const{onBeforeRender:e}=this.options,{url:n}=r,i=`<div data-type="${Dh.cardName}" data-value="${(0,s.it)(r)}"><audio controls src="${(0,s.Nm)(e?e("query",n):n)}" webkit-playsinline="webkit-playsinline" playsinline="playsinline" style="outline:none;" /></div>`;t.empty(),t.replaceWith((0,s.$)(i))}else t.remove()}))}}const Ph={id:"draw-view"},qh={key:0,class:"draw-view",ref:"xmlContainer"};function Kh(e,t,n,r,i,o){const a=(0,Ft.up)("Spin");return(0,Ft.wg)(),(0,Ft.iD)("div",Ph,[(0,Ft.Wm)(a,{spinning:e.loading,tip:"资源加载中..."},null,8,["spinning"]),e.loading?(0,Ft.kq)("",!0):((0,Ft.wg)(),(0,Ft.iD)("div",qh,null,512))])}var Wh=n(82450);const jh='<mxGraphModel dx="1186" dy="670" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">\n<root>\n <mxCell id="0" />\n <mxCell id="1" parent="0" />\n <mxCell id="9v9bDfxMJK_rrW6hIOUh-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="9v9bDfxMJK_rrW6hIOUh-1" target="9v9bDfxMJK_rrW6hIOUh-3">\n <mxGeometry relative="1" as="geometry" />\n </mxCell>\n <mxCell id="9v9bDfxMJK_rrW6hIOUh-1" value="Start" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">\n <mxGeometry x="200" y="140" width="120" height="60" as="geometry" />\n </mxCell>\n <mxCell id="9v9bDfxMJK_rrW6hIOUh-3" value="End" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">\n <mxGeometry x="400" y="140" width="120" height="60" as="geometry" />\n </mxCell>\n</root>\n</mxGraphModel>',Vh=e=>{if(!e)return null;try{const t=new XMLSerializer;return t.serializeToString(e)}catch(t){return console.log("XmlToString Error: ",t),null}},Gh=e=>{try{const t=new DOMParser;return t.parseFromString(e,"text/xml")}catch(t){return console.log("StringToXml Error: ",t),null}};let $h=null;const Yh=()=>$h?Promise.resolve($h):n.e(617).then(n.bind(n,43617)).then((e=>($h=e,e)));var Xh=(0,Ft.aZ)({name:"draw-view",components:{Spin:Wh.Z},props:{value:{type:String,default:jh}},setup(e){const{value:t}={...e},n=(0,Tt.iH)(!0),r=(0,Tt.iH)(t),i=(0,Tt.iH)(null);(0,Ft.YP)(r,(()=>o())),(0,Ft.bv)((()=>{Yh().then((()=>{setTimeout((()=>{n.value=!1,(0,Ft.Y3)((()=>o()))}),400)}))}));const o=(e=r.value)=>{const t=i.value;t&&Yh().then((n=>{const r=new n.DiagramViewer(Gh(e)),i=r.renderSVG(null,1,1);i&&t.appendChild(i)}))};return{loading:n,xmlContainer:i}}});const Jh=(0,Nu.Z)(Xh,[["render",Kh]]);var ep=Jh;const tp={id:"draw-edit"},np={key:0};function rp(e,t,n,r,i,o){return(0,Ft.wg)(),(0,Ft.iD)("div",tp,[e.loading?((0,Ft.wg)(),(0,Ft.iD)("div",np,"资源加载中...")):(0,Ft.kq)("",!0)])}var ip=(0,Ft.aZ)({name:"draw-edit",components:{},props:{value:{type:String,default:jh},change:{type:Function,default:null}},setup(e){const{value:t,change:n}={...e};let r=null;const i=(0,Tt.iH)(!0),o=(0,Tt.iH)(t);(0,Ft.bv)((()=>{Yh().then((e=>{setTimeout((()=>{i.value=!1,a()}),400)}))}));const a=()=>{Yh().then((e=>{const t=e=>{const t=document.createElement("div");t.innerText="保存",t.style.marginRight="20px",t.onclick=s,e.appendChild(t)},n=document.body;r=new e.DiagramEditor(n,t),e.getLanguage("zh").then((e=>{r.start(e,Gh(o.value),(e=>{const t=Vh(e);o.value=t||""}))}))}))},s=()=>{r&&r.exit(),n&&n(o.value)};return{loading:i,xmlExample:o}}});const op=(0,Nu.Z)(ip,[["render",rp]]);var ap=op;const sp='<span class="draw-icon-edit">\n <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1777" width="16" height="16">\n <path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" fill="#595959"></path>\n </svg>\n</span>';var lp=new WeakMap;class cp extends s.Zb{constructor(...e){super(...e),(0,Fe.Z)(this,"renderBefore",void 0),qi(this,lp,{writable:!0,value:void 0}),(0,Fe.Z)(this,"vm",void 0),(0,Fe.Z)(this,"resize",(()=>{const e=this.getValue();if(e?.isResize)return ji(this,lp)?.parent()}))}static get cardName(){return"draw"}static get cardType(){return s.eT.BLOCK}static get lazyRender(){return!0}static get singleSelectable(){return!1}static get autoSelected(){return!1}toolbar(){const e=()=>{if((0,s.iC)(this.editor)&&!this.editor.readonly){const e=[{type:"dnd"},{type:"node",node:(0,s.$)(sp),didMount:e=>{e?.get()&&e.on("click",(()=>{const t=this.getValue();(0,It.ri)(ap,{value:t.xml,change:e=>{this.setValue({...t,xml:e}),this.didRender()}}).mount(e.get())}))}},{type:"copy"},{type:"separator"},{type:"delete"}];return e}return[]};return e()}renderContainer(){const e=this.getValue(),t=e?.height||"auto",n=(0,s.$)(`\n\t\t\t<div class="data-draw data-draw-container">\n\t\t\t\t<div \n class="data-draw-body" \n style="height:${"auto"===t?"":t+"px"}"\n >\n\t\t\t\t\t<div class="data-draw-content">\n </div>\n <span class="data-draw-maximize">\n <span class="data-icon data-icon-maximize"></span>\n </span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`),r=n.find(".data-draw-content"),i=n.find(".data-draw-maximize");return i.on("click",(()=>{const e=this.getValue();Cu.Z.confirm({icon:null,content:(0,Ft.Wm)(ep,{value:e.xml}),wrapClassName:"draw-full-modal",width:"100%",cancelText:"关 闭",closable:!0})})),e?.height&&r.attributes("data-height",e.height),Gi(this,lp,r),n}render(e){this.renderBefore=e;const t=this.getCenter();t.empty(),t.append(this.renderContainer())}didRender(){super.didRender();const e=this.getValue();this.vm=(0,It.ri)(ep,{value:e.xml}),this.vm.mount(ji(this,lp)?.get())}destroy(){super.destroy(),this.vm?.unmount(),this.vm=void 0}}var Ap=cp,up=class extends s.Sy{static get pluginName(){return"draw"}init(){this.editor.on("paser:html",(e=>this.parseHtml(e))),this.editor.on("paste:schema",(e=>this.pasteSchema(e))),this.editor.on("paste:each",(e=>this.pasteHtml(e)))}execute(){if(!(0,s.iC)(this.editor))return;const{card:e}=this.editor;e.insert(Ap.cardName)}hotkey(){return this.options.hotkey||"mod+shift+0"}pasteSchema(e){e.add({type:"block",name:"div",attributes:{"data-type":{required:!0,value:Ap.cardName},"data-value":"*"}})}pasteHtml(e){if((0,s.iC)(this.editor)){if(e.isElement()){const t=e.attributes("data-type");if(t===Ap.cardName){const t=e.attributes("data-value"),n=(0,s.RW)(t);return this.editor.card.replaceNode(e,Ap.cardName,n),e.remove(),!1}}return!0}}parseHtml(e){e.find(`[${s.Jr}=${Ap.cardName}`).each((e=>{const t=(0,s.$)(e),n=this.editor.card.find(t),r=n?.getValue();if(r){t.empty();const e=(0,s.$)(`<div data-type="${Ap.cardName}" data-value="${(0,s.it)(r)}"></div>`);t.replaceWith(e)}else t.remove()}))}},dp={"en-US":{tag:{defaultTag:"Default Tag",customTag:"Custom Tag",historyTag:"History Tag",placeholder:"Press Enter to confirm",addTag:"Add Tag",abandon:"Abandon",must:"Require",add:"Add",delete:"Delete"}},"zh-CN":{tag:{defaultTag:"默认标签",customTag:"自定义标签",historyTag:"历史标签",placeholder:"输入标签内容, 回车确认",addTag:"请添加标签",abandon:"废弃",must:"必填",add:"添加",delete:"删除"}}},hp=n(25431);const pp=[{type:"abandon",background:"#FFE8E6",color:"#820014",text:"废弃"},{type:"must",background:"#ebf3ff",color:"#338aff",text:"必填"},{type:"add",background:"#d8eecd",color:"#5ca537",text:"新增"},{type:"delete",background:"#ffe9bc",color:"#dc9300",text:"删除"}],fp=(e,t,n)=>{const{tagType:r,tagValue:i,isCustom:o}=t,a=e.find((e=>e.type===r))||e[0];return o?{...a,text:i||n["addTag"],isCustom:!0}:{...a,text:r?a.type:n["addTag"],isCustom:!1}};var gp=(0,Ft.aZ)({name:"tag-comp",props:{value:{type:Object,required:!0},editor:{type:Object,required:!0},defaultVisible:{type:Boolean,required:!1},change:{type:Function}},setup(e){const{value:t,editor:n,defaultVisible:r,change:i}=(0,Tt.IU)(e),{tagType:o,tagValue:a,isCustom:s}=t,l=n.language.get("tag"),c=pp.map((e=>({...e,text:l[e.type]}))),A=fp(c,t,l),u=s?a:"",d=(0,Tt.iH)(o);let h=(0,Tt.qj)(A);const p=(0,Tt.iH)(u),f=(0,Tt.iH)(r),g=()=>{f.value=!1},m=e=>{f.value=e},v=e=>{d.value=e.type,p.value="",h=(0,Tt.qj)({...e,isCustom:!1}),i&&(i(h),g())},b=e=>{d.value=e.type,h=(0,Tt.qj)({...e,text:p.value,isCustom:!0}),i&&i(h)},y=e=>{p.value=e.target.value||"",h.isCustom=!0},w=()=>{d.value=h.type||"abandon",h=(0,Tt.qj)({...h,text:p.value}),i&&(i(h),g())};return()=>(0,Ft.Wm)(hp.Z,{visible:f.value,trigger:"click",placement:"bottomLeft",overlayClassName:"tag-plugin-tooltip",onVisibleChange:m,overlayStyle:{padding:0,boxShadow:"0px 2px 4px 0px rgba(225 225 225, .5)"},content:(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-contain"},[(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-default"},[(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-title"},[l["defaultTag"]]),c.map((e=>(0,Ft.Wm)("span",{key:e.type,style:{minWidth:22,color:e.color,background:e.background},onClick:()=>v(e)},[d.value===e.type&&!h.isCustom&&(0,Ft.Wm)("svg",{width:12,height:12,fill:e.color,viewBox:"0 0 18 18",style:{marginRight:2}},[(0,Ft.Wm)("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},null)]),e.text])))]),(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-custom"},[(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-title"},[l["customTag"]]),(0,Ft.Wm)("div",{class:"tag-plugin-tooltip-custom-theme"},[c.map((e=>(0,Ft.Wm)("span",{key:e.type,style:{color:e.color,background:e.background},onClick:()=>{b(e)}},[d.value===e.type&&h.isCustom&&(0,Ft.Wm)("svg",{width:12,height:12,fill:e.color,viewBox:"0 0 18 18",style:{marginRight:2}},[(0,Ft.Wm)("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},null)])])))]),(0,Ft.Wm)(Ut.ZP,{size:"small",value:p.value,placeholder:l["placeholder"],onChange:y,onPressEnter:w},null)])])},{default:()=>[(0,Ft.Wm)("div",{class:"tag-plugin-contain",style:{color:h.color,background:h.background}},[h.text||l["addTag"]])]})}}),mp=new WeakMap;class vp extends s.Zb{constructor(...e){super(...e),qi(this,mp,{writable:!0,value:void 0}),(0,Fe.Z)(this,"vm",void 0),(0,Fe.Z)(this,"defaultVisible",!1)}static get cardName(){return"tag"}static get cardType(){return s.eT.INLINE}static get autoSelected(){return!1}static get singleSelectable(){return!1}static get selectStyleType(){return s.dw.BACKGROUND}render(e){return Gi(this,mp,(0,s.$)("<div>Loading</div>")),this.defaultVisible=e??!1,ji(this,mp)}didRender(){super.didRender();const e=this.getValue(),{editor:t}=this;setTimeout((()=>{this.vm=(0,It.ri)(gp,{value:e,editor:t,defaultVisible:this.defaultVisible,change:e=>{this.setValue({tagType:e.type,tagValue:e.text,isCustom:e.isCustom})}}),this.vm.mount(ji(this,mp)?.get())}),20)}destroy(){super.destroy(),this.vm?.unmount(),this.vm=void 0}}var bp=vp,yp=class extends s.Sy{constructor(...e){super(...e),(0,Fe.Z)(this,"pasteSchema",(e=>{e.add({type:"inline",name:"span",attributes:{"data-type":{required:!0,value:bp.cardName},"data-value":"*"}})})),(0,Fe.Z)(this,"pasteHtml",(e=>{const{editor:t}=this;if((0,s.iC)(t)&&!t.readonly){if(e.isElement()){const n=e.attributes("data-type");if(n===bp.cardName){const n=e.attributes("data-value"),r=(0,s.RW)(n);return t.card.replaceNode(e,bp.cardName,r),e.remove(),!1}}return!0}})),(0,Fe.Z)(this,"parseHtml",(e=>{const t=bp.cardName;e.find(`[${s.Jr}="${t}"],[${s.mV}="${t}"]`).each((e=>{const n=(0,s.$)(e),r=this.editor.card.find(n),i=r?.getValue();if(i){n.empty();const e=i.tagValue?"":"qz-tag-hide",r=pp.find((e=>e.type===i.tagType))||pp[0],o=(0,s.$)(`<span data-type="${t}"data-value="${(0,s.it)(i)}"class="${e} qz-tag-view qz-tag-type-${i.tagType}" style="color:${r.color};background:${r.background};">${i.isCustom?i.tagValue||"请添加标签":r.text}</div>`);n.replaceWith(o)}else n.remove()}))}))}static get pluginName(){return"tag"}init(){const{editor:e}=this;e.language.add(dp),e.on("parse:html",this.parseHtml),e.on("paste:schema",this.pasteSchema),e.on("paste:each",this.pasteHtml)}execute(){const{editor:e}=this;if(!(0,s.iC)(e)||e.readonly)return;const{card:t}=e;t.insert(bp.cardName,{tagType:"",tagValue:"",isCustom:!1},!0)}hotkey(){return this.options.hotkey||""}destroy(){const{editor:e}=this;e.off("parse:html",this.parseHtml),e.off("paste:schema",this.pasteSchema),e.off("paste:each",this.pasteHtml)}};const wp=(0,Ft._)("div",null,"This is test plugin",-1),xp=[wp];function kp(e,t){return(0,Ft.wg)(),(0,Ft.iD)("div",null,xp)}const Cp={},Bp=(0,Nu.Z)(Cp,[["render",kp]]);var _p=Bp,Ep=new WeakMap,Sp=new WeakMap;class Fp extends s.Zb{constructor(...e){super(...e),qi(this,Ep,{writable:!0,value:void 0}),qi(this,Sp,{writable:!0,value:void 0})}static get cardName(){return"test"}static get cardType(){return s.eT.BLOCK}toolbar(){return!(0,s.iC)(this.editor)||this.editor.readonly?[]:[{type:"dnd"},{type:"copy"},{type:"delete"},{type:"node",node:(0,s.$)("<span>测试按钮</span>"),didMount:e=>{e.on("click",(()=>{alert("test button")}))}}]}render(){return Gi(this,Ep,(0,s.$)("<div>Loading</div>")),ji(this,Ep)}didRender(){super.didRender(),Gi(this,Sp,(0,It.ri)(_p,{})),ji(this,Sp).mount(ji(this,Ep)?.get())}destroy(){super.destroy(),ji(this,Sp)?.unmount()}}var Tp=Fp,Mp=class extends s.Sy{static get pluginName(){return"test"}init(){this.editor.on("paser:html",(e=>this.parseHtml(e))),this.editor.on("paste:schema",(e=>this.pasteSchema(e))),this.editor.on("paste:each",(e=>this.pasteHtml(e)))}execute(){if(!(0,s.iC)(this.editor))return;const{card:e}=this.editor;e.insert(Tp.cardName)}hotkey(){return this.options.hotkey||"mod+shift+0"}pasteSchema(e){e.add({type:"block",name:"div",attributes:{"data-type":{required:!0,value:Tp.cardName},"data-value":"*"}})}pasteHtml(e){if((0,s.iC)(this.editor)){if(e.isElement()){const t=e.attributes("data-type");if(t===Tp.cardName){const t=e.attributes("data-value"),n=(0,s.RW)(t);return this.editor.card.replaceNode(e,Tp.cardName,n),e.remove(),!1}}return!0}}parseHtml(e){e.find(`[${s.Jr}=${Tp.cardName}`).each((e=>{const t=(0,s.$)(e),n=this.editor.card.find(t),r=n?.getValue();if(r){t.empty();const e=(0,s.$)(`<div data-type="${Tp.cardName}" data-value="${(0,s.it)(r)}"></div>`);t.replaceWith(e)}else t.remove()}))}},Ip=n(46194),Np=n(73057),Up=n(43693);const Lp={class:"mention-container"},Qp=(0,Ft._)("p",null,"配置 mention 插件的 onMouseEnter 方法",-1),Dp=(0,Ft._)("p",null,"此处使用 createApp().mount 自定义渲染",-1),Hp=(0,Ft._)("p",null,"Use createApp().mount to customize rendering here",-1);function Op(e,t,n,r,i,o){return(0,Ft.wg)(),(0,Ft.iD)("div",Lp,[(0,Ft._)("p",null,"This is name: "+(0,Mt.zw)(e.name),1),Qp,Dp,Hp])}var zp=(0,Ft.aZ)({name:"am-mention",props:{name:String}});const Zp=(0,Nu.Z)(zp,[["render",Op]]);var Rp=Zp;const Pp="";let qp=localStorage.getItem("token");qp=JSON.parse(qp||"{}");const Kp=[c,u,g,x,C,_,N,Q,H,j,ke,Be,Se,Qe,De.Z,ze,Ke,$e,Je,at,ft,yt,xt,Bt,tn,In,sr,nr,ui,Ei,bi,Ri,Ui,zu,Ip.Mq,qu,ld,dd,Rd,th,ch,Lh,Rh,Hh,up,yp,Mp],Wp=[Z,fe,xn,Gn,oi,fi,Ti,Ou,Ip.nV,ed,Td,jd,Mh,Dh,Ap,bp,Tp];let jp=null;const Vp=e=>{jp=e},Gp={[ch.pluginName]:{keys:["mark"],onChange:(e,t)=>{e["comment"],t["comment"]},onSelect:(e,t)=>{const{key:n,id:r}=t||{};jp?.command.executeMethod("mark-range","action","comment","revoke"),"mark"===n&&r&&jp?.command.executeMethod("mark-range","action",n,"preview",r)}},[Q.pluginName]:{markdown:"*"},[nr.pluginName]:{file:{action:`${Pp}/resource/upload`,crossOrigin:!1,headers:{Authorization:`${qp}`},limitSize:52428800},remote:{action:`${Pp}/resource/upload`},isRemote:e=>e.indexOf(Pp)<0,parse:e=>{const t={};return"success"==e.msg?(t.result=!0,t.data=`${Pp}/file-bucket/${e.data.diskname}`):(t.result=!1,t.data=e.message||e.data.message),t}},[sr.pluginName]:{onBeforeRender:(e,t)=>t.startsWith("data:image/")?t:`${t}`},[bi.pluginName]:{action:`${Pp}/resource/upload`,crossOrigin:!1,headers:{Authorization:`${qp}`},parse:e=>{const t={data:{}};return"success"==e.msg?(t.result=!0,t.data.url=`${Pp}/file-bucket/${e.data.diskname}`,t.data.preview=`${Pp}/file-bucket/${e.data.diskname}`,t.data.download=`${Pp}/file-bucket/${e.data.diskname}`):(t.result=!1,t.data=e.message||e.data.message),t}},[Ei.pluginName]:{onBeforeRender:(e,t)=>t},[Ui.pluginName]:{action:`${Pp}/resource/upload`,crossOrigin:!1,headers:{Authorization:`${qp}`},limitSize:52428800,parse:e=>{const t={};return"success"==e.msg?(t.result=!0,t.data=`${Pp}/file-bucket/${e.data.diskname}`):(t.result=!1,t.data=e.message||e.data.message),t}},[Ri.pluginName]:{onBeforeRender:(e,t)=>t},[Hh.pluginName]:{action:`${Pp}/resource/upload`,crossOrigin:!1,headers:{Authorization:`${qp}`},limitSize:52428800,parse:e=>{const t={};return"success"==e.msg?(t.result=!0,t.data=`${Pp}/file-bucket/${e.data.diskname}`):(t.result=!1,t.data=e.message||e.data.message),t}},[Rh.pluginName]:{onBeforeRender:(e,t)=>`${t}`},[zu.pluginName]:{action:`${Pp}/latex`,parse:e=>e.success?{result:!0,data:e.svg}:{result:!1,data:""}},[Rd.pluginName]:{action:`${Pp}/user/search`,onLoading:e=>{const t=(0,It.ri)(Up.Z);t.mount(e.get())},onEmpty:e=>{const t=(0,It.ri)(Np.Z);t.mount(e.get())},onClick:(e,{key:t,name:n})=>{console.log("mention click:",t,"-",n)},onMouseEnter:(e,{name:t})=>{const n=(0,It.ri)(Rp,{name:t});n.mount(e.get())}},[N.pluginName]:{filter:e=>["12px","13px","14px","15px","16px","19px","22px","24px","29px","32px","40px","48px"].indexOf(e)>-1},[qu.pluginName]:{filter:e=>{const t=Ip.F7.find((t=>e.split(",").some((e=>t.value.toLowerCase().indexOf(e.replace(/"/,"").toLowerCase())>-1))));return!!t&&t.value}},[dd.pluginName]:{filter:e=>"14px"===e?"1":"16px"===e?"1.15":"21px"===e?"1.5":"28px"===e?"2":"35px"===e?"2.5":"42px"===e?"3":["1","1.15","1.5","2","2.5","3"].indexOf(e)>-1}}},41127:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(73396),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},o=i,a=n(9388);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(e,t){var n=s({},e,t.attrs);return(0,r.Wm)(a.Z,s({},n,{icon:o}),null)};c.displayName="LeftOutlined",c.inheritAttrs=!1;var A=c},43629:function(e,t,n){"use strict";n.d(t,{$:function(){return Ut},AK:function(){return je},AT:function(){return Ti},Am:function(){return xe},BX:function(){return Li},Cj:function(){return ie},Cy:function(){return Ii},D1:function(){return lt},Dt:function(){return Qe},Fp:function(){return rn},G6:function(){return Ne},G7:function(){return ca},Gg:function(){return Xe},Jr:function(){return fe},LW:function(){return ma},Ly:function(){return ea},MX:function(){return De},Me:function(){return rt},Mr:function(){return $},NC:function(){return Ze},Nm:function(){return et},Nn:function(){return Ve},P6:function(){return i.ZP},RW:function(){return Ye},Rw:function(){return Qi},S:function(){return se},Su:function(){return ne},Sy:function(){return Ei},TM:function(){return ve},TT:function(){return Zt},UI:function(){return J},Vj:function(){return Ot},W9:function(){return me},W_:function(){return En},Y1:function(){return Pt},YU:function(){return We},YX:function(){return Si},Yh:function(){return tt},Ym:function(){return wo},ZQ:function(){return Ge},ZU:function(){return Oe},Zb:function(){return la},Zi:function(){return G},_b:function(){return un},dw:function(){return on},e6:function(){return $t},eT:function(){return nn},f4:function(){return Ee},gJ:function(){return te},hR:function(){return xo},iC:function(){return st},it:function(){return $e},kI:function(){return pt},kd:function(){return ot},m6:function(){return ee},mV:function(){return ge},mW:function(){return gt},oq:function(){return _t},rN:function(){return re},sk:function(){return Fe},tq:function(){return Ue},u:function(){return nr},w_:function(){return ba},xT:function(){return Dt},yx:function(){return Ke}});n(57658),n(82801);var r,i=n(87538),o=n(3336),a=n(48534),s=n(95082),l=n(13087),c=n(62833),A=n(52417),u=n(26334),d=n(62040),h=n(93806),p=n(24343),f=n(78305),g=n.n(f),m=n(66281),v=n.n(m),b=n(83812),y=n.n(b),w=n(54621),x=n(82482),k=n(66347),C=n(88478),B=n(66046),_=n(39693),E=n(72036),S=n(73738),F=n.n(S),T=n(62568),M=n.n(T),I=n(82718),N=n.n(I),U=n(91148),L=n.n(U),Q=n(76540),D=n(90281),H=n(31823),O=n.n(H),z=n(51945),Z=n.n(z),R=n(20826),P=n.n(R),q=n(70263),K=n.n(q),W=n(79289),j=n.n(W),V=function(){function e(t){if((0,l.Z)(this,e),this.options={limitHeight:5e3,canvasCache:[],canvasCount:0},this.width=0,this.height=0,this.handleClear=function(e){var t=e.context,n=e.x,r=e.y,i=e.width,o=e.height;null===t||void 0===t||t.clearRect(n,r,i,o)},!t.container)throw new Error("need a cantainer!");this.options=(0,s.Z)((0,s.Z)({},this.options),t),t.container.style["line-height"]="0px"}return(0,c.Z)(e,[{key:"removeCanvas",value:function(){var e=this.options.canvasCache;null===e||void 0===e||e.forEach((function(e){var t;null===e||void 0===e||null===(t=e.parentElement)||void 0===t||t.removeChild(e)})),this.options.canvasCache=[],this.options.canvasCount=0}},{key:"getCanvas",value:function(e){var t=this.options.canvasCache;return e=e>0?e-1:e,t?t[e]:void 0}},{key:"resize",value:function(e,t){if(this.width!==e||this.height!==t){this.width=e,this.height=t;var n=this.options,r=n.limitHeight,i=n.canvasCount,o=n.container,a=this.options.canvasCache,s=Math.ceil(t/(r||0));if(s!==i){this.removeCanvas(),a=[];for(var l=0;l<s;l++){var c=document.createElement("canvas");c.style["vertical-align"]="bottom",c.setAttribute("width",e.toString()),l===s-1?c.setAttribute("height",(t%(r||0)).toString()):c.setAttribute("height",(r||0).toString()),null===o||void 0===o||o.appendChild(c),a.push(c)}this.options.canvasCache=a,this.options.canvasCount=a.length}else{var A,u=this.getCanvas(s);if(null===(A=a)||void 0===A||A.forEach((function(t){var n=t.getAttribute("width");n&&parseInt(n)===e||t.setAttribute("width",e.toString())})),u){var d=u.getAttribute("height"),h=t%(r||0);d&&parseInt(d)===h||u.setAttribute("height",h.toString())}}}}},{key:"handleSingleRect",value:function(e){var t=e.x,n=e.y,r=e.index,i=e.width,o=e.height,a=e.callback,s=this.options.limitHeight,l=this.getCanvas(r);if(l){var c=l.getContext("2d"),A=new DOMRect(t,n-(s||0)*(r-1),i,o);a(Object.assign({},A.toJSON(),{context:c}))}}},{key:"handleFillRect",value:function(e){var t=e.context,n=e.x,r=e.y,i=e.width,o=e.height,a=e.fill,s=e.stroke;t&&(t.fillStyle=void 0===a?"#FFEC3D":a,t.strokeStyle=void 0===s?"#FFEC3D":s,t.fillRect(n,r,i,o))}},{key:"drawRect",value:function(e){var t=this,n=e.x,r=e.y,i=e.width,o=e.height,a=e.fill,s=e.stroke,l=new DOMRect(n,r,i,o);this.handleRect(Object.assign({},l.toJSON(),{callback:function(e){t.handleFillRect(Object.assign({},e,{fill:a,stroke:s}))}}))}},{key:"handleRect",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.callback,a=this.options.limitHeight,s={x:t+r,y:n+i},l=Math.ceil(n/(a||0)),c=Math.ceil(s.y/(a||0)),A=new DOMRect(t,n,r,i),u=A.toJSON();this.handleSingleRect(Object.assign({},u,{index:l,callback:o})),l!==c&&this.handleSingleRect(Object.assign({},u,{index:c,callback:o}))}},{key:"getImageData",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=this.options.limitHeight,a=Math.ceil(n/(o||0)),s=this.getCanvas(a),l=null===s||void 0===s?void 0:s.getContext("2d");return null===l||void 0===l?void 0:l.getImageData(t,n,r,i)}},{key:"clearRect",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=new DOMRect(t,n,r,i);this.handleRect(Object.assign({},o.toJSON(),{callback:this.handleClear}))}},{key:"clear",value:function(){var e=this.options.canvasCache;null===e||void 0===e||e.forEach((function(e){var t=e.getContext("2d"),n=Number(e.getAttribute("width")),r=Number(e.getAttribute("height"));null===t||void 0===t||t.clearRect(0,0,n,r)}))}},{key:"destroy",value:function(){this.removeCanvas()}}]),e}(),G="data-element",$="data-id",Y="root",X="[".concat(G,'="').concat(Y,'"]'),J="ui",ee="[".concat(G,'="').concat(J,'"]'),te="editable",ne="[".concat(G,'="').concat(te,'"]'),re="data-transient-attributes",ie="data-transient-element",oe="am-engine",ae="am-engine-mobile",se="am-engine-view",le="anchor",ce="focus",Ae="cursor",ue="span[".concat(G,"=").concat(le,"],anchor"),de="span[".concat(G,"=").concat(ce,"],focus"),he="span[".concat(G,"=").concat(Ae,"],cursor"),pe="card",fe="data-card-key",ge="data-ready-card",me="data-card-type",ve="data-card-value",be="data-card-element",ye="data-card-loading",we="data-card-editable",xe="div[".concat(fe,"],span[").concat(fe,"]"),ke="div[".concat(ge,"],span[").concat(ge,"]"),Ce="span[".concat(be,"=left]"),Be="div[".concat(be,"=center],span[").concat(be,"=center]"),_e="span[".concat(be,"=right]"),Ee="trigger-card-id",Se=("undefined"!==typeof navigator?navigator:window.navigator).userAgent.toLowerCase(),Fe="undefined"===typeof navigator,Te=/edge/i.test(Se),Me=!Te&&/chrome/i.test(Se),Ie=/firefox/i.test(Se),Ne=!Te&&!Me&&/safari/i.test(Se),Ue=/mobile/i.test(Se),Le=/os [\.\_\d]+ like mac os/i.test(Se),Qe=/android/i.test(Se),De=!Le&&/mac os x/i.test(Se),He=/windows\s*(?:nt)?\s*[\.\_\d]+/i.test(Se),Oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;e<5&&(e=5);for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n};(function(e){e["UPPER"]="upper",e["LOWER"]="lower"})(r||(r={}));var ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.LOWER;return~e.indexOf("-")?e.split("-").map((function(e,n){return"upper"===t||n>0?e.charAt(0).toUpperCase()+e.substr(1):"lower"===t&&0===n?e.charAt(0).toLowerCase()+e.substr(1):e})).join(""):e},Ze=function(e){var t=function(e){var t=parseInt(e,10).toString(16).toUpperCase();return t.length>1?t:"0"+t},n=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/gi;return e.replace(n,(function(e,n,r,i){return"#"+t(n)+t(r)+t(i)}))},Re=function(e){var t,n={},r=/\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g;while(t=r.exec(e)){var i=(t[1]||t[2]||t[4]||t[6]).toLowerCase(),o=(t[2]?t[3]:t[4]?t[5]:t[7])||"";n[i]=o}return n},Pe=new Map,qe=function(e){var t=e.replace(/\s+/g,""),n={};if(!t)return n;var r=Pe.get(t);if(r)return Object.assign({},r);var i,o=/\s*([\w\-]+)\s*:([^;]*)(;|$)/g;e=e.toLowerCase();while(i=o.exec(e)){var a=i,s=(0,w.Z)(a,3),l=(s[0],s[1]),c=s[2];(l.endsWith("color")||c.includes("rgb"))&&(c=Ze(c)),n[l.trim()]=c.trim()}return Pe.set(t,n),Object.assign({},n)},Ke=function(e,t){var n=ze(t),r=window.getComputedStyle(e,null);return r?r[n]:""},We=function(e){return(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},je=function(e){return(e||"").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},Ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px";return e&&/^-?\d+(?:\.\d+)?$/.test(e.toString())?e+t:e},Ge=function(e){var t;return e&&(t=/^((-?\d+)(\.\d+)?)/.exec(e))?Math.floor(1e4*parseFloat(t[1]))/1e4:0},$e=function(e){var t="";try{t=encodeURIComponent(JSON.stringify(e||""))}catch(n){}return"data:".concat(t)},Ye=function(e){try{return e=e.substr(5),JSON.parse(decodeURIComponent(e))}catch(t){return{}}},Xe=function(e){return e.replace(/<anchor\s*\/>/gi,"<span ".concat(G,'="').concat(le,'"></span>')).replace(/<focus\s*\/>/gi,"<span ".concat(G,'="').concat(ce,'"></span>')).replace(/<cursor\s*\/>/gi,"<span ".concat(G,'="').concat(Ae,'"></span>')).replace(/(<card\s+[^>]+>).*?<\/card>/gi,(function(e,t){var n=Re(t),r=n.type,i=n.name,o=n.value,a=n.editable,s="inline"===r,l=s?"span":"div",c=["<".concat(l)];return c.push(" ".concat(me,'="').concat(r||"",'"')),c.push(" ".concat(ge,'="').concat(i||"",'"')),""!==a&&c.push(" ".concat(we,'="').concat(a||"false",'"')),Object.keys(n).forEach((function(e){0===e.indexOf("data-")&&0!==e.indexOf("data-card")&&c.push(" ".concat(e,'="').concat(n[e]||"",'"'))})),void 0!==o&&c.push(" ".concat(ve,'="').concat(o,'"')),c.push("></".concat(l,">")),c.join("")}))},Je=function(e){return"string"===typeof e&&(e=e.toLowerCase(),!e.startsWith("data:text/html")&&(!!e.match(/^\S*$/)&&(!!["http:","https:","data:","ftp:"].some((function(t){return e.startsWith(t)}))||(!(!e.startsWith("./")&&!e.startsWith("/"))||e.indexOf(":")<0))))},et=function(e){return Je(e)?e:""},tt=function(e){var t=e.toLowerCase().split("+");return t=t.map((function(e){return"mod"===e?De?"⌘":"Ctrl":"opt"===e?De?"Option":"Alt":e.length>1?e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase():e.toUpperCase()})),t.join("+")},nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t=+t))return"•";switch(null===e||void 0===e?void 0:e.toLowerCase()){case"disc":return"•";case"circle":return"◦";case"square":return"◼";case"lower-alpha":return String.fromCharCode("a".charCodeAt(0)+t);case"lower-roman":return String.fromCharCode(8559+t);case"decimal":default:return t}},rt=function(e){if("undefined"===typeof document&&"undefined"===typeof n.g["__amWindow"])throw"document is not defined,If you are using ssr, you can assign a value to the `__amWindow` global variable.";return e?e.ownerDocument||e["document"]||e:"undefined"===typeof document?n.g["__amWindow"].document:document},it=function(e){e instanceof Node||(e=e[0]),e.normalize()},ot=function e(t,n){var r=[];if(n&&!n(t))return r;for(var i=t.childNodes,o=0;o<i.length;o++){var a=i[o],s=a.nodeType;3===s?r.push(a):1!==s&&9!==s&&11!==s||(r=r.concat(e(a,n)))}return r},at=function(e){var t;return e.nodeType===rt().ELEMENT_NODE&&e.getAttribute(G)===Y?void 0:(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0},st=function(e){return"engine"===e.kind},lt=function(e){return"view"===e.kind},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=new(y())(t,{html:!0,typographer:!0,linkify:!0});return e.trigger("markdown-it",n),n},At=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=t.renderer,o=t.options,a=!1,s=e.schema.getTags("blocks"),l="",c=[];return n.forEach((function(A,u){var d=A.type,h=A.tag,p=A.children,f=A.nesting,g=e.trigger("markdown-it-token",{token:A,markdown:t,callback:function(e){l+=e}});if(!1!==g){var m,v="";if("inline"===d&&p)v=null!==(m=i.renderInline(p,o,{}))&&void 0!==m?m:"",r&&p.find((function(e){return"image"===e.type||e.type.endsWith("_inline")||e.type.endsWith("_open")}))&&(a=!0);else if("undefined"!==typeof i.rules[d]){var b;v=null!==(b=i.rules[d](n,u,o,{},i))&&void 0!==b?b:""}else{var y;v=null!==(y=i.renderToken(n,u,o))&&void 0!==y?y:""}if(1===f)c.push(""),l+=v;else if(0===f)0===c.length?(l+=v,h&&!a&&(a=!0)):v&&(c[c.length-1]+=v);else if(-1===f){var w;c.length>0&&!c[c.length-1]&&s.includes(h)&&(c[c.length-1]+="<br />"),l+=null!==(w=c[c.length-1])&&void 0!==w?w:"",c.pop(),c.every((function(e){return!e}))&&(c=[]),l+=v,a||"p"===h||(a=!0)}}else a=!0})),a&&l?l:null},ut="data-uuid",dt="data-color",ht=function(){function e(){(0,l.Z)(this,e),this.listeners={}}return(0,c.Z)(e,[{key:"on",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),"object"===(0,o.Z)(n)&&n.once||this.listeners[e].push(t)}},{key:"off",value:function(e,t){var n=this.listeners[e];if(n)for(var r=0;r<n.length;r++)if(n[r]===t){n.splice(r,1);break}}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this.listeners[e];if(i){var o=void 0;return i.every((function(e){return o=e.apply(void 0,n),"boolean"!==typeof o||!1!==o})),o}}},{key:"destroy",value:function(){var e=this;Object.keys(this.listeners).forEach((function(t){e.listeners[t].forEach((function(n){e.off(t,n)}))}))}}]),e}(),pt=function(e){return!!e&&void 0!==e.get},ft=function(e){return!!e&&void 0!==e.entries},gt=function(e){return!!e&&void 0!==e.nodeType},mt=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!t)return!1;var n=function(e,t){var n,r=null===(n=rt(e))||void 0===n?void 0:n.querySelectorAll(t),i=r?r.length:0;while(--i>=0&&(null===r||void 0===r?void 0:r.item(i))!==e);return i>-1},r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.matchesSelector||n;return r.call(e,t)},vt=function(e){return e.nodeName===pe||!!e.getAttribute(me)},bt=function(e){return"block"===e.getAttribute(me)},yt=function(e){return"inline"===e.getAttribute(me)},wt=function(e){return e.getAttribute(G)===te||"true"===e.getAttribute(we)||!!(null===e||void 0===e?void 0:e.querySelector(ne))},xt=function(e,t){return e.getAttribute(G)===Y&&(!t||e===t)},kt=function(e){return xt(e)||e.getAttribute(G)===te},Ct=function(e,t){if(e.nodeType===Node.ELEMENT_NODE&&xt(e,t))return!1;var n=_t(e,X);return!!n&&(!t||n===t)},Bt=function(e){var t=e.getAttribute(G);return!!t&&[le,ce,Ae].indexOf(t)>-1},_t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.parentElement||void 0},r=e||void 0;while(r){if(mt(r,t))return r;r=n(r)}return r},Et=new Map;function St(e,t){if(!e)return[];if("string"===typeof e){var n=!1;if(!t||(n=/<[^>]+>/g.test(e))){var r=0===e.indexOf("<tr"),i=0===e.indexOf("<td");e=(n?e.trim():e).replace(/<!--[^>]*-->/g,"");var o=Et.get(e);if(o){if(r){var a=o.querySelector("tbody");return a?a.cloneNode(!0).childNodes:[]}if(i){var s=o.querySelector("tr");return s?s.cloneNode(!0).childNodes:[]}return o.cloneNode(!0).childNodes}r&&(e="<table><tbody>".concat(e,"</tbody></table>")),i&&(e="<table><tbody><tr>".concat(e,"</tr></tbody></table>"));var l=rt().createElement("div");if(l.innerHTML=e,Et.set(e,l.cloneNode(!0)),r){var c=l.querySelector("tbody");return c?c.childNodes:[]}if(i){var A=l.querySelector("tr");return A?A.childNodes:[]}return l.childNodes}return t.querySelectorAll(e)}if(ft(e)||Array.isArray(e))return e;if(pt(e)){var u=[];return e.each((function(e){u.push(e)})),u}if(gt(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var d,h=[],p=(0,k.Z)(e.childNodes);try{for(p.s();!(d=p.n()).done;){var f=d.value;h.push(f)}}catch(g){p.e(g)}finally{p.f()}return h}return[e]}var Ft,Tt,Mt,It,Nt=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.events=[],this.document=null,this.context=void 0,this.name="",this.type=void 0,this.window=null,this.display=void 0,this.fragment=void 0,gt(t)&&(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.fragment=t),t=[t]),t.forEach((function(e,t){r[t]=e,r.events[t]=new ht}));var i=this[0];if(i){this.document=rt(n),this.context=n;var o=i.nodeName,a=i.nodeType;this.name=o.toLowerCase(),this.type=a,this.window=this.document.defaultView||window}}return(0,c.Z)(e,[{key:"length",get:function(){var e=0;while(this[e])e++;return e}},{key:"each",value:function(e){var t,n=0;while(t=this[n]){if(!1===e(t,n))break;n++}return this}},{key:"toArray",value:function(){var t=[];return this.each((function(n){t.push(new e(n))})),t}},{key:"isElement",value:function(){return this.type===Node.ELEMENT_NODE}},{key:"isText",value:function(){return this.type===Node.TEXT_NODE}},{key:"isCard",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&vt(e)}},{key:"isBlockCard",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&bt(e)}},{key:"isInlineCard",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&yt(e)}},{key:"isEditableCard",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&wt(e)}},{key:"isRoot",value:function(e){var t,n=this.get();return(null===n||void 0===n?void 0:n.nodeType)===Node.ELEMENT_NODE&&xt(n,e?null!==(t=e[0])&&void 0!==t?t:e:void 0)}},{key:"isEditable",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&kt(e)}},{key:"inEditor",value:function(e){var t,n=this.get();return!!n&&Ct(n,e?null!==(t=e[0])&&void 0!==t?t:e:void 0)}},{key:"isCursor",value:function(){var e=this.get();return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE&&Bt(e)}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===this.length?null:this[e]}},{key:"eq",value:function(t){return t>-1&&t<this.length?new e(this[t]):void 0}},{key:"index",value:function(){var e,t=null===(e=this.get())||void 0===e?void 0:e.previousSibling,n=0;while(t&&t.nodeType===Node.ELEMENT_NODE)n++,t=t.previousSibling;return n}},{key:"parent",value:function(){var t,n=this.get(),r=null!==(t=null===n||void 0===n?void 0:n.parentElement)&&void 0!==t?t:null===n||void 0===n?void 0:n.parentNode;return r?new e(r):void 0}},{key:"children",value:function(t){if(0===this.length)return new e([]);var n=this.get().childNodes;if(t){for(var r=[],i=0;i<n.length;i++){var o=n[i];mt(o,t)&&r.push(o)}return new e(r)}return new e(n)}},{key:"first",value:function(){var t;if(this.fragment)return this.eq(0)||null;var n=0===this.length?null:null===(t=this.get())||void 0===t?void 0:t.firstChild;return n?new e(n):null}},{key:"last",value:function(){var t;if(this.fragment)return this.eq(this.length-1)||null;var n=0===this.length?null:null===(t=this.get())||void 0===t?void 0:t.lastChild;return n?new e(n):null}},{key:"prev",value:function(){var t,n=0===this.length?null:null===(t=this.get())||void 0===t?void 0:t.previousSibling;return n?new e(n):null}},{key:"next",value:function(){var t,n=0===this.length?null:null===(t=this.get())||void 0===t?void 0:t.nextSibling;return n?new e(n):null}},{key:"prevElement",value:function(){var t=0===this.length?null:this.get().previousElementSibling;return t?new e(t):null}},{key:"nextElement",value:function(){var t=0===this.length?null:this.get().nextElementSibling;return t?new e(t):null}},{key:"getPath",value:function(e,t,n){e=e||document.body;var r=[];if(this.length>0){var i=this.getIndex(t);if(n){var o=n(i,r,this);o&&(r=o)}else r.unshift(i)}if(this.equal(e))return r;var a=this.parent();while(a&&!a.equal(e)){var s=a.getIndex(t);if(n){var l=n(s,r,a);l&&(r=l)}else r.unshift(s);a=a.parent()}return r}},{key:"contains",value:function(e){var t,n=gt(e)?e:e.get();if(0===this.length)return!1;if(this.get().nodeType===Node.DOCUMENT_NODE&&(null===(t=n)||void 0===t?void 0:t.nodeType)!==Node.DOCUMENT_NODE)return!0;if(n===this[0])return!0;while(n=(null!==(r=null===(i=n)||void 0===i?void 0:i.parentElement)&&void 0!==r?r:null===(o=n)||void 0===o?void 0:o.parentNode)||null){var r,i,o;if(n===this[0])return!0}return!1}},{key:"find",value:function(t){if(this.length>0&&(this.isElement()||this.fragment)){var n,r=null===(n=this.fragment?this.fragment:this.get())||void 0===n?void 0:n.querySelectorAll(t);return new e(r||[])}return new e([])}},{key:"closest",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t;return null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode||void 0},r=[],i=this.get()||void 0;while(i){if(mt(i,t))return r.push(i),new e(r);i=n(i)}return new e(r)}},{key:"on",value:function(e,t,n){var r=this;return this.each((function(i,o){i.addEventListener(e,t,n),r.events[o]&&r.events[o].on(e,t,n)})),this}},{key:"off",value:function(e,t,n){var r=this;return this.each((function(i,o){i.removeEventListener(e,t,n),r.events[o]&&r.events[o].off(e,t,n)})),this}},{key:"getBoundingClientRect",value:function(e){if(0!==this.length){try{var t=this.get(),n=t.getBoundingClientRect(),r=document.documentElement.clientTop,i=document.documentElement.clientLeft;return{top:n.top-r,bottom:n.bottom-r,left:n.left-i,right:n.right-i}}catch(o){console.error(o)}return e}}},{key:"removeAllEvents",value:function(){var e=this;return this.each((function(t,n){e.events[n]&&Object.keys(e.events[n].listeners).forEach((function(r){for(var i=e.events[n].listeners[r],o=0;o<i.length;o++)e.off(r,i[o]),e.events[n].off(r,i[o]),t.removeEventListener(r,i[o],!1)}))})),this}},{key:"attributes",value:function(e,t){if(void 0===e){var n=this.get();if(!n)return{};for(var r={},i=n.attributes,a=i.length;a--;){var s=i[a];r[s.name]=s.value}return r}if("object"===(0,o.Z)(e)){for(var l in e){var c=e[l];this.attributes(l,c)}return this}if(void 0===t){var A=this.get();return this.length>0&&this.isElement()&&(null===A||void 0===A?void 0:A.getAttribute(e))||""}var u="style"===e&&""===t;return this.each((function(n){n instanceof Element&&(u?n.removeAttribute("style"):n.setAttribute(e,t.toString()))})),this}},{key:"removeAttributes",value:function(e){return this.each((function(t){t instanceof Element&&t.removeAttribute(e)})),this}},{key:"hasClass",value:function(e){if(0===this.length)return!1;var t=this.get();if(!t)return!1;var n=0,r=null,i=t.classList||{};while(r=i[n]){if(r===e)return!0;n++}return!1}},{key:"addClass",value:function(e){return this.each((function(t){t instanceof Element&&t.classList.add(e)})),this}},{key:"removeClass",value:function(e){return this.each((function(t){t instanceof Element&&t.classList.remove(e)})),this}},{key:"css",value:function(e,t){if(void 0===e)return qe(this.attributes("style")||"");if("object"===(0,o.Z)(e)){for(var n in e){var r=e[n];this.css(n,r)}return this}if(void 0===t){if(0===this.length||this.isText())return"";var i=this.get();return i&&(i.style[ze(e)]||Ke(this[0],e))||""}return this.each((function(n){var r=n;r.style[ze(e)]=t.toString(),0===r.style.length&&r.removeAttribute("style")})),this}},{key:"width",value:function(){var e=this.css("width");if("auto"===e){var t=this.get();e=t.offsetWidth.toString()}return e&&Ge(e)||0}},{key:"height",value:function(){var e=this.css("height");if("auto"===e){var t=this.get();e=t.offsetHeight.toString()}return e&&parseFloat(e)||0}},{key:"html",value:function(e){if(void 0!==e){var t=St(e);return this.each((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e.firstChild;while(n){var r=n.nextSibling;e.removeChild(n),n=r}t.forEach((function(t){e.appendChild(t.cloneNode(!0))}))}})),this}return this.length>0&&this[0]instanceof Element?this[0].innerHTML:""}},{key:"text",value:function(e){var t;return void 0!==e?(this.each((function(t){t.textContent=e})),this):0===this.length?"":(null===(t=this.get())||void 0===t?void 0:t.textContent)||""}},{key:"show",value:function(e){return void 0===e&&(e=this.display||""),"none"===e&&(e=""),"none"!==this.css("display")?this:this.css("display",e)}},{key:"hide",value:function(){var e;return 0===this.length?this:(this.display=null===(e=this.get())||void 0===e?void 0:e.style.display,this.css("display","none"))}},{key:"remove",value:function(){var e=this;return this.each((function(t,n){var r,i=null!==(r=t.parentElement)&&void 0!==r?r:t.parentNode;i&&(i.removeChild(t),delete e[n])})),this}},{key:"empty",value:function(){return this.each((function(e){var t=e.firstChild;while(t){var n=t.nextSibling;e.removeChild(t),t=n}})),this}},{key:"equal",value:function(e){return gt(e)?this.get()===e:!!pt(e)&&this.get()===e.get()}},{key:"clone",value:function(t){var n=[];return this.each((function(e){n.push(e.cloneNode(t))})),new e(n)}},{key:"prepend",value:function(e){var t=St(e,this.context),n="string"===typeof e&&/<.+>/.test(e);return this.each((function(e){for(var r=t.length-1;r>=0;r--){var i=n?t[r].cloneNode(!0):t[r];e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}})),this}},{key:"append",value:function(e){var t=St(e,this.context),n="string"===typeof e&&/<.+>/.test(e);return this.each((function(r){for(var i=0;i<t.length;i++){var o=n?t[i].cloneNode(!0):t[i];"string"===typeof e?r instanceof Element&&r.append(o):r.appendChild(o)}})),this}},{key:"before",value:function(e){var t=St(e,this.context),n="string"===typeof e&&/<.+>/.test(e);return this.each((function(e){var r,i=null!==(r=e.parentElement)&&void 0!==r?r:e.parentNode;i&&t.forEach((function(t){n&&(t=t.cloneNode(!0)),i.insertBefore(t,e),e=t}))})),this}},{key:"after",value:function(e){var t=St(e,this.context),n="string"===typeof e&&/<.+>/.test(e);return this.each((function(e){var r,i=null!==(r=e.parentElement)&&void 0!==r?r:e.parentNode;i&&t.forEach((function(t){n&&(t=t.cloneNode(!0)),e.nextSibling?(i.insertBefore(t,e.nextSibling),e=t):i.appendChild(t)}))})),this}},{key:"replaceWith",value:function(t){var n=[],r=St(t,this.context),i="string"===typeof t&&/<.+>/.test(t);return this.each((function(e){var t,o=null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode;if(o){var a=i?r[0].cloneNode(!0):r[0];try{o.replaceChild(a,e),n.push(a)}catch(s){}}})),new e(n)}},{key:"getRoot",value:function(){return this.closest(X)}},{key:"traverse",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=function o(a){var s=a.isCard();if(!s||a.fragment&&1!==a.fragment.childNodes.length||n&&("editable"!==n||a.isEditableCard())){var l=t?a.first():a.last();while(l){var c=t?l.next():l.prev();r&&r(l);var A=e(l);if(!1===A)return void(i&&i(l,c));if(!0!==A){var u=A&&"boolean"!==typeof A;u&&(i&&i(l,A),l=A),s=l.isCard(),s?!0===n?(u&&e(l),o(l)):"editable"===n&&l.isEditableCard()&&function(){var e=l.find(ne);e.each((function(t,n){var r=e.eq(n);r&&o(r)}))}():(u&&e(l),o(l))}i&&i(l,c),l=c}}};e(this),o(this)}},{key:"getChildByPath",value:function(e,t){var n=this.get();if(0===e.length)return n;for(var r=function(e){var r,i=0,o=(0,k.Z)(n.childNodes);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(!t||t(a)){if(i==e)return a;i++}}}catch(s){o.e(s)}finally{o.f()}},i=0;void 0!==e[i];){var o=r(e[i]);if(!o)break;n=o,i++}return n}},{key:"getIndex",value:function(e){var t,n=this[0],r=null!==(t=n.parentElement)&&void 0!==t?t:n.parentNode;if(!r)return 0;var i,o=0,a=(0,k.Z)(r.childNodes);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(!e||e(s)){if(s===this[0])return o;o++}}}catch(l){a.e(l)}finally{a.f()}return-1}},{key:"findParent",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.closest(X),i=null!==(t=r[0])&&void 0!==t?t:r,o=null!==(n=i.parentElement)&&void 0!==n?n:i.parentNode;if(0===this.length||!o)return null;var a=this[0];while((o=null!==(s=a.parentElement)&&void 0!==s?s:a.parentNode)&&o!==i){var s;a=o}return o?new e(a):null}},{key:"allChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[];return this.traverse((function(e){t.push(e)}),void 0,e),t.shift(),t}},{key:"getViewport",value:function(){var e,t=this.window||{innerHeight:0,innerWidth:0},n=t.innerHeight,r=t.innerWidth,i=this.isText()?null===(e=this.parent())||void 0===e?void 0:e.get():this.get();if(!i)return{top:0,left:0,bottom:0,right:0};var o=i.getBoundingClientRect(),a=o.top,s=o.left,l=o.bottom,c=o.right;return{top:a,left:s,bottom:Math.min(l,n),right:Math.min(c,r)}}},{key:"inViewport",value:function(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=null;if(t.type!==Node.ELEMENT_NODE){var a;if(!t.document)return!1;o=t.document.createElement("span");var s=null!==(a=t[0].parentElement)&&void 0!==a?a:t[0].parentNode;t.next()?null===s||void 0===s||s.insertBefore(o,t[0].nextSibling):null===s||void 0===s||s.appendChild(o),t=new e(o)}var l=t.get();if(!l)return!0;var c=l.getBoundingClientRect(),A=c.top,u=c.left,d=c.right,h=c.bottom,p=this.getViewport();return o&&(null===(n=null!==(r=o.parentElement)&&void 0!==r?r:o.parentNode)||void 0===n||n.removeChild(o)),i?A>0&&A<=p.bottom||h>0&&h<=p.bottom:A>0&&A>=p.top&&u>0&&u>=p.left&&h<=p.bottom&&d<=p.right}},{key:"scrollIntoView",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest";if("function"===typeof(null===(n=t.document)||void 0===n?void 0:n.body.scrollIntoView)){var i,o,a,s,l,c=null;if(t.type!==Node.ELEMENT_NODE||"br"===t.name.toLowerCase())c=t.document.createElement("span"),c.innerHTML="&nbsp;",null===(a=null!==(s=t[0].parentElement)&&void 0!==s?s:t[0].parentNode)||void 0===a||a.insertBefore(c,t[0]),t=new e(c);if(!this.inViewport(t))null===(l=t.get())||void 0===l||l.scrollIntoView({block:r,inline:r});c&&(null===(i=null!==(o=c.parentElement)&&void 0!==o?o:c.parentNode)||void 0===i||i.removeChild(c))}}}]),e}(),Ut=function(e,t,n){void 0===t&&(t=rt());var r=St(e,t),i=new(n||Nt)(r,t||void 0);return gt(e)&&e.nodeType===window.Node.DOCUMENT_FRAGMENT_NODE&&(i.fragment=e),i},Lt=[{from:function(e,t,n){return!!n[fe]||!!n[ge]},to:function(e,t,n){var r=n[ve],i=(0,s.Z)({},n);for(var o in n=(0,x.Z)({type:n[me],name:(n[fe]||n[ge]).toLowerCase(),editable:n[we]},$,n[$]),i)o!==ge&&0===o.indexOf("data-")&&0!==o.indexOf("data-card")&&(n[o]=i[o]);void 0!==r&&(n.value=r);var a=Ut("<card />");for(var l in n)a.attributes(l,n[l]);return a}},{from:function(e,t,n){return("div"===e||"section"===e)&&(!n[fe]||!n[ge])&&n[G]!==Y},to:function(e,t,n){var r=Ut("<p />");for(var i in r.css(t),n)r.attributes(i,n[i]);return r}},{from:function(e){return[Ae,le,ce].includes(e)},to:function(e){return{node:Ut("<".concat(e," />")),replace:!0}}}],Qt=[{type:"block",attributes:(0,x.Z)({},$,"*")},{name:"p",type:"block",allowIn:["$root"]},{name:"br",type:"inline",isVoid:!0},{name:le,type:"inline",isVoid:!0},{name:ce,type:"inline",isVoid:!0},{name:Ae,type:"inline",isVoid:!0},{name:"span",type:"mark",attributes:(0,x.Z)({},G,{required:!0,value:["anchor","cursor","focus"]})},{name:"card",type:"inline",attributes:{name:{required:!0,value:/\w+/},type:{required:!0,value:"inline"},editable:"*",value:"*"}},{name:"span",type:"inline",attributes:(Ft={},(0,x.Z)(Ft,fe,{required:!0,value:/\w+/}),(0,x.Z)(Ft,me,{required:!0,value:"inline"}),(0,x.Z)(Ft,ve,"*"),(0,x.Z)(Ft,we,"*"),(0,x.Z)(Ft,"class","*"),(0,x.Z)(Ft,"contenteditable","*"),Ft)},{name:"span",type:"inline",attributes:(Tt={},(0,x.Z)(Tt,ge,{required:!0,value:/\w+/}),(0,x.Z)(Tt,me,{required:!0,value:"inline"}),(0,x.Z)(Tt,ve,"*"),(0,x.Z)(Tt,we,"*"),(0,x.Z)(Tt,"class","*"),(0,x.Z)(Tt,"contenteditable","*"),Tt)},{name:"card",type:"block",attributes:{name:{required:!0,value:/\w+/},type:{required:!0,value:"block"},editable:"*",value:"*"}},{name:"div",type:"block",attributes:(Mt={},(0,x.Z)(Mt,fe,{required:!0,value:/\w+/}),(0,x.Z)(Mt,me,{required:!0,value:"block"}),(0,x.Z)(Mt,ve,"*"),(0,x.Z)(Mt,we,"*"),(0,x.Z)(Mt,"class","*"),(0,x.Z)(Mt,"contenteditable","*"),Mt)},{name:"div",type:"block",attributes:(It={},(0,x.Z)(It,ge,{required:!0,value:/\w+/}),(0,x.Z)(It,me,{required:!0,value:"block"}),(0,x.Z)(It,ve,"*"),(0,x.Z)(It,we,"*"),(0,x.Z)(It,"class","*"),(0,x.Z)(It,"contenteditable","*"),It)}],Dt="contenteditable",Ht=0,Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Number(Math.random().toString().substring(2,7)+e+Date.now()).toString(36)},zt=new Map,Zt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";if("string"!==typeof e){var r,i=null!==(r=e[0])&&void 0!==r?r:e;if(i.nodeType===Node.ELEMENT_NODE){var o=i,a=o.localName;n=a.substring(0,1),e=a;for(var s=o.attributes,l=s.length;l--;){var c=s[l];~~[$,"id"].indexOf(c.name)&&(e+="".concat(c.name,'="').concat(c.value,'"'))}}else{var A;e=null!==(A=i.textContent)&&void 0!==A?A:""}}var u=zt.get(e);if(u)n=u;else{var d=window.btoa(encodeURIComponent(e)).replace(/=/g,""),h=[];["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"].forEach((function(e,t){var n=d.indexOf(e);h.push(~n?n:d.length%t?0:1)}));var p=Number(h.join("")).toString(36).replace(/0/g,"");n=n+p.substr(0,4)+p.substr(-4),zt.set(e,n)}var f=n;if(t){var g="".concat(f,"-").concat(Ot(Ht));return Ht++,g}return f},Rt=function(){function e(t){var n=this;(0,l.Z)(this,e),this.editor=void 0,this.addBrForBlock=function(e){if(!e.isText()){var t,r=e.get().childNodes,i=0,o=!0,a=!1,s="p"===e.name,l=(0,k.Z)(r);try{for(l.s();!(t=l.n()).done;){var c=t.value;if(o&&c.nodeType===Node.TEXT_NODE?o=!1:s||a||c.nodeType!==Node.ELEMENT_NODE||!n.isBlock(c)||(a=!0),c.nodeType===Node.ELEMENT_NODE&&[le,ce,Ae].indexOf(c.getAttribute(G)||"")<1&&i++,!o&&i>1)break}}catch(u){l.e(u)}finally{l.f()}if(s&&0===i){var A=document.createElement("br");e.each((function(e){e.appendChild(A.cloneNode())}))}!a&&o&&n.isBlock(e)&&(1!==r.length||"BR"!==r[0].nodeName)&&n.isEmptyWithTrim(e)&&(e.empty(),e.append(document.createElement("br")))}},this.editor=t}return(0,c.Z)(e,[{key:"isVoid",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.editor.schema,n="string"===typeof e?e:"";return gt(e)?n=e.nodeName.toLowerCase():pt(e)&&(n=e.name),t.find((function(e){return e.name===n&&!0===e.isVoid})).length>0}},{key:"isMark",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.editor.schema;return r.getTags("marks").includes((null!==(t=null===(n=e.nodeName)||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:e.name).toLowerCase())&&"mark"===r.getType(e)}},{key:"isInline",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.editor.schema;return r.getTags("inlines").includes(null!==(t=null===(n=e.nodeName)||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:e.name)&&"inline"===r.getType(e)}},{key:"isBlock",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.editor.schema;return r.getTags("blocks").includes((null!==(t=null===(n=e.nodeName)||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:e.name).toLowerCase())&&"block"===r.getType(e)}},{key:"isNestedBlock",value:function(e){if(!this.isBlock(e))return!1;var t=e.length?e[0]:e;if(!t)return!1;var n=t.firstChild;while(n){if(this.isBlock(n))return!1;n=n.nextSibling}return!0}},{key:"isRootBlock",value:function(e,t){var n;return!!(null===(n=e.parent())||void 0===n?void 0:n.isEditable())&&(!!this.isNestedBlock(e)&&(t||this.editor.schema).find((function(t){return t.name===e.name})).every((function(e){if("block"!==e.type)return!1;var t=e.allowIn;return!t||t.indexOf("$root")>-1})))}},{key:"isEmpty",value:function(e,t){var n,r;if(e.length>0&&e.isElement()){var i,o=e.attributes(),a=null!==(i=e.fragment)&&void 0!==i?i:e.get(),s=Array.from(a.querySelectorAll("".concat(xe,",").concat(ke,",").concat(ne,",br")));if(o[fe]||o[ge]||s.some((function(e){return e.hasAttribute(fe)||e.hasAttribute(ge)}))&&!s.some((function(e){return e.getAttribute(G)===te})))return!1;if("br"!==e.name&&this.isVoid(e))return!1;if(s.filter((function(e){return"br"===e.localName})).length>1)return!1}var l=e.isText()?e[0].nodeValue||"":e.text();return l=null===(n=l)||void 0===n?void 0:n.replace(/\u200B/g,""),l=null===(r=l)||void 0===r?void 0:r.replace(/\r\n|\n/,""),l&&t&&(l=l.trim()),""===l}},{key:"isEmptyWithTrim",value:function(e){return this.isEmpty(e,!0)}},{key:"isEmptyWidthChild",value:function(e){if(0===e.length)return!0;if(e.isCard())return!1;if(e.isText())return this.isEmpty(e);var t=e[0].childNodes;if(0===t.length)return!0;for(var n=0;n<t.length;n++){var r=t[n];if(r.nodeType===Node.TEXT_NODE){if(""!==r["data"].replace(/\u200b/g,""))return!1}else if(r.nodeType===Node.ELEMENT_NODE){if("li"===r.nodeName.toLowerCase()&&!this.editor.list.isEmptyItem(Ut(r)))return!1;if(r.hasAttribute(fe))return!1;if(!this.isEmptyWidthChild(Ut(r)))return!1}}return!0}},{key:"isList",value:function(e){var t="string"===typeof e?e:"";return gt(e)?t=e.nodeName.toLowerCase():pt(e)&&(t=e.name),["ul","ol"].indexOf(t)>-1}},{key:"isCustomize",value:function(e){var t=this.editor.list;switch(e.name){case"li":return e.hasClass(t.CUSTOMZIE_LI_CLASS);case"ul":return e.hasClass(t.CUSTOMZIE_UL_CLASS);default:return!1}}},{key:"unwrap",value:function(e){var t=e.first(),n=[];while(t){var r=t.next();e.before(t),n.push(t),t=r}return e.remove(),n}},{key:"wrap",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.editor.mark;if(gt(e)&&(e=Ut(e)),t=this.clone(t,!1),e.isText())return t.append(this.clone(e,!1)),e.replaceWith(t);if(r&&this.isMark(t)){var o=this.clone(t,!1,!1);if(e.name===t.name){var a=e.attributes();delete a.style,delete a[$],Object.keys(a).forEach((function(e){if(t.attributes(e)){var n=t.attributes(e).split(",");void 0!==n[e]&&n.indexOf(n[e])<0&&n.push(n[e]),t.attributes(e,n.join(","))}else t.attributes(e,a[e])}));var s=e.css();Object.keys(s).forEach((function(e){t.css(e)||t.css(e,s[e])})),t.append(this.clone(e,!0,!1).children())}else t.append(this.clone(e,!0,!1));var l=t.allChildren();return l.forEach((function(e){!e.isText()&&n.isMark(e)&&i.compare(e,o)&&n.unwrap(e)})),e.replaceWith(t)}var c=e.parent(),A=this.clone(e,!1,!1);return e.after(A),t.append(e),c?A.replaceWith(t):t}},{key:"merge",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.equal(t)){if(t.isText())return e.append(t),void this.removeSide(e);var r=this.editor,i=r.block,o=r.mark,a=r.list,s=t,l=this.isList(e),c=this.isList(t.name);if(l&&!c){var A=e.find("li");if(0===A.length)return;e=Ut(A[A.length-1])}if(!l&&c){var u=t.find("li");u.length>0&&(t=Ut(u[0])),u[1]&&(s=Ut(u[0]))}if(this.isCustomize(e)){var d,h,p=e.first();if(!(null===(d=p)||void 0===d?void 0:d.isCard())){var f=a.getPlugins(),g=a.getPluginNameByNode(e),m=f.find((function(e){return e.constructor.pluginName===g}));(null===m||void 0===m?void 0:m.cardName)&&(a.addCardToCustomize(e,m.cardName),p=e.first())}if(this.isCustomize(t)&&!(null===(h=p)||void 0===h?void 0:h.equal(t))){var v=t.first();(null===v||void 0===v?void 0:v.isCard())&&p.attributes(fe)===v.attributes(fe)&&v.remove()}}var b=e.last(),y=t.first(),w=i.findPlugin(e);while(y){var x,k,C=y.next(),B=o.findPlugin(y);if(w&&B&&w.disableMark&&w.disableMark.indexOf(B.constructor.pluginName)>-1){var _=this.unwrap(y);_.forEach((function(t){e.append(t)}))}else if(y.isText()&&/\u200b/.test(y.text())){var E=y.parent(),S=y.prev(),F=y.next();if(!E||!this.isMark(E)&&(S&&!this.isInline(S)||F&&!this.isInline(F))){y.remove(),y=F;continue}}else if(B&&1===(null===(x=y.get())||void 0===x?void 0:x.childNodes.length)){var T=y.prev();T&&!T.isText()||y.allChildren().forEach((function(e){var t,n=e.text();e.type===rt().TEXT_NODE&&n&&!(null===(t=e.next())||void 0===t?void 0:t.isCursor())&&e.text(n.replace(/\u200b/,""))}))}y.length>0&&!y.equal(e)&&!(null===(k=y.parent())||void 0===k?void 0:k.equal(e))&&e.append(y),y=C}if(n&&s.remove(),b&&"br"===b.name){var M=b.next();while(M){if(M.isCursor()){b.remove();break}M=M.next()}}this.removeSide(e)}}},{key:"replace",value:function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.clone(t,!1,i),a=this.isCustomize(e)&&"li"===e.name&&(null===(n=e.first())||void 0===n?void 0:n.isCard())?null===(r=e.first())||void 0===r?void 0:r.next():e.first();while(a){var s=a.next();o.append(a),a=s}return e.isText()&&o.append(e.clone()),e.replaceWith(o)}},{key:"insertText",value:function(e,t){var n,r=this.editor;if(st(r)){var i=r.change,o=t||i.range.toTrusty(),a=rt(o.startContainer);o.collapsed||i.delete(t);var s=a.createTextNode(e);return null===(n=this.insert(s,o))||void 0===n||n.handleBr(),t||i.apply(o),o}}},{key:"insert",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(pt(e)){if(0===e.length)throw"Not found node";e=e[0]}var i=this.editor;if(st(i)){var o=i.change,a=i.block,s=i.schema,l=i.mark;t=t||o.range.get();var c=t.cloneRange().shrinkToTextNode(),A=c.startNode,u=c.startOffset,d=A.prev(),h=A.parent(),p=A.text()||"",f=p.substr(0,u);if(A.isText()&&/\u200b$/.test(f)&&p.length>1&&(d&&!this.isInline(d)||!d&&h&&!this.isInline(h))){var g=A.get(),m=g.splitText(u-1),v=m.textContent;v&&v.length>0&&m.splitText(1),m.remove()}var b=null===h||void 0===h?void 0:h.attributes(be);if(!b&&A.isCard()&&t.setStartAfter(A),b&&h&&["left","right"].includes(b)){var y=i.card.find(h);y&&("left"===b?t.setStartBefore(y.root):t.setStartAfter(y.root))}if(this.isBlock(e)){var w=t,x=w.commonAncestorNode;x.isText()&&(x=i.block.closest(x));var k=null;if(this.isBlock(x)&&this.isEmpty(x))k=r?x:void 0;else{var C,B=!1;if(a.isFirstOffset(t,"start")&&(B=!0),k=a.split(t),B)k=null===(C=k)||void 0===C?void 0:C.prev()}var _=a.closest(t.startNode.isEditable()?t.cloneRange().shrinkToElementNode().shrinkToTextNode().startNode:t.startNode);if(_.isRoot()&&!t.startNode.next())_.append(e);else if(!_.isCard()&&s.isAllowIn(_.name,e.nodeName.toLowerCase()))_.find("br").remove(),_.append(e);else{var E,S=_.parent();while(S&&this.isBlock(S)&&!_.isEditable()&&(!S.isEditable()||S.isCard())&&!s.isAllowIn(S.name,e.nodeName.toLowerCase()))_=S,S=_.parent();var F=s.getCanMergeTags(),T=e.nodeName.toLowerCase(),M=null;if(k&&_.name===T&&F.includes(_.name)){var I;_=k;var N=document.createDocumentFragment(),U=[],L=null===(I=_.get())||void 0===I?void 0:I.nextSibling;e.childNodes.forEach((function(e){L?U.push(e):U.unshift(e)})),N.append.apply(N,U),e=N,M=N.lastChild}_.isEditable()&&0===(null===(E=_.get())||void 0===E?void 0:E.childNodes.length)?_.append(e):(this.isEmptyWidthChild(_)||a.isLastOffset(t,"start")?(_.after(e),this.isEmptyWidthChild(_)&&k&&_.remove()):(_.before(e),k&&this.isEmptyWidthChild(k)&&k.remove()),M&&(e=M))}(e instanceof Element||e instanceof DocumentFragment)&&i.nodeId.generate(e)}else{var Q=a.closest(t.startNode.isEditable()?t.cloneRange().shrinkToElementNode().shrinkToTextNode().startNode:t.startNode),D=Q?a.findPlugin(Q):void 0;if(D){var H=Ut(e),O=function(e){if(n.isMark(e)){var t=l.findPlugin(e);if(!t)return;if(D.disableMark&&D.disableMark.indexOf(t.constructor.pluginName)>-1)return!0}return!1};if(H.allChildren().forEach((function(e){O(e)&&n.unwrap(e)})),O(H)){var z=H.document.createDocumentFragment();H.children().each((function(e){z.appendChild(e)})),H.remove(),e=z.childNodes[z.childNodes.length-1],t.insertNode(z)}else t.insertNode(e);if(0===H.length)return t}else t.insertNode(e)}return e.nodeType===Node.ELEMENT_NODE&&(e.hasAttribute(ge)||e.hasAttribute(fe))?t.collapse(!1):t.select(e,!this.isVoid(e)&&e.nodeType!==Node.TEXT_NODE).shrinkToElementNode().collapse(!1)}}},{key:"setAttributes",value:function(e,t){var n=t.style;for(var r in t)if("style"!==r)if("className"===r){var i=t[r];Array.isArray(i)?i.forEach((function(t){return e.addClass(t)})):e.addClass(i)}else e.attributes(r,t[r].toString());"number"===typeof n?n={}:"string"===typeof n&&(n=qe(n)),n=n||{};var o=Object.keys(n);for(var a in n){var s=n[a];/^0(px|em)?$/.test(s.toString())&&(s=""),e.css(a,s.toString())}return 0!==o.length&&0!==Object.keys(e.attributes("style")).length||e.removeAttributes("style"),e}},{key:"removeMinusStyle",value:function(e,t){if(e.isElement()){var n=e.css();if(n[t]){var r=parseInt(n[t]||"0",10)||0;r<0&&e.css(t,"")}}}},{key:"mergeChild",value:function(e){var t=this.editor,n=t.schema,r=t.list,i=n.getAllowInTags(),o=e.first();while(o){var a=o.next();while(a&&o.name===a.name&&(i.indexOf(o.name)>-1&&!this.isList(o)||this.isList(o)&&r.isSame(o,a))){var s=a.next(),l=a.first();while(l){var c=l.next();o.append(l),l=c}a.remove(),this.mergeChild(o),a=s}o=a}}},{key:"removeSide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"br",n=e.first();(null===n||void 0===n?void 0:n.name)===t&&e.children().toArray().filter((function(e){return!e.isCursor()})).length>1&&n.remove();var r=e.last();(null===r||void 0===r?void 0:r.name)===t&&e.children().toArray().filter((function(e){return!e.isCursor()})).length>1&&r.remove()}},{key:"flat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.editor.block,r=e.first(),i=e.fragment?Ut("<p />"):this.clone(e,!1);while(r){var o=r.next();if(r.isBlockCard()||this.isNestedBlock(r))n.flat(r,t);else if(this.isBlock(r))r=this.flat(r,t);else{var a=this.clone(i,!1),s="li"===a.name;r.before(a);while(r){var l;o=r.next();var c="br"===r.name&&!s;if(c&&(null===(l=r.parent())||void 0===l?void 0:l.isRoot())&&a.append(r),r.isText()){var A=r.text(),u=/^((\n|\r)+)/.exec(A),d=!1;if(u&&(A=A.substring(u[1].length),d=!0,0===A.length&&r.remove()),u=/((\n|\r)+)$/.exec(A),u){r.text(A.substr(0,u.index)),a.append(r);break}d&&r.length>0&&r.text(A)}if(r.length>0&&a.append(r),o){var h=o.text(),p=/^(\n|\r)+/.exec(h);if(p)break}if(c||!o||this.isBlock(o)||o.isBlockCard())break;r=o}this.removeSide(a),n.flat(a,t),this.addBrForBlock(a)}this.addBrForBlock(r),this.removeSide(r),r=o}return e.fragment&&(e=Ut(e.fragment)),r=e.first(),r||e.remove(),e}},{key:"normalize",value:function(e){return e=this.flat(e),this.mergeChild(e),e}},{key:"html",value:function(e,t){var n,r=this;return void 0===t?e.length>0&&(null===(n=e.get())||void 0===n?void 0:n.innerHTML)||"":(e.each((function(e){e instanceof Element&&(e.innerHTML=t,r.editor.nodeId.generateAll(e))})),e)}},{key:"clone",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.editor.nodeId,i=[];return e.each((function(e){var o=e.cloneNode(t),a=Ut(o);n||(r.generateAll(a,!0),r.isNeed(a)&&r.generate(a,!0)),i.push(o)})),Ut(i)}},{key:"getBatchAppendHTML",value:function(e,t){var n;if(0===e.length)return t;var r=t.startsWith("\\u")||t.startsWith("&#")?Ut(t,null):Ut(t);return e.forEach((function(e){e=e.clone(!1),e.append(r),r=e})),(null===(n=r.get())||void 0===n?void 0:n.outerHTML)||""}},{key:"removeZeroWidthSpace",value:function(e){var t=this;e.traverse((function(e){var n=e[0];if(n.nodeType===Node.TEXT_NODE){var r=n.nodeValue;if(2===(null===r||void 0===r?void 0:r.length)){var i=n.nextSibling,o=n.previousSibling;if(!(8203===r.charCodeAt(1)&&i&&i instanceof Element&&[le,ce,Ae].indexOf(i.getAttribute(G)||"")>=0)){var a=e.parent();if((8203!==r.charCodeAt(1)||!(!i&&a&&t.isInline(a)||i&&t.isInline(i)))&&(8203!==r.charCodeAt(0)||!(!o&&a&&t.isInline(a)||o&&t.isInline(o)))&&8203===r.charCodeAt(0)){var s,l,c=n.splitText(1);c.previousSibling&&(null===(s=null!==(l=c.parentElement)&&void 0!==l?l:c.parentNode)||void 0===s||s.removeChild(c.previousSibling))}}}}}))}}]),e}(),Pt=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,l.Z)(this,e),this.range=void 0,this.editor=void 0,this.key="",this.anchor=null,this.focus=null,this.editor=t,this.range=n,this.key=r}return(0,c.Z)(e,[{key:"has",value:function(){return!!this.focus&&!!this.anchor}},{key:"create",value:function(){var e=this.range,t=e.commonAncestorNode,n=e.startNode,r=e.endNode;if(t.isEditable()||t.inEditor()){var i=t.document;if(i){var o=t.closest(X);if(this.key)o.find('[data-anchor-id="'.concat(this.key,'"]')).remove(),o.find('[data-focus-id="'.concat(this.key,'"]')).remove(),o.find('[data-cursor-id="'.concat(this.key,'"]')).remove();else{var a=o.find(ue);a.each((function(e,t){var n=a.eq(t);n&&!n.attributes("data-anchor-id")&&n.remove()}));var s=o.find(de);s.each((function(e,t){var n=s.eq(t);n&&!n.attributes("data-focus-id")&&n.remove()}));var l=o.find(he);l.each((function(e,t){var n=l.eq(t);n&&!n.attributes("data-cursor-id")&&n.remove()}))}var c=n.closest(xe);if(c.length>0){var A=n.closest(Ce);A.length>0&&this.range.setStartBefore(c);var u=n.closest(_e);u.length>0&&this.range.setStartAfter(c)}if(!n.equal(r)){var d=r.closest(xe);if(d.length>0){var h=r.closest(Ce);h.length>0&&this.range.setEndBefore(d);var p=r.closest(_e);p.length>0&&this.range.setEndAfter(d)}}if(this.range.collapsed){var f=Ut(i.createElement("span"));return f.attributes(G,Ae),this.key&&f.attributes("data-cursor-id",this.key),this.range.insertNode(f),this.anchor=f,void(this.focus=f)}var g=this.range.cloneRange();g.collapse(!0);var m=Ut(i.createElement("span"));m.attributes(G,le),this.key&&m.attributes("data-anchor-id",this.key),g.insertNode(m),this.range.setStartAfter(m);var v=this.range.cloneRange();v.collapse(!1);var b=Ut(i.createElement("span"));b.attributes(G,ce),this.key&&b.attributes("data-focus-id",this.key),v.insertNode(b),this.anchor=m,this.focus=b}}}},{key:"move",value:function(){var e,t;if(this.focus&&this.anchor){if(this.key){var n,r,i=this.range.commonAncestorNode,o=i.closest(X);this.focus.inEditor()&&(null===(n=this.focus.get())||void 0===n?void 0:n.isConnected)||(this.focus=o.find("[data-".concat(this.focus.attributes(G),'-id="').concat(this.key,'"]'))),this.anchor.inEditor()&&(null===(r=this.anchor.get())||void 0===r?void 0:r.isConnected)||(this.anchor=o.find("[data-".concat(this.anchor.attributes(G),'-id="').concat(this.key,'"]')))}var a=this.editor.node;if((null===(e=this.anchor.get())||void 0===e?void 0:e.isConnected)||(this.anchor=this.range.commonAncestorNode.find("[".concat(G,'="anchor"]'))),(null===(t=this.focus.get())||void 0===t?void 0:t.isConnected)||(this.focus=this.range.commonAncestorNode.find("[".concat(G,'="focus"]'))),this.anchor.equal(this.focus)){var s,l=this.anchor,c=l.parent();if(!c)return;a.removeZeroWidthSpace(c),c[0].normalize();var A=!1,u=l.prev(),d=l.next();if(u&&u.isCard()){var h=u.find(_e);h.length>0&&(this.range.select(h,!0),this.range.collapse(!1),A=!0)}else if(d&&d.isCard()){var p=d.find(Ce);p.length>0&&(this.range.select(p,!0),this.range.collapse(!1),A=!0)}return A||(this.range.setStartBefore(l[0]),this.range.collapse(!0)),Te?(c[0].normalize(),l.remove()):(l.remove(),c[0].normalize()),void("p"===c.name&&0===(null===(s=c.get())||void 0===s?void 0:s.childNodes.length)&&c.append(Ut("<br />")))}var f,g=this.anchor.parent();if(g&&(a.removeZeroWidthSpace(g),this.anchor.length>0&&this.range.setStartBefore(this.anchor),this.anchor.remove(),g[0].normalize()),g=this.focus.parent(),g)if(a.removeZeroWidthSpace(g),this.focus.length>0&&this.range.setEndBefore(this.focus),this.focus.remove(),g[0].normalize(),"p"===g.name&&0===(null===(f=g.get())||void 0===f?void 0:f.childNodes.length)&&g.append(Ut("<br />")),Ne){var m=window.getSelection();null===m||void 0===m||m.removeAllRanges(),null===m||void 0===m||m.addRange(this.range.base)}}}},{key:"getNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},i=n?e.clone(!0):e;if(!this.focus||!this.anchor)return i;if("left"===t||"center"===t){var o="center"!==t?this.anchor:this.focus,a=Ut(this.key?"[data-".concat(o.attributes(G),'-id="').concat(this.key,'"]'):"[".concat(G,"=").concat(o.attributes(G),"]"),i.get());this.key||(a=a.toArray().find((function(e){return!e.attributes("data-".concat(o.attributes(G),"-id"))})));var s=!1;i.traverse((function(e){if(a&&e.equal(a)){var t,n=e.parent();return a.remove(),"p"===(null===n||void 0===n?void 0:n.name)&&0===(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&n.append(Ut("<br />")),void(s=!0)}s&&r(e)&&(e.attributes(G)!==o.attributes(G)||"cursor"===o.attributes(G))&&e.remove()}),!0)}if("right"===t||"center"===t){var l="center"!==t?this.focus:this.anchor,c=Ut(this.key?"[data-".concat(l.attributes(G),'-id="').concat(this.key,'"]'):"[".concat(G,"=").concat(l.attributes(G),"]"),i.get());this.key||(c=c.toArray().find((function(e){return!e.attributes("data-".concat(l.attributes(G),"-id"))})));var A=!1;i.traverse((function(e){if(c&&e.equal(c)){var t,n=e.parent();return c.remove(),"p"===(null===n||void 0===n?void 0:n.name)&&0===(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&n.append(Ut("<br />")),void(A=!0)}A&&r(e)&&(e.attributes(G)!==l.attributes(G)||"cursor"===l.attributes(G))&&e.remove()}),!1)}return i}}]),e}();function qt(e){return"[object Object]"===Object.prototype.toString.call(e)}function Kt(e){if(!qt(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!1!==qt(n)&&!1!==n.hasOwnProperty("isPrototypeOf")}Pt.removeTags=function(e){return e.replace(/<anchor\s*\/>/gi,"").replace(/<focus\s*\/>/gi,"").replace(/<cursor\s*\/>/gi,"")};var Wt=new WeakMap,jt=function(e,t,n){var r=gt(e)?e:e[0],i=Wt.get(r);return void 0!==i||(i=Vt(r,t,n),Wt.set(r,i)),i},Vt=function(e,t,n){var r=gt(e)?e:e[0];if(r.nodeType===Node.ELEMENT_NODE){var i=r.getAttribute(G)||"";if([Ae,le,ce].indexOf(i)>-1)return!0;if(r.getAttribute(ie)||i===J)return!0;var o=r.parentElement,a=(null===o||void 0===o?void 0:o.getAttribute(G))||"";if(i===Y||a===Y)return!1;var s=vt(r),l=null===o||void 0===o?void 0:o.getAttribute(ye);if(l&&o&&(null===n||void 0===n||n.push(Ut(o))),!s&&o&&vt(o)&&!wt(o))return!0;if(t){if(s)return!1;var c=t.find((function(t){return t===e[0]}));if(c)return c["__card_root"]&&(null===n||void 0===n||n.push(c["__card_root"])),!0}var A=_t(r,"".concat(xe,",").concat(ee),at);if(!A||!(A instanceof Element))return!1;if(A.getAttribute(G)===J)return!0;if(A.getAttribute(ye)&&(null===n||void 0===n||n.push(Ut(A))),!s&&vt(A)&&!wt(A))return!0;if(!s||wt(r)||!o)return!1;var u=_t(o,xe,at);if(!u||!(u instanceof Element))return!1;var d=u.getAttribute(ye);if(d&&u&&(null===n||void 0===n||n.push(Ut(u))),u&&vt(u)&&!wt(u))return!0}else if(r.nodeType===Node.TEXT_NODE){var h=r.parentElement;return!!h&&jt(h)}return!1},Gt=function(e,t){var n=gt(e)?e:e[0];if(xt(n))return!0;if(vt(n)&&["id","class","style",ye].includes(t))return!0;var r=n.getAttribute(re);return!!("*"===r||r&&r.split(",").some((function(e){return e.trim().toLowerCase()===t.toLowerCase()})))},$t=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.editor=void 0,this.base=void 0,this.toRange=function(){return r.base},this.collapse=function(e){return r.base.collapse(e),r},this.cloneRange=function(){return e.from(r.editor,r.base.cloneRange())},this.select=function(e,t){return t?r.base.selectNodeContents(pt(e)?e[0]:e):r.base.selectNode(pt(e)?e[0]:e),r},this.getText=function(){var e=r.cloneContents();return e.textContent},this.getClientRect=function(){var e=r.getClientRects().item(0);return e||(e=r.getBoundingClientRect()),e},this.enlargeFromTextNode=function(){var e=function(e,t,n){var i;if(e.nodeType===Node.TEXT_NODE)if(0===t)switch(n){case"start":r.setStartBefore(e);break;case"end":r.setEndBefore(e);break}else if(t===(null===(i=e.nodeValue)||void 0===i?void 0:i.length))switch(n){case"start":r.setStartAfter(e);break;case"end":r.setEndAfter(e);break}};return e(r.startContainer,r.startOffset,"start"),e(r.endContainer,r.endOffset,"end"),r},this.shrinkToTextNode=function(){var e=function(e,t,n){if(e.nodeType===Node.ELEMENT_NODE){var i=e.childNodes;if(0!==i.length){var o,a,s,l;if(t>0&&(o=i[t-1]),t<i.length&&(a=i[t]),o&&o.nodeType===Node.TEXT_NODE)s=o,t=(null===(l=s.nodeValue)||void 0===l?void 0:l.length)||0;if(a&&a.nodeType===Node.TEXT_NODE&&(s=a,t=0),s)switch(n){case"start":r.setStart(s,t);break;case"end":r.setEnd(s,t);break}}}};return e(r.startContainer,r.startOffset,"start"),e(r.endContainer,r.endOffset,"end"),r},this.enlargeToElementNode=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=r.enlargeFromTextNode(),i=r.editor.node,o=function(r,o,a){var s,l,c=Ut(r);if(!(c.type===Node.TEXT_NODE||!e&&i.isBlock(c)||c.isEditable()))if(0===o){while(!c.prev()){if(l=c.parent(),!l||!e&&i.isBlock(l))break;if(!l.inEditor()||l.isEditable())break;if(!t){if(!e&&l.isElement())break;if(e&&i.isBlock(l))break}c=l}a?n.setStartBefore(c[0]):n.setEndBefore(c[0])}else if(o===(null===(s=c.get())||void 0===s?void 0:s.childNodes.length)){while(!c.next()){if(l=c.parent(),!l||!e&&i.isBlock(l))break;if(!l.inEditor()||l.isEditable())break;if(!t){if(!e&&l.isElement())break;if(e&&i.isBlock(l))break}c=l}a?n.setStartAfter(c[0]):n.setEndAfter(c[0])}};return o(n.startContainer,n.startOffset,!0),o(n.endContainer,n.endOffset,!1),r},this.shrinkToElementNode=function(){var e,t,n=r.editor.node;while(r.startContainer.nodeType===Node.ELEMENT_NODE&&(e=r.startContainer.childNodes[r.startOffset])&&(t=Ut(e))&&e.nodeType===Node.ELEMENT_NODE&&!t.isCursor()&&!n.isVoid(e)&&(!t.isCard()||t.isEditableCard()||t.find(Ce).length>0))r.setStart(e,0);while(r.endContainer.nodeType===Node.ELEMENT_NODE&&r.endOffset>0&&(e=r.endContainer.childNodes[r.endOffset-1])&&(t=Ut(e))&&e.nodeType===Node.ELEMENT_NODE&&!n.isVoid(e)&&!t.isCursor()&&(!t.isCard()||t.isEditableCard()||t.find(_e).length>0))r.setEnd(e,e.childNodes.length);return r},this.createSelection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new Pt(r.editor,r,e);return t.create(),t},this.getSubRanges=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=[];return r.commonAncestorNode.traverse((function(o){if(o.isText()){var a,s=0,l=o.get(),c=(null===(a=l.nodeValue)||void 0===a?void 0:a.length)||0,A=r.comparePoint(l,s),u=r.comparePoint(l,c),d=e.create(r.editor);if(A<0){if(u<0)return;0===u?d.setOffset(l,r.startOffset,c):d.setOffset(l,r.startOffset,r.endOffset)}else{if(0!==A)return;if(u<0)return;0===u?d.setOffset(l,s,c):d.setOffset(l,s,r.endOffset)}i.push(d)}else if(t&&o.isCard()&&!o.isEditableCard()){var h,p=r.editor.card.find(o);if(!p||n&&!1===p.constructor.singleSelectable)return;var f=p.getCenter(),g=f.get(),m=null!==(h=null===g||void 0===g?void 0:g.parentElement)&&void 0!==h?h:null===g||void 0===g?void 0:g.parentNode;if(!m||!f.inEditor())return;var v=f.index(),b=o.get(),y=r.comparePoint(m,v),w=r.comparePoint(m,v+1),x=e.create(r.editor);if(y<0){if(w<0)return;0===w?x.setOffset(b,r.startOffset,v+1):x.setOffset(b,r.startOffset,r.endOffset)}else{if(0!==y)return;if(w<0)return;0===w?x.setOffset(m,v,v+1):x.setOffset(m,v,r.endOffset)}i.push(x)}})),0===i.length&&i.push(r),i},this.setOffset=function(e,t,n){return pt(e)&&(e=e[0]),r.setStart(e,t),r.setEnd(e,n),r},this.findElements=function(){var e=r.startContainer,t=r.endContainer,n=r.startOffset,i=r.endOffset,o=r.collapsed,a=[];if(e!==t||!0===o||e.nodeType===Node.TEXT_NODE)return a;for(var s=e.childNodes,l=n;l<i;l++)a.push(s[l]);return a},this.inCard=function(){var e=r.startNode.closest(xe);return e&&e.length>0},this.getStartOffsetNode=function(){var e=r.startContainer,t=r.startOffset;return(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(e.childNodes[t]||e.childNodes[t-1])||e},this.getEndOffsetNode=function(){var e=r.endContainer,t=r.endOffset;return(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(e.childNodes[t]||e.childNodes[t-1])||e},this.scrollIntoView=function(){var e=r.endNode.get();Ue&&e&&e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},this.scrollRangeIntoView=function(){var e,t=r.getEndOffsetNode(),n=t.nodeType===Node.TEXT_NODE?null!==(e=t.parentElement)&&void 0!==e?e:t.parentNode:t,i=r.collapsed?n.getBoundingClientRect():r.getClientRect(),o=window.innerHeight;(i.bottom>=o||i.bottom<=0)&&n.scrollIntoView({block:"center"})},this.scrollIntoViewIfNeeded=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.editor.container,t=arguments.length>1?arguments[1]:void 0;if(r.collapsed)e.scrollIntoView(Ut(r.getEndOffsetNode()));else{var n=r.getStartOffsetNode(),i=r.getEndOffsetNode();Ut(n).scrollIntoView(t),Ut(i).scrollIntoView(t)}},this.containsCard=function(){var e=r.collapsed,t=r.commonAncestorNode;return!e&&(3!==t.type&&t.find(xe).length>0||t.closest(xe).length>0)},this.handleBr=function(e){var t,n=r.editor,i=n.list,o=n.block.closest(r.commonAncestorNode);o.find("br").each((function(t){var n,r=Ut(t),o=r.prev(),a=r.next(),s=r.parent();if((!o||(null===s||void 0===s?void 0:s.hasClass(i.CUSTOMZIE_LI_CLASS))&&(null===s||void 0===s||null===(n=s.first())||void 0===n?void 0:n.equal(o)))&&a&&"br"!==a.name&&!a.isCursor()||!a&&o&&"br"!==o.name){var l;if(e&&o&&(!(null===s||void 0===s?void 0:s.hasClass(i.CUSTOMZIE_LI_CLASS))||!(null===s||void 0===s||null===(l=s.first())||void 0===l?void 0:l.equal(r.prev()))))return;r.remove()}}));var a,s=o.first(),l=o.children();if(!s||1===l.length&&o.hasClass(i.CUSTOMZIE_LI_CLASS)&&(null===s||void 0===s?void 0:s.isCard()))return o.append(Ut("<br />")),r;if(1===l.length&&s.isText()&&0===s.text().replace(/\r\n|\n|\t|\u200b/g,"").length)return o.html("<br />"),r;2===l.length&&o.hasClass(i.CUSTOMZIE_LI_CLASS)&&(null===s||void 0===s?void 0:s.isCard())&&["cursor","anchor","focus"].includes((null===(t=o.last())||void 0===t?void 0:t.attributes(G))||"")&&(null===(a=o.first())||void 0===a||a.after("<br />"));return r},this.getPrevNode=function(){r.enlargeFromTextNode();var e=r.startNode,t=r.startOffset;if(!e.isText()){var n=e.children();if(0!==n.length)return n.eq(t-1)}},this.getNextNode=function(){r.enlargeFromTextNode();var e=r.endNode,t=r.endOffset;if(!e.isText()){var n=e.children();if(0!==n.length)return n.eq(t)}},this.editor=t,this.base=n}return(0,c.Z)(e,[{key:"collapsed",get:function(){return this.base.collapsed}},{key:"endOffset",get:function(){return this.base.endOffset}},{key:"startOffset",get:function(){return this.base.startOffset}},{key:"startContainer",get:function(){return this.base.startContainer}},{key:"endContainer",get:function(){return this.base.endContainer}},{key:"commonAncestorContainer",get:function(){return this.base.commonAncestorContainer}},{key:"cloneContents",value:function(){return this.base.cloneContents()}},{key:"deleteContents",value:function(){return this.base.deleteContents()}},{key:"extractContents",value:function(){return this.base.extractContents()}},{key:"getBoundingClientRect",value:function(){return this.base.getBoundingClientRect()}},{key:"getClientRects",value:function(){return this.base.getClientRects()}},{key:"insertNode",value:function(e){var t,n;pt(e)&&(e=e[0]);var r,i=this.startNode;Ut(e).isCursor()||1!==(null===(t=i.get())||void 0===t?void 0:t.childNodes.length)||"br"!==(null===(n=i.first())||void 0===n?void 0:n.name)?"br"===i.name&&i.remove():null===(r=i.first())||void 0===r||r.remove();e.nodeType!==Node.TEXT_NODE&&"BR"!==e.nodeName||!i.isEditable()||this.shrinkToElementNode().shrinkToTextNode(),(e instanceof Element||e instanceof DocumentFragment)&&this.editor.nodeId.generate(e),this.base.insertNode(e)}},{key:"isPointInRange",value:function(e,t){return pt(e)&&(e=e[0]),this.base.isPointInRange(e,t)}},{key:"comparePoint",value:function(e,t){return pt(e)&&(e=e[0]),this.base.comparePoint(e,t)}},{key:"setEnd",value:function(e,t){return pt(e)&&(e=e[0]),this.base.setEnd(e,t)}},{key:"setEndAfter",value:function(e){if(pt(e)&&(e=e[0]),e.parentNode)return this.base.setEndAfter(e)}},{key:"setEndBefore",value:function(e){if(pt(e)&&(e=e[0]),e.parentNode)return this.base.setEndBefore(e)}},{key:"setStart",value:function(e,t){return pt(e)&&(e=e[0]),this.base.setStart(e,t)}},{key:"setStartAfter",value:function(e){if(pt(e)&&(e=e[0]),e.parentNode)return this.base.setStartAfter(e)}},{key:"setStartBefore",value:function(e){if(pt(e)&&(e=e[0]),e.parentNode)return this.base.setStartBefore(e)}},{key:"toString",value:function(){return this.base.toString()}},{key:"startNode",get:function(){return Ut(this.base.startContainer)}},{key:"endNode",get:function(){return Ut(this.base.endContainer)}},{key:"commonAncestorNode",get:function(){return Ut(this.base.commonAncestorContainer)}},{key:"deepCut",value:function(){this.collapsed||this.extractContents();var e=this.startNode;if(!e.isEditable()){var t=e;if(t&&!t.isEditable()){var n=t.parent();while(n&&!n.isEditable())t=n,n=n.parent();this.setEndAfter(t[0]);var r=this.extractContents();this.insertNode(r),this.collapse(!0)}}}},{key:"equal",value:function(e){return this.startContainer===e.startContainer&&this.startOffset===e.startOffset&&this.endContainer===e.endContainer&&this.endOffset===e.endOffset}},{key:"getRootBlock",value:function(){if(this.startNode.isEditable())return this.startNode.children().eq(this.startOffset);var e=this.startNode;while((null===(t=e)||void 0===t?void 0:t.parent())&&!e.parent().isEditable()){var t;e=e.parent()}return e}},{key:"filterPath",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=[];return function(r){var i=Ut(r);if(t&&r instanceof HTMLElement&&~["left","right","center","body"].indexOf(r.getAttribute(be)||"")){var o=e.editor.card.closest(i);return o&&o.length>0&&n.push(o),!0}return!!(t&&i.isCard()&&n.includes(i))||!jt(i)}}},{key:"toPath",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.editor.container,r=this.cloneRange(),i=r.commonAncestorNode;if(i.isRoot()||i.inEditor()){r.shrinkToElementNode().shrinkToTextNode();var o=function(r,i){var o,a=r.attributes($),s=a?0:-1,l=r.getPath(n,(null===(o=r.parent())||void 0===o?void 0:o.isRoot())?void 0:e.filterPath(t),(function(e,t,n){if(-1===e)return a="",s=-1,[];a||(a=n.attributes($),s=t.length),t.unshift(e)}));return s=l.length-s,l.push(i),{path:l,id:a,bi:s}};return{start:o(r.startNode,r.startOffset),end:o(r.endNode,r.endOffset)}}}}]),e}();$t.create=void 0,$t.from=void 0,$t.fromPath=void 0,$t.create=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2?arguments[2]:void 0;return t=r?n.caretRangeFromPoint(r.x,r.y):n.createRange(),$t.from(e,t)},$t.from=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(!Xt(t)){var n=Yt(t)?t:t.getSelection();if(!(n&&n.rangeCount>0))return null;t=n.getRangeAt(0)}return new $t(e,t)},$t.fromPath=function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.container,a=t.start.path.slice(),s=t.end.path.slice(),l=a.pop(),c=s.pop(),A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get(),n=t,r=0;r<e.length;r++){var a=e[r];a<0&&(a=0);var s=void 0,l=n.firstChild,c=0;while(l)if(!(l instanceof Element)||!l.getAttribute(ie)&&l.getAttribute(G)!==J||i&&["left","right"].includes(l.getAttribute(be)||"")){if(c===a||!l.nextSibling){s=l;break}c++,l=l.nextSibling}else l=l.nextSibling;if(!s)break;n=s}return n},u=function(e,t,n,r){if(null!==n){var i,o;if(r<0&&(r=0),n.nodeType===Node.ELEMENT_NODE&&r>n.childNodes.length&&(r=n.childNodes.length),n.nodeType===Node.TEXT_NODE&&r>((null===(i=n.nodeValue)||void 0===i?void 0:i.length)||0))r=(null===(o=n.nodeValue)||void 0===o?void 0:o.length)||0;t[e](n,r)}},d=t.start.id?null===(n=o.get())||void 0===n?void 0:n.querySelector("[".concat($,'="').concat(t.start.id,'"]')):o.get(),h=A(t.start.bi>-1&&d instanceof Element?a.slice(t.start.bi):a,d instanceof Element?d:void 0),p=t.end.id?null===(r=o.get())||void 0===r?void 0:r.querySelector("[".concat($,'="').concat(t.end.id,'"]')):o,f=A(t.end.bi>-1&&p instanceof Element?s.slice(t.end.bi):s,p instanceof Element?p:void 0),g=$t.create(e,document);return u("setStart",g,h,void 0===l?0:l),u("setEnd",g,f,void 0===c?0:c),g};var Yt=function(e){return void 0!==e.getRangeAt},Xt=function(e){return void 0!==e.collapsed},Jt=function(e){return!!e&&void 0!==e.base};function en(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var tn=".data-drop-cursor {\r\n\tposition: absolute;\r\n\twidth: 2px;\r\n\tbackground-color: #347EFF;\r\n}\r\n\r\ndiv.data-drag-image {\r\n\tbackground-color: #f9f9f9;\r\n}";en(tn);var nn,rn,on,an=function(){function e(t,n){(0,l.Z)(this,e),this.x=0,this.y=0,this.doc=document,this.range=void 0,this.caretRange=void 0,this.targetCard=void 0,this.caretCard=void 0,this.isCardLeftRange=!1,this.engine=void 0,this.options={className:"data-drop-cursor"},this.engine=t,this.options=(0,s.Z)((0,s.Z)({},this.options),n)}return(0,c.Z)(e,[{key:"getRangeForPoint",value:function(){var e=this.doc,t=this.x,n=this.y;if(void 0!==e.caretRangeFromPoint){var r=$t.create(this.engine,e,{x:t,y:n});if(r)return r}if(event&&void 0!==event["rangeParent"]){var i=$t.create(this.engine,e);return i.setStart(event["rangeParent"],event["rangeOffset"]),i.collapse(!0),i}}},{key:"getCard",value:function(){return this.targetCard||this.caretCard}},{key:"parseEvent",value:function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="move");var t=this.engine.card;this.x=e.clientX,this.y=e.clientY;var n=Ut(e.target||[]);this.doc=n.document||document,this.targetCard=t.find(n),this.caretRange=this.getRangeForPoint(),this.caretCard=this.caretRange?t.find(this.caretRange.commonAncestorContainer):void 0}},{key:"getRange",value:function(){var e,t=this.caretRange,n=this.doc,r=this.x,i=this.getCard();if(i&&i.root.length>0){e=$t.create(this.engine,n);var o=i.root.getBoundingClientRect()||{left:0,right:0},a=o.left,s=o.right,l=(a+s)/2;e.select(i.root.get()),l<r?(e.collapse(!1),this.isCardLeftRange=!1):(e.collapse(!0),this.isCardLeftRange=!0)}return this.range=e||t,this.range}},{key:"getRect",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,r=this.isCardLeftRange,i=this.range,o=this.getCard();if(o&&o.root.length>0&&i){if(r){i.setEnd(i.commonAncestorContainer,i.endOffset+1);var a=i.getBoundingClientRect(),s=a.left,l=a.bottom,c=a.top;return i.setEnd(i.commonAncestorContainer,i.endOffset-1),{x:s-n,y:c,height:l-c}}i.setStart(i.commonAncestorContainer,i.startOffset-1);var A=i.getBoundingClientRect(),u=A.right,d=A.top,h=A.bottom;return i.setStart(i.commonAncestorContainer,i.startOffset+1),{x:u-n,y:d,height:h-d}}var p=null===(e=this.range)||void 0===e?void 0:e.getBoundingClientRect();if(0===(null===(t=p)||void 0===t?void 0:t.height)){var f,g=null===(f=this.range)||void 0===f?void 0:f.startContainer;p=g.getBoundingClientRect()}var m=p||{},v=m.left,b=m.top,y=m.bottom;return{x:v,y:b,height:(y||0)-(b||0)}}},{key:"getCursor",value:function(){var e=this.options.className;return Ut("body > div.".concat(e))}},{key:"removeCursor",value:function(){this.getCursor().remove()}},{key:"setCursor",value:function(){this.removeCursor();var e=this.options.className,t=Ut('<div class="'.concat(e,'" />'));Ut(document.body).append(t)}}]),e}(),sn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.Z)(this,e),this.events={},this.globalEvents={},this.engine=void 0,this.isComposing=void 0,this.isSelecting=void 0,this.dragoverHelper=void 0,this.options=void 0,this.keydownRange=null,this.engine=t,this.isComposing=!1,this.isSelecting=!1,this.dragoverHelper=new an(t),this.options=n}return(0,c.Z)(e,[{key:"isCardInput",value:function(e){var t=e.target?Ut(e.target):null;while(t){if(t.isEditable())return!1;if("center"===t.attributes(be))return!0;if(t.attributes(G)===J)return!0;var n=t.parent();if(!n)break;t=n}return!1}},{key:"onInput",value:function(e){var t=this,n=this.options.bindInput;if(!n||n()){var r=null;this.onContainer("compositionstart",(function(e){if(!t.engine.readonly){t.isCardInput(e)||t.engine.model.mutation.startCache();var n=t.engine,r=n.change,i=n.node,o=n.block,a=n.list,s=r.range.get().cloneRange().shrinkToTextNode().enlargeToElementNode();if(!s.collapsed){var l,c=o.closest(s.startNode),A=o.closest(s.endNode);if((i.isCustomize(c)||i.isCustomize(A))&&!c.equal(A))null===(l=a.backspaceEvent)||void 0===l||l.trigger(new KeyboardEvent(""))}t.isComposing=!0}}));var i=function(n){if(!t.isComposing){if(Qe&&r){var i=r.first(),o=null===i||void 0===i?void 0:i.next();if(null===o||void 0===o?void 0:o.isText()){var a=o.text();if(/^\u200b/.test(a)){var s=o.get();null===s||void 0===s||s.splitText(1),null===s||void 0===s||s.remove()}}var l=t.engine.change.range.get(),c=l.startNode,A=l.startOffset;if(l.collapsed&&(null===c||void 0===c?void 0:c.isText())){var u=c.text(),d=u.substring(A);/^\u200b/.test(d)&&(c.text(u.substring(0,A)+d.substring(1)),l.setOffset(c,A,A),t.engine.change.range.select(l))}r=null}e(n),t.engine.model.mutation.submitCache()}};this.onContainer("compositionend",(function(e){t.engine.readonly||(t.isComposing=!1,setTimeout((function(){t.engine.model.mutation.isCache&&i(e)}),40))})),this.onContainer("beforeinput",(function(e){if(!t.engine.readonly){var n=t.engine,i=n.change,o=n.card,a=n.node,s=n.block,l=n.list;if("@"===e.data&&!t.isCardInput(e)){var c=t.engine.trigger("keydown:at",e);!1===c&&(t.engine.model.mutation.submitCache(),e.preventDefault())}i.rangePathBeforeCommand||i.cacheRangeBeforeCommand();var A=i.range.get(),u=A.cloneRange().shrinkToTextNode().enlargeToElementNode(),d=u.startNode;if(Ne&&"deleteCompositionText"===e.inputType&&"li"===d.name&&d.length>0&&!a.isCustomize(d)){var h=d[0].childNodes;1===h.length&&"BR"!==h[0].nodeName&&(d.prepend("<br />"),setTimeout((function(){var e=d[0].childNodes;2===e.length&&"BR"===e[0].nodeName&&"BR"===e[1].nodeName&&e[0].remove()}),0))}if(Qe&&"li"===d.name&&1===u.startOffset&&a.isCustomize(d)&&t.isComposing){var p=d.first(),f=null===p||void 0===p?void 0:p.next(),g=function(){var e=Ut("",null);null===p||void 0===p||p.after(e),u.setOffset(e,1,1),i.range.select(u),r=d};if(null===f||void 0===f?void 0:f.isText()){var m=f.text();/^\u200b/.test(m)||g()}else"br"===(null===f||void 0===f?void 0:f.name)&&f.remove(),g()}if(u.collapsed||("body"===u.commonAncestorNode.attributes(be)?o.remove(u.commonAncestorNode):("body"===u.startNode.attributes(be)&&o.remove(u.startNode),"body"===u.endNode.attributes(be)&&o.remove(u.endNode))),u.startNode.isRoot()){var v=u.getStartOffsetNode();if(v instanceof Element&&vt(v)&&!v.querySelector(Be)&&o.remove(v),!u.collapsed&&u.endNode.isRoot()){var b=u.getEndOffsetNode();b instanceof Element&&vt(b)&&!b.querySelector(Be)&&o.remove(b)}}if(!u.collapsed&&!t.isComposing){var y,w=s.closest(u.startNode),x=s.closest(u.endNode);if((a.isCustomize(w)||a.isCustomize(x))&&!w.equal(x))null===(y=l.backspaceEvent)||void 0===y||y.trigger(new KeyboardEvent("")),a.insertText(e.data||"")}var k=e.inputType;!t.isComposing||k&&k.includes("Composition")||t.engine.model.mutation.submitCache();var C=["format","history"];k&&C.forEach((function(n){if(0===k.indexOf(n)){e.preventDefault();var r=k.substring(n.length).toLowerCase();t.engine.command.queryEnabled(r)&&t.engine.command.execute(r)}}))}}));var o=null;this.onContainer("input",(function(e){var n;if(!t.engine.readonly&&!t.isCardInput(e)){t.engine.isEmpty()?t.engine.showPlaceholder():t.engine.hidePlaceholder();var r=t.engine,a=r.change,s=r.card;if(e.target instanceof Element&&kt(e.target)&&s.active&&s.active.root.isBlockCard()&&!s.active.isEditable&&(null===(n=s.active.root.get())||void 0===n?void 0:n.isContentEditable)){var l=a.range.get(),c=Ut("<p><br /></p>");return s.active.root.before(c),s.remove(s.active.root),l.select(c,!0),void a.range.select(l)}o&&clearTimeout(o),o=setTimeout((function(){i(e)}),10)}}))}}},{key:"onSelect",value:function(e,t,n){var r=this,o=this.options.bindSelect;o&&!o()||(this.onContainer(Ue?"touchstart":"mousedown",(function(e){r.isCardInput(e)||(r.isSelecting=!0,t&&t(e))})),this.onDocument(Ue?"touchend":"mouseup",(function(t){r.isSelecting&&(r.isSelecting=!1,window.setTimeout((function(){e(t),n&&n(t)}),10))})),this.onContainer("keydown",(function(){var e=$t.from(r.engine);r.keydownRange=e})),this.onContainer("keyup",(function(t){if(!r.engine.readonly&&!r.isCardInput(t)&&((0,i.ZP)("left",t)||(0,i.ZP)("right",t)||(0,i.ZP)("up",t)||(0,i.ZP)("down",t)||"Meta"===t.key||(0,i.ZP)("shift+left",t)||(0,i.ZP)("shift+right",t)||(0,i.ZP)("shift+up",t)||(0,i.ZP)("shift+down",t)||(0,i.ZP)("ctrl+b",t)||(0,i.ZP)("ctrl+f",t)||(0,i.ZP)("ctrl+n",t)||(0,i.ZP)("ctrl+p",t)||(0,i.ZP)("ctrl+a",t)||(0,i.ZP)("ctrl+e",t)||(0,i.ZP)("home",t)||(0,i.ZP)("end",t))){var n=$t.from(r.engine);if(r.keydownRange&&n&&n.equal(r.keydownRange))return;r.isComposing||e(t)}})))}},{key:"onPaste",value:function(e){var t=this,n=this.options.bindPaste;if(!n||n()){var r=!1;this.onContainer("keydown",(function(e){t.engine.readonly||((0,i.ZP)("mod",e)&&(0,i.ZP)("shift",e)&&(0,i.ZP)("v",e)||(r=!1),((0,i.ZP)("mod+shift+v",e)||(0,i.ZP)("mod+alt+shift+v",e))&&(r=!0))})),this.onDocument("paste",(function(n){var i=t.engine.change.range.get();if(t.engine.container.contains(i.commonAncestorNode)&&!t.engine.readonly&&!t.isCardInput(n)){n.preventDefault();var o=t.engine.clipboard.getData(n),a=r;r=!1,e((0,s.Z)((0,s.Z)({},o),{},{isPasteText:a}))}}))}}},{key:"onDrop",value:function(e){var t=this,n=this.options.bindDrop;if(!n||n()){var r,i,o,a=function(e){if(e.target&&!t.engine.readonly){e.stopPropagation(),t.dragoverHelper.setCursor();var n=Ut(e.target),o=n.attributes("drag-card-trigger");if(r=t.engine.card.find(o||n),r){var a,s;if(null===(a=r.toolbarModel)||void 0===a||a.hideCardToolbar(),i=r.find("img.data-drag-image"),i.length>0)i=t.engine.node.clone(i);else{i=Ut('<div class="data-drag-image" />');var l=r.root.get();l&&i.css({width:l.clientWidth+"px",height:l.clientHeight+"px"})}i.css({position:"absolute",top:"-99999px",right:"-99999px"}),Ut(document.body).append(i),null===(s=e.dataTransfer)||void 0===s||s.setDragImage(i[0],0,0)}}};this.onRoot("dragstart",a),this.onContainer("dragstart",a),this.onContainer("dragover",(function(e){if(!t.engine.readonly){var n=t.dragoverHelper,r=n.getCursor();if(0!==r.length){n.parseEvent(e),o=n.getRange();var i=n.getRect();r.css({height:i.height+"px",top:Math.round(window.pageYOffset+(i.y||0))+"px",left:Math.round(window.pageXOffset+(i.x||0))+"px"})}else t.dragoverHelper.setCursor()}})),this.onContainer("dragleave",(function(){t.dragoverHelper.removeCursor()})),this.onContainer("dragend",(function(){t.dragoverHelper.removeCursor(),i&&(i.remove(),i=void 0)})),this.onContainer("drop",(function(n){if(!t.engine.readonly){n.preventDefault(),t.dragoverHelper.removeCursor(),i&&(i.remove(),i=void 0);var a=n.dataTransfer,s=[];try{a&&a.items&&a.items.length>0?Array.from(a.items).forEach((function(e){if("file"===e.kind){var t=e.getAsFile();t&&s.push(t)}})):a&&a.files&&a.files.length>0&&(s=Array.from(a.files))}catch(c){a&&a.files&&a.files.length>0&&(s=Array.from(a.files))}var l={event:n,range:o,card:r,files:s};e(l),r=void 0}}))}}},{key:"onDocument",value:function(e,t,n){this.addEvent("document",e,t,n)}},{key:"onWindow",value:function(e,t,n){this.addEvent("window",e,t,n)}},{key:"onContainer",value:function(e,t,n){this.addEvent("container",e,t,n)}},{key:"onRoot",value:function(e,t,n){this.addEvent("root",e,t,n)}},{key:"addEvent",value:function(e,t,n,r){var i=this;if(this.globalEvents[e]||(this.globalEvents[e]=[]),!this.globalEvents[e].find((function(e){return e.type===t}))){var o=function(){for(var n,r=i.events[e].filter((function(e){return e.type===t})),o=0;o<r.length;o++){var a;if(n=(a=r[o]).listener.apply(a,arguments),!1===n)break}return n};switch(e){case"container":this.engine.container.on(t,o);break;case"root":this.engine.root.on(t,o);break;case"document":document.addEventListener(t,o);break;case"window":window.addEventListener(t,o);break}this.globalEvents[e].push({type:t,listener:o})}this.events[e]||(this.events[e]=[]),void 0!==r?this.events[e].splice(r,0,{type:t,listener:n}):this.events[e].push({type:t,listener:n})}},{key:"destroy",value:function(){var e=this;Object.keys(this.globalEvents).forEach((function(t){var n=e.globalEvents[t];n.forEach((function(n){"window"===t?window.removeEventListener(n.type,n.listener):"document"===t?document.removeEventListener(n.type,n.listener):"container"===t?e.engine.container.off(n.type,n.listener):"root"===t&&e.engine.root.off(n.type,n.listener)}))}))}}]),e}(),ln=function(){function e(t){(0,l.Z)(this,e),this.source=void 0,this.source=t}return(0,c.Z)(e,[{key:"toHTML",value:function(){var e=We(this.source);return e=e.replace(/\n/g,"</p><p>").replace(/<p><\/p>/g,"<p><br /></p>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;"),e.indexOf("</p><p>")>=0&&(e="<p>".concat(e,"</p>")),e}}]),e}(),cn=function(e){var t="";for(var n in e)if("style"!==n){var r=We(e[n]);t+=" ".concat(n,'="').concat(r,'"')}return t.trim()},An=function(e){var t="";for(var n in e){n=n.toLowerCase();var r=We(e[n]);/^(padding|margin|text-indent)/.test(n)&&0===Ge(r)||(n.endsWith("color")&&(r=(0,B.Vi)(r).toHex()),t+=" ".concat(n,": ").concat(r,";"))}return t.trim()},un=function(){function e(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if((0,l.Z)(this,e),this.root=void 0,this.editor=void 0,this.isNormalize=!0,this.editor=n,this.isNormalize=i,"string"===typeof t){var o;t=t.replace(/<a\s{0,1000}\/>/gi,"<a></a>"),t=t.replace(/<a(\s[^>]+?)\/>/gi,(function(e,t){return"<a".concat(t,"></a>")})),t=null===(o=t)||void 0===o?void 0:o.replace(/<img .*>/gi,(function(e){return e.replace(/\son[a-zA-Z]{1,20}=/g,"notallow=")})),t=t.replace(/<p(>|\s+[^>]*>)/gi,"<paragraph$1").replace(/<\/p(>|\s+[^>]*>)/gi,"</paragraph$1"),t=Xe(t);var a=(new DOMParser).parseFromString(t,"text/html"),s=a.body.innerHTML.replace(/<paragraph(>|\s+[^>]*>)/gi,"<p$1").replace(/<\/paragraph(>|\s+[^>]*>)/gi,"</p$1");this.root=Ut("<div>".concat(s,"</div>"))}else pt(t)?this.root=t:this.root=Ut(t);r&&r(this.root)}return(0,c.Z)(e,[{key:"convert",value:function(e,t,n){var r=e.transform(t),i=[],o=this.editor.node,a=null;while(r){var l,c=r,A=c.rule;i.push(A);var u=r.node,d=u.name,h=u.attributes,p=u.style;"card"!==d&&delete h[$],delete h["id"];var f=Ut("<".concat(d," />"));if(o.setAttributes(f,(0,s.Z)((0,s.Z)({},h),{},{style:p})),null===(l=f.get())||void 0===l||l.append.apply(l,(0,C.Z)(t.get().childNodes)),t.isCard())return t.replaceWith(f),f;(r.replace?(t.replaceWith(f),t=f):f.each((function(e){var n=t.get();n&&n instanceof Element&&n.append(e)})),a&&0!==a.length||(a=f),o.isBlock(f,n))?r=e.transform(f,(function(e){return i.indexOf(e)<0})):r=e.transform(t,(function(e){return i.indexOf(e)<0}))}return a}},{key:"normalize",value:function(e,t,n){var r=this,i=this.editor,a=i.node,s=i.inline;if(this.isNormalize){var l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mark",r=e.attributes(),i=qe(r.style||"");if(delete r.style,0!==Object.keys(r).length||0!==Object.keys(i).length){var o=Object.keys(r).length,a=Object.keys(i).length,s=e.clone();t.filter(e,r,i,!0),s.removeAttributes($);var l=Object.keys(r),c=0;l.forEach((function(e){r[e]&&(c++,s.removeAttributes(e))}));var A=0,u=Object.keys(i);if(u.forEach((function(e){i[e]&&(A++,s.css(e,""))})),(c===o&&A===a||0===c&&0===A)&&t.getType(s)===n){e.before(s);var d=e.children();return s.append(d.length>0?d:"block"===n?"<br />":Ut("",null)),e.remove(),void(e=s)}return""===s.attributes("style").trim()&&s.removeAttributes("style"),s}};e.traverse((function(c){if(c[0]!==e[0]&&!["style","script","meta"].includes(c.name))if(c.isElement()){var A=c.isCard();if(n&&(!t.getType(c)||A)){var u=r.convert(n,c,t);if(u)return!!A||u}if(A)return;if(a.isMark(c,t)){var d=function(){var e=[],a=t.getRule(c);if(a){var s=function(){var o;e.push(a),0===(null===(o=c.get())||void 0===o?void 0:o.childNodes.length)&&i.mark.repairCursor(c);var s=l(c);if(!s)return{v:{v:void 0}};var A=t.getType(s,(function(t){return t.name===s.name&&"mark"===t.type&&e.indexOf(t)<0}));if(!A&&n){var u=r.convert(n,s,t);if(u&&u.length>0){var d=c.children();return u.append(d.length>0?d:Ut("",null)),c.append(0===s.length?u:s.children()),{v:{v:void 0}}}}var h=c;while("mark"===A){var p=h.children(),f=s;while(1){var g=f.children();if(!(g.length>0))break;f=g}if(f.append(p.length>0?p:Ut("",null)),h.append(s),h=s,s=l(s),!s)break;if(A=t.getType(s,(function(t){return t.name===s.name&&"mark"===t.type&&e.indexOf(t)<0})),!A){if(n){var m=r.convert(n,s,t);if(m&&m.length>0){s=s.length>0?s.children():m,A="mark";continue}}break}if(a=t.getRule(s),!a)break;e.push(a)}}();if("object"===(0,o.Z)(s))return s.v}}();if("object"===(0,o.Z)(d))return d.v}else if(a.isInline(c))return s.flat(c,t)}else if(c.isText()){var h=c.text();if(/^\n+$/.test(h)||/^\s+$/.test(h)){var p=c.get(),f=p.previousSibling,g=p.nextSibling,m=f?t.getType(f):void 0,v=g?t.getType(g):void 0;if(!f&&g&&(!v||"block"===v))return void c.remove();g||!f||m&&"block"!==m||c.remove()}}}))}else{if(!n)return;var c=e.find(xe);c.each((function(e,i){var o=c.eq(i);o&&r.convert(n,o,t)}));var A=e.find("".concat(he,",").concat(ue,",").concat(de));A.each((function(e,i){var o=A.eq(i);o&&r.convert(n,o,t)}))}}},{key:"traverse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=this.editor.node,a=e.first();while(a)if(["style","script","meta"].includes(a.name))a=a.next();else{if(a.isElement()){var s=a.name,l=a.attributes();if(l[G]===J){a=a.next();continue}var c=qe(l.style||"");if(delete l.style,["left","right"].indexOf(l[be])>=0){a=a.next();continue}var A=!0,u=void 0;if(t&&l[G]!==te)if(u=t.getType(a),void 0===u){var d,h;A=!1;var p=a.parent();if(p&&o.isBlock(p,t)&&1===(null===(d=p.get())||void 0===d?void 0:d.childNodes.length)&&0===(null===(h=a.get())||void 0===h?void 0:h.childNodes.length)){var f=Ut("<br />");a.before(f),a.remove(),a=f,s=f.name,l={},c={},A=!0}}else t.filter(a,l,c);if("center"!==l[be]&&r.onOpen&&A){var g=r.onOpen(a,s,l,c);if(!1===g){a=a.next();continue}}("card"===s||l[fe]&&"true"!==l[we])&&!i||this.traverse(a,t,n,r,i),"center"!==l[be]&&r.onClose&&A&&r.onClose(a,s,l,c)}else if(a.isText()){var m=a[0].nodeValue?We(a[0].nodeValue):"";""===m&&o.isBlock(a.parent(),t||void 0)&&(a.prev()||(m=m.replace(/^[ \n]+/,"")),a.next()||(m=m.replace(/[ \n]+$/,"")));var v=a.prev(),b=a.next();v&&o.isBlock(v,t||void 0)&&b&&o.isBlock(b,t||void 0)&&""===m.trim()&&(m=m.trim()),r.onText&&r.onText(a,m)}a=a.next()}}},{key:"toValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=this.editor,a=o.node,s=this.root.clone(!0);e&&this.normalize(s,e,t),o.trigger("parse:value-before",s),this.traverse(s,e,t,{onOpen:function(t,n,r,s){var l;if(!1===o.trigger("parse:value",t,r,s,i))return!1;if(i.push("<"),i.push(n),Object.keys(r).length>0&&i.push(" "+cn(r)),Object.keys(s).length>0){var c=An(s);""!==c&&(i.push(' style="'),i.push(c),i.push('"'))}a.isVoid(n,e||void 0)&&0===(null===(l=t.get())||void 0===l?void 0:l.childNodes.length)?i.push(" />"):i.push(">")},onText:function(e,t){n&&t.length>1&&(t=t.replace(/[\u00a0 ]+/g,(function(e){var t=[];e=e.replace(/\u00a0/g," ");for(var n=0;n<e.length;n++)t[n]=n%2==0?e[n]:" ";return t.join("")}))),i.push(t)},onClose:function(t,n){a.isVoid(n,e||void 0)||i.push("</".concat(n,">"))}}),o.trigger("parse:value-after",i),i.length>0&&/^\n+/g.test(i[0])&&(i[0]=i[0].replace(/^\n+/g,"")),i.length>0&&/\n+$/g.test(i[i.length-1])&&(i[i.length-1]=i[i.length-1].replace(/\n+$/g,""));var l=i.join("");return r?Xe(l):l}},{key:"toHTML",value:function(e,t){var n=Ut("<div />"),r=this.editor,i=r.container.css();return e&&t?(Ut(e).append(this.root).css(i),n.append(t)):n.append(this.root),r.trigger("parse:html-before",this.root),r.trigger("parse:html",n),r.trigger("parse:html-after",n),n.html().replace(/\u200b/g,"")}},{key:"toDOM",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=this.toValue(e,t,!1,!0),r=(new DOMParser).parseFromString(n,"text/html"),i=r.createDocumentFragment(),o=r.body.childNodes;while(o.length>0){var a=o[0];i.appendChild(a)}return i}},{key:"toText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.root.clone(!0),i=[],o=this.editor;return this.traverse(r,null,null,{onOpen:function(e,t,r,a){if(!1===o.trigger("parse:text",e,r,a,i))return!1;if("br"===t&&i.push("\n"),n&&"li"===e.name){if(e.hasClass(o.list.CUSTOMZIE_LI_CLASS))return;var s=e.parent(),l=null===s||void 0===s?void 0:s.css("listStyleType");if("ol"===(null===s||void 0===s?void 0:s.name)){var c=s[0]["start"],A=c||1;i.push("".concat(nt(l,A),". ")),s.attributes("start",A+1)}else"ul"===(null===s||void 0===s?void 0:s.name)&&i.push(nt(l)+" ")}},onText:function(e,t){t=je(t),t=t.replace(/\u00a0/g," "),t=t.replace(/\u200b/g,""),i.push(t)},onClose:function(t,n){var r=o.node;if("p"===n||r.isBlock(t,e||o.schema)){var a=Array.from(t.get().childNodes);if(0===a.length||a.some((function(t){if(t instanceof Text)return!1;if("BR"===t.nodeName)return!0;var n=(e||o.schema).getType(t);return!n||"block"===n})))return;i.push("\n")}}},t),i.join("").trim()}}]),e}(),dn=function(){function e(t,n){(0,l.Z)(this,e),this.source=void 0,this.engine=void 0,this.schema=void 0,this.source=t,this.engine=n,this.schema=this.engine.schema.clone()}return(0,c.Z)(e,[{key:"parser",value:function(){var e=this,t=this.engine.conversion.clone();this.engine.trigger("paste:schema",this.schema);var n=new un(this.source,this.engine,(function(t){e.engine.trigger("paste:origin",t)}));return n.toDOM(this.schema,t)}},{key:"getDefaultStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.engine.container,t={color:(0,B.Vi)(e.css("color")).toHex(),"background-color":(0,B.Vi)(e.css("background-color")).toHex(),"font-size":e.css("font-size")};return t}},{key:"elementNormalize",value:function(e){var t=this,n=this.getDefaultStyle(),r=this.engine,i=r.inline,o=r.list,a=this.engine.node,s=this.engine.mark,l=this.engine.block,c=[];Ut(e).traverse((function(r){var A,u,d,h=r.parent();if(h&&!r.isCard()&&r.fragment!==e)if(r.isText()){var p=r.text();if(/\u200b/.test(p)){var f=!0,g=r.next(),m=r.prev(),v=r.parent();(v&&a.isMark(v,t.schema)||v&&a.isInline(v,t.schema)||g&&a.isInline(g,t.schema)||m&&a.isInline(m,t.schema))&&(f=!1),f&&(p=p.replace(/\u200b/g,""),r.text(p))}else{var b;if(/^\n(\t)[0,]$/.test(p))return r.remove(),void(0===(null===(b=h.get())||void 0===b?void 0:b.childNodes.length)&&(h.after("<p><br /></p>"),h.remove()));if(/^\n$/.test(p)){if(a.isList(h))return void r.remove();var y=r.next();y&&a.isBlock(y)&&r.remove()}}if(a.isList(h)){var w=r.next(),x=r.prev(),k=function(e,t){if(a.isCustomize(e)){var n=e.first();if(n&&n.isCard()){var r=n.attributes(fe)||n.attributes(ge);r&&o.addCardToCustomize(t,r)}}},C=null;return"li"===(null===w||void 0===w?void 0:w.name)?(C=w.clone(),k(w,C)):"li"===(null===x||void 0===x?void 0:x.name)?(C=x.clone(),k(x,C)):C=Ut("<li></li>"),r.before(C),C.append(r),C}}else{var _=r.css();for(var E in n){var S=_[E];S&&(E.endsWith("color")&&(S=(0,B.Vi)(S).toHex()),S.toLowerCase()===n[E].toLowerCase()&&r.css(E,""))}var F=t.schema.getType(r);if(!F){var T=r.first();return a.unwrap(r),T}a.removeMinusStyle(r,"text-indent"),a.isList(r)&&r.css("padding-left","");var M=r.attributes();M.style&&""===M.style.trim()&&r.removeAttributes("style");while("span"===r.name&&a.isEmpty(r)){var I=r.children();if(I.length>0)break;if(h=r.parent(),r.remove(),!h)return;if(r=h,h=r.parent(),!h)return;F=void 0,M=void 0}if(M||(M=r.attributes()),!M[ge]){var N=F?"block"===F:a.isBlock(r,t.schema),U=a.isVoid(r,t.schema),L=a.isBlock(h,t.schema);if(!N||"p"===M["data-type"]||U||L||//!node.isSolid() &&
""!==a.html(r)){var Q;if("p"===M["data-type"]&&r.removeAttributes("data-type"),N&&"p"===(null===(A=h)||void 0===A?void 0:A.name))a.unwrap(h),h=r.parent(),(null===(Q=h)||void 0===Q?void 0:Q.fragment)===e&&(h=void 0),L=!!h&&a.isBlock(h,t.schema);var D=!!h&&a.isList(h);if("li"===r.name&&h&&!D){var H=Ut("<ul />");return r.before(H),void H.append(r)}if(a.isList(r)&&h&&a.isList(h)){var O=[],z=[],Z=!0,R=h.children().toArray(),P=h.clone(),q=function(){var e,t;return(null!==(e=null===(t=P.get())||void 0===t?void 0:t.childNodes.length)&&void 0!==e?e:0)>0&&(Z?O.push(P):z.push(P),P=h.clone(),!0)};R.forEach((function(e,t){if(e)return Z&&e.equal(r)?(R.length-1===t?(q(),z.push(r)):(0===t||q(),O.push(r)),void(Z=!1)):void("li"!==e.name?(q(),Z?O.push(e):z.push(e)):P.append(e))})),q();var K=h.attributes(o.INDENT_KEY)||"0";r.attributes(o.INDENT_KEY,K),o.addIndent(r,1);var W=h;return O.forEach((function(e){var t,n=Ut(e);n&&0!==(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&(W.after(n),W=n)})),z.forEach((function(e){var t,n=Ut(e);n&&0!==(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&(W.after(n),W=n)})),h.remove(),r||void 0}if("li"!==r.name&&D){if("br"===r.name)return void r.remove();var j=Ut("<li />");return r.before(j),void j.append(r)}if(a.isList(r)&&"li"===(null===(u=h)||void 0===u?void 0:u.name)){var V,G,$,Y,X,J,ee=null===(V=h)||void 0===V?void 0:V.parent();if(!ee)return void a.unwrap(h);var te=ee.clone(),ne=ee.clone(),re=!0,ie=ee.children().toArray();ie.forEach((function(e){e&&(re&&e.equal(h)?re=!1:re?te.append(e):ne.append(e))}));var oe=null===(G=h)||void 0===G||null===($=G.parent())||void 0===$?void 0:$.hasClass("data-list"),ae=null===(Y=h)||void 0===Y?void 0:Y.children(),se=null,le=null;ae.each((function(e,n){var r=ae.eq(n);if(r&&(!a.isEmptyWithTrim(r)||a.isVoid(r))){var i=a.isList(r),s=te[te.length-1];if(i){var l,c=(null===(l=Ut(s))||void 0===l?void 0:l.attributes(o.INDENT_KEY))||"0";return r.attributes(o.INDENT_KEY,c),o.addIndent(r,1),te[te.length]=r[0],void(se=null)}if(a.isBlock(e,t.schema)){var A=te.length;return te[A]=r[0],te[A+1]=te.clone()[0],void(se=null)}if(!se){var u;se=Ut(oe?'<li class="'.concat(o.CUSTOMZIE_LI_CLASS,'" />'):"<li />");var d=null===(u=Ut(s))||void 0===u?void 0:u.last();d?null===d||void 0===d||d.after(se):Ut(s).append(se)}se.append(e),le||(le=se)}})),null===(X=h)||void 0===X||X.remove();var ce=ee;return te.each((function(e){var t,n=Ut(e);n&&0!==(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&(ce.after(n),ce=n)})),ne.each((function(e){var t,n=Ut(e);n&&0!==(null===(t=n.get())||void 0===t?void 0:t.childNodes.length)&&(ce.after(n),ce=n)})),ee.remove(),(null===(J=le)||void 0===J?void 0:J.next())||te.next()||void 0}if("p"===r.name&&D){var Ae=Ut("<li />");return a.replace(r,Ae),Ae}if(N&&!U&&""===a.html(r).trim()&&(a.isRootBlock(r,t.schema)||"li"===r.name)&&a.html(r,"<br />"),N&&"li"===(null===(d=h)||void 0===d?void 0:d.name)){var ue,de,he=null!==(ue=null===(de=r.get())||void 0===de?void 0:de.childNodes)&&void 0!==ue?ue:[];if("p"===r.name){var pe=r.next();0!==he.length||pe||r.append("<br />");var me=r.first();return pe&&"p"===pe.name&&r.append("<br />"),a.unwrap(r),me}var ve=h.parent();if(!ve)return;var be=ve.clone(),ye=ve.clone(),we=h.prev();while(we)be.prepend(we),we=h.prev();var xe=h.next();while(xe)ye.append(xe),xe=h.next();var ke=h.clone(),Ce=h.clone(),Be=r.prev();while(Be)ke.prepend(Be),Be=r.prev();var _e=r.next();while(_e)Ce.append(_e),_e=r.next();return ve.after(r),ke.first()&&be.append(ke),Ce.first()&&ye.prepend(Ce),be.first()&&ve.before(be),ye.first()&&r.after(ye),void ve.remove()}if(!N&&a.isInline(r)&&!r.isCard()&&!U){var Ee=r.allChildren().some((function(e){return a.isVoid(e,t.schema)}));a.isEmptyWithTrim(r)&&!Ee?r.remove():i.repairCursor(r)}a.removeSide(r);var Se=h,Fe=function e(n){if(Se&&!Se.fragment&&a.isBlock(n,t.schema)&&a.isBlock(Se,t.schema)&&!t.schema.isAllowIn(Se.name,n.name)){var r=n.children();a.unwrap(n),r.each((function(t,n){e(r.eq(n))}))}};Fe(r);while(r.length>0&&Se&&!Se.fragment&&a.isBlock(r,t.schema)&&!a.isBlock(Se,t.schema)){var Te=r.clone();a.unwrap(r),Se.before(Te),Te.append(Se),r=Te,Se=r.parent()}var Me=a.isMark(r,t.schema);if(r.length>0&&Me){var Ie=l.closest(r);if(!Ie.equal(r)){var Ne,Ue=s.findPlugin(r),Le=l.findPlugin(Ie);if(Ue&&(null===Le||void 0===Le||null===(Ne=Le.disableMark)||void 0===Ne?void 0:Ne.includes(Ue.name))){var Qe=r.first();return a.unwrap(r),Qe||void 0}}}if(Me){var De=s.findPlugin(r),He=c.concat();if(He.pop(),De){var Oe,ze=He.find((function(e){var t;return(null===(t=e.plugin)||void 0===t?void 0:t.name)===De.name&&e.node.length>0&&!e.node.equal(r)}));if(ze)return void(1===(null===(Oe=ze.node.get())||void 0===Oe?void 0:Oe.childNodes.length)?a.unwrap(ze.node):a.unwrap(r))}}if(Se=h,r.length>0&&Se&&a.isMark(Se,t.schema)&&Me){var Ze,Re=s.findPlugin(Se),Pe=null===(Ze=c[c.length-1])||void 0===Ze?void 0:Ze.plugin;if(Re&&Pe&&Pe.mergeLeval>Re.mergeLeval){var qe=Se.clone(!1),Ke=Se.children().toArray(),We=qe.clone(),je=qe.clone(),Ve=!0,Ge=-1;if(Ke.forEach((function(e,t){if(e.equal(r)){var n=r.children();qe.append(n),r.append(qe),Ve=!1,Ge=t}else Ve?We.append(e):je.append(e)})),Ge>0&&Se.before(We),Ge<Ke.length-1&&Se.after(je),Ge>-1)return Se.before(r),Se.remove(),c.splice(c.length-2,1),r}}}else r.remove()}}}),void 0,void 0,(function(e){if(a.isMark(e)){var t=s.findPlugin(e);e["is_mark"]=!0,c.push({plugin:t,node:e})}}),(function(e){e["is_mark"]&&c.pop()}))}},{key:"normalize",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.engine.node,r=this.parser();this.elementNormalize(r);var i=this.engine.change.range.get(),o=i.commonAncestorNode,a=this.engine.inline.closest(o);if(o.inEditor()&&!a.isCard()&&n.isInline(a,this.schema))return this.removeElementNodes(Ut(r)),r;if(o.inEditor()&&o.isText()&&i.startContainer===i.endContainer){var s=o[0].nodeValue,l=null===s||void 0===s?void 0:s.substr(0,i.startOffset),c=null===s||void 0===s?void 0:s.substr(i.endOffset);if(/\[.*?\]\($/.test(l||"")&&/^\)/.test(c||""))return this.removeElementNodes(Ut(r)),r}Ut(r).traverse((function(t){var i;if(t.fragment!==r){var o=null===(i=t.get())||void 0===i?void 0:i.firstChild;if(t.length>0&&t[0].parentNode&&e.engine.trigger("paste:each",t),t.isText()){var a=t.text();if(/^(\r|\n)+$/.test(a)){var s,l=t.prev(),c=t.next();(l&&!n.isBlock(l)||c&&!n.isBlock(c)||l&&n.isBlock(l)&&c&&n.isBlock(c)||"p"===(null===(s=t.parent())||void 0===s?void 0:s.name))&&t.remove()}var A=/((\n)+)/.exec(a),u=t;while(A&&A.index>0&&A.index<a.length-1){var d=u.get().splitText(A.index),h=d.splitText(A[0].length);u.after(d),d.after(h),u.text()||u.remove();var p=Ut(h);u=p,a=p.text(),A=/((\n)+)/.exec(a)}}else"pre"===t.name&&t.find(ke).length>0&&n.unwrap(t);return 0===t.length&&o?Ut(o):void 0}})),this.engine.trigger("paste:each-after",Ut(r));var A=n.normalize(Ut(r));A.fragment&&(r=A.fragment),r.normalize();var u=Ut(r),d=u.find("ul,ol");return d.each((function(t,r){var i=d.eq(r);i&&n.isList(i)&&e.engine.list.addStart(i)})),this.engine.nodeId.generateAll(Ut(r),t),r}},{key:"removeElementNodes",value:function(e){var t=this,n=e.allChildren();n.forEach((function(e){e.isElement()&&t.engine.node.unwrap(e)}))}}]),e}();(function(e){e["INLINE"]="inline",e["BLOCK"]="block"})(nn||(nn={})),function(e){e["CARD_CHANGE"]="card_change",e["CLICK"]="click",e["MOUSE_DOWN"]="mouse_down"}(rn||(rn={})),function(e){e["NONE"]="none",e["BACKGROUND"]="background",e["BORDER"]="border"}(on||(on={}));var hn=(0,E.Z)("lastePasteRange"),pn=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,Object.defineProperty(this,hn,{writable:!0,value:void 0}),this.prevSelection=null,this.engine=t}return(0,c.Z)(e,[{key:"repairInput",value:function(e,t){var n=t,r=n.commonAncestorNode,i=this.engine.card.find(r),o=this.engine,a=o.node,s=o.mark,l=o.change;if(i&&i.type===nn.INLINE)if(i.isLeftCursor(r)){var c=r.closest(Ce),A=c.text().replace(/\u200B/g,"");A&&(A=We(A),t.setStartBefore(i.root),t.collapse(!0),a.html(c,"&#8203;"),a.insertText(A,t),l.apply(t))}else if(i.isRightCursor(r)){var u=r.closest(_e),d=u.text().replace(/\u200B/g,"");if(d){d=We(d);var h=i.root.next(),p=i.queryMarks?i.queryMarks(!0):[];if(p.length>0){var f=p[p.length-1];f.append(d);for(var g=p.length-2;g>=0;g--)f=p[g].append(f);i.root.after(f),t.select(f,!0).collapse(!1)}else h&&(h.isText()||a.isMark(h))?(t.select(h,!0).collapse(!0),a.insertText(d,t)):(t.setEndAfter(i.root),t.collapse(!1),a.insertText(d,t));a.html(u,"&#8203;"),l.apply(t)}}else l.range.toTrusty(t);var m=t.cloneRange().shrinkToTextNode(),v=m.startNode,b=m.startOffset,y=v.parent();if(v.isText()&&y&&a.isMark(y)){var w=v.get(),x=v.text(),k=e.inputType;if(b===x.length&&e.data&&k&&0===k.indexOf("insert")){var C=y,B=[];while(C&&a.isMark(C)){var _,E,S=s.findPlugin(C);S&&!S.followStyle&&B.push(C),C=C.parent();var F=null===(_=C)||void 0===_?void 0:_.parent();if((null===(E=C)||void 0===E?void 0:E.next())&&F&&a.isMark(F))break}var T=v.next();if(B.forEach((function(e,t){if(y.equal(e)&&T)B.splice(t,1);else{var n=e.next(),r=e;while(!n&&r){var i=r.parent();if(i&&a.isBlock(i))break;n=(null===i||void 0===i?void 0:i.next())||null,r=i}var o=n;while(o&&!o.isText()){if(a.isMark(o)&&s.compare(o,e)){B.splice(t,1);break}o=o.first()}}})),B.length>0){var M=w.splitText(x.length-e.data.length);M.remove(),a.isEmpty(y)&&y.remove(),s.unwrap(B.map((function(e){return e.clone()}))),a.insertText(x.substr(x.length-e.data.length)),s.merge(),t=l.range.get().cloneRange().shrinkToTextNode(),v=t.startNode,b=t.startOffset,w=v.get(),x=v.text()}}else if(e.data&&b===e.data.length&&k&&0===k.indexOf("insert")){var I=y,N=[];while(I&&a.isMark(I)){var U,L,Q=s.findPlugin(I);Q&&!Q.followStyle&&N.push(I),I=I.parent();var D=null===(U=I)||void 0===U?void 0:U.parent();if((null===(L=I)||void 0===L?void 0:L.prev())&&D&&a.isMark(D))break}var H=v.prev();N.forEach((function(e,t){if(y.equal(e)&&H)N.splice(t,1);else{var n=e.prev(),r=e;while(!n&&r){var i=r.parent();if(i&&a.isBlock(i))break;n=(null===i||void 0===i?void 0:i.prev())||null,r=i}var o=n;while(o&&!o.isText()){if(a.isMark(o)&&s.compare(o,e)){N.splice(t,1);break}o=o.last()}}})),N.length>0&&(w.splitText(e.data.length),w.remove(),a.isEmpty(y)&&y.remove(),s.unwrap(N.map((function(e){return e.clone()}))),a.insertText(""===e.data?" ":e.data),s.merge(),t=l.range.get().cloneRange().shrinkToTextNode(),v=t.startNode,b=t.startOffset,w=v.get(),x=v.text())}x.length>0&&/^\u200B$/g.test(x.substr(0,1))&&(w.splitText(1),w.remove())}var O=v.prev();if(v.isText()&&O&&a.isMark(O)){var z=v.get(),Z=v.text();Z.length>0&&/^\u200B$/g.test(Z.substr(0,1))&&(z.splitText(1),z.remove())}}},{key:"handleSelectionChange",value:function(){var e,t,n,r,i=this,o=this.engine,a=o.change,s=o.container,l=o.card;if(!a.isComposing()){var c=s.window,A=null===c||void 0===c?void 0:c.getSelection();if(((null===(e=this.prevSelection)||void 0===e?void 0:e.anchorNode)!==(null===A||void 0===A?void 0:A.anchorNode)||(null===(t=this.prevSelection)||void 0===t?void 0:t.anchorOffset)!==(null===A||void 0===A?void 0:A.anchorOffset)||(null===(n=this.prevSelection)||void 0===n?void 0:n.focusNode)!==(null===A||void 0===A?void 0:A.focusNode)||(null===(r=this.prevSelection)||void 0===r?void 0:r.focusOffset)!==(null===A||void 0===A?void 0:A.focusOffset))&&(this.prevSelection=A?{anchorNode:A.anchorNode,anchorOffset:A.anchorOffset,focusNode:A.focusNode,focusOffset:A.focusOffset}:null,A&&A.anchorNode)){var u=$t.from(this.engine,A);if(!u.commonAncestorNode.inEditor(s))return;a.onSelect();var d=u.containsCard()||u.commonAncestorNode.closest(xe).length>0&&0===u.startNode.closest("".concat(Ce,",").concat(_e,",").concat(ee)).length,h=u.collapsed;if(!h){var p=u.startNode,f=u.endNode,g=u.startOffset,m=u.endOffset,v=p.isElement()&&!p.isCard()?p.children().eq(g):p,b=f.isElement()&&!f.isCard()?f.children().eq(m-1):f;v&&b&&v.isCard()&&v.equal(b)&&(h=!0)}l.each((function(e){var t=e.getCenter();if(t&&t.length>0){var n=!!A.containsNode&&A.containsNode(t[0]);if(!n&&d&&A.focusNode){var r=i.engine.card.find(A.focusNode);r&&(h=!A.anchorNode||r.root.contains(A.anchorNode),h&&e.root.equal(r.root)&&(n=!0)),n&&h&&(d=!1)}var o=e.constructor.autoSelected;e.select(n&&(!h||!1!==o))}}))}}}},{key:"init",value:function(){var e=this,t=this.engine,n=t.change,r=t.card,o=t.clipboard;n.event.onInput((function(t){var r=n.range.get();e.repairInput(t,r),n.range.select(r),n.onSelect(r),n.change()})),n.event.onDocument("selectionchange",(function(){e.handleSelectionChange()})),n.event.onSelect((function(e){var t=n.range.get();0!==t.startNode.closest(X).length&&(t.collapsed&&t.containsCard()&&n.range.toTrusty(t),n.range.select(t),(0,i.P6)("shift+left",e)||(0,i.P6)("shift+right",e)||(0,i.P6)("shift+up",e)||(0,i.P6)("shift+down",e)||r.activate(t.commonAncestorNode),n.onSelect(t))}),(function(){n.onSelectStart()}),(function(){n.onSelectEnd()})),n.event.onDocument("mousedown",(function(e){if(e.target){var t=Ut(e.target);if(0!==t.closest("body").length&&!(t.closest(".am-view").length>0)){var n=t;while(n){var i=n.attributes(G);if(i&&[Y,te].indexOf(i)<0)return;n=n.parent()}r.activate(t,rn.MOUSE_DOWN,e)}}})),n.event.onDocument("copy",(function(t){var r=n.range.get();e.engine.container.contains(r.commonAncestorNode)&&o.write(t)})),n.event.onDocument("cut",(function(t){var r=n.range.get();if(e.engine.container.contains(r.commonAncestorNode)&&!e.engine.readonly){var i=o.write(t,void 0);i&&(t.stopPropagation(),o.cut(),n.change())}}));var s=function(t){n.cacheRangeBeforeCommand();var r=ct(e.engine,"zero");r.enable(["paragraph","html_inline","newline"]);var i=r.parse(t,{});if(0!==i.length)return At(e.engine,r,i)},l=function(){var t=(0,a.Z)(g().mark((function t(r){var i,o,a;return g().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(o=s(r),null!==o){t.next=3;break}return t.abrupt("return");case 3:if(a=function(){e.engine.history.saveOp(),n.cacheRangeBeforeCommand(),e.paste(o,(0,_.Z)(e,hn)[hn],void 0,!1)},"confirm"===(null===(i=e.engine.options.markdown)||void 0===i?void 0:i.mode)){t.next=7;break}return a(),t.abrupt("return");case 7:e.engine.messageConfirm("markdown",e.engine.language.get("checkMarkdown","title")).then((function(){a()})).catch((function(t){t&&e.engine.messageError("markdown",t)}));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();n.event.onPaste((function(t){var r=t.html,i=t.text,o=t.files,a=t.isPasteText,s="";if(0===o.length)if(a){var c="";i?c=i:r&&(c=new un(r,e.engine).toText()),s=new ln(c).toHTML()}else r&&r.indexOf('<meta name="source" content="aomao" />')>-1||r?s=r:i&&(s=new ln(i).toHTML());if(!1!==e.engine.trigger("paste:event",t,s)&&0===o.length){n.cacheRangeBeforeCommand(),e.paste(s);var A=e.engine.options.markdown||{};if(!1!==A.mode)if(A.check||!i||/^https?:\/\/\S+$/i.test(i.trim()))A.check&&A.check(null!==i&&void 0!==i?i:"",null!==r&&void 0!==r?r:"").then((function(e){e&&l(e)}));else{if(!i)return;if(!r)return void setTimeout((function(){l(i)}),0);var u=i.split(/\r\n|\n/)||"",d=0,h=0,p=!1,f=(new DOMParser).parseFromString(r,"text/html"),g=f.querySelectorAll("li"),m=[];g.forEach((function(e){var t,n,r=null!==(t=e.textContent)&&void 0!==t?t:"";("OL"===(null===(n=e.parentElement)||void 0===n?void 0:n.nodeName)||/\d\.\s+/.test(r))&&m.push(r)}));for(var v=0;v<u.length;v++){var b=u[v];b.trim()&&(b.startsWith("```")?p?p=!1:(p=!0,h++,d++):p||(d++,/^(#|\*|-|\+|\[ \]|\[x\]|>){1,}\s+/.test(b)?h++:/^\d\.\s+/.test(b)?m.includes(b)||m.includes(b.replace(/^\d\./,"").trim())||h++:(/^(---|\*\*\*|\+\+\+)/.test(b)||/(\*|~|\^|_|\`|\]\(https?:\/\/)/.test(b))&&h++))}h>0&&(0===d||h/d>.5)&&setTimeout((function(){l(i)}),0)}}}));var c=function(e){return!e||r.closest(e.commonAncestorContainer)};n.event.onDrop((function(t){var r=t.event,i=t.range,o=t.card,a=t.files;if(o){if(r.preventDefault(),c(i))return;var s=o.constructor,l=s.cardName,A=o.getValue();e.engine.card.remove(o.root),n.range.select(i),e.engine.card.insert(l,A)}if(a.length>0){if(r.preventDefault(),c(i))return;n.range.select(i),e.engine.trigger("drop:files",a)}}))}},{key:"paste",value:function(e,t,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=this.engine.change,l=new dn(e,this.engine).normalize(a);this.engine.trigger("paste:before",l),o?o(l,t,void 0,i):s.insert(l,t,(function(e){var t;r.engine.trigger("paste:insert",e);var i=e.cloneRange(),o=i.endNode,a="";o.isCard()&&0===(null===(t=o.get())||void 0===t?void 0:t.childNodes.length)&&(i.setEndAfter(o),a=o.attributes($)),(0,_.Z)(r,hn)[hn]=i,e.collapse(!1);var l=e.startNode.closest("".concat(xe,",").concat(ke));if(l.length>0){var c=l.attributes();(c[ye]||c[ge])&&e.setStartAfter(l)}var A=e.createSelection();r.engine.card.render(void 0,(function(t){if(A.move(),a){var o=r.engine.container.find('[data-id="'.concat(a,'"]'));o.length>0&&(i.setEndAfter(o),(0,_.Z)(r,hn)[hn]=i)}e.scrollRangeIntoView(),s.range.select(e),n&&n(t),r.engine.trigger("paste:after")}))}),i)}}]),e}(),fn=(0,E.Z)("lastBlurRange"),gn=(0,E.Z)("otpions"),mn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.Z)(this,e),this.engine=void 0,Object.defineProperty(this,fn,{writable:!0,value:void 0}),Object.defineProperty(this,gn,{writable:!0,value:void 0}),this.engine=t,(0,_.Z)(this,gn)[gn]=n}return(0,c.Z)(e,[{key:"setLastBlurRange",value:function(e){(null===e||void 0===e?void 0:e.commonAncestorNode.inEditor())?(0,_.Z)(this,fn)[fn]=e:(0,_.Z)(this,fn)[fn]=void 0}},{key:"toTrusty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.get(),t=e.commonAncestorNode;t.isEditable()||t.inEditor()||e.select(this.engine.container,!0).shrinkToElementNode().collapse(!1);var n=e.cloneRange();if(n.collapse(!0),this.setCardRang(n),e.startNode.equal(n.startNode)&&e.startOffset===n.startOffset||e.setStart(n.startContainer,n.startOffset),n=e.cloneRange(),n.collapse(!1),this.setCardRang(n),e.endNode.equal(n.endNode)&&e.endOffset===n.endOffset||e.setEnd(n.endContainer,n.endOffset),e.collapsed){n=e.cloneRange(),n.enlargeFromTextNode();var r=Ut(n.startContainer),i=n.startOffset;this.engine.node.isInline(r)&&0===i&&e.setStartBefore(r[0]),this.engine.node.isInline(r)&&i===r[0].childNodes.length&&e.setStartAfter(r[0]),e.collapse(!0)}return e}},{key:"setCardRang",value:function(e){var t=this,n=e.startNode,r=e.startOffset,i=this.engine.card,o=i.find(n);if(o){var a,s=o.getCenter().get();if(s&&(!n.isElement()||(null!==(a=n[0].parentElement)&&void 0!==a?a:n[0].parentNode)!==o.root[0]||n.attributes(be))){var l=function(){var e=$t.create(t.engine);return e.select(s,!0),e.comparePoint(n,r)<0};if("inline"===o.type)return e.select(o.root),void e.collapse(l());l()?i.focusPrevBlock(o,e,!0):i.focusNextBlock(o,e,!0)}}}},{key:"get",value:function(){var e=this.engine.container,t=e.window,n=$t.from(this.engine,t,!1);return n||(n=$t.create(this.engine,t.document).select(e,!0).shrinkToElementNode().collapse(!1)),n}},{key:"select",value:function(e){var t,n,r,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.engine,a=o.container,s=o.inline,l=o.node,c=o.change,A=a.window,u=null===A||void 0===A?void 0:A.getSelection();if(!c.isComposing()){if(e.collapsed){var d,h,p,f,g=e.startNode,m=e.startOffset;if((g.isElement()&&1===m&&1===(null===(d=g.get())||void 0===d?void 0:d.childNodes.length)||2===m&&2===(null===(h=g.get())||void 0===h?void 0:h.childNodes.length)&&(null===(p=g.first())||void 0===p?void 0:p.isCard()))&&"br"===(null===(f=g.last())||void 0===f?void 0:f.name)&&(e.setStart(g,m-1),e.collapse(!0)),g.isText()){var v=g.parent();"right"===(null===v||void 0===v?void 0:v.attributes(be))&&0===m?(e.setStart(g,1),e.collapse(!0)):"left"===(null===v||void 0===v?void 0:v.attributes(be))&&1===m&&(e.setStart(g,0),e.collapse(!0))}}var b=e.cloneRange().shrinkToTextNode(),y=b.startNode,w=b.endNode,x=b.startOffset,k=b.endOffset,C=y.prev(),B=w.next();if(C&&!C.isCard()&&!l.isVoid(C)&&l.isInline(C)){var E=y.text();/^\u200B/g.test(E)&&0===x&&(e.setStart(w,x+1),e.collapsed&&e.collapse(!0))}if(B&&!B.isCard()&&!l.isVoid(B)&&l.isInline(B)){var S=w.text();/\u200B$/g.test(S)&&k===S.length&&(e.setEnd(w,k-1),e.collapsed&&e.collapse(!1))}var F=s.closest(y);if(!F.isCard()&&l.isInline(F)&&!l.isVoid(F)){var T,M;if(y.isText()&&!y.prev()&&(null===(T=y.parent())||void 0===T?void 0:T.equal(F))&&0===x){var I=y.text();/^\u200B/g.test(I)&&(e.setStart(y,x+1),e.collapsed&&e.collapse(!0))}if(w.isText()&&!w.next()&&(null===(M=w.parent())||void 0===M?void 0:M.equal(F))){var N=w.text();k===N.length&&/\u200B$/g.test(N)&&(e.setEnd(w,k-1),e.collapsed&&e.collapse(!1))}}if(y=e.startNode,w=e.endNode,y.isText()||w.isText()){var U=e.cloneRange().enlargeFromTextNode();y=U.startNode,w=U.endNode}var L=y.children();l.isCustomize(y)&&0===x&&e.setStart(y,1),l.isCustomize(w)&&0===k&&e.setEnd(w,1);var Q=this.engine.model.mutation.isStopped;if("p"===y.name&&!Q)if(0===L.length)y.append("<br />");else if(!Ie&&L.length>1&&"BR"!==L[L.length-2].nodeName&&"BR"===L[L.length-1].nodeName){var D=y.last();null===D||void 0===D||D.remove()}e.collapsed||Q||"p"!==w.name||0!==(null===(t=w.get())||void 0===t?void 0:t.childNodes.length)||w.append("<br />");var H=y.children();if(l.isList(y)&&!Q&&(0===H.length||"BR"===H[0].nodeName)){var O=Ut("<p><br /></p>");this.engine.nodeId.create(O),y.before(O),y.remove(),y=O}if("li"===y.name&&!Q){var z;if(l.isCustomize(y)&&!(null===(z=y.first())||void 0===z?void 0:z.isCard())){var Z,R,P=null===(Z=y.parent())||void 0===Z?void 0:Z.children().toArray().find((function(e){var t;return null===(t=e.first())||void 0===t?void 0:t.isCard()})),q=null===P||void 0===P||null===(R=P.first())||void 0===R?void 0:R.attributes(fe);q?this.engine.list.addCardToCustomize(y,q):this.engine.list.unwrapCustomize(y)}if(0===L.length)y.append("<br />");else if(!l.isCustomize(y)&&L.length>1&&"BR"!==L[L.length-2].nodeName&&"BR"===L[L.length-1].nodeName){var K;null===(K=y.last())||void 0===K||K.remove()}else if(l.isCustomize(y)&&1===L.length)y.append("<br />");else if(l.isCustomize(y)&&L.length>2&&"BR"!==L[L.length-2].nodeName&&"BR"===L[L.length-1].nodeName){var W;null===(W=y.last())||void 0===W||W.remove()}}if(!e.collapsed&&"li"===w.name&&!Q){var j=w.children();if(0===j.length)w.append("<br />");else if(!l.isCustomize(w)&&j.length>1&&"BR"!==j[j.length-2].nodeName&&"BR"===j[j.length-1].nodeName){var V;null===(V=y.last())||void 0===V||V.remove()}else if(l.isCustomize(w)&&1===j.length)w.append("<br />");else if(l.isCustomize(w)&&j.length>2&&"BR"!==j[j.length-2].nodeName&&"BR"===j[j.length-1].nodeName){var G;null===(G=y.last())||void 0===G||G.remove()}}!y.isEditable()||Q||0!==(null===(n=y.get())||void 0===n?void 0:n.childNodes.length)||this.engine.model.mutation.isStopped||y.html("<p><br /></p>"),u&&(e.collapsed||u.rangeCount>0&&!e.equal(u.getRangeAt(0)))&&(null===(r=e.startNode.get())||void 0===r?void 0:r.isConnected)&&(u.removeAllRanges(),u.addRange(e.toRange()));var $=(0,_.Z)(this,gn)[gn].onSelect;$&&i&&$(e)}}},{key:"focus",value:function(e){var t,n=this,r=(0,_.Z)(this,fn)[fn]||this.get();void 0!==e&&r.select(this.engine.container,!0).shrinkToElementNode().collapse(e),this.select(r);var i=r.commonAncestorNode.closest(ne);if(null===i||void 0===i||null===(t=i.get())||void 0===t||t.focus(),i.length>0&&!this.engine.container.equal(i)){var o,a=new MouseEvent("mousedown");null===(o=this.engine.container.get())||void 0===o||o.dispatchEvent(a),setTimeout((function(){var e,t=new MouseEvent("mouseup");null===(e=n.engine.container.get())||void 0===e||e.dispatchEvent(t)}),0)}}},{key:"blur",value:function(){var e,t,n=this.get();null===(e=n.commonAncestorNode.closest(ne).get())||void 0===e||e.blur(),null===(t=this.engine.container.get())||void 0===t||t.blur(),this.engine.trigger("blur")}}]),e}(),vn=new WeakMap,bn=new WeakMap,yn=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.Z)(this,e),this.engine=void 0,this.options=void 0,this.event=void 0,this.valueCached=null,this.onChange=void 0,this.onRealtimeChange=void 0,this.onSelect=void 0,this.onSelectStart=void 0,this.onSelectEnd=void 0,this.onSetValue=void 0,this.rangePathBeforeCommand=void 0,this.marks=[],this.blocks=[],this.inlines=[],this.changeTrigger=[],this.range=void 0,this.nativeEvent=void 0,this.options=r,this.engine=t,this.event=new sn(t,{}),this.onChange=this.options.onChange||function(){},this.onRealtimeChange=this.options.onRealtimeChange||function(){};var i=null;this.onSelect=function(e){var r,o,a,s,l=t.mark,c=t.block,A=t.inline;e=e||n.range.get(),n.marks=l.findMarks(e),n.blocks=c.findBlocks(e),n.inlines=A.findInlines(e),(null===(r=i)||void 0===r?void 0:r.startContainer)===e.startContainer&&(null===(o=i)||void 0===o?void 0:o.startOffset)===e.startOffset&&(null===(a=i)||void 0===a?void 0:a.endContainer)===e.endContainer&&(null===(s=i)||void 0===s?void 0:s.endOffset)===e.endOffset||(i={startContainer:e.startContainer,startOffset:e.startOffset,endContainer:e.endContainer,endOffset:e.endOffset},bn.get(n.engine)||(bn.set(n.engine,!0),Promise.resolve().then((function(){bn.set(n.engine,!1),n.options.onSelect&&n.options.onSelect()}))))},this.onSelectStart=function(){n.options.onSelectStart&&n.options.onSelectStart()},this.onSelectEnd=function(){n.options.onSelectEnd&&n.options.onSelectEnd()},this.onSetValue=this.options.onSetValue||function(){},this.range=new mn(t,{onSelect:function(e){n.onSelect(e)}}),this.nativeEvent=new pn(t)}return(0,c.Z)(e,[{key:"init",value:function(){this.nativeEvent.init()}},{key:"_change",value:function(){if(!this.isComposing()){this.engine.card.gc();var e=2===this.changeTrigger.length?"both":"remote"===this.changeTrigger[0]?"remote":"local";this.onChange(e),this.changeTrigger=[]}}},{key:"change",value:function(e,t){var n=this,r=e?"remote":"local",i=void 0;if(e)null===t||void 0===t||t.forEach((function(e){if(i=e.closest(ne),i&&i.length>0){var t=n.engine.card.find(i,!0);(null===t||void 0===t?void 0:t.onChange)&&(null===t||void 0===t||t.onChange(r,i))}}));else{var o=this.range.get(),a=o.startNode;if(a.inEditor())i=a.closest(ne);else{var s,l=a.closest(ee),c=l.attributes(Ee);if(c)i=null===(s=this.engine.card.find(c))||void 0===s?void 0:s.root.closest(ne)}if(i&&i.length>0){var A=this.engine.card.find(i,!0);(null===A||void 0===A?void 0:A.onChange)&&(null===A||void 0===A||A.onChange(r,i))}else null===t||void 0===t||t.forEach((function(e){if(i=e.closest(ne),i&&i.length>0){var t=n.engine.card.find(i,!0);(null===t||void 0===t?void 0:t.onChange)&&(null===t||void 0===t||t.onChange(r,i))}}))}this.onRealtimeChange(r),this.changeTrigger.indexOf(r)<0&&this.changeTrigger.push(r),vn.get(this.engine)||(vn.set(this.engine,!0),Promise.resolve().then((function(){vn.set(n.engine,!1),n._change()})))}},{key:"isComposing",value:function(){return this.event.isComposing}},{key:"isSelecting",value:function(){return this.event.isSelecting}},{key:"initValue",value:function(e){var t,n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.engine.container,o=i.html(),a="<p><br /></p>";if(!(o===a||((null===(t=i.get())||void 0===t?void 0:t.childNodes.length)||0)>0)){var s=o||a,l=Ut(s);0===(null===(n=l.get())||void 0===n?void 0:n.childNodes.length)&&l.html("<br />"),i.empty().append(l);var c=e||this.range.get();!e&&r&&(c.select(l,!0).collapse(!1),this.apply(c))}}},{key:"setValue",value:function(e,t,n){var r=this.range.get(),i=this.engine,o=i.schema,a=i.conversion,s=i.container,l=i.history,c=i.mark,A=i.card;if(""===e)this.engine.container.html(e),this.initValue(void 0,!1),n&&n(0);else{var u=new un(e,this.engine,(function(e){c.removeEmptyMarks(e),e.allChildren("editable").forEach((function(e){t&&t(e)}))}),!1);s.html(u.toValue(o,a,!1,!0)),A.render(void 0,(function(e){n&&n(e)}));var d=s.find(he),h=new Pt(this.engine,r);d.length>0&&(h.anchor=d,h.focus=d);var p=s.find(ue),f=s.find(de);p.length>0&&f.length>0&&(h.anchor=p,h.focus=f),h.anchor&&h.focus&&(h.move(),this.range.select(r),this.onSelect()),this.onSetValue(),l.clear()}this.change()}},{key:"setHtml",value:function(e,t){var n=this,r=this.engine,i=r.card,o=r.container;this.nativeEvent.paste(e,void 0,t,!0,(function(e,r,a,s){o.empty().append(e),i.render(void 0,(function(e){n.initValue(void 0,!1),n.engine.trigger("paste:after"),t&&t(e)})),n.change()}),!1)}},{key:"setMarkdown",value:function(e,t){var n=this,r=ct(this.engine,"zero");r.enable(["paragraph","html_inline","newline"]);var i=r.parse(e,{});if(0!==i.length){var o=At(this.engine,r,i);o||(o=e);var a=this.engine,s=a.card,l=a.container;this.nativeEvent.paste(o,void 0,t,!0,(function(e,r,i,o){l.empty().append(e),s.render(void 0,(function(e){n.initValue(void 0,!1),n.engine.trigger("paste:after"),t&&t(e)})),n.change()}))}}},{key:"getOriginValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.engine.container,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.engine,r=n.schema,i=n.conversion;return new un(t?e.clone(!0):e,this.engine,void 0,!1).toValue(r,i)}},{key:"getValue",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.ignoreCursor||this.isComposing())e=this.getOriginValue();else{var n=this.range.get(),r=this.engine.container.clone(!0);if(!n.inCard()){var i=n.toPath(!0);if(!i)return this.getOriginValue(r,!1);n=$t.fromPath(this.engine,i,!0,r),n.createSelection()}e=this.getOriginValue(r,!1)}return e}},{key:"cacheRangeBeforeCommand",value:function(){this.rangePathBeforeCommand=this.range.get().toPath()}},{key:"getRangePathBeforeCommand",value:function(){var e=this.rangePathBeforeCommand;return this.rangePathBeforeCommand=void 0,e}},{key:"isEmpty",value:function(){var e=this.engine,t=e.container,n=e.node,r=e.schema,i=r.getAllowInTags(),o=t.children();return 0===o.length||1===o.length&&n.isEmpty(t)&&!t.allChildren().some((function(e){return i.includes(e.name)}))}},{key:"combinText",value:function(){it(this.engine.container)}},{key:"apply",value:function(e){this.combinText();var t=this.engine,n=t.inline,r=t.mark,i=t.nodeId;if(e){var o=e.createSelection("change-apply");n.findInlines(e).forEach((function(e){return n.repairCursor(e)})),r.findMarks(e).forEach((function(e){return r.repairCursor(e)})),o.move(),e.shrinkToTextNode(),this.range.select(e)}this.change(),i.generateAll(this.engine.container)}},{key:"insert",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.engine,a=o.block,s=o.list,l=o.schema,c=o.mark,A=o.inline,u=this.engine.node;t=t||this.range.toTrusty();var d=a.closest(t.startNode),h=a.closest(t.endNode),p=h[0]===d[0],f=a.isLastOffset(t,"end"),g=l.getCanMergeTags(),m=l.getAllowInTags(),v=d.closest(g.join(",")),b=t.collapsed,y=e.childNodes,w=Ut(e.firstChild||[]),x=function(){var n,r=Ut(e),i=r.first(),o=t.cloneRange().shrinkToElementNode().shrinkToTextNode(),a=o.startNode;if(a.inEditor()&&i&&"p"===i.name&&(1!==i.length||"br"!==(null===(n=i.first())||void 0===n?void 0:n.name))){if("p"===a.name&&u.isEmptyWidthChild(a)){var s=i.css();a.css(s)}u.unwrap(i)}};if(b){if(x(),t.startNode.isText()){var k=A.closest(t.startNode),C=t.startNode.text();0===k.length&&!k.equal(t.startNode)&&/^\u200B/.test(C)&&t.startNode.text(C.substr(1))}}else this.delete(t,p||!f,i),u.isEmptyWidthChild(t.startNode)&&t.shrinkToElementNode().shrinkToTextNode(),x();var B=void 0,_=function(e){B&&B.node[0].isConnected&&(e.shrinkToElementNode().setStart(B.node,B.offset),e.enlargeToElementNode()),a.merge(e),s.merge(void 0,e),c.merge(e),A.flat(e),r&&r(e),n.apply(e)};if(u.isList(t.startNode)||t.startNode.closest("li").length>0){var E=t.startNode.children();return B={node:t.startNode,offset:1===E.length&&"BR"===E[0].nodeName?0:t.startOffset},s.insert(e,t),void _(t)}if(w[0]){if(!u.isBlock(w)){if(t.shrinkToElementNode(),y.length>0){var S=t.startNode.children();B={node:t.startNode,offset:1===S.length&&"BR"===S[0].nodeName?0:t.startOffset}}var F=w.next(),T=w,M=u.insert(w,t);M&&(t=M);while(F&&!u.isBlock(F)){t.startContainer.nodeType===Node.TEXT_NODE&&t.enlargeToElementNode().collapse(!1);var I=F.next();T.after(F),T=F,F=I}if(T!==w&&t.select(T,!0).collapse(!1),0===y.length)return void _(t)}var N=t.cloneRange().enlargeToElementNode(!0).collapse(!1),U=N.startContainer.childNodes[0===t.startOffset?0:t.startOffset-1],L=N.startContainer.childNodes[t.startOffset];if(0!==y.length){var Q=Ut(y[y.length-1]);if("br"===Q.name&&(Q.remove(),Q=Ut(y[y.length-1])),!B){var D=t.startNode.children();B={node:t.startNode,offset:1===D.length&&"BR"===D[0].nodeName?0:t.startOffset}}var H=Ut(y[0]),O=null,z=[];while(H&&H.length>0){var Z,R;u.removeSide(H);var P=H.next();if(P||(Q=H),O?O.after(H):(u.isInline(t.startNode)&&(t.setStartAfter(t.startNode),t.collapse(!0)),u.insert(H,t,!0),u.isInline(H)&&(t.setEndAfter(H),t.collapse(!1))),(null===(Z=H.get())||void 0===Z?void 0:Z.isConnected)&&z.push(H),u.isBlock(H)||(null===P||void 0===P?void 0:P.isText())?O=H:(O&&t.select(H,!0).collapse(!1),O=null),P||!(null===(R=H.get())||void 0===R?void 0:R.isConnected)||u.isInline(H)||t.select(H,!0).collapse(!1),B&&!B.node[0].isConnected){var q=H.parent();q&&(B={node:q,offset:H.index()})}H=P}v[0]&&z.forEach((function(e){g.indexOf(e.name)<0&&0===e.closest(v.name).length&&u.wrap(e,u.clone(v,!1,!1))}))}var K=function(e){var t=e.first();if(!t||!u.isBlock(t))return e;while(m.indexOf(t?t.name:"")>-1)t=t.first();return t},W=function(e){var t=e.last();if(!t||!u.isBlock(t))return e;while(m.indexOf(t?t.name:"")>-1)t=t.last();return t},j=function(e,t){if(!e.isCard()&&!w.isCard()){var n=t.parent(),r=e.parent(),i=n&&!n.isEditable()&&r&&!r.isEditable()&&n.name===r.name;return"p"===t.name&&i||e.name===t.name&&i&&!("li"===e.name&&!s.isSame(e.parent(),t.parent()))}},V=function(e){while(!e.isEditable()){var t=e.parent();if(e.remove(),!t||!u.isEmpty(t))break;e=t}},G=function(e,t){if(e.name===t.name&&"p"===e.name){var n=t.attributes();n[$]&&delete n[$],e.attributes(n)}u.isEmptyWidthChild(e)&&!u.isEmptyWidthChild(t)&&(e.get().innerHTML=""),u.isCustomize(e)===u.isCustomize(t)&&s.unwrapCustomize(t)};if(U){var Y=K(Ut(U.nextSibling||[])),X=W(Ut(U));"p"===X.name&&Y.name!==X.name&&j(X,Y)&&(G(X,Y),u.merge(X,Y,!1),V(Y))}if(L){var J=W(Ut(L.previousSibling||[])),ee=K(Ut(L));J&&j(J,ee)&&(u.merge(J,ee,!1),V(ee))}_(t)}else _(t)}},{key:"paste",value:function(e,t,n){this.nativeEvent.paste(e,t,n,!0)}},{key:"delete",value:function(e,t){var n,r,i,o,a,s,l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=e||this.range.toTrusty();if(c.collapsed)return this.isEmpty()&&this.initValue(c),void(e||this.apply(c));var A=this.engine,u=A.mark,d=A.inline,h=A.card,p=this.engine.node,f=this.engine.block,g=c.cloneRange();g.collapse(!0);var m=l?u.findMarks(g):[];c.enlargeToElementNode();var v=f.closest(c.cloneRange().shrinkToElementNode().shrinkToTextNode().enlargeToElementNode().startNode);if(!v.inEditor()&&!v.isRoot())return this.isEmpty()&&this.initValue(c),void(e||this.apply(c));if(v.isRoot()){var b=v.children().eq(c.startOffset);while(null===(y=b)||void 0===y?void 0:y.isCard()){var y,w=b.equal(c.endNode)||b.contains(c.endNode),x=b.next()||void 0,k=h.find(b);if(k?h.removeNode(k):b.remove(),w){b=void 0;break}b=x}if(!b)return this.isEmpty()&&this.initValue(c),void(e||this.apply(c));v=b}var C=c.endNode,B=c.endOffset,_=!f.closest(c.startNode).equal(f.closest(C)),E=d.closest(C);if(E.length>0&&(null===(n=C.parent())||void 0===n?void 0:n.equal(E))&&C.isText()){var S=C.text();B===S.length-1&&c.setEndAfter(E)}var F=c.cloneRange().shrinkToElementNode().shrinkToTextNode().getEndOffsetNode();c.extractContents();var T=c.startNode;if(T.isEditable()&&0===(null===(r=T.get())||void 0===r?void 0:r.childNodes.length)&&(T.html("<p><br /></p>"),this.engine.nodeId.generate(T)),T=c.shrinkToElementNode().shrinkToTextNode().enlargeToElementNode().startNode,T.isCard()&&0===T.find(Be).length&&h.remove(T),c.collapse(!0),T=c.shrinkToElementNode().shrinkToTextNode().enlargeToElementNode().startNode,v.isElement()&&!v.equal(T)&&0===v.get().childNodes.length&&v.remove(),T.isText()||!v.inEditor())return this.isEmpty()&&this.initValue(c),void(e||this.apply(c));var M=!1;if(_&&0===(null===(i=T.get())||void 0===i?void 0:i.childNodes.length)){var I,N,U,L,Q=c.createSelection();T.remove(),(null===(I=Q.anchor)||void 0===I||null===(N=I.get())||void 0===N?void 0:N.isConnected)&&(null===(U=Q.focus)||void 0===U||null===(L=U.get())||void 0===L?void 0:L.isConnected)&&Q.move(),M=!0,T=c.startNode}var D,H,O=v,z=F&&F.isConnected?T:null,Z=0===(null===(o=T.get())||void 0===o?void 0:o.childNodes.length);!Z&&T.length>0&&T.inEditor()&&(1===T[0].childNodes.length&&(null===(D=T[0].firstChild)||void 0===D?void 0:D.nodeType)===Node.ELEMENT_NODE&&p.isCustomize(T)&&(null===(H=T.first())||void 0===H?void 0:H.isCard())&&(Z=!0));if(Z&&p.isBlock(T)&&T.inEditor()){if(p.isList(T))T.remove();else{var R=p.getBatchAppendHTML(m,"<br />");T.isEditable()&&(R="<p>".concat(R,"</p>")),T.append(Ut(R));var P=T.find("br"),q=P.parent();q&&p.isMark(q)&&p.replace(P,Ut("",null)),c.select(T,!0)}return c.shrinkToElementNode().shrinkToTextNode(),c.collapse(!1),this.isEmpty()&&this.initValue(c),void(e||this.apply(c))}var K,W=function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.isBlock(n)&&!p.isVoid(n)&&!n.isCard()){t.select(n,!0),t.collapse(!1);var a=t.shrinkToElementNode().shrinkToTextNode().createSelection(),s=r.parent();p.merge(n,r);while(s&&p.isBlock(s)&&p.isEmpty(s))s.remove(),s=s.parent();a.move(),t.enlargeToElementNode(!0);var l=t.getPrevNode(),c=t.getNextNode(),A=t.startNode;l||c||!p.isBlock(A)||(A.append(Ut(p.getBatchAppendHTML(i,"<br />"))),t.select(A.find("br"),!0),t.collapse(!1)),l&&c&&!l.isCard()&&!c.isCard()&&o&&e(t,l,c,i)}};if(O&&z&&z.length>0&&p.isBlock(O)&&p.isBlock(z)&&!O.equal(z)&&!(null===(a=O.parent())||void 0===a?void 0:a.equal(z))&&z.inEditor()&&W(c,O,z,m,t),T.children().each((function(e){var t=Ut(e);!p.isVoid(t)&&t.isElement()&&""===p.html(t)&&t.remove(),p.isInline(t)&&d.repairCursor(t)})),p.isList(T)&&p.isEmpty(T)&&T.remove(),g=c.cloneRange().shrinkToTextNode(),g.startNode.isText()&&/^\u200B/g.test(g.startNode.text())&&0===g.startOffset){var j=g.startNode.prev();j&&this.engine.node.isInline(j)&&(c.select(j,!0),c.collapse(!1))}(p.isBlock(T)&&0===(null===(s=T.get())||void 0===s?void 0:s.childNodes.length)&&T.html("<br />"),M)&&(p.isBlock(O)&&0===(null===(K=O.get())||void 0===K?void 0:K.childNodes.length)&&O.html("<br />"),O.inEditor()&&c.select(O,!0).collapse(!1));this.isEmpty()&&this.initValue(c),e||this.apply(c)}},{key:"unwrap",value:function(e){var t=this.engine.block,n=this.range.get();if(e=e||t.closest(n.startNode),e.inEditor()){var r=n.createSelection();this.engine.node.unwrap(e),r.move(),this.range.select(n)}}},{key:"mergeAfterDelete",value:function(e){var t,n,r=this.engine,i=r.block,o=r.card,a=r.list,s=r.mark,l=this.engine.node,c=this.range.get();e=e||i.closest(c.startNode);var A=e.children();if(0===A.length)return e.append(Ut("<br />")),void this.apply(c);var u=e.first();if(A.length>1&&"br"===(null===u||void 0===u?void 0:u.name))null===u||void 0===u||u.remove();else{var d=e.prev();if(d){if(d.isCard()){(1===A.length&&"br"===(null===u||void 0===u?void 0:u.name)||l.isEmpty(e))&&e.remove();var h=o.find(d);if(h)return void o.focus(h)}if(l.isVoid(d))return d.remove(),void this.apply(c);if(l.isRootBlock(d)&&l.isEmpty(d))return d.remove(),void this.apply(c);if(d.isText()){var p=Ut("<p />");d.before(p),p.append(d),d=p}if(l.isList(d)&&(d=d.last()),1===A.length&&"br"===(null===u||void 0===u?void 0:u.name))null===u||void 0===u||u.remove();else if(d&&1===(null===(t=d.get())||void 0===t?void 0:t.childNodes.length)&&"br"===(null===(n=d.first())||void 0===n?void 0:n.name)){var f;null===(f=d.first())||void 0===f||f.remove()}if(!d||d.isText())this.unwrap(e);else{var g=c.createSelection();l.merge(d,e),g.move(),this.range.select(c),s.merge(),a.merge()}}else{var m=e.parent();(null===m||void 0===m?void 0:m.inEditor())&&!(null===m||void 0===m?void 0:m.isEditable())&&this.unwrap(e)}}}},{key:"destroy",value:function(){this.event.destroy()}}]),e}(),wn=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},xn=function(e){return Cn(e)&&1===e.nodeType},kn=function(e){return!!xn(e)&&("undefined"!==typeof HTMLElement?e instanceof HTMLElement:e.style instanceof CSSStyleDeclaration)},Cn=function(e){var t,n=null!==(t=wn(e))&&void 0!==t?t:globalThis.window;return!!n&&e instanceof n.Node},Bn=function(e){return Cn(e)&&3===e.nodeType},_n={isText:function(e){return Kt(e)&&"string"===typeof e.text},create:function(e){return{text:e}}},En={isElement:function(e){return Kt(e)&&Array.isArray(e.children)},create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,s.Z)((0,s.Z)({type:e},t),{},{children:n})}},Sn=function e(t){if(_n.isText(t))return document.createTextNode(t.text);if(En.isElement(t)){var n=t.type,r=t.children,i=null;try{i=document.createElement(n.replace(/[-_\[\]\s]/g,""))}catch(h){i=document.createElement("span")}for(var o=0,a=Object.entries(t);o<a.length;o++){var s=(0,w.Z)(a[o],2),l=s[0],c=s[1];"type"!==l&&"children"!==l&&i.setAttribute(l,c)}t[fe]&&!t[ge]&&(i.setAttribute(ge,t[fe]),i.removeAttribute(fe));var A,u=(0,k.Z)(r);try{for(u.s();!(A=u.n()).done;){var d=A.value;i.appendChild(e(d))}}catch(p){u.e(p)}finally{u.f()}return i}throw new Error("Cannot convert node to DOM")},Fn=function e(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(i&&xn(n)&&n.hasAttribute(ye)){var o=t.card,a=o.find(n);a&&(a.getCenter().empty(),o.renderComponent(a))}var s,l=r[0],c=0,A=(0,k.Z)(n.childNodes);try{for(A.s();!(s=A.n()).done;){var u=s.value;if(!jt(u)){if(l===c)return 1===r.length?{parent:n,node:u,offset:-1}:e(t,u,r.slice(1));c++}}}catch(d){A.e(d)}finally{A.f()}if(r.length>1)throw new Error("Cannot find element");return{parent:n,node:n,offset:l}},Tn=function(e,t,n){var r=e.card,i=t.path,o=Fn(e,e.container[0],i),a=o.parent,s=o.node,l=o.offset;if("insert_node"===t.type){var c=t.node,A=Sn(c),u=Ut(A);a!==s?a.insertBefore(A,s):a.appendChild(A),xn(A)&&vt(A)&&A.setAttribute(ye,n?"remote":"true");var d=c[$];if(e.card.render(u),u[0].isConnected||!d)return u;var h=a.querySelector("[".concat($,'="').concat(d,'"]'));return h?Ut(h):u}if("remove_node"===t.type)return-1===l?(xn(s)&&vt(s)?n?r.removeRemote(s):r.remove(s,!1):a.removeChild(s),xt(a)?void 0:Ut(a)):void 0;if("set_node"===t.type){if(-1===l&&xn(s)){for(var p=t.properties,f=t.newProperties,g=0,m=Object.entries(p);g<m.length;g++){var v=(0,w.Z)(m[g],1),b=v[0];s.removeAttribute(b)}for(var y=0,x=Object.entries(f);y<x.length;y++){var k=(0,w.Z)(x[y],2),C=k[0],B=k[1];null===B?s.removeAttribute(C):s.setAttribute(C,B)}var _=Ut(s);if(vt(s)){var E=r.find(s);if(!E)return;E.isEditable||r.reRender(E),E.isEditable&&E.onChange&&E.onChange(n?"remote":"local",_)}return _}}else if("insert_text"===t.type){var S=t.offset,F=t.text;if(-1===l&&Bn(s)){var T,M=null!==(T=s.nodeValue)&&void 0!==T?T:"";return s.nodeValue=M.slice(0,S)+F+M.slice(S),Ut(s)}}else if("remove_text"===t.type){var I=t.offset,N=t.text;if(-1===l&&Bn(s)){var U,L=null!==(U=s.nodeValue)&&void 0!==U?U:"";return s.nodeValue=L.slice(0,I)+L.slice(I+N.length),Ut(s)}}},Mn=new WeakMap,In=function(){var e=null,t=[];return{getMembers:function(){return t},add:function(e){t.push(e)},remove:function(e){var n=t.findIndex((function(t){return t.uuid===e}));-1!==n&&t.splice(n,1)},getCurrent:function(){return e},setCurrent:function(n){var r="string"===typeof n?t.find((function(e){return e.uuid===n})):n;r&&(e=r)}}},Nn={fromEngine:function(e){var t=Mn.get(e);return t||(t=In(),Mn.set(e,t)),t}},Un={childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0},Ln=new WeakMap,Qn=function(e){var t=!1,n=!0,r=[],i=new I.EventEmitter2,o=new MutationObserver((function(e){var o;t&&(o=r).push.apply(o,(0,C.Z)(e));n||t||i.emit("change",e)})),a={get isStopped(){return n},get isCache(){return t},onChange:function(e){i.on("change",e)},offChange:function(e){i.off("change",e)},start:function(){var t=e.container[0];n&&(o.observe(t,Un),n=!1)},stop:function(){n||(o.disconnect(),n=!0)},startCache:function(){t||(r=[],t=!0)},submitCache:function(){t&&setTimeout((function(){e.change.isComposing()||(t=!1,r=r.map((function(e){return"characterData"===e.type&&e.target.nodeType===document.TEXT_NODE&&(e["text-data"]=e.target.textContent),e})),r.length>0&&i.emit("change",r),r=[])}),20)},destroyCache:function(){t&&setTimeout((function(){t=!1,r=[]}),20)},getCaches:function(){return r},destroy:function(){i.removeAllListeners(),a.stop()}};return a},Dn={from:function(e){var t=Ln.get(e);return t||(t=Qn(e),Ln.set(e,t)),t},destroy:function(e){var t=Ln.get(e);null===t||void 0===t||t.destroy()}},Hn=new WeakMap,On=new WeakMap,zn={isPath:function(e){return Array.isArray(e)&&e.every((function(e){return"number"===typeof e}))},setPath:function(e,t,n){Hn.set(e,n),On.set(e,t)},getPath:function(e){var t=[],n=e;while(n){var r=On.get(n);if(!r)break;var i=Hn.get(n);if(void 0===i)throw new Error("Invalid index in ".concat(JSON.stringify(n)));t.unshift(i),n=r}return t},getIndex:function(e){var t=Hn.get(e);if(void 0===t)throw new Error("Invalid index in ".concat(e));return t},isEqual:function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},isReverse:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e.length!==t.length)return!1;var r=e.length-1,i=t.slice();return i[r]=i[r]-n,zn.isEqual(e,i)},commonLength:function(e,t){var n=e.length,r=t.length;if(0===n)return-1;if(0===r)return null;n--,r--;for(var i=0;i<n;i++){var o=e[i];if(i>=r||o!==t[i])return null}return n},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)}},Zn=new WeakMap,Rn=new WeakMap,Pn=new WeakMap,qn={createFromDOM:function(e,t){if(!jt(e)){var n=e.nodeName,r=e.nodeValue;if(xn(e)){var i,o=e.attributes,a=e.childNodes,s={},l=(0,k.Z)(o);try{for(l.s();!(i=l.n()).done;){var c=i.value,A=c.name,u=c.value;Gt(e,A)||("style"===A&&kn(e)?s["style"]=Ze(e.style.cssText||u):s[A]=String(u))}}catch(w){l.e(w)}finally{l.f()}var d,h=[],p=(0,k.Z)(a);try{for(p.s();!(d=p.n()).done;){var f=d.value,g=qn.createFromDOM(f,t);g&&h.push(g)}}catch(w){p.e(w)}finally{p.f()}for(var m=En.create(n.toLowerCase(),s,h),v=0;v<h.length;v++){var b=h[v];zn.setPath(b,m,v)}return qn.setDOM(m,e,t),m}var y=_n.create(String(r));return qn.setDOM(y,e),y}},findNode:function(e){return Zn.get(e)},setDOM:function(e,t,n){Zn.set(t,e),n&&En.isElement(e)&&qn.setSchemaType(e,t,n)},setSchemaType:function(e,t,n){var r=n.getType(t);r&&Rn.set(e,r);var i=n.find((function(t){return t.name===e.type&&!0===t.isVoid})).length>0;Pn.set(e,i)},isBlock:function(e){return!!En.isElement(e)&&"block"===Rn.get(e)},isInline:function(e){return!!En.isElement(e)&&"inline"===Rn.get(e)},isMark:function(e){return!!En.isElement(e)&&"mark"===Rn.get(e)},isVoid:function(e){return!!En.isElement(e)&&(!0===Pn.get(e)||~["img","br","area","col","embed","hr","input","link","meta","param","source","track","wbr"].indexOf(e.type))},get:function(e,t){var n,r=e,i=(0,k.Z)(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(!En.isElement(r))throw new Error("Cannot find element");r=r.children[o]}}catch(a){i.e(a)}finally{i.f()}return r}},Kn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&t.isConnected||(t=n),!t)return n;while(t.parentNode!==e){var r=t.parentNode;if(!r||!e.contains(r))return n;t=r}return t},Wn=function(e,t){var n,r=[],i=function(e,t,n,r){var i,o,a=e.previousSibling,s=e.nextSibling;(n&&(!a||a.compareDocumentPosition(n)&globalThis.Node.DOCUMENT_POSITION_PRECEDING)||(null===a||void 0===a?void 0:a.parentNode)!==e.node)&&(e.previousSibling=Kn(e.node,n,a)),(r&&(!s||s.compareDocumentPosition(r)&globalThis.Node.DOCUMENT_POSITION_FOLLOWING)||(null===s||void 0===s?void 0:s.parentNode)!==e.node)&&(e.nextSibling=Kn(e.node,r,s)),e.previousSibling===t&&(e.previousSibling=t.previousSibling),e.nextSibling===t&&(e.nextSibling=t.nextSibling),e.previousSibling!==n&&(null===(i=e.previousSibling)||void 0===i?void 0:i.contains(n))&&(e.previousSibling=e.previousSibling.previousSibling),e.nextSibling!==r&&(null===(o=e.nextSibling)||void 0===o?void 0:o.contains(r))&&(e.nextSibling=e.nextSibling.nextSibling)},o=function(e,t,n){var o,a=!1,s=(0,k.Z)(r);try{for(s.s();!(o=s.n()).done;){var l=o.value,c=l.node;if(e===c||c.contains(e))a=!0,i(l,c,t,n);else if(e.contains(c)){a=!0,l.node=e;var A=l.previousSibling,u=l.nextSibling;l.previousSibling=Kn(e,t,A),l.nextSibling=Kn(e,n,u),i(l,c,A,u)}}}catch(d){s.e(d)}finally{s.f()}return a},a=(0,k.Z)(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=s.type,c=s.attributeName,A=s.target,u=!1;if(xn(A)&&xt(A)&&(u=!0),!(!A.isConnected||jt(A)||"attributes"===l&&(u||c&&Gt(A,c)))){var d=s.previousSibling,h=s.nextSibling;if("childList"===l){var p=s.addedNodes;p.length>0&&(d||(d=p[0].previousSibling),h||(h=p[p.length-1].nextSibling)),!d&&h&&(d=h.previousSibling),!h&&d&&(h=d.nextSibling)}else if(("characterData"===l||"attributes"===l)&&(d||(d=A.previousSibling),h||(h=A.nextSibling),"attributes"===l||!xn(A))){var f=A.parentElement;if(!f||jt(f))continue;A=f}o(A,d,h)||r.push({node:A,previousSibling:Kn(A,d),nextSibling:Kn(A,h)})}}}catch(O){a.e(O)}finally{a.f()}for(var g=[],m=0,v=r;m<v.length;m++){var b,y,w=v[m],x=w.node,B=w.previousSibling,_=w.nextSibling,E=qn.findNode(x);if(E){if(!En.isElement(E))throw new Error("parentNode is not an element");var S=zn.getPath(E);if(B)while(jt(B)||B===x.firstChild)if(B=B.previousSibling,!B)break;if(_)while(jt(_)||_===x.lastChild)if(_=_.nextSibling,!_)break;var F=B?qn.findNode(B):null,T=_?qn.findNode(_):null,M=F?zn.getIndex(F):-1,I=T?zn.getIndex(T):E.children.length,N=[],U=F?null===(b=B)||void 0===b?void 0:b.nextSibling:null;U||(U=x.firstChild,M=-1);while(U&&U!==_){var L=qn.createFromDOM(U,e.schema);L&&N.push(L),U=U.nextSibling}var Q=M+1,D=E.children.slice(Q,I);g.push.apply(g,(0,C.Z)(jn(e,D,N,S,Q))),(y=E.children).splice.apply(y,[Q,D.length].concat(N));for(var H=Q;H<E.children.length;H++)zn.setPath(E.children[H],E,H)}}return g},jn=function e(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=Math.max(n.length,r.length),l=[],c=0;c<s;c++){var A=n[c],u=r[c],d=i.concat(c+o);if(A)if(u){var h=En.isElement(A),p=h?A:null,f=h?null:A,g=En.isElement(u),m=g?u:null,v=g?null:u;if(a=a||!!m&&Gn(t,m),h!==g||p&&m&&p.type!==m.type){l.unshift({type:"remove_node",path:d,node:A,undoable:a}),l.push({type:"insert_node",path:d,node:u,undoable:a});continue}var b=!1,y=function(e){var t={};for(var n in e)~["children","text","type"].indexOf(n)||(t[n]=e[n]);return t},w=y(A),x=Object.keys(w).length,k=y(u),B=Object.keys(k).length;if(x!==B)b=!0;else for(var _ in w)if(w[_]!==k[_]){b=!0;break}if(b){var E=k[ve],S={type:"set_node",path:d,properties:w,newProperties:k,undoable:a};if(E){var F=Ye(E),T=t.card.find(F.id);(null===T||void 0===T?void 0:T.writeHistoryOnValueChange)&&!1===T.writeHistoryOnValueChange(F)&&(S.undoable=!0)}l.push(S)}p&&m?l.push.apply(l,(0,C.Z)(e(t,p.children,m.children,d,0,a))):f&&v&&f.text!==v.text&&l.push.apply(l,(0,C.Z)(Vn(f.text,v.text,d,a)))}else l.unshift({type:"remove_node",path:i.concat(c+o),node:A});else l.push({type:"insert_node",path:d,node:u})}return l},Vn=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=(new Q.diff_match_patch).patch_make(e,t);return Object.keys(o).forEach((function(e){var t=o[e];if(null!==t.start1){var a=t.start1;t.diffs.forEach((function(e){var t=(0,w.Z)(e,2),o=t[0],s=t[1];o!==Q.DIFF_DELETE?o!==Q.DIFF_INSERT?o===Q.DIFF_EQUAL&&(a+=s.length):i.push({type:"insert_text",text:s,path:n,offset:a,undoable:r}):i.unshift({type:"remove_text",text:s,path:n,offset:a,undoable:r})}))}})),i},Gn=function(e,t){var n=t[fe],r=t[me],i=t[$];if(n&&r&&i){var o,a=null===(o=e.container.get())||void 0===o?void 0:o.querySelector("[".concat($,'="').concat(i,'"]'));if(null===a||void 0===a?void 0:a.getAttribute(ye))return!0}return!1},$n={transform:Wn,diff:jn,inverse:function(e){switch(e.type){case"insert_node":return(0,s.Z)((0,s.Z)({},e),{},{type:"remove_node"});case"remove_node":return(0,s.Z)((0,s.Z)({},e),{},{type:"insert_node"});case"insert_text":return(0,s.Z)((0,s.Z)({},e),{},{type:"remove_text"});case"remove_text":return(0,s.Z)((0,s.Z)({},e),{},{type:"insert_text"});case"set_node":var t=e.properties,n=e.newProperties;return(0,s.Z)((0,s.Z)({},e),{},{type:"set_node",properties:n,newProperties:t})}},isReverse:function(e,t){if("insert_node"===e.type&&"remove_node"===t.type||"remove_node"===e.type&&"insert_node"===t.type)return L()(e.node,t.node)&&zn.isEqual(e.path,t.path);if("insert_text"===e.type&&"remove_text"===t.type){var n=e.path.concat(e.offset),r=t.path.concat(t.offset);return L()(e.text,t.text)&&(L()(n,r)||zn.isReverse(n,r,e.text.length)||zn.isReverse(r,n,e.text.length))}if("remove_text"===e.type&&"insert_text"===t.type){var i=e.path.concat(e.offset),o=t.path.concat(t.offset);return L()(e.text,t.text)&&L()(i,o)}return!1},canOpAffectPath:function(e,t){return null!==zn.commonLength(t,e.path)}},Yn={adjustX:!0,adjustY:!0},Xn=[0,0],Jn={left:{points:["cr","cl"],overflow:Yn,offset:[-4,0],targetOffset:Xn},right:{points:["cl","cr"],overflow:Yn,offset:[4,0],targetOffset:Xn},top:{points:["bc","tc"],overflow:Yn,offset:[0,-4],targetOffset:Xn},bottom:{points:["tc","bc"],overflow:Yn,offset:[0,4],targetOffset:Xn},topLeft:{points:["bl","tl"],overflow:Yn,offset:[0,-4],targetOffset:Xn},leftTop:{points:["tr","tl"],overflow:Yn,offset:[-4,0],targetOffset:Xn},topRight:{points:["br","tr"],overflow:Yn,offset:[0,-4],targetOffset:Xn},rightTop:{points:["tl","tr"],overflow:Yn,offset:[4,0],targetOffset:Xn},bottomRight:{points:["tr","br"],overflow:Yn,offset:[0,4],targetOffset:Xn},rightBottom:{points:["bl","br"],overflow:Yn,offset:[4,0],targetOffset:Xn},bottomLeft:{points:["tl","bl"],overflow:Yn,offset:[0,4],targetOffset:Xn},leftBottom:{points:["br","bl"],overflow:Yn,offset:[-4,0],targetOffset:Xn}},er=".data-tooltip {\r\n\tfont-size: 14px;\r\n\tfont-variant: tabular-nums;\r\n\tline-height: 1.5;\r\n\tcolor: rgba(0, 0, 0, 0.65);\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tlist-style: none;\r\n\tposition: absolute;\r\n\tz-index: 1060;\r\n\tdisplay: block;\r\n\tvisibility: visible;\r\n\tmax-width: 320px;\r\n\tword-wrap:break-word;\r\n top: 0;\r\n}\r\n\r\n.data-tooltip-hidden {\r\n\topacity: 0;\r\n\tvisibility: hidden;\r\n\ttransition: opacity 0.3s ease-in-out;\r\n}\r\n\r\n.data-tooltip-active {\r\n\topacity: 1;\r\n\tvisibility: visible;\r\n}\r\n\r\n.data-tooltip-placement-top,.data-tooltip-placement-topLeft,.data-tooltip-placement-topRight {\r\n\tpadding-bottom: 8px;\r\n}\r\n\r\n.data-tooltip-placement-right,.data-tooltip-placement-rightTop,.data-tooltip-placement-rightBottom {\r\n\tpadding-left: 8px;\r\n}\r\n\r\n.data-tooltip-placement-bottom,.data-tooltip-placement-bottomLeft,.data-tooltip-placement-bottomRight {\r\n\tpadding-top: 8px;\r\n}\r\n\r\n.data-tooltip-placement-left,.data-tooltip-placement-leftTop,.data-tooltip-placement-leftBottom {\r\n\tpadding-right: 8px;\r\n}\r\n\r\n.data-tooltip-inner {\r\n\tpadding: 6px 8px;\r\n\tcolor: #fff;\r\n\ttext-align: left;\r\n\ttext-decoration: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.75);\r\n\tborder-radius: 4px;\r\n\t-webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\r\n\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.data-tooltip-arrow {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n\theight: 0;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n}\r\n\r\n.data-tooltip-placement-top .data-tooltip-arrow,.data-tooltip-placement-topLeft .data-tooltip-arrow,.data-tooltip-placement-topRight .data-tooltip-arrow {\r\n\tbottom: 3px;\r\n\tborder-width: 5px 5px 0;\r\n\tborder-top-color: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.data-tooltip-placement-top .data-tooltip-arrow {\r\n\tleft: 50%;\r\n\tmargin-left: -5px;\r\n}\r\n\r\n.data-tooltip-placement-topLeft .data-tooltip-arrow {\r\n\tleft: 16px;\r\n}\r\n\r\n.data-tooltip-placement-topRight .data-tooltip-arrow {\r\n\tright: 16px;\r\n}\r\n\r\n.data-tooltip-placement-right .data-tooltip-arrow,.data-tooltip-placement-rightTop .data-tooltip-arrow,.data-tooltip-placement-rightBottom .data-tooltip-arrow {\r\n\tleft: 3px;\r\n\tborder-width: 5px 5px 5px 0;\r\n\tborder-right-color: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.data-tooltip-placement-right .data-tooltip-arrow {\r\n\ttop: 50%;\r\n\tmargin-top: -5px;\r\n}\r\n\r\n.data-tooltip-placement-rightTop .data-tooltip-arrow {\r\n\ttop: 8px;\r\n}\r\n\r\n.data-tooltip-placement-rightBottom .data-tooltip-arrow {\r\n\tbottom: 8px;\r\n}\r\n\r\n.data-tooltip-placement-left .data-tooltip-arrow,.data-tooltip-placement-leftTop .data-tooltip-arrow,.data-tooltip-placement-leftBottom .data-tooltip-arrow {\r\n\tright: 3px;\r\n\tborder-width: 5px 0 5px 5px;\r\n\tborder-left-color: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.data-tooltip-placement-left .data-tooltip-arrow {\r\n\ttop: 50%;\r\n\tmargin-top: -5px;\r\n}\r\n\r\n.data-tooltip-placement-leftTop .data-tooltip-arrow {\r\n\ttop: 8px;\r\n}\r\n\r\n.data-tooltip-placement-leftBottom .data-tooltip-arrow {\r\n\tbottom: 8px;\r\n}\r\n\r\n.data-tooltip-placement-bottom .data-tooltip-arrow,.data-tooltip-placement-bottomLeft .data-tooltip-arrow,.data-tooltip-placement-bottomRight .data-tooltip-arrow {\r\n\ttop: 3px;\r\n\tborder-width: 0 5px 5px;\r\n\tborder-bottom-color: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.data-tooltip-placement-bottom .data-tooltip-arrow {\r\n\tleft: 50%;\r\n\tmargin-left: -5px;\r\n}\r\n\r\n.data-tooltip-placement-bottomLeft .data-tooltip-arrow {\r\n\tleft: 16px;\r\n}\r\n\r\n.data-tooltip-placement-bottomRight .data-tooltip-arrow {\r\n\tright: 16px;\r\n}";en(er);var tr=function(e){return"\n <div ".concat(G,'="tooltip" class="data-tooltip data-tooltip-placement-').concat(e.placement,' data-tooltip-hidden" style="transform-origin: 50% 45px 0px;">\n <div class="data-tooltip-content">\n <div class="data-tooltip-arrow"></div>\n <div class="data-tooltip-inner" data-role="tooltip"></div>\n </div>\n </div>')},nr=function(){function e(){(0,l.Z)(this,e)}return(0,c.Z)(e,null,[{key:"show",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{placement:"top"};e.hide();var i=Ut(tr(r));"string"===typeof n?i.find("[data-role=tooltip]").html(n):i.find("[data-role=tooltip]").append(n);var o=rt(),a=Ut(o.body);a.append(i);var l=(0,D.ZP)(i.get(),t.get(),(0,s.Z)({},Jn[r.placement])),c=Object.keys(Jn).find((function(e){var t=Jn[e].points;return t[0]===l.points[0]&&t[1]===l.points[1]}));c!==r.placement&&i.removeClass("data-tooltip-placement-".concat(r.placement)).addClass("data-tooltip-placement-".concat(c)),i.addClass("data-tooltip-active")}},{key:"hide",value:function(){var e=rt();Ut(e.body).find("div[".concat(G,"=tooltip]")).remove()}}]),e}(),rr=function(e){return'\n <span class="data-toolbar-item">\n <a class="data-toolbar-btn"'.concat(e.disabled?' disabled="disabled"':""," ").concat(e.link?' href="'+e.link+'" target="_blank"':"",">\n ").concat(e.content,"\n </a>\n </span>")},ir=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.options=t,this.root=Ut(rr(t)),t.style&&this.root.attributes("style",t.style),t.class&&this.root.addClass(t.class)}return(0,c.Z)(e,[{key:"getPlacement",value:function(){var e=this.root.closest(".data-toolbar").attributes("data-placement")||"top";return e.startsWith("top")?"top":"bottom"}},{key:"render",value:function(e){var t=this,n=this.options,r=n.title,i=n.didMount,o=n.onClick,a=n.link;e.append(this.root),r&&(this.root.on("mouseenter",(function(){var e=t.getPlacement();nr.show(t.root,"function"===typeof r?r():r,{placement:e})})),this.root.on("mouseleave",(function(){nr.hide()})),this.root.on("mousedown",(function(){nr.hide()}))),!a&&o&&this.root.find("a").on("click",(function(e){e.preventDefault(),e.stopPropagation(),o(e,t.root)})),i&&i(this.root)}}]),e}(),or=function(e){var t=!!e.checked;return e.getState&&(t=e.getState()),'\n <div class="data-toolbar-item data-toolbar-dropdown-item data-toolbar-dropdown-switch">\n <span class="data-toolbar-dropdown-item-content"'.concat(e.disabled?' disabled="disabled"':"",">").concat(e.content,'</span>\n <button type="button"').concat(e.disabled?' disabled="disabled"':"",' role="switch" aria-checked="true" class="switch-btn ').concat(t?" switch-checked":"",'">\n <div class="switch-handle"></div>\n <span class="switch-inner"></span>\n </button>\n </div>')},ar=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.switch=void 0,this.options=t}return(0,c.Z)(e,[{key:"renderTo",value:function(e){var t=this;this.root=Ut(or(this.options)),this.switch=this.root.find(".switch-btn"),e.append(this.root),this.root.on("mousedown",(function(e){return e.preventDefault()}));var n=this.options.onClick;this.root.on("click",(function(e){e.stopPropagation(),n&&(n(e,t.root),t.updateSwitch())}))}},{key:"updateSwitch",value:function(){var e,t;this.options.getState&&(this.options.getState()?null===(e=this.switch)||void 0===e||e.addClass("switch-checked"):null===(t=this.switch)||void 0===t||t.removeClass("switch-checked"))}}]),e}(),sr=function(e){return'\n <div class="data-toolbar-item data-toolbar-dropdown-item data-toolbar-dropdown-btn">\n <span class="data-toolbar-dropdown-item-content"'.concat(e.disabled?' disabled="disabled"':"",">\n ").concat(e.content,"\n </span>\n </div>")},lr=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.options=t}return(0,c.Z)(e,[{key:"renderTo",value:function(e){var t=this;this.root=Ut(sr(this.options)),e.append(this.root);var n=this.options.onClick;n&&this.root.on("click",(function(e){return n(e,t.root)}))}}]),e}(),cr=function(e){return'\n <span class="data-toolbar-item data-toolbar-item-dropdown">\n <a class="data-toolbar-btn data-toolbar-dropdown"'.concat(e.disabled?' disabled="disabled"':"",">").concat(e.content,'</a>\n <div class="dropdown-container"></div>\n </span>')},Ar=function(){function e(t){var n=this;(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.dropdown=void 0,this.documentMouseDown=function(e){var t;n.root&&!n.root[0].contains(e.target)&&(null===(t=n.dropdown)||void 0===t?void 0:t.hasClass("show"))&&n.hideDropdown()},this.options=t}return(0,c.Z)(e,[{key:"initToggleEvent",value:function(){var e=this,t=this.root.find(".data-toolbar-dropdown");t.on("mousedown",(function(e){e.preventDefault(),e.stopPropagation()})),t.on("click",(function(t){t.stopPropagation(),e.toggleDropdown()})),document.addEventListener("mousedown",this.documentMouseDown,!0)}},{key:"toggleDropdown",value:function(){var e;(null===(e=this.dropdown)||void 0===e?void 0:e.hasClass("show"))?this.hideDropdown():this.showDropdown()}},{key:"showDropdown",value:function(){var e;null===(e=this.dropdown)||void 0===e||e.addClass("show")}},{key:"hideDropdown",value:function(){var e;null===(e=this.dropdown)||void 0===e||e.removeClass("show")}},{key:"getPlacement",value:function(){var e=this.root.closest(".data-toolbar").attributes("data-placement")||"top";return e.startsWith("top")?"top":"bottom"}},{key:"renderTooltip",value:function(){var e=this,t=this.options.title;t&&(this.root.on("mouseenter",(function(){var n=e.getPlacement();nr.show(e.root,"function"===typeof t?t():t,{placement:n})})),this.root.on("mouseleave",(function(){nr.hide()})),this.root.on("mousedown",(function(){nr.hide()})))}},{key:"renderDropdown",value:function(){var e=this;this.dropdown=this.root.find(".dropdown-container");var t=this.options.items;t.forEach((function(t){switch(t.type){case"switch":return new ar(t).renderTo(e.dropdown);case"button":return new lr(t).renderTo(e.dropdown)}})),this.dropdown.on("click",(function(t){t.stopPropagation(),e.hideDropdown()}))}},{key:"render",value:function(e){this.root=Ut(cr(this.options)),e.append(this.root),this.initToggleEvent(),this.renderTooltip(),this.renderDropdown();var t=this.options.didMount;t&&t(this.root)}},{key:"destroy",value:function(){document.removeEventListener("mousedown",this.documentMouseDown,!0)}}]),e}(),ur=function(e){return'\n <span class="data-toolbar-item data-toolbar-item-input">\n '.concat(e.prefix?"<span class='data-toolbar-input-prefix'>"+We(e.prefix)+"</span>":"",'<input data-role="input" placeholder="').concat(We(e.placeholder),'" class="data-toolbar-input" type="input" value="').concat(We(e.value.toString()),'" />').concat(e.suffix?"<span class='data-toolbar-input-suffix'>"+We(e.suffix)+"</span>":"","\n </span>")},dr=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.onEnter=void 0,this.onInput=void 0,this.onChange=void 0,this.options=t,this.root=Ut(ur(t)),this.onEnter=t.onEnter||function(){},this.onInput=t.onInput||function(){},this.onChange=t.onChange||function(){}}return(0,c.Z)(e,[{key:"find",value:function(e){var t="[data-role=".concat(e,"]");return this.root.find(t)}},{key:"render",value:function(e){var t=this,n=this.options,r=n.value,o=n.didMount,a=this.find("input"),s=a.get();s&&(s.value=(void 0!==r?r:"").toString(),a.on("keydown",(function(e){e.stopPropagation(),(0,i.ZP)("enter",e)&&(e.preventDefault(),s.blur(),t.onEnter(s.value))})),a.on("input",(function(){t.onInput(s.value)})),a.on("change",(function(){setTimeout((function(){t.onChange(s.value)}),10)})),e.append(this.root),o&&o(this.root))}}]),e}(),hr=function(e){var t=!!e.checked;return e.getState&&(t=e.getState()),'\n <div class="data-toolbar-switch">\n <span class="switch-content"'.concat(e.disabled?' disabled="disabled"':"",">").concat(e.content,'</span>\n <button type="button" role="switch" aria-checked="true" class="switch-btn ').concat(t?" switch-checked":"",'"').concat(e.disabled?' disabled="disabled"':"",'>\n <div class="switch-handle"></div>\n <span class="switch-inner"></span>\n </button>\n </div>')},pr=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.switch=void 0,this.options=t,this.root=Ut(hr(t)),this.switch=this.root.find(".switch-btn"),t.class&&this.root.addClass(t.class)}return(0,c.Z)(e,[{key:"render",value:function(e){var t=this,n=this.options,r=n.didMount,i=n.onClick;e.append(this.root),this.root.on("mousedown",(function(e){return e.preventDefault()})),this.root.on("click",(function(e){e.stopPropagation(),i&&(i(e,t.root),t.updateSwitch())})),r&&r(this.root)}},{key:"updateSwitch",value:function(){var e,t;this.options.getState&&(this.options.getState()?null===(e=this.switch)||void 0===e||e.addClass("switch-checked"):null===(t=this.switch)||void 0===t||t.removeClass("switch-checked"))}}]),e}(),fr='.data-toolbar {\r\n\tposition: absolute;\r\n\topacity: 0;\r\n\tvisibility: hidden;\r\n\twidth: auto;\r\n\tline-height: 26px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tfont-size: 14px;\r\n\tfont-weight: normal;\r\n\ttext-indent: 0;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t user-select: none;\r\n z-index: 127;\r\n}\r\n\r\n.data-toolbar-active {\r\n\topacity: 1;\r\n\tvisibility: visible;\r\n}\r\n\r\n.data-toolbar-block {\r\n\ttop: auto;\r\n\tbottom: -46px;\r\n\tleft: -1px;\r\n\tright: auto;\r\n\theight: 40px;\r\n}\r\n\r\n.data-toolbar-btn {\r\n\tline-height: 26px;\r\n\tmin-width: 28px;\r\n\tdisplay: inline-block;\r\n\ttext-align: center;\r\n\tcolor: #595959;\r\n\ttransition: background-color 0.3s ease-in-out;\r\n\tcursor: pointer;\r\n}\r\n\r\n.data-toolbar-btn-disabled,.data-toolbar-btn-disabled:hover {\r\n\tbackground-color: transparent;\r\n\tbox-shadow: none;\r\n\tcursor: not-allowed;\r\n}\r\n\r\n.data-toolbar-group {\r\n\tborder: 1px solid rgba(226, 226, 226, 0.84);\r\n border-radius: 4px;\r\n box-shadow: 0px 2px 4px 0px rgb(225 225 225 / 50%);\r\n background: #fff;\r\n position: relative;\r\n display: inline-flex;\r\n padding: 5px;\r\n align-items: center;\r\n}\r\n\r\n.data-toolbar-item {\r\n\tposition: relative;\r\n\tdisplay: inline-block;\r\n\tline-height: 26px;\r\n\ttext-align: left;\r\n\tcolor: #595959;\r\n\tflex: 0 0 auto;\r\n font-size: 12px;\r\n cursor: pointer;\r\n}\r\n\r\n.data-toolbar-item:not(.data-toolbar-item-input):hover, .data-toolbar-item.active:not(.data-toolbar-item-input){\r\n background-color: #f4f4f4;\r\n border-radius: 2px;\r\n}\r\n\r\n.data-toolbar-item > * {\r\n font-size: 12px !important;\r\n}\r\n\r\n.data-toolbar-item[disabled] {\r\n\topacity: 0.5;\r\n\tcursor: not-allowed;\r\n}\r\n\r\n.data-toolbar-item-split {\r\n\twidth: 1px;\r\n\theight: 16px;\r\n\tline-height: 16px;\r\n\tmargin: 6px 4px;\r\n\tborder-left: 1px solid #e8e8e8;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.data-toolbar-item-dropdown-active {\r\n\topacity: 1;\r\n\tvisibility: visible;\r\n\ttransform: translateY(0px);\r\n}\r\n\r\n.data-toolbar-item-input {\r\n\tdisplay: flex;\r\n margin: 0 4px;\r\n}\r\n\r\n.data-toolbar-item-input .data-toolbar-input {\r\n width: 46px;\r\n line-height: 12px;\r\n font-size: 12px;\r\n outline: none;\r\n border: 1px solid #dadada;\r\n border-radius: 4px;\r\n}\r\n\r\n.data-toolbar-item-input .data-toolbar-input::-moz-selection {\r\n color: inherit;\r\n background:transparent\r\n}\r\n\r\n.data-toolbar-item-input .data-toolbar-input::selection {\r\n color: inherit;\r\n background:transparent\r\n}\r\n\r\n.data-toolbar-item-input .data-toolbar-input:focus::-moz-selection\r\n{\r\n color: #fff;\r\n background: #1890ff;\r\n}\r\n\r\n.data-toolbar-item-input .data-toolbar-input:focus::selection\r\n{\r\n color: #fff;\r\n background: #1890ff;\r\n}\r\n\r\n.data-toolbar-item-dropdown .dropdown-container {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\tpadding: 8px 0;\r\n\ttop: 100%;\r\n\tmargin-top: 6px;\r\n\tborder-radius: 2px;\r\n\tbackground-color: #fff;\r\n\tbox-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.13), 0 2px 8px 0 rgba(0, 0, 0, 0.08), 0 8px 16px 4px rgba(0, 0, 0, 0.04);\r\n z-index: 99999;\r\n}\r\n\r\n.data-toolbar-item-dropdown .dropdown-container.show {\r\n\tdisplay: block;\r\n}\r\n\r\n.data-toolbar-dropdown-item {\r\n\tpadding: 2px 16px;\r\n\tmargin: 0;\r\n\twhite-space: nowrap;\r\n\tline-height: 26px;\r\n\tcolor: #404040;\r\n\tcursor: pointer;\r\n display: block;\r\n}\r\n\r\n.data-toolbar-dropdown-item:hover {\r\n\tbackground-color: #f5f5f5;\r\n}\r\n\r\n.data-toolbar-dropdown-switch {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .data-toolbar-dropdown-item-content {\r\n\tflex: 1;\r\n margin-right: 4px;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn {\r\n margin: 0;\r\n padding: 0;\r\n color: #595959;\r\n font-size: 14px;\r\n font-variant: tabular-nums;\r\n line-height: 1.5;\r\n list-style: none;\r\n -webkit-font-feature-settings: "tnum";\r\n font-feature-settings: "tnum";\r\n position: relative;\r\n display: inline-block;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n vertical-align: middle;\r\n background-color: rgba(0,0,0,.25);\r\n border: 0;\r\n border-radius: 100px;\r\n cursor: pointer;\r\n -webkit-transition: all .2s;\r\n transition: all .2s;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n min-width: 28px;\r\n height: 16px;\r\n line-height: 16px;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn.switch-checked {\r\n background-color: #347EFF\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn .switch-handle {\r\n top: 2px;\r\n left: 2px;\r\n width: 12px;\r\n height: 12px;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn .switch-handle, .data-toolbar-dropdown-switch .switch-btn .switch-handle:before {\r\n position: absolute;\r\n -webkit-transition: all .2s ease-in-out;\r\n transition: all .2s ease-in-out;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn.switch-checked .switch-handle {\r\n left: calc(100% - 14px);\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn .switch-handle:before {\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n background-color: #fff;\r\n border-radius: 9px;\r\n -webkit-box-shadow: 0 2px 4px 0 rgb(0 35 11 / 20%);\r\n box-shadow: 0 2px 4px 0 rgb(0 35 11 / 20%);\r\n content: "";\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn .switch-inner {\r\n display: block;\r\n margin: 0 5px 0 18px;\r\n font-size: 12px;\r\n color: #fff;\r\n -webkit-transition: margin .2s;\r\n transition: margin .2s;\r\n}\r\n\r\n.data-toolbar-dropdown-switch .switch-btn.switch-checked .switch-inner {\r\n margin: 0 18px 0 5px;\r\n}\r\n.data-toolbar-switch {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n padding: 0 4px;\r\n cursor: pointer;\r\n width: -webkit-max-content;\r\n width: -moz-max-content;\r\n width: max-content;\r\n}\r\n\r\n.data-toolbar-switch:hover {\r\n background-color: #f4f4f4;\r\n border-radius: 2px;\r\n}\r\n\r\n.data-toolbar-switch .switch-content {\r\n\tflex: 1;\r\n margin-right: 4px;\r\n}\r\n\r\n.data-toolbar-switch .switch-btn {\r\n margin: 0;\r\n padding: 0;\r\n color: #595959;\r\n font-size: 14px;\r\n font-variant: tabular-nums;\r\n line-height: 1.5;\r\n list-style: none;\r\n -webkit-font-feature-settings: "tnum";\r\n font-feature-settings: "tnum";\r\n position: relative;\r\n display: inline-block;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n vertical-align: middle;\r\n background-color: rgba(0,0,0,.25);\r\n border: 0;\r\n border-radius: 100px;\r\n cursor: pointer;\r\n -webkit-transition: all .2s;\r\n transition: all .2s;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n min-width: 28px;\r\n height: 16px;\r\n line-height: 16px;\r\n}\r\n\r\n.data-toolbar-switch .switch-btn.switch-checked {\r\n background-color: #347EFF\r\n}\r\n\r\n.data-toolbar-switch .switch-btn .switch-handle {\r\n top: 2px;\r\n left: 2px;\r\n width: 12px;\r\n height: 12px;\r\n}\r\n\r\n.data-toolbar-switch .switch-btn .switch-handle, .data-toolbar-switch .switch-btn .switch-handle:before {\r\n position: absolute;\r\n -webkit-transition: all .2s ease-in-out;\r\n transition: all .2s ease-in-out;\r\n}\r\n\r\n.data-toolbar-switch .switch-btn.switch-checked .switch-handle {\r\n left: calc(100% - 14px);\r\n}\r\n\r\n.data-toolbar-switch .switch-btn .switch-handle:before {\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n background-color: #fff;\r\n border-radius: 9px;\r\n -webkit-box-shadow: 0 2px 4px 0 rgb(0 35 11 / 20%);\r\n box-shadow: 0 2px 4px 0 rgb(0 35 11 / 20%);\r\n content: "";\r\n}\r\n\r\n.data-toolbar-switch .switch-btn .switch-inner {\r\n display: block;\r\n margin: 0 5px 0 18px;\r\n font-size: 12px;\r\n color: #fff;\r\n -webkit-transition: margin .2s;\r\n transition: margin .2s;\r\n}\r\n\r\n.data-toolbar-switch .switch-btn.switch-checked .switch-inner {\r\n margin: 0 18px 0 5px;\r\n}';en(fr);var gr=function(){return"<div ".concat(G,'="ui" class="data-toolbar data-toolbar-active" ').concat(Dt,'="false"></div>')},mr=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.items=[],this.options=(0,s.Z)({},t),this.root=Ut(gr())}return(0,c.Z)(e,[{key:"getPlacement",value:function(){var e=this.root.attributes("data-placement")||"top";return e.startsWith("top")?"top":"bottom"}},{key:"addItems",value:function(e){var t=this;this.options.items.forEach((function(n){var r;if("button"===n.type&&(r=new ir(n),r.render(e)),"switch"===n.type&&(r=new pr(n),r.render(e)),"input"===n.type){var i=n;r=new dr(i),r.render(e)}if("dropdown"===n.type&&(r=new Ar(n),r.render(e)),"node"===n.type){var o=n,a=o.node;a.addClass("data-toolbar-item");var s=o.title;s&&(a.on("mouseenter",(function(){var e=t.getPlacement();nr.show(a,"function"===typeof s?s():s,{placement:e})})),a.on("mouseleave",(function(){nr.hide()})),a.on("mousedown",(function(){nr.hide()}))),e.append(a),n.didMount&&n.didMount(a)}r&&t.items.push(r)}))}},{key:"find",value:function(e){var t="[data-role=".concat(e,"]");return this.root.find(t)}},{key:"destroy",value:function(){this.root.remove()}},{key:"hide",value:function(){this.root.removeClass("data-toolbar-active")}},{key:"show",value:function(){this.root.addClass("data-toolbar-active")}},{key:"renderGroup",value:function(){return Ut('<div class="data-toolbar-group"></div>')}},{key:"render",value:function(e){var t=this.renderGroup();return this.root.append(t),this.addItems(t),e&&e.append(this.root),this.root.addClass("data-toolbar-block"),this.root}},{key:"update",value:function(e){this.options=e,this.root.empty();var t=this.renderGroup();this.root.append(t),this.addItems(t)}}]),e}(),vr="ot-user-background",br="ot-user-cursor",yr="ot-user-cursor-card",wr="ot-card-mask",xr="ot-user-cursor-trigger",kr="ot-user-cursor-trigger-active",Cr=new Map,Br=new Map,_r=new Map,Er=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.root=void 0,this.hideCursorInfoTimeoutMap=void 0,this.engine=t,this.root=t.root,this.hideCursorInfoTimeoutMap={}}return(0,c.Z)(e,[{key:"destroy",value:function(){var e,t=(0,k.Z)(Cr);try{for(t.s();!(e=t.n()).done;){var n=(0,w.Z)(e.value,2),r=n[0],i=n[1];i.remove(),Cr.delete(r)}}catch(f){t.e(f)}finally{t.f()}var o,a=(0,k.Z)(Br);try{for(a.s();!(o=a.n()).done;){var s=(0,w.Z)(o.value,2),l=s[0],c=s[1];c.remove(),Br.delete(l)}}catch(f){a.e(f)}finally{a.f()}var A,u=(0,k.Z)(_r);try{for(u.s();!(A=u.n()).done;){var d=(0,w.Z)(A.value,2),h=d[0],p=d[1];p.remove(),_r.delete(h)}}catch(f){u.e(f)}finally{u.f()}}},{key:"getRectWithRange",value:function(e,t){var n,r=t.getClientRect(),i=null===(n=e.get())||void 0===n?void 0:n.getBoundingClientRect();return new DOMRect(r.left-((null===i||void 0===i?void 0:i.left)||0),r.top-((null===i||void 0===i?void 0:i.top)||0),r.right-r.left,r.bottom-r.top)}},{key:"isWrapByRange",value:function(e){var t=e.cloneRange().collapse(!0).getClientRect(),n=e.cloneRange().collapse(!1).getClientRect();return t.bottom!==n.bottom}},{key:"drawSubRang",value:function(e,t,n,r){var i=n.startOffset,o=n.startNode,a=n.endNode,l=n.startOffset,c=n.endOffset,A=n.getClientRect().top,u=i;while(l<c){n.setStart(n.commonAncestorContainer,l),n.setEnd(n.commonAncestorContainer,l+1);var d=n.getClientRect();if(d.top>A||l===c-1){n.setStart(n.commonAncestorContainer,u),u=l,A=d.top;var h=this.getRectWithRange(e,n);t.clearRect(h),t.drawRect((0,s.Z)((0,s.Z)({},h.toJSON()),r))}l++}n.setStart(o,i),n.setEnd(a,c)}},{key:"drawBackground",value:function(e,t){var n,r,i,o,a=this,l=this.engine.card,c=t.uuid,A=t.color,u=Cr.get(c),d=null!==(n=this.engine.scrollNode)&&void 0!==n?n:this.root,h=function(){if(u&&u.length>0){u.attributes(dt,A.toString());var e=u[0]["__canvas"];return u[0]["__clear"]||(e.clear(),u[0]["__clear"]=!0),e}};if(e.collapsed)return h(),[e];u&&u.length>0?o=h():(u=Ut('<div class="'.concat(vr,'" ').concat(ut,'="').concat(c,'" ').concat(dt,'="').concat(A,'" />')),d.append(u),Cr.set(c,u),o=new V({container:u.get()}),u[0]["__canvas"]=o),u.get().style.cssText="position: absolute; top: 0; left: 0; transform: translateX(0) translateY(0); will-change: transform; pointer-events: none;",u[0]["__range"]=e.cloneRange();var p=(null===(r=d.get())||void 0===r?void 0:r.clientWidth)||d.width(),f=this.root.height();o.resize(p,f),u[0]["__clear"]=!1;var g=l.find(e.commonAncestorNode,!0);g&&!g.isCenter(e.commonAncestorNode)&&(g=void 0);var m=(0,B.Vi)(A),v=m.alpha(.3).toRgbString(),b={fill:v},y=e.getSubRanges();if((null===(i=g)||void 0===i?void 0:i.isEditable)&&g.drawBackground){var w=g.drawBackground(u,e,o);if(!1===w)return[e];if(w){if(!Array.isArray(w))return w.x<0&&(o.resize(p-w.x,f),u.css("transform","translateX(".concat(w.x,"px) translateY(0)")),w.x=0),o.clearRect(w),o.drawRect((0,s.Z)((0,s.Z)({},w.toJSON()),b)),[e];y=w}}else if(g)return[e];return y.forEach((function(e){if(a.isWrapByRange(e))a.drawSubRang(u,o,e,b);else{var t=a.getRectWithRange(u,e);o.clearRect(t),o.drawRect(Object.assign({},t.toJSON(),b))}})),y}},{key:"getNodeRect",value:function(e,t){var n,r=e.parent();if(e.isCard()&&(null===r||void 0===r?void 0:r.hasClass(this.engine.list.CUSTOMZIE_LI_CLASS))&&(null===r||void 0===r||null===(n=r.first())||void 0===n?void 0:n.equal(e))&&e.next()&&(e=e.next()),e.isElement()&&(t=e.get().getBoundingClientRect()),e.isText()){var i=$t.create(this.engine).cloneRange();i.select(e,!0),t=i.getClientRect()}return t}},{key:"getCursorRect",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=(null===(t=this.root.get())||void 0===t?void 0:t.getBoundingClientRect())||{top:0,left:0};if(Jt(e)){var o=e,a=o.startNode;o.shrinkToElementNode();var s=o.getClientRect();if(a.isElement()&&0===s.height){var l=Ut(a[0].childNodes[o.startOffset]);l&&l.length>0?s=this.getNodeRect(l,s):(l=a.first(),l&&l.length>0&&(s=this.getNodeRect(l,s)))}var c=s.top-(i.top||0),A=s.left-(i.left||0)-r,u=s.height;return{top:c+"px",left:A+"px",height:u>0?u+"px":-1,elementHeight:s.height||0}}var d=e,h=Ge(d.css("outline-width")),p=(null===(n=d.get())||void 0===n?void 0:n.getBoundingClientRect())||{top:0,left:0,height:0},f=p.top-i.top-1,g=p.left-i.left;return h&&(f-=h+1,g-=2),{left:g+"px",top:f+"px",height:0,elementHeight:p.height||0}}},{key:"setCursorRect",value:function(e,t,n){var r=t.get();if(r)if(-1!==n.height){if(r.style.cssText+="top: 0; left: 0; height: ".concat(n.height,"; transform: translateX(").concat(n.left,") translateY(").concat(n.top,"); will-change: transform, height;"),0===n.height)return void t.addClass(yr);t.removeClass(yr)}else t.remove(),Br.delete(e)}},{key:"showCursorInfo",value:function(e,t){var n=t.uuid,r=t.color;this.hideCursorInfoTimeoutMap[n]&&clearTimeout(this.hideCursorInfoTimeoutMap[n]);var i=e.find(".".concat(xr)),o=e.css("background-color");e.attributes("data-old-background-color",o),i.addClass("".concat(kr)),e.css("background-color",r),i.css("background-color",r)}},{key:"hideCursorInfo",value:function(e){var t=e.find(".".concat(xr)),n=e.attributes("data-old-background-color");t.removeClass("".concat(kr)),e.css("background-color",n),t.css("background-color",n)}},{key:"drawCursor",value:function(e,t,n){var r=this,i=t.uuid,o=t.name,a=t.color,s=this.getCursorRect(e),l=Br.get(i);if(l&&l.length>0)this.setCursorRect(i,l,s);else{var c='\n <div class="'.concat(br,'" ').concat(ut,'="').concat(i,'">\n <div class="').concat(xr,'">').concat(We(o||""),"</div>\n </div>");l=Ut(c),Br.set(i,l);var A=l.find(".".concat(xr));if(0===s.elementHeight){var u=0,d=function t(){u++,s=r.getCursorRect(e),s.elementHeight<20&&u<=50?setTimeout((function(){t()}),20):r.setCursorRect(i,l,s)};d()}else this.setCursorRect(i,l,s);l.on("mouseenter",(function(){return r.showCursorInfo(l,t)}));var h=!0;l.on("transitionstart",(function(){h=!1})),l.on("transitionend",(function(){h=!0})),l.on("mouseleave",(function(){h&&r.hideCursorInfo(l)})),l.css("background-color",a),A.css("background-color",a),this.root.append(l)}if(l&&l[0]){l.css("z-index","");var p=this.engine.card.components.find((function(e){return e.isMaximize}));if(p){var f=this.engine.card.closest(Jt(e)?e.startNode:e,!0);f&&p.root.equal(f)||l.css("z-index",120)}return l[0]["__target"]=Jt(e)?e.toPath(!0):e,!1===n?l:(this.showCursorInfo(l,t),this.hideCursorInfoTimeoutMap[i]&&clearTimeout(this.hideCursorInfoTimeoutMap[i]),this.hideCursorInfoTimeoutMap[i]=setTimeout((function(){r.hideCursorInfo(l)}),2e3),l)}}},{key:"drawCard",value:function(e,t,n){var r,i,o=this,a=this.engine.language,s=(null===(r=this.root.get())||void 0===r?void 0:r.getBoundingClientRect())||{left:0,top:0,width:0,height:0},l=(null===(i=e.get())||void 0===i?void 0:i.getBoundingClientRect())||{left:0,top:0,width:0,height:0},c="top: 0; left: 0; transform: translateX(".concat(l.left-s.left,"px) translateY(").concat(l.top-s.top,"px); will-change: transform;"),A=_r.get(n.uuid);if(A&&A.length>0)return A[0]["__node"]=e[0],void(A.get().style.cssText=c);if(A=Ut('<div class="'.concat(wr,'" ').concat(ut,'="').concat(n.uuid,'" />')),_r.set(n.uuid,A),A[0]["__node"]=e[0],0===l.height){var u=0,d=function t(){var n;u++,l=(null===(n=e.get())||void 0===n?void 0:n.getBoundingClientRect())||{left:0,top:0,width:0,height:0},l.height<20&&u<=50?setTimeout((function(){t()}),20):A&&A.length>0&&(A.get().style.cssText=c+"height: ".concat(l.height,"px; width: ").concat(l.width,"px;"))};d()}else A.get().style.cssText=c+"height: ".concat(l.height,"px; width: ").concat(l.width,"px;");A.on("mouseenter",(function(){o.showCursorInfo(t,n),A&&A.length>0&&nr.show(A,a.get("card","lockAlert").toString(),{placement:"bottomLeft"})})),A.on("mousemove",(function(e){var t=Ut("div[".concat(G,"=tooltip]")),n=t.get();n&&(n.style.cssText="left: 0; top: 0; transform: translateX(".concat(e.pageX-16,"px) translateY(").concat(e.pageY+32,"px); will-change: transform;"))})),A.on("mouseleave",(function(){o.hideCursorInfo(t),nr.hide()})),A.on("click",(function(e){e.preventDefault(),e.stopPropagation()})),A.on("mousedown",(function(e){e.preventDefault(),e.stopPropagation()})),this.root.append(A)}},{key:"setCardSelectedByOther",value:function(e,t){var n=t||{},r=n.uuid,i=n.color;if(i){var o,a=(0,B.Vi)(i),s=a.alpha(.3).toRgbString();return e.selectedByOther||(o=e.onSelectByOther(!0,{color:i,rgb:s})),e.selectedByOther=r,o}e.selectedByOther&&e.onSelectByOther(!1),e.selectedByOther=!1}},{key:"setCardActivatedByOther",value:function(e,t){if(!e.isEditable){var n=t||{},r=n.uuid,i=n.color;if(i){var o,a=(0,B.Vi)(i),s=a.alpha(.3).toRgbString();return e.activatedByOther||(o=e.onActivateByOther(!0,{color:i,rgb:s})),e.activatedByOther=r,o}e.activatedByOther&&e.onActivateByOther(!1),e.activatedByOther=!1}}},{key:"drawRange",value:function(e,t,n){var r=this,i=this.engine.card,o=t.uuid,a=e,s=a.commonAncestorNode,l=i.find(s);l&&!l.isCenter(s)&&(l=void 0);var c=[];if(i.each((function(e){e.isEditable||l&&e.root.equal(l.root)||(e.activatedByOther===o&&r.setCardActivatedByOther(e),c.push(o))})),c.length>0){for(var A=0;A<c.length;A++){var u=c[A],d=_r.get(u);null===d||void 0===d||d.remove(),_r.delete(u)}nr.hide()}if(l&&!l.isEditable){var h,p=this.setCardActivatedByOther(l,t)||l.root;null===(h=Br.get(o))||void 0===h||h.remove(),Br.delete(o);var f=l.constructor.collab;if(void 0===f||!0===f){var g=this.drawCursor(p,t,n);g&&this.drawCard(p,g,t),this.drawBackground(e,t)}}else{var m;if(l)return this.drawBackground(e,t),null===(m=Br.get(o))||void 0===m||m.remove(),void Br.delete(o);i.each((function(n){var i=n.getCenter();if(i&&i.length>0){if(n.isEditable&&i.contains(e.startNode)&&i.contains(e.endNode)&&(e.startNode.closest(ne).length>0||e.endNode.closest(ne).length>0))return void r.setCardSelectedByOther(n);e.isPointInRange(i.get(),0)?r.setCardSelectedByOther(n,t):n.selectedByOther===o&&r.setCardSelectedByOther(n)}}));var v=i.getSingleSelectedCard(e);if(v){if(v.isEditable){var b=v.getCenter();if(b.contains(e.startNode)&&b.contains(e.endNode)&&(e.startNode.closest(ne).length>0||e.endNode.closest(ne).length>0))return}var y=this.setCardSelectedByOther(v,t)||v.root;this.drawCursor(y,t,n)}else{e.shrinkToElementNode();var w=this.drawBackground(e,t);e.collapsed||(w.forEach((function(t){t.collapsed||(e=t)})),e.shrinkToElementNode(),e.collapse(!1)),this.drawCursor(e,t,n)}}}},{key:"updateBackgroundPosition",value:function(){var e,t=(0,k.Z)(Cr.values());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n.get();if(r){var i=r["__range"],o=n.attributes(ut),a=n.attributes(dt);this.drawBackground(i,{uuid:o,color:a})}}}catch(s){t.e(s)}finally{t.f()}}},{key:"updateCursorPosition",value:function(){var e,t=(0,k.Z)(Br);try{for(t.s();!(e=t.n()).done;){var n=(0,w.Z)(e.value,2),r=n[0],i=n[1],o=i.get();if(o&&o instanceof HTMLElement){var a=o["__target"];if(!a)return i.remove(),void Br.delete(r);if(a.name||(a=$t.fromPath(this.engine,a,!0)),a.startContainer||a.length>0&&a[0].isConnected){var s=this.getCursorRect(a);this.setCursorRect(r,i,s)}else i.remove(),Br.delete(r)}}}catch(l){t.e(l)}finally{t.f()}}},{key:"updateCardPosition",value:function(){var e,t,n=(null===(e=this.root.get())||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0},r=(0,k.Z)(_r);try{for(r.s();!(t=r.n()).done;){var i=(0,w.Z)(t.value,2),o=i[0],a=i[1],s=a.get();if(s&&s instanceof HTMLElement){var l=s["__node"];if(null===l||void 0===l?void 0:l.isConnected){var c=l.getBoundingClientRect();s.style.left=c.left-n.left+"px",s.style.top=c.top-n.top+"px"}else{var A,u;null===(A=null!==(u=s.parentElement)&&void 0!==u?u:s.parentNode)||void 0===A||A.removeChild(s),_r.delete(o)}}}}catch(d){r.e(d)}finally{r.f()}}},{key:"updatePosition",value:function(){this.updateBackgroundPosition(),this.updateCursorPosition(),this.updateCardPosition()}},{key:"updateBackgroundAlpha",value:function(e){var t,n=this.getCursorRect(e),r=(0,k.Z)(Br.values());try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.get();if(o&&o instanceof HTMLElement){var a=o.querySelector(".".concat(xr)),s=o.style.left,l=o.style.top,c=(0,B.Vi)(o.style.backgroundColor);n.left===s&&n.top===l?c.alpha(.3):c.alpha(1);var A=c.toRgbString();o.style.backgroundColor=A,a&&(a.style.backgroundColor=A)}}}catch(u){r.e(u)}finally{r.f()}}},{key:"render",value:function(e,t,n){var r=e.path,i=e.uuid,o=e.active;if(r){var a=$t.fromPath(this.engine,r,!0);this.drawRange(a,t,o||n)}else this.remove(i)}},{key:"remove",value:function(e){var t,n,r,i=this;null===(t=null!==(n=null===(r=this.engine.scrollNode)||void 0===r?void 0:r.get())&&void 0!==n?n:this.root.get())||void 0===t||t.querySelectorAll("[".concat(ut,'="').concat(e,'"]')).forEach((function(t){var n,r;if(t.classList.contains(wr)){var o=t["__node"],a=o?i.engine.card.find(o):null;a&&!a.isEditable&&a.activatedByOther===e&&i.setCardActivatedByOther(a)}null===(n=null!==(r=t.parentElement)&&void 0!==r?r:t.parentNode)||void 0===n||n.removeChild(t)})),this.engine.card.each((function(t){t.isEditable||t.selectedByOther!==e||i.setCardSelectedByOther(t)}))}}]),e}(),Sr=new WeakMap,Fr=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(e){var r;return(0,l.Z)(this,n),r=t.call(this),r.engine=void 0,r.rangeColoring=void 0,r.currentRangePath=void 0,r.data=new Map,r.member=void 0,r.handleResize=function(){r.rangeColoring.updatePosition()},r.handleScroll=function(e){var t,n=null===(t=r.engine.container.get())||void 0===t?void 0:t.childNodes;if(n){var i,o=(0,k.Z)(r.data);try{for(o.s();!(i=o.n()).done;){var a,s,l=(0,w.Z)(i.value,2),c=l[0],A=l[1];if(c!==(null===(a=r.member.getCurrent())||void 0===a?void 0:a.uuid)&&(null===(s=A.path)||void 0===s?void 0:s.start.id)){var u=A.path.start.path[0],d=n.item(u);if(d&&e.equal(d)){r.rangeColoring.updatePosition();break}}}}catch(h){o.e(h)}finally{o.f()}}},r.handleMouseDown=function(){var e=r.engine.container;e.off("mouseup",r.handleMouseUp),e.off("mousemove",r.emitSelectChange),e.on("mouseup",r.handleMouseUp),e.on("mousemove",r.emitSelectChange)},r.mouseUpTimeout=null,r.handleMouseUp=function(){var e=r.engine.container;e.off("mouseup",r.handleMouseUp),e.off("mousemove",r.emitSelectChange),r.mouseUpTimeout&&clearTimeout(r.mouseUpTimeout),r.mouseUpTimeout=setTimeout((function(){r.emitSelectChange()}),10)},r.observer=null,r.emitSelectChange=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!r.engine.change.isComposing()){var n=r.engine.change.range.get();null===(e=r.observer)||void 0===e||e.disconnect();var i=r.engine.card.find(n.commonAncestorContainer,!0);if(null===i||void 0===i?void 0:i.getSelectionNodes){var o=r.getCardResizeRange(i);o&&(n=o.cloneRange(),r.observer=new ResizeObserver((function(){var e;(o=r.getCardResizeRange(i),o)?r.onSelectionChange(o,!0,t):null===(e=r.observer)||void 0===e||e.disconnect()})),r.observer.observe(i.root.get()))}if(n.commonAncestorNode.isRoot()||n.commonAncestorNode.inEditor())r.onSelectionChange(n,!0,t,!1);else{var a=r.member.getCurrent();a&&r.removeAttirbute(a.uuid)}}},r.engine=e,r.member=Nn.fromEngine(e),r.rangeColoring=new Er(e),e.container.on("keyup",r.emitSelectChange),e.container.on("mousedown",r.handleMouseDown),e.on("scroll",r.handleScroll,{passive:!0}),window.addEventListener("resize",r.handleResize,{passive:!0}),r}return(0,c.Z)(n,[{key:"getCardResizeRange",value:function(e){if(null===e||void 0===e?void 0:e.getSelectionNodes){var t=e.getSelectionNodes();if(t.length>0){var n,r=$t.create(this.engine);r.setStart(t[0],0);var i=t[t.length-1];return r.setEnd(i,i.isText()?i.text().length:(null===(n=i.get())||void 0===n?void 0:n.childNodes.length)||0),r}}return null}},{key:"setAttribute",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.data.get(e.uuid);if(e.force||!L()(o||{},e)){this.data.set(e.uuid,Object.assign({},e,{active:!o}));var a=this.member.getCurrent();e.uuid===(null===a||void 0===a?void 0:a.uuid)?Sr.get(this.engine)||(Sr.set(this.engine,!0),Promise.resolve().then((function(){Sr.set(n.engine,!1),!0===r&&n.rangeColoring.updatePosition(),n.emit("change",e)}))):this.rangeColoring.render(e,t,i)}}},{key:"removeAttirbute",value:function(e){if(this.data.has(e)){this.data.delete(e);var t=this.member.getCurrent();e===(null===t||void 0===t?void 0:t.uuid)?this.emit("change",{uuid:e,remove:!0}):this.rangeColoring.remove(e)}}},{key:"getAttribute",value:function(e){return this.data.get(e)}},{key:"onSelectionChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.member.getCurrent();if(i){var o=this.engine.card;e=e.cloneRange();var a=o.active;if(a&&!a.isEditable){var s=a.getCenter();if(jt(a.root)){var l=a.root.prev();l?e.select(l,!0).collapse(!1):(e.setStartBefore(a.root),e.collapse(!0))}else s&&s.length>0&&e.select(s.get(),!0)}if(!a&&!e.collapsed){var c=this.engine.card.find(e.startNode,!0);c&&c.type===nn.BLOCK&&e.setStart(c.getCenter().parent(),1);var A=this.engine.card.find(e.endNode,!0);A&&A.type===nn.BLOCK&&e.setEnd(A.getCenter().parent(),1)}var u=e.toPath(!0);this.currentRangePath=e.toPath();var d=this.getAttribute(i.uuid);this.setAttribute(Object.assign({},d,{path:u,uuid:i.uuid,force:t}),i,n,r),this.rangeColoring.updateBackgroundAlpha(e)}}},{key:"refreshAttributes",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){var n=e.getAttribute(t.uuid);n&&e.rangeColoring.render(n,t)}))}},{key:"destroy",value:function(){var e=this.engine.container;e.off("mouseup",this.handleMouseUp),e.off("mousemove",this.emitSelectChange),e.off("keyup",this.emitSelectChange),e.off("mousedown",this.handleMouseDown),this.engine.off("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)}}]),n}(I.EventEmitter2),Tr=".ot-user-cursor {\r\n\tposition: absolute;\r\n\tz-index: 125;\r\n\twidth: 2px;\r\n}\r\n\r\n.ot-user-cursor-trigger {\r\n\tposition: absolute;\r\n\ttop: -5px;\r\n\tleft: -2px;\r\n\tborder-radius: 100%;\r\n\tcolor: #ffffff;\r\n\twidth: 6px;\r\n\theight: 6px;\r\n\tfont-size: 0;\r\n\toverflow: hidden;\r\n\ttransition: all 0.1s linear;\r\n}\r\n\r\n.ot-user-cursor-trigger-active {\r\n\ttop: -17px;\r\n\tborder-radius: 2px;\r\n\tcolor: #ffffff;\r\n\tfont-size: 10px;\r\n\tline-height: 18px;\r\n\theight: 18px;\r\n\twidth: auto;\r\n\tpadding: 0 3px;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.ot-card-mask {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n\tbackground: transparent;\r\n\tcursor: not-allowed;\r\n}\r\n\r\n.ot-user-background {\r\n z-index: 120;\r\n}\r\n\r\n.ot-user-cursor-card {\r\n\tposition: absolute;\r\n}\r\n\r\n.ot-user-cursor-card .ot-user-cursor-trigger {\r\n\tdisplay: none;\r\n}\r\n\r\n.ot-user-cursor-card .ot-user-cursor-trigger-active {\r\n\tposition: absolute;\r\n\tdisplay: block;\r\n\ttop: -19px;\r\n\tleft: 0;\r\n\tborder-radius: 2px;\r\n\tcolor: #ffffff;\r\n\tfont-size: 10px;\r\n\tline-height: 18px;\r\n\theight: 18px;\r\n\twidth: auto;\r\n\tpadding: 0 3px;\r\n\twhite-space: nowrap;\r\n}";en(Tr);var Mr=function(e,t,n){var r=e.block.closest(t);if(r.length>0){var i=r.attributes($),o=$t.create(e),a=$t.create(e);return o.setStart(r[0],0),o.setEnd(t[0],n),a.setStart(t[0],n),a.setEnd(r[0],r[0].childNodes.length),{id:i,leftText:o.toString(),rightText:a.toString()}}},Ir=function(e){try{var t;if(0===(null===(t=window.getSelection())||void 0===t?void 0:t.rangeCount))return;var n=$t.from(e);if(!n||n.inCard())return;n.startNode.isRoot()&&n.shrinkToElementNode();var r=n.startNode,i=n.startOffset,o=n.endNode,a=n.endOffset;return{start:Mr(e,r,i),end:Mr(e,o,a)}}catch(s){return void e.messageError("apply-remote-path",s)}},Nr=function(e,t){var n;if(t){var r=t.id,i=t.leftText,o=t.rightText,a=null===(n=e.container.get())||void 0===n?void 0:n.querySelector("[".concat($,'="').concat(r,'"]'));if(a){var s=a.textContent||"";if(""===s)return{container:a,offset:0};if(null===s||void 0===s?void 0:s.startsWith(i)){var l=a.firstChild,c=i.length;while(l&&(3!==l.nodeType||((null===(A=l.textContent)||void 0===A?void 0:A.length)||0)<c)){var A,u,d;if(((null===(u=l.textContent)||void 0===u?void 0:u.length)||0)<c)c-=(null===(d=l.textContent)||void 0===d?void 0:d.length)||0,l=l.nextSibling;else l=l.firstChild}return{container:l,offset:c}}if(null===s||void 0===s?void 0:s.endsWith(o)){var h,p,f=o.length,g=a.lastChild;while(g&&(3!==g.nodeType||((null===(m=g.textContent)||void 0===m?void 0:m.length)||0)<f)){var m,v,b,y;if((null===(v=g.textContent)||void 0===v?void 0:v.length)||0<f)f-=(null===(b=g)||void 0===b||null===(y=b.textContent)||void 0===y?void 0:y.length)||0,g=g.previousSibling;else g=g.lastChild}return{container:g,offset:(null===(h=g)||void 0===h||null===(p=h.textContent)||void 0===p?void 0:p.length)||0-f}}var w=0;while(s[w]===i[w])w++;var x=a.firstChild;while(x&&(3!==x.nodeType||((null===(k=x.textContent)||void 0===k?void 0:k.length)||0)<w)){var k,C,B;if((null===(C=x.textContent)||void 0===C?void 0:C.length)||0<w)w-=(null===(B=x.textContent)||void 0===B?void 0:B.length)||0,x=x.nextSibling;else x=x.firstChild}return{container:x,offset:w}}}},Ur=function(e,t,n){try{var r,i=window.getSelection(),o=i?null===(r=$t.from(e,i))||void 0===r?void 0:r.cloneRange():void 0;if(!o)return;var a,s,l=t.start,c=t.end;l&&(a=Nr(e,l)),c&&(s=Nr(e,c)),a&&a.container&&o.setStart(a.container,a.offset),s&&s.container&&o.setEnd(s.container,s.offset),e.change.range.select(o,!1),null===n||void 0===n||n()}catch(A){e.messageError("apply-remote-path",A)}},Lr=function e(t){if(_n.isText(t)){var n=t.text;return je(n).replace(/\u00a0/g," ").replace(/\u200b/g,"")}if(En.isElement(t)){for(var r=t.type,i=t.children,o="<".concat(r),a=0,s=Object.entries(t);a<s.length;a++){var l=(0,w.Z)(s[a],2),c=l[0],A=l[1];"type"!==c&&"children"!==c&&(o+=" ".concat(c,'="').concat(We(A),'"'))}var u=qn.isVoid(t);o+=u?"":">";var d,h=(0,k.Z)(i);try{for(h.s();!(d=h.n()).done;){var p=d.value;o+=e(p)}}catch(f){h.e(f)}finally{h.f()}return o+=u?" />":"</".concat(r,">"),o.replace(/\u200b/g,"")}throw new Error("Cannot convert node to value")},Qr=function(e){var t=e[me];if(!t)return"";var n=(0,x.Z)({type:t,value:e[ve],name:(e[fe]||e[ge]).toLowerCase(),editable:e[we]},$,e[$]);for(var r in e)r!==ge&&0===r.indexOf("data-")&&0!==r.indexOf("data-card")&&(n[r]=e[r]);var i="<card ";for(var o in n){var a=n[o];void 0!==a&&(i+="".concat(o,'="').concat(We(n[o]),'" '))}return i+="></card>",i},Dr=function e(t,n){if(_n.isText(t)){var r=t.text;return je(r).replace(/\u00a0/g," ").replace(/\u200b/g,"")}if(En.isElement(t)){var i=t.type,o=t.children;if(n&&!1===n(t))return"";var a=t[fe];if(a)return Qr(t);for(var s="<".concat(i),l=0,c=Object.entries(t);l<c.length;l++){var A=(0,w.Z)(c[l],2),u=A[0],d=A[1];"type"!==u&&"children"!==u&&(s+=" ".concat(u,'="').concat(We(d),'"'))}if(qn.isVoid(t))return s+" />";s+=">";var h,p=(0,k.Z)(o);try{for(p.s();!(h=p.n()).done;){var f=h.value;s+=e(f)}}catch(g){p.e(g)}finally{p.f()}return s+="</".concat(i,">"),s}throw new Error("Cannot convert node to value")},Hr=function(e,t){return"ol"===e?t%3===1?"lower-alpha":t%3===2?"lower-roman":"decimal":t%3===1?"circle":t%3===2?"square":"disc"},Or=function(e){var t=e["data-indent"];if(!t){var n=e["style"];if(!n)return 0;var r=n.match(/text-indent: (\d+)(px|em|rem);/);if(!r)return 0;t=r[1]}var i=t?parseInt(t):0;return i},zr=function(e){var t=Or(e);return" ".repeat(2*t)},Zr=function(e){var t=e["start"],n=e["class"];if(n&&n.includes("data-list-task"))return Rr(e);var r=Or(e),i=Hr(e.type,r),o=zr(e),a=zr(e),s="ol"===e.type,l=t?parseInt(t):1;s||(a="".concat(nt(i)," "));var c="";return e.children.forEach((function(e,t){En.isElement(e)?"li"===e.type?(s&&(a="".concat(nt(i,l+t),". ")),c+=o+a+Rr(e)):c+=o+Rr(e):c+=Pr(e)})),c},Rr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.children,r=zr(e),i=!qn.isBlock(e)||0===n.length;if("checkbox"===e[fe]){var o=Ye(e[ve]),a=o.checked;return a?"✅":"🔲"}if(t||!e[fe]||"true"===e[we]){var s,l=(0,k.Z)(n);try{for(l.s();!(s=l.n()).done;){var c=s.value;r+=Pr(c),!i&&En.isElement(c)&&("br"===c.type||qn.isBlock(c))&&(i=!0)}}catch(A){l.e(A)}finally{l.f()}}return r+(i?"":"\n")},Pr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(_n.isText(e)){var n=e.text;return je(n).replace(/\u00a0/g," ").replace(/\u200b/g,"")}if(En.isElement(e)){var r=e.type;return"br"===r?"\n":"ol"===r||"ul"===r?Zr(e):Rr(e,t)}throw new Error("Cannot convert node to text")},qr=new WeakMap,Kr=new WeakMap,Wr=function(e,t){var n=new(N()),r=e.history,i=e.change,s=Dn.from(e);s.onChange((function(t){var o=v()(e.model.root),a=$n.transform(e,t);0!==a.length&&(n.emit("change",a,o),r.handleSelfOps(a.filter((function(e){return!0===e.undoable&&"set_node"===e.type&&e.newProperties[ve]&&r.handleNLCardValue(e),!e.undoable&&("set_node"!==e.type||!e.newProperties[ge])}))),e.trigger("operations",a),a.find((function(e){return"set_node"===e.type&&e.newProperties[ve]}))&&i.change(!1))})),e.readonly||s.start();var l=new Fr(e);l.on("change",(function(e){n.emit("selection-change",e)}));var c=Nn.fromEngine(e),A=function(t){var n,r=[],i=(0,k.Z)(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=Tn(e,o,!1);if(a&&a.length>0&&r.push(a),"insert_node"===o.type||"remove_node"===o.type){var s=o.path,l=o.node,c=qn.get(u.root,s.slice(0,s.length-1));if(En.isElement(c)){var A="insert_node"===o.type,d=s[s.length-1];A?c.children.splice(d,0,l):c.children.splice(d,1),A&&a&&a.length>0&&function(){var t=function t(n,r,i,o){if(qn.setDOM(n,o,e.schema),zn.setPath(n,r,i),En.isElement(n))for(var a=0;a<n.children.length;a++){var s=n.children[a],l=Fn(e,o,[a],!1),c=l.node;t(s,n,a,c)}};t(l,c,d,a[0])}();for(var h=s[s.length-1];h<c.children.length;h++){var p=c.children[h];zn.setPath(p,c,h)}}}else if("set_node"===o.type){var f=o.path,g=o.properties,m=o.newProperties,v=qn.get(u.root,f);if(v){for(var b in g)delete v[b];for(var y in m)v[y]=m[y]}}else if("insert_text"===o.type||"remove_text"===o.type){var w=o.path,x=o.offset,C=o.text,B=qn.get(u.root,w);_n.isText(B)&&("insert_text"===o.type?B.text=B.text.slice(0,x)+C+B.text.slice(x):B.text=B.text.slice(0,x)+B.text.slice(x+C.length))}}}catch(_){i.e(_)}finally{i.f()}return r},u={root:t,mutation:s,selection:l,member:c,resetRoot:function(){var t=qn.createFromDOM(e.container[0],e.schema);En.isElement(t)&&(u.root=t)},onChange:function(e){n.on("change",e)},offChange:function(e){n.off("change",e)},emitChange:function(t){n.emit("change",t,v()(e.model.root))},onSelectionChange:function(e){n.on("selection-change",e)},offSelectionChange:function(e){n.off("selection-change",e)},findNode:function(e){var t,n=u.root,r=(0,k.Z)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!En.isElement(n))return;n=n.children[i]}}catch(o){r.e(o)}finally{r.f()}return n},apply:function(t){var n=A(t);return e.change.change(!1,n),n},applyRemote:function(t){s.stop();var n=Ir(e),r=A(t);return Promise.resolve().then((function(){s.start()})),n&&e.isFocus()&&Ur(e,n,l.emitSelectChange),e.change.change(!0,r),r},drawCursor:function(t){Kr.get(e)||(Kr.set(e,!0),Promise.resolve().then((function(){Kr.set(e,!1),Array.isArray(t)||(t=[t]);var n=c.getCurrent(),r=c.getMembers();t.forEach((function(e){if(!n||e.uuid!==n.uuid){var t=r.find((function(t){return t.uuid===e.uuid}));"remove"in e||!t?l.removeAttirbute(e.uuid):l.setAttribute(e,t)}}))})))},toDOM:function(e){return Sn(null!==e&&void 0!==e?e:u.root)},toHTML:function(t){var n=Lr(t||u.root),r=Ut(n);if(!t){var i=e.container.css();r.css(i)}return e.trigger("parse:html-before",r),e.trigger("parse:html",r),e.trigger("parse:html-after",r),r.html().replace(/\u200b/g,"")},toValue:function(t){var n=function(t){return e.trigger("parse:node",t)};return t?Dr(t,n):u.root.children.map((function(e){return Dr(e,n)})).join("")},toValueAsync:function(t,n){return new Promise(function(){var r=(0,a.Z)(g().mark((function r(i,a){var s,l,c;return g().wrap((function(r){while(1)switch(r.prev=r.next){case 0:s=g().mark((function t(r){var i,s;return g().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e.plugin.components[r],t.next=3,new Promise((function(e){i.waiting?i.waiting(n).then((function(){return e(!0)})).catch(e):e(!0)}));case 3:if(s=t.sent,"object"!==(0,o.Z)(s)){t.next=7;break}return a(s),t.abrupt("return",{v:void 0});case 7:case"end":return t.stop()}}),t)})),r.t0=g().keys(e.plugin.components);case 2:if((r.t1=r.t0()).done){r.next=10;break}return l=r.t1.value,r.delegateYield(s(l),"t2",5);case 5:if(c=r.t2,"object"!==(0,o.Z)(c)){r.next=8;break}return r.abrupt("return",c.v);case 8:r.next=2;break;case 10:i(u.toValue(t));case 11:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}())},toText:function(e,t){return e?Pr(e,t):u.root.children.map((function(e){return Pr(e,t)})).join("")},destroy:function(){s.destroy(),l.destroy(),qr.delete(e)}};return u},jr={from:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{type:"div",children:[]},n=qr.get(e);return n||(n=Wr(e,t),qr.set(e,n)),n},destroy:function(e){var t=qr.get(e);null===t||void 0===t||t.destroy()}},Vr=function(e,t){if(t){var n=t.start,r=t.end;if(n&&r){var i=n.path[n.path.length-1],o=r.path[r.path.length-1],a=n.path.slice(),s=r.path.slice();a.pop(),s.pop();var l=e.container,c=e.change,A=l.getChildByPath(a,(function(e){return!jt(Ut(e))}));if(!A)return;var u=l.getChildByPath(s,(function(e){return!jt(Ut(e))}));if(!u)return;var d=function(e,t){if(e.nodeType===rt().TEXT_NODE){var n=e.textContent||"";return n.length<t?n.length:t}var r=e.childNodes;return r.length<t?r.length:t};try{var h=c.range.get();if("BR"===A.nodeName||e.node.isVoid(A)?h.select(A).collapse(!1):(h.setStart(A,d(A,i)),h.setEnd(u,d(u,o))),!h.collapsed){var p=e.card.find(h.startNode,!0),f=e.card.find(h.endNode,!0);if(p&&f&&(null===p||void 0===p?void 0:p.root.equal(f.root))){var g=h.startNode.closest(ne);0===g.length&&(g=h.startNode.find(ne));var m=h.endNode.closest(ne);0===m.length&&(m=h.endNode.find(ne)),g.length>0&&m.length>0&&!g.equal(m)&&h.collapse(!0)}}c.range.select(h),h.scrollRangeIntoView()}catch(v){e.messageError("history setRangeByPath",v)}}}},Gr=(0,E.Z)("selfWaiting"),$r=function(){function e(t){var n=this;(0,l.Z)(this,e),this.actionOps=[],this.engine=void 0,this.currentAction={ops:[]},this.currentActionIndex=0,this.filterEvents=[],this.selfEvents=[],Object.defineProperty(this,Gr,{writable:!0,value:void 0}),this.lazySave=F()((function(){n.saveOp()}),200),this.handlePath=function(e,t,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return!jt(Ut(e))},a=n.engine.container.find("[".concat($,'="').concat(t,'"]'));if(a.length>0&&a.inEditor()){var s,l=a.getPath(n.engine.container,(null===(s=a.parent())||void 0===s?void 0:s.isRoot())?void 0:o);return(i?l.map((function(e){return e+2})):l).concat(e.slice(r))}return e},this.engine=t}return(0,c.Z)(e,[{key:"resetCurrentAction",value:function(){this.currentAction={ops:[]}}},{key:"reset",value:function(){this.actionOps=[],this.currentActionIndex=0}},{key:"onFilter",value:function(e){this.filterEvents.push(e)}},{key:"onSelf",value:function(e){this.selfEvents.push(e)}},{key:"hasUndo",value:function(){return!!this.getUndoOp()}},{key:"hasRedo",value:function(){return!!this.getRedoOp()}},{key:"undo",value:function(){this.saveOp();var e=this.getUndoOp();if(e){var t=!1,n=this.engine,r=n.change,i=n.model;i.mutation.stop();try{i.emitChange(e.ops),i.apply(e.ops),this.currentActionIndex--,t=!0}catch(o){this.reset(),n.messageError("history-undo",o)}n.isEmpty()&&r.initValue(),t&&(r.getRangePathBeforeCommand(),e.startRangePath&&Vr(n,e.startRangePath),r.change(),n.trigger("undo")),Promise.resolve().then((function(){i.mutation.start()}))}}},{key:"redo",value:function(){this.saveOp();var e=this.getRedoOp();if(e){var t=!1,n=this.engine,r=n.change,i=n.model;try{i.mutation.stop(),i.emitChange(e.ops),i.apply(e.ops),this.currentActionIndex++,t=!0}catch(o){this.reset(),n.messageError("history-redo",o)}t&&(r.getRangePathBeforeCommand(),e.rangePath&&Vr(this.engine,e.rangePath),r.change(),n.trigger("redo")),Promise.resolve().then((function(){i.mutation.start()}))}}},{key:"clear",value:function(){var e=this;setTimeout((function(){e.reset()}),10)}},{key:"saveOp",value:function(){this.currentAction&&this.currentAction.ops&&this.currentAction.ops.length>0&&(this.currentAction.self&&(this.currentAction.rangePath=this.getCurrentRangePath(),this.currentAction.id=Oe(8),this.actionOps.splice(this.currentActionIndex),this.actionOps.push(this.currentAction),this.currentActionIndex=this.actionOps.length,this.engine.trigger("historyChange")),this.resetCurrentAction(),this.engine.change.getRangePathBeforeCommand())}},{key:"handleSelfOps",value:function(e){var t,n=this;(null===(t=this.currentAction)||void 0===t?void 0:t.self)||this.saveOp();var r=!1;if(e.forEach((function(e){if(r=!0,n.filterEvents.some((function(t){return t(e)}))){var t;n.actionOps.length>0&&!e.undoable&&(null===(t=n.actionOps[n.actionOps.length-1].ops)||void 0===t||t.push(e))}else{n.currentAction.self=!0,n.currentAction.ops||(n.currentAction.ops=[]),n.currentAction.startRangePath||(n.currentAction.startRangePath=n.getRangePathBeforeCommand());var i=n.currentAction.ops[n.currentAction.ops.length-1];i&&$n.isReverse(e,i)?n.currentAction.ops.pop():n.currentAction.ops.push(e)}})),r){var i=void 0;if(this.selfEvents.some((function(t){return i=t(e),void 0!==i})),(0,_.Z)(this,Gr)[Gr])return;"boolean"===typeof i?i?this.saveOp():this.resetCurrentAction():"object"===(0,o.Z)(i)?((0,_.Z)(this,Gr)[Gr]=i,i.then((function(e){e?n.saveOp():n.resetCurrentAction()})).finally((function(){return(0,_.Z)(n,Gr)[Gr]=void 0}))):void 0===i&&this.lazySave()}}},{key:"handleNLCardValue",value:function(e){if(!0===e.undoable&&"set_node"===e.type){var t=e.newProperties,n=t[ve];if(!n)return;var r=Ye(n);this.actionOps.forEach((function(e){e.ops.forEach((function(e){if("set_node"===e.type){var t=e.newProperties,n=t[ve],i=Ye(n);r.id===i.id&&(t[ve]=r)}else if("insert_node"===e.type){var o=e.node,a=o[ve];if(!a)return;var s=Ye(a);r.id===s.id&&(o[ve]=r)}}))}))}}},{key:"handleRemoteOps",value:function(e){var t=this;this.currentAction.self&&!(0,_.Z)(this,Gr)[Gr]&&this.saveOp();var n=this.engine.change.range.get();this.actionOps.forEach((function(e){if(e.rangePath){var r=e.rangePath,i=r.start,o=r.end;i.id&&void 0!==i.bi&&(i.path=t.handlePath(i.path,i.id,i.bi,!1,n.filterPath(!0))),o.id&&void 0!==o.bi&&(o.path=t.handlePath(o.path,o.id,o.bi,!1,n.filterPath(!0)))}if(e.startRangePath){var a=e.startRangePath,s=a.start,l=a.end;s.id&&void 0!==s.bi&&(s.path=t.handlePath(s.path,s.id,s.bi,!1,n.filterPath(!0))),l.id&&void 0!==l.bi&&(l.path=t.handlePath(l.path,l.id,l.bi,!1,n.filterPath(!0)))}})),e.forEach((function(e){t.currentAction.ops||(t.currentAction.ops=[]);var n=t.currentAction.ops[t.currentAction.ops.length-1];n&&$n.isReverse(e,n)?t.currentAction.ops.pop():t.currentAction.ops.push(e),t.actionOps.some((function(n,r){var i,o=null===(i=n.ops)||void 0===i?void 0:i.some((function(t){return $n.canOpAffectPath(e,t.path)}));if(o){for(var a=[n],s=function(e){var r,i=t.actionOps[e],o=null===(r=i.ops)||void 0===r?void 0:r.some((function(e){var t;return null===(t=n.ops)||void 0===t?void 0:t.some((function(t){return $n.canOpAffectPath(e,t.path)}))}));if(o){var s;a.push(i);var l=e+1,c=t.actionOps[l];c&&(null===(s=c.ops)||void 0===s?void 0:s.some((function(e){var t;return null===(t=i.ops)||void 0===t?void 0:t.some((function(t){return $n.canOpAffectPath(e,t.path)}))})))&&a.push(c)}},l=r+1;l<t.actionOps.length;l++)s(l);var c=t.actionOps.filter((function(e){return void 0===a.find((function(t){return t.id===e.id}))}));return t.actionOps=c,t.currentActionIndex=t.actionOps.length,o}return!1}))}))}},{key:"getUndoOp",value:function(){var e=this.currentActionIndex-1;if(this.actionOps[e]){var t=v()(this.actionOps[e]),n=M()(this.actionOps,(function(e){return e.id==t.id}));-1!==n?t=this.actionOps[n]:n=e;var r=t.ops.map((function(e){return $n.inverse(e)})).reverse();try{return{self:!0,ops:r,id:t.id,type:"undo",rangePath:t.rangePath,startRangePath:t.startRangePath}}catch(i){this.engine.messageError("history-undo-op",i)}}}},{key:"getRedoOp",value:function(){var e=this.currentActionIndex;if(this.actionOps[e]){var t=v()(this.actionOps[e]),n=[];n="undo"===t.type?t.ops.map((function(e){return $n.inverse(e)})).reverse():t.ops;try{return{self:!0,ops:n,id:t.id,type:"redo",rangePath:t.rangePath,startRangePath:t.startRangePath}}catch(r){this.engine.messageError("history-redo-op",r)}}}},{key:"getCurrentRangePath",value:function(){var e=this.engine,t=e.model,n=e.change,r=t.selection.currentRangePath;return r||n.range.get().toPath()}},{key:"getRangePathBeforeCommand",value:function(){return this.engine.change.getRangePathBeforeCommand()||this.getCurrentRangePath()}}]),e}(),Yr=function(){function e(t){var n=this;(0,l.Z)(this,e),this.engine=void 0,this.disabled=!1,this.engine=t,this.engine.container.on("keydown",(function(e){return n.trigger(e)}))}return(0,c.Z)(e,[{key:"match",value:function(e){var t=this;Object.keys(this.engine.plugin.components).every((function(n){var r=t.engine.plugin.components[n];if(r.hotkey){var a,s=r.hotkey(e),l=!1,c=[];if("string"===typeof s&&(0,i.ZP)(s,e)?l=!0:Array.isArray(s)?s.some((function(t){if("string"===typeof t){if((0,i.ZP)(t,e))return l=!0,c=[],!0}else{var n=t.key,r=t.args;if((0,i.ZP)(n,e))return l=!0,c=Array.isArray(r)?r:[r],!0}return!1})):"object"===(0,o.Z)(s)&&(0,i.ZP)(s.key,e)&&(l=!0,c=Array.isArray(s.args)?s.args:[s.args]),l)return e.preventDefault(),(a=t.engine.command).execute.apply(a,[n].concat((0,C.Z)(c))),!1}return!0}))}},{key:"trigger",value:function(e){this.disabled||this.match(e)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"destroy",value:function(){this.engine.container.off("keydown",this.trigger)}}]),e}(),Xr=function(){function e(t){(0,l.Z)(this,e),this.type="keydown",this.hotkey="",this.listeners=[],this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"on",value:function(e){this.listeners.push(e)}},{key:"unshiftOn",value:function(e){this.listeners.unshift(e)}},{key:"off",value:function(e){for(var t=0;t<this.listeners.length;t++)if(this.listeners[t]===e){this.listeners.splice(t,1);break}}},{key:"trigger",value:function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t],r=n(e);if(!1===r)break}}},{key:"destroy",value:function(){this.listeners=[]}}]),e}(),Jr=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keydown",e.hotkey="backspace",e}return(0,c.Z)(n,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.container,i=n.range.get();if(n.cacheRangeBeforeCommand(),n.isEmpty())return e.preventDefault(),r.empty(),void n.initValue();var o=i.commonAncestorNode,a=this.engine.card.find(o,!0),s=(null===a||void 0===a?void 0:a.isEditable)&&(null===a||void 0===a?void 0:a.getSelectionNodes)?a.getSelectionNodes():[];if(s.length>0)return s.forEach((function(e){e.html("<p></br ></p>")})),void n.apply(i.cloneRange().select(s[0],!0).collapse(!0));var l=i.startNode,c=i.startOffset;if(l.isEditable()){var A=l[0].childNodes[c-1],u=Ut(A);if("br"===u.name)return e.preventDefault(),u.remove(),void n.apply(i)}for(var d=!0,h=0;h<this.listeners.length;h++){var p=this.listeners[h];if(d=p(e),!1===d)break}if(!1!==d){if(!i.collapsed){e.preventDefault();var f=l.prev();"br"===(null===f||void 0===f?void 0:f.name)&&f.remove(),n.delete(i);var g=i.startNode.prev();return(null===g||void 0===g?void 0:g.isCard())&&0===g.find(Be).length&&g.remove(),n.apply(i),void(this.engine.scrollNode&&i.scrollIntoViewIfNeeded(this.engine.container,this.engine.scrollNode))}var m,v=void 0;if(this.engine.node.isBlock(l)){var b=l[0].childNodes[c-1];v=Ut(b)}else"br"===l.name&&(v=l);if("br"===(null===(m=v)||void 0===m?void 0:m.name)){var y=v.prev(),w=v.next(),x=null===w||void 0===w?void 0:w.next(),k=null===y||void 0===y?void 0:y.prev();"br"!==(null===y||void 0===y?void 0:y.name)&&"br"===(null===w||void 0===w?void 0:w.name)&&"br"!==(null===x||void 0===x?void 0:x.name)?(e.preventDefault(),v.remove(),w.remove(),n.apply(i.shrinkToTextNode())):"br"!==(null===w||void 0===w?void 0:w.name)&&"br"===(null===y||void 0===y?void 0:y.name)&&"br"!==(null===k||void 0===k?void 0:k.name)&&(e.preventDefault(),v.remove(),y.remove(),n.apply(i.shrinkToTextNode()))}}else this.engine.scrollNode&&i.scrollIntoViewIfNeeded(this.engine.container,this.engine.scrollNode)}}]),n}(Xr),ei=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keydown",e.hotkey="delete",e}return(0,c.Z)(n,[{key:"getNext",value:function(e){var t,n=null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode;return Ut(e).isEditable()?null:e.nextSibling?e.nextSibling:null===n?null:this.getNext(n)}},{key:"getRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Ut(e).isEditable())return null;if(!t){var n=this.getNext(e);if(!n)return null;e=n}while(e){var r=Ut(e);if(r.attributes(fe)){if(!e.ownerDocument)return null;var i=$t.create(this.engine,e.ownerDocument);return i.setStartAfter(e),i.collapse(!0),i}if(this.engine.node.isBlock(r)){if(!e.ownerDocument)return null;var o=$t.create(this.engine,e.ownerDocument);return o.select(r,!0).collapse(!0),o}if("br"===r.name){var a,s;if(1===(null===(a=null!==(s=e.parentElement)&&void 0!==s?s:e.parentNode)||void 0===a?void 0:a.childNodes.length))return null;if(!e.ownerDocument)return null;var l=$t.create(this.engine,e.ownerDocument);return l.setStartAfter(e),l.collapse(!0),l}if(e.nodeType===Node.TEXT_NODE){if(0===e["data"].length)return this.getRange(e);if(!e.ownerDocument)return null;var c=$t.create(this.engine,e.ownerDocument);return c.setStart(e,1),c.collapse(!0),c}if(0===e.childNodes.length)return this.getRange(e);e=e.childNodes[0]}return null}},{key:"trigger",value:function(e){var t=this.engine.change;t.cacheRangeBeforeCommand();var n=t.range.get();if(!n.collapsed)return e.preventDefault(),void t.delete();var r,i=this.engine.card.find(n.startNode),o=!1;if(i){if(i.isLeftCursor(n.startNode))return e.preventDefault(),this.engine.card.select(i),void t.delete();if(!i.isRightCursor(n.startNode))return;r=i.root[0]}else if(n.endContainer.nodeType===Node.TEXT_NODE){if(n.endContainer["data"].length>n.endOffset){e.preventDefault();var a=n.cloneRange();return a.setEnd(n.endContainer,n.endOffset+1),t.range.select(a),t.delete(),void t.range.select(t.range.get().shrinkToTextNode())}r=n.endContainer}else{if(n.endContainer.nodeType!==Node.ELEMENT_NODE)return;if(0===n.endContainer.childNodes.length)r=n.endContainer;else if(0===n.endOffset){var s;1===n.endContainer.childNodes.length&&"BR"===(null===(s=n.endContainer.firstChild)||void 0===s?void 0:s.nodeName)||(o=!0),r=n.endContainer.childNodes[n.endOffset]}else r=n.endContainer.childNodes[n.endOffset-1]}var l=this.getRange(r,o);if(l){e.preventDefault();var c=n.startOffset;1===c&&1===n.startContainer.childNodes.length&&"BR"===n.startContainer.childNodes[0].nodeName&&(c=0),l.setStart(n.startContainer,c),t.range.select(l),t.delete()}for(var A=0;A<this.listeners.length;A++){var u=this.listeners[A],d=u(e);if(!1===d)break}}}]),n}(Xr),ti=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keydown",e.hotkey="enter",e}return(0,c.Z)(n,[{key:"trigger",value:function(e){var t=this.engine.change;t.cacheRangeBeforeCommand();var n=t.range.get(),r=this.engine.block.closest(n.endNode);r.isEditable()&&this.engine.block.wrap("<p />");for(var i=0;i<this.listeners.length;i++){var o=this.listeners[i],a=o(e);if(!1===a)break}this.engine.scrollNode&&this.engine.change.range.get().scrollIntoViewIfNeeded(this.engine.container,this.engine.scrollNode),this.engine.trigger("select")}}]),n}(Xr),ni=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keydown",e.hotkey="tab",e}return(0,c.Z)(n,[{key:"trigger",value:function(e){var t=this.engine.node;e.preventDefault(),t.insertText(" ")}}]),n}(Xr),ri=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey="shift+tab",e}return(0,c.Z)(n)}(Xr),ii=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keydown",e.hotkey="shift+enter",e}return(0,c.Z)(n,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.inline,i=t.block;e.preventDefault(),n.cacheRangeBeforeCommand();var o,a=n.range.get();if(0!==a.startNode.closest("li").length){var s,l,c=Ut("<br />");if(r.insert(c,a),i.isLastOffset(a,"end")&&(!c.next()||"br"!==(null===(s=c.next())||void 0===s?void 0:s.name))&&(!c.prev()||"br"!==(null===(l=c.prev())||void 0===l?void 0:l.name))){var A=c.clone();c.after(A),a.select(A).collapse(!1)}for(var u=0;u<this.listeners.length;u++){var d=this.listeners[u],h=d(e);if(!1===h)break}n.apply(a),this.engine.scrollNode&&this.engine.change.range.get().scrollIntoViewIfNeeded(this.engine.container,this.engine.scrollNode)}else null===(o=this.engine.typing.getHandleListener("enter","keydown"))||void 0===o||o.trigger(e)}}]),n}(Xr),oi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey=function(e){return" "===e.key},e}return(0,c.Z)(n)}(Xr),ai=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.hotkey=function(e){return"/"===e.key||(0,i.ZP)("/",e)||229===e.keyCode&&"Slash"===e.code},e}return(0,c.Z)(n)}(Xr),si=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey="mod+a",e}return(0,c.Z)(n)}(Xr),li=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.type="keydown",e.hotkey=function(e){return(0,i.ZP)("left",e)||(0,i.ZP)("shift+left",e)||(0,i.ZP)("ctrl+a",e)||(0,i.ZP)("ctrl+b",e)},e}return(0,c.Z)(n)}(Xr),ci=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.type="keydown",e.hotkey=function(e){return(0,i.ZP)("right",e)||(0,i.ZP)("shift+right",e)||(0,i.ZP)("ctrl+e",e)||(0,i.ZP)("ctrl+f",e)},e}return(0,c.Z)(n)}(Xr),Ai=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.hotkey=function(e){return(0,i.ZP)("up",e)||(0,i.ZP)("ctrl+p",e)},e}return(0,c.Z)(n)}(Xr),ui=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.hotkey=function(e){return(0,i.ZP)("down",e)||(0,i.ZP)("ctrl+n",e)},e}return(0,c.Z)(n)}(Xr),di=[{name:"default",handle:Xr},{name:"enter",handle:ti,triggerName:"keydown:enter"},{name:"backspace",handle:Jr,triggerName:"keydown:backspace"},{name:"delete",handle:ei,triggerName:"keydown:delete"},{name:"tab",handle:ni,triggerName:"keydown:tab"},{name:"shift-tab",handle:ri,triggerName:"keydown:shift-tab"},{name:"shift-enter",handle:ii,triggerName:"keydown:shift-enter"},{name:"space",handle:oi,triggerName:"keydown:space"},{name:"slash",handle:ai,triggerName:"keydown:slash"},{name:"all",handle:si,triggerName:"keydown:all"},{name:"left",handle:li,triggerName:"keydown:left"},{name:"right",handle:ci,triggerName:"keydown:right"},{name:"up",handle:Ai,triggerName:"keydown:up"},{name:"down",handle:ui,triggerName:"keydown:down"}],hi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keyup",e}return(0,c.Z)(n)}(Xr),pi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey="enter",e}return(0,c.Z)(n)}(hi),fi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.type="keyup",e.hotkey="backspace",e}return(0,c.Z)(n,[{key:"trigger",value:function(e){var t=this.engine.change;if(t.isEmpty())e.preventDefault();else for(var n=!0,r=0;r<this.listeners.length;r++){var i=this.listeners[r];if(n=i(e),!1===n)break}}}]),n}(hi),gi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey="tab",e}return(0,c.Z)(n)}(hi),mi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.hotkey=function(e){return" "===e.key},e}return(0,c.Z)(n)}(hi),vi=[{name:"default",handle:hi},{name:"enter",handle:pi,triggerName:"keyup:enter"},{name:"backspace",handle:fi,triggerName:"keyup:backspace"},{name:"tab",handle:gi,triggerName:"keyup:tab"},{name:"space",handle:mi,triggerName:"keyup:space"}],bi=function(){function e(t){var n=this;(0,l.Z)(this,e),this.engine=void 0,this.handleListeners=[],this.bindKeydown=function(e){var t=n.engine,r=t.readonly,o=t.card;r?(0,i.ZP)("mod+a",e)&&e.preventDefault():e.target&&o.find(Ut(e.target))||n.trigger("keydown",e)},this.bindKeyup=function(e){var t=n.engine,r=t.readonly,i=t.card;r||e.target&&i.find(Ut(e.target))||n.trigger("keyup",e)},this.engine=t,di.concat(vi).forEach((function(e){n.addHandleListener(e.name,e.handle,e.triggerName)}));var r=t.container;r.on("keydown",this.bindKeydown),r.on("keyup",this.bindKeyup)}return(0,c.Z)(e,[{key:"addHandleListener",value:function(e,t,n,r){this.handleListeners.push({name:e,handle:new t(this.engine),triggerName:n,triggerParams:r})}},{key:"getHandleListener",value:function(e,t){var n;return null===(n=this.handleListeners.find((function(n){return n.name===e&&n.handle.type===t})))||void 0===n?void 0:n.handle}},{key:"removeHandleListener",value:function(e,t){for(var n=0;n<this.handleListeners.length;n++)if(this.handleListeners[n].name===e&&this.handleListeners[n].handle.type===t){this.handleListeners[n].handle.destroy(),this.handleListeners.splice(n,1);break}}},{key:"trigger",value:function(e,t){var n,r=this,o=this.handleListeners.filter((function(t){var n=t.handle;return n.type===e})).some((function(e){var n=e.name,o=e.handle,a=e.triggerName,s=e.triggerParams;if("default"===n||!o.hotkey)return!1;if("function"===typeof o.hotkey?o.hotkey(t):(0,i.ZP)(o.hotkey,t)){var l,c=[t];return"function"===typeof s&&(c=s(r.engine,t)),a&&!1===(l=r.engine).trigger.apply(l,[a].concat((0,C.Z)(c)))||o.trigger(t),!0}return!1}));!1===o&&!1!==this.engine.trigger(e+":default",t)&&(null===(n=this.getHandleListener("default",e))||void 0===n||n.trigger(t))}},{key:"destroy",value:function(){var e=this.engine.container;this.handleListeners=[],e.off("keydown",this.bindKeydown),e.off("keyup",this.bindKeyup)}}]),e}(),yi="data-placeholder",wi="am-engine-placeholder",xi=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.options=void 0,this.node=void 0,this._focused=!1,this._setFocus=function(){r._focused=!0},this._setBlur=function(){r._focused=!1},this.handleClick=function(e){var t=r.options,n=t.engine,i=t.autoAppend,o=t.autoPrepend;if(e.target&&!n.readonly&&st(n)){var a,s,l,c=Ut(e.target);if(!c.isEditable())return;var A=Ut("<p><br /></p>"),u=c.closest("".concat(ne,",").concat(X)),d=u.first();d||n.change.initValue(void 0,!0,c);var h=u.last(),p=!1;if(!1!==o&&d&&e.offsetY<((null===(a=d.get())||void 0===a?void 0:a.offsetTop)||0)&&!n.node.isEmptyWidthChild(d)?(u.prepend(A),p=!0):!1!==i&&h&&e.offsetY>((null===(s=h.get())||void 0===s?void 0:s.offsetTop)||0)+((null===(l=h.get())||void 0===l?void 0:l.clientHeight)||0)&&!n.node.isEmptyWidthChild(h)&&(u.append(A),p=!0),p){var f=n.change.range.get();f.select(A,!0).collapse(!1),n.change.apply(f)}}},this.handleFocus=function(){var e=r.options.engine;r.triggerFoucs(),!e.model.mutation.isStopped&&e.isEmpty()&&e.change.initValue()},this.focusTimeout=null,this.triggerFoucs=function(){var e=r.options.engine;r.focusTimeout&&clearTimeout(r.focusTimeout),r.focusTimeout=setTimeout((function(){if(!r._focused){var t=e.change.range.get();(t.commonAncestorNode.isRoot(e.container)||t.commonAncestorNode.inEditor(e.container))&&(e.change.range.setLastBlurRange(),e.trigger("focus"))}}),0)},this.onInput=function(e){var t=r.options.engine;if(!t.readonly&&(!e.target||!t.card.find(Ut(e.target)))){var n=t.change.range.get();n.handleBr(!0)}},this.onRealtimeChange=function(){var e=r.options.engine;e.isEmpty()?e.showPlaceholder():e.hidePlaceholder()},this.blurTimeout=null,this.docMouseDown=function(e){if(e.target){var t=Ut(e.target),n=r.options.engine;if(r._focused&&0===t.closest(ee).length&&!t.inEditor(n.container)){r.blurTimeout&&clearTimeout(r.blurTimeout);var i=n.change.range.get();r.blurTimeout=setTimeout((function(){var e=n.change.range.get();e.commonAncestorNode.inEditor(n.container)||(n.change.range.setLastBlurRange(i),n.trigger("blur"))}),0)}}},this.node=Ut(t),this.options=n,this._init(),this._focused=null!==document.activeElement&&this.node.equal(document.activeElement);var i=n.engine;i.on("blur",this._setBlur),i.on("focus",this._setFocus)}return(0,c.Z)(e,[{key:"_init",value:function(){var e,t=this,n=this.options,r=n.lang,i=n.tabIndex,o=n.className;this.node.attributes((e={},(0,x.Z)(e,Dt,"true"),(0,x.Z)(e,"role","textbox"),(0,x.Z)(e,"autocorrect","en-US"===r?"on":"off"),(0,x.Z)(e,"autocomplete","off"),(0,x.Z)(e,"spellcheck","en-US"===r?"true":"false"),(0,x.Z)(e,"data-gramm","false"),e)),void 0!==i&&this.node.attributes("tabindex",i),this.node.hasClass(oe)||this.node.addClass(oe),Ue&&this.node.addClass(ae),void 0!==o&&(Array.isArray(o)?o:o.split(/\s+/)).forEach((function(e){""!==e.trim()&&t.node.addClass(e)}))}},{key:"init",value:function(){var e=this.options.engine;this.node.on("input",this.onInput),e.on("realtimeChange",this.onRealtimeChange),this.node.on("click",this.handleClick),document.addEventListener("mousedown",this.docMouseDown),this.node.on(Ue?"touchstart":"mousedown",this.triggerFoucs,{passive:!0}),this.node.on("focus",this.handleFocus)}},{key:"isFocus",value:function(){return this._focused}},{key:"getNode",value:function(){return this.node}},{key:"setReadonly",value:function(e){this.node.attributes(Dt,e?"false":"true")}},{key:"showPlaceholder",value:function(){var e=this.options.placeholder;e&&(this.node.attributes((0,x.Z)({},yi,e)),this.node.addClass(wi))}},{key:"hidePlaceholder",value:function(){this.node.removeAttributes(yi),this.node.removeClass(wi)}},{key:"destroy",value:function(){var e=this,t=this.options,n=t.className,r=t.engine;r.on("blur",this._setBlur),r.on("focus",this._setFocus),r.off("realtimeChange",this.onRealtimeChange),document.removeEventListener("mousedown",this.docMouseDown),this.node.removeAttributes(Dt),this.node.removeAttributes("role"),this.node.removeAttributes("autocorrect"),this.node.removeAttributes("autocomplete"),this.node.removeAttributes("spellcheck"),this.node.removeAttributes("data-gramm"),this.node.removeAttributes("tabindex"),this.node.removeAttributes(yi),this.options.className&&(Array.isArray(n)?n:(n||"").split(/\s+/)).forEach((function(t){""!==t.trim()&&e.node.removeClass(t)})),r.card.closest(this.node)&&this.node.removeClass(oe),this.node.removeAllEvents()}}]),e}(),ki=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.Z)(this,e),this.data={},this.locale="zh-CN",this.locale=t,this.data=n}return(0,c.Z)(e,[{key:"add",value:function(e){this.data=O()(this.data,e)}},{key:"get",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function e(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0,i=n;i<t.length;i++){var a=r[t[i]];return"object"===(0,o.Z)(a)?e(i+1,a):a||""}return r};return r(0,this.data[this.locale])}}]),e}(),Ci={dnd:{title:"Drag to reposition"},copy:{title:"Copy",success:"Copied successfully",error:"Copy error"},delete:{title:"Delete"},copyAnchor:{title:"Copy anchor link"},link:{placeholder:"Please enter a link or anchor and press Enter to confirm",save:"Apply",edit:"Change",delete:"Remove link",open:"Open link",text:"link"},copyContent:{title:"copy content"},maximize:{title:"Maximize",back:"Back to document"},expand:{title:"Embedded preview"},collapse:{title:"Compact display"},card:{lockAlert:"Please wait for the other user to finish editing"},preferences:{title:"Preferences"},download:{title:"Download"},more:{title:"More"},checkMarkdown:{title:"It is detected that the paste content conforms to the Markdown syntax. Do you need to do style conversion?"},searchEmtpy:{title:"No matching card"}},Bi={dnd:{title:"拖动调整位置"},copy:{title:"复制",success:"复制成功",error:"复制失败"},delete:{title:"删除"},copyAnchor:{title:"复制锚点链接"},link:{placeholder:"请输入链接或锚点,回车确认",save:"保存",edit:"编辑",delete:"取消链接",open:"打开链接",text:"链接"},copyContent:{title:"复制内容"},maximize:{title:"最大化",back:"返回文档"},expand:{title:"嵌入预览"},collapse:{title:"紧凑展示"},card:{lockAlert:"请等待对方编辑完毕后,再进入编辑"},preferences:{title:"设置"},download:{title:"下载"},more:{title:"更多"},checkMarkdown:{title:"检测到粘贴内容符合 Markdown 语法,是否需要转换?"},searchEmtpy:{title:"无匹配卡片"}},_i={"en-US":Ci,"zh-CN":Bi},Ei=(0,c.Z)((function e(t,n){(0,l.Z)(this,e),this.editor=void 0,this.options=void 0,this.kind="plugin",this.name=this.constructor.pluginName,this.disabled=void 0,this.editor=t,this.options=n||{};var r=this.options.disabled;this.disabled=r}));Ei.pluginName=void 0;var Si=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.kind="element",e.sechamCache=void 0,e.tagName=void 0,e.style=void 0,e.attributes=void 0,e.variable=void 0,e}return(0,c.Z)(n,[{key:"init",value:function(){var e=this.editor,t=e.schema,n=e.conversion;t.add(this.schema()),this.conversion&&this.conversion().forEach((function(e){var t=e.from,r=e.to;n.add(t,r)}))}},{key:"setStyle",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];gt(e)&&(e=Ut(e)),this.style&&Object.keys(this.style).forEach((function(n){var i,a=t.style[n];"object"===(0,o.Z)(a)&&(a=a.value),null===(i=a.match(/@var\d/g))||void 0===i||i.forEach((function(e){var t=parseInt(e.replace("@var",""),10);a=a.replace(new RegExp(e,"gm"),r[t]||"")})),e.css(n,a)}))}},{key:"setAttributes",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];gt(e)&&(e=Ut(e)),this.attributes&&Object.keys(this.attributes).forEach((function(n){var i,a=t.attributes[n];"object"===(0,o.Z)(a)&&(a=a.value),null===(i=a.match(/@var\d/g))||void 0===i||i.forEach((function(e){var t=parseInt(e.replace("@var",""),10);a=a.replace(new RegExp(e,"gm"),r[t]||"")})),e.attributes(n,a)}))}},{key:"getStyle",value:function(e){var t=this;gt(e)&&(e=Ut(e));var n={};return this.style&&this.isSelf(e)&&Object.keys(this.style).forEach((function(r){var i=r.toLowerCase().indexOf("color")>-1?(0,B.Vi)(e.css(r)||"").toHex():e.css(r),a=t.style[r];"object"===(0,o.Z)(a)&&(i=a.format(i)),i&&(n[r]=i)})),n}},{key:"getAttributes",value:function(e){var t=this;gt(e)&&(e=Ut(e));var n={};return this.attributes&&this.isSelf(e)&&Object.keys(this.attributes).forEach((function(r){var i=e.attributes(r),a=t.attributes[r];"object"===(0,o.Z)(a)&&(i=a.format(i)),i&&(n[r]=i)})),n}},{key:"isSelf",value:function(e){gt(e)&&(e=Ut(e));var t=this.schema();return Array.isArray(t)&&(t=t.find((function(t){var n=t.name;return n===e.name}))),!!t&&((Array.isArray(this.tagName)?this.tagName.indexOf(e.name)>-1:e.name===this.tagName)&&this.editor.schema.checkNode(e,t.attributes))}},{key:"schema",value:function(){var e=this;if(this.sechamCache)return this.sechamCache;var t={};if(this.attributes&&Object.keys(this.attributes).forEach((function(n){var r,i=e.attributes[n];"object"===(0,o.Z)(i)&&(i=i.value),t[n]=i,null===(r=i.match(/@var\d/g))||void 0===r||r.forEach((function(r){if(!e.variable)throw"Please specify the variable type";t[n]=e.variable[r]}))})),this.style){var n={};Object.keys(this.style).forEach((function(t){var r,i=e.style[t];"object"===(0,o.Z)(i)&&(i=i.value),null===(r=i.match(/@var\d/g))||void 0===r||r.forEach((function(r){if(!e.variable)throw"Please specify the variable type";n[t]=e.variable[r]}))})),t=(0,s.Z)((0,s.Z)({},t),{},{style:n})}if(this.sechamCache={type:this.kind,attributes:t},"string"===typeof this.tagName)this.sechamCache.name=this.tagName.toLowerCase();else if(Array.isArray(this.tagName)){var r=[];this.tagName.forEach((function(t){r.push((0,s.Z)((0,s.Z)({},e.sechamCache),{},{name:t}))})),this.sechamCache=r}return this.sechamCache}},{key:"createElement",value:function(){for(var e=Ut("<".concat(this.tagName," />")),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.setStyle.apply(this,[e].concat(n)),this.setAttributes.apply(this,[e].concat(n)),e}}]),n}(Ei),Fi=function(e){return"element"===e.kind},Ti=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.kind="block",e.allowIn=void 0,e.disableMark=void 0,e.canMerge=void 0,e}return(0,c.Z)(n,[{key:"schema",value:function(){var e=this,t=(0,u.Z)((0,d.Z)(n.prototype),"schema",this).call(this);return Array.isArray(t)?t.map((function(t){return(0,s.Z)((0,s.Z)({},t),{},{allowIn:e.allowIn})})):(0,s.Z)((0,s.Z)({},t),{},{allowIn:this.allowIn,canMerge:this.canMerge})}}]),n}(Si),Mi=function(e){return"block"===e.kind},Ii=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.kind="inline",e.markdown=void 0,e}return(0,c.Z)(n,[{key:"execute",value:function(){var e=this.editor;if(st(e)){for(var t=Ut("<".concat(this.tagName," />")),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];this.setStyle.apply(this,[t].concat(r)),this.setAttributes.apply(this,[t].concat(r));var o=e.inline,a=this.isTrigger?this.isTrigger.apply(this,r):!this.queryState();a?o.wrap(t):o.unwrap()}}},{key:"queryState",value:function(){var e=this,t=this.editor;if(st(t)){var n=t.change;if(!this.style&&!this.attributes)return n.inlines.some((function(t){return t.name===e.tagName}));var r=[];return n.inlines.forEach((function(t){r.push.apply(r,(0,C.Z)(Object.values(e.getStyle(t)))),r.push.apply(r,(0,C.Z)(Object.values(e.getAttributes(t))))})),0===r.length?void 0:r}}}]),n}(Si),Ni=function(e){return"inline"===e.kind},Ui='.am-engine ol, .am-engine-view ol, .am-engine ul, .am-engine-view ul {\n margin: 0 0 0 3px;\n padding: 0;\n list-style: none;\n}\n\n.am-engine ol ul,.am-engine-view ol ul,.am-engine ul ul,.am-engine-view ul ul,.am-engine ol ol,.am-engine-view ol ol,.am-engine ul ol,.am-engine-view ul ol {\n\tmargin-left: 0;\n}\n\n.am-engine ol ul li,.am-engine-view ol ul li,.am-engine ul ul li,.am-engine-view ul ul li,.am-engine ol ol li,.am-engine-view ol ol li,.am-engine ul ol li,.am-engine-view ul ol li {\n\tmargin-left: 2em;\n}\n\n.am-engine ol ol[data-indent-new="0"],.am-engine-view ol ol[data-indent-new="0"],.am-engine ul ol[data-indent-new="0"],.am-engine-view ul ol[data-indent-new="0"],.am-engine ol ol[data-indent-new="3"],.am-engine-view ol ol[data-indent-new="3"],.am-engine ul ol[data-indent-new="3"],.am-engine-view ul ol[data-indent-new="3"],.am-engine ol ol[data-indent-new="6"],.am-engine-view ol ol[data-indent-new="6"],.am-engine ul ol[data-indent-new="6"],.am-engine-view ul ol[data-indent-new="6"],.am-engine ol ol[data-indent-new="6"],.am-engine ol ol[data-indent-new="9"],.am-engine-view ol ol[data-indent-new="9"],.am-engine ul ol[data-indent-new="9"],.am-engine-view ul ol[data-indent-new="9"],.am-engine ol ol[data-indent-new="12"],.am-engine-view ol ol[data-indent-new="12"],.am-engine ul ol[data-indent-new="12"],.am-engine-view ul ol[data-indent-new="12"],.am-engine ol ol[data-indent-new="15"],.am-engine-view ol ol[data-indent-new="15"],.am-engine ul ol[data-indent-new="15"],.am-engine-view ul ol[data-indent-new="15"],.am-engine ol ol[data-indent-new="18"],.am-engine-view ol ol[data-indent-new="18"],.am-engine ul ol[data-indent-new="18"],.am-engine-view ul ol[data-indent-new="18"] {\n\tlist-style-type: decimal;\n}\n\n.am-engine ol ol[data-indent-new="1"],.am-engine-view ol ol[data-indent-new="1"],.am-engine ul ol[data-indent-new="1"],.am-engine-view ul ol[data-indent-new="1"],.am-engine ol ol[data-indent-new="4"],.am-engine-view ol ol[data-indent-new="4"],.am-engine ul ol[data-indent-new="4"],.am-engine-view ul ol[data-indent-new="4"],.am-engine ol ol[data-indent-new="7"],.am-engine-view ol ol[data-indent-new="7"],.am-engine ul ol[data-indent-new="7"],.am-engine-view ul ol[data-indent-new="7"],.am-engine ol ol[data-indent-new="10"],.am-engine-view ol ol[data-indent-new="10"],.am-engine ul ol[data-indent-new="10"],.am-engine-view ul ol[data-indent-new="10"],.am-engine ol ol[data-indent-new="13"],.am-engine-view ol ol[data-indent-new="13"],.am-engine ul ol[data-indent-new="13"],.am-engine-view ul ol[data-indent-new="13"],.am-engine ol ol[data-indent-new="16"],.am-engine-view ol ol[data-indent-new="16"],.am-engine ul ol[data-indent-new="16"],.am-engine-view ul ol[data-indent-new="16"],.am-engine ol ol[data-indent-new="19"],.am-engine-view ol ol[data-indent-new="19"],.am-engine ul ol[data-indent-new="19"],.am-engine-view ul ol[data-indent-new="19"] {\n\tlist-style-type: lower-alpha;\n}\n\n.am-engine ol ol[data-indent-new="2"],.am-engine-view ol ol[data-indent-new="2"],.am-engine ul ol[data-indent-new="2"],.am-engine-view ul ol[data-indent-new="2"],.am-engine ol ol[data-indent-new="5"],.am-engine-view ol ol[data-indent-new="5"],.am-engine ul ol[data-indent-new="5"],.am-engine-view ul ol[data-indent-new="5"],.am-engine ol ol[data-indent-new="8"],.am-engine-view ol ol[data-indent-new="8"],.am-engine ul ol[data-indent-new="8"],.am-engine-view ul ol[data-indent-new="8"],.am-engine ol ol[data-indent-new="11"],.am-engine-view ol ol[data-indent-new="11"],.am-engine ul ol[data-indent-new="11"],.am-engine-view ul ol[data-indent-new="11"],.am-engine ol ol[data-indent-new="14"],.am-engine-view ol ol[data-indent-new="14"],.am-engine ul ol[data-indent-new="14"],.am-engine-view ul ol[data-indent-new="14"],.am-engine ol ol[data-indent-new="17"],.am-engine-view ol ol[data-indent-new="17"],.am-engine ul ol[data-indent-new="17"],.am-engine-view ul ol[data-indent-new="17"],.am-engine ol ol[data-indent-new="20"],.am-engine-view ol ol[data-indent-new="20"],.am-engine ul ol[data-indent-new="20"],.am-engine-view ul ol[data-indent-new="20"] {\n\tlist-style-type: lower-roman;\n}\n\n.am-engine ol ul[data-indent-new="3"],.am-engine-view ol ul[data-indent-new="3"],.am-engine ul ul[data-indent-new="3"],.am-engine-view ul ul[data-indent-new="3"],.am-engine ol ul[data-indent-new="6"],.am-engine-view ol ul[data-indent-new="6"],.am-engine ul ul[data-indent-new="6"],.am-engine-view ul ul[data-indent-new="6"],.am-engine ol ul[data-indent-new="9"],.am-engine-view ol ul[data-indent-new="9"],.am-engine ul ul[data-indent-new="9"],.am-engine-view ul ul[data-indent-new="9"],.am-engine ol ul[data-indent-new="12"],.am-engine-view ol ul[data-indent-new="12"],.am-engine ul ul[data-indent-new="12"],.am-engine-view ul ul[data-indent-new="12"],.am-engine ol ul[data-indent-new="15"],.am-engine-view ol ul[data-indent-new="15"],.am-engine ul ul[data-indent-new="15"],.am-engine-view ul ul[data-indent-new="15"],.am-engine ol ul[data-indent-new="18"],.am-engine-view ol ul[data-indent-new="18"],.am-engine ul ul[data-indent-new="18"],.am-engine-view ul ul[data-indent-new="18"] {\n\tlist-style-type: disc;\n}\n\n.am-engine ol ul[data-indent-new="1"],.am-engine-view ol ul[data-indent-new="1"],.am-engine ul ul[data-indent-new="1"],.am-engine-view ul ul[data-indent-new="1"],.am-engine ol ul[data-indent-new="4"],.am-engine-view ol ul[data-indent-new="4"],.am-engine ul ul[data-indent-new="4"],.am-engine-view ul ul[data-indent-new="4"],.am-engine ol ul[data-indent-new="7"],.am-engine-view ol ul[data-indent-new="7"],.am-engine ul ul[data-indent-new="7"],.am-engine-view ul ul[data-indent-new="7"],.am-engine ol ul[data-indent-new="10"],.am-engine-view ol ul[data-indent-new="10"],.am-engine ul ul[data-indent-new="10"],.am-engine-view ul ul[data-indent-new="10"],.am-engine ol ul[data-indent-new="13"],.am-engine-view ol ul[data-indent-new="13"],.am-engine ul ul[data-indent-new="13"],.am-engine-view ul ul[data-indent-new="13"],.am-engine ol ul[data-indent-new="16"],.am-engine-view ol ul[data-indent-new="16"],.am-engine ul ul[data-indent-new="16"],.am-engine-view ul ul[data-indent-new="16"],.am-engine ol ul[data-indent-new="19"],.am-engine-view ol ul[data-indent-new="19"],.am-engine ul ul[data-indent-new="19"],.am-engine-view ul ul[data-indent-new="19"] {\n\tlist-style-type: circle;\n}\n\n.am-engine ol ul[data-indent-new="2"],.am-engine-view ol ul[data-indent-new="2"],.am-engine ul ul[data-indent-new="2"],.am-engine-view ul ul[data-indent-new="2"],.am-engine ol ul[data-indent-new="5"],.am-engine-view ol ul[data-indent-new="5"],.am-engine ul ul[data-indent-new="5"],.am-engine-view ul ul[data-indent-new="5"],.am-engine ol ul[data-indent-new="8"],.am-engine-view ol ul[data-indent-new="8"],.am-engine ul ul[data-indent-new="8"],.am-engine-view ul ul[data-indent-new="8"],.am-engine ol ul[data-indent-new="11"],.am-engine-view ol ul[data-indent-new="11"],.am-engine ul ul[data-indent-new="11"],.am-engine-view ul ul[data-indent-new="11"],.am-engine ol ul[data-indent-new="14"],.am-engine-view ol ul[data-indent-new="14"],.am-engine ul ul[data-indent-new="14"],.am-engine-view ul ul[data-indent-new="14"],.am-engine ol ul[data-indent-new="17"],.am-engine-view ol ul[data-indent-new="17"],.am-engine ul ul[data-indent-new="17"],.am-engine-view ul ul[data-indent-new="17"],.am-engine ol ul[data-indent-new="20"],.am-engine-view ol ul[data-indent-new="20"],.am-engine ul ul[data-indent-new="20"],.am-engine-view ul ul[data-indent-new="20"] {\n\tlist-style-type: square;\n}\n\n.am-engine li,.am-engine-view li {\n\tmargin-left: 23px;\n position: relative;\n}\n\n.am-engine ol,.am-engine-view ol,.am-engine ol[data-indent="3"],.am-engine-view ol[data-indent="3"],.am-engine ol[data-indent="6"],.am-engine-view ol[data-indent="6"],.am-engine ol[data-indent="9"],.am-engine-view ol[data-indent="9"],.am-engine ol[data-indent="12"],.am-engine-view ol[data-indent="12"],.am-engine ol[data-indent="15"],.am-engine-view ol[data-indent="15"],.am-engine ol[data-indent="18"],.am-engine-view ol[data-indent="18"] {\n\tlist-style-type: decimal;\n}\n\n.am-engine ol[data-indent="1"],.am-engine-view ol[data-indent="1"],.am-engine ol[data-indent="4"],.am-engine-view ol[data-indent="4"],.am-engine ol[data-indent="7"],.am-engine-view ol[data-indent="7"],.am-engine ol[data-indent="10"],.am-engine-view ol[data-indent="10"],.am-engine ol[data-indent="13"],.am-engine-view ol[data-indent="13"],.am-engine ol[data-indent="16"],.am-engine-view ol[data-indent="16"],.am-engine ol[data-indent="19"],.am-engine-view ol[data-indent="19"] {\n\tlist-style-type: lower-alpha;\n}\n\n.am-engine ol[data-indent="2"],.am-engine-view ol[data-indent="2"],.am-engine ol[data-indent="5"],.am-engine-view ol[data-indent="5"],.am-engine ol[data-indent="8"],.am-engine-view ol[data-indent="8"],.am-engine ol[data-indent="11"],.am-engine-view ol[data-indent="11"],.am-engine ol[data-indent="14"],.am-engine-view ol[data-indent="14"],.am-engine ol[data-indent="17"],.am-engine-view ol[data-indent="17"],.am-engine ol[data-indent="20"],.am-engine-view ol[data-indent="20"] {\n\tlist-style-type: lower-roman;\n}\n\n.am-engine ul,.am-engine-view ul,.am-engine ul[data-indent="3"],.am-engine-view ul[data-indent="3"],.am-engine ul[data-indent="6"],.am-engine-view ul[data-indent="6"],.am-engine ul[data-indent="9"],.am-engine-view ul[data-indent="9"],.am-engine ul[data-indent="12"],.am-engine-view ul[data-indent="12"],.am-engine ul[data-indent="15"],.am-engine-view ul[data-indent="15"],.am-engine ul[data-indent="18"],.am-engine-view ul[data-indent="18"] {\n\tlist-style-type: disc;\n}\n\n.am-engine ul[data-indent="1"],.am-engine-view ul[data-indent="1"],.am-engine ul[data-indent="4"],.am-engine-view ul[data-indent="4"],.am-engine ul[data-indent="7"],.am-engine-view ul[data-indent="7"],.am-engine ul[data-indent="10"],.am-engine-view ul[data-indent="10"],.am-engine ul[data-indent="13"],.am-engine-view ul[data-indent="13"],.am-engine ul[data-indent="16"],.am-engine-view ul[data-indent="19"],.am-engine ul[data-indent="19"],.am-engine-view ul[data-indent="19"] {\n\tlist-style-type: circle;\n}\n\n.am-engine ul[data-indent="2"],.am-engine-view ul[data-indent="2"],.am-engine ul[data-indent="5"],.am-engine-view ul[data-indent="5"],.am-engine ul[data-indent="8"],.am-engine-view ul[data-indent="8"],.am-engine ul[data-indent="11"],.am-engine-view ul[data-indent="11"],.am-engine ul[data-indent="14"],.am-engine-view ul[data-indent="14"],.am-engine ul[data-indent="17"],.am-engine-view ul[data-indent="17"],.am-engine ul[data-indent="20"],.am-engine-view ul[data-indent="20"] {\n\tlist-style-type: square;\n}\n\n.am-engine ol[data-indent="1"],.am-engine-view ol[data-indent="1"],.am-engine ul[data-indent="1"],.am-engine-view ul[data-indent="1"] {\n\tpadding-left: 2em;\n}\n\n.am-engine ol[data-indent="2"],.am-engine-view ol[data-indent="2"],.am-engine ul[data-indent="2"],.am-engine-view ul[data-indent="2"] {\n\tpadding-left: 4em;\n}\n\n.am-engine ol[data-indent="3"],.am-engine-view ol[data-indent="3"],.am-engine ul[data-indent="3"],.am-engine-view ul[data-indent="3"] {\n\tpadding-left: 6em;\n}\n\n.am-engine ol[data-indent="4"],.am-engine-view ol[data-indent="4"],.am-engine ul[data-indent="4"],.am-engine-view ul[data-indent="4"] {\n\tpadding-left: 8em;\n}\n\n.am-engine ol[data-indent="5"],.am-engine-view ol[data-indent="5"],.am-engine ul[data-indent="5"],.am-engine-view ul[data-indent="5"] {\n\tpadding-left: 10em;\n}\n\n.am-engine ol[data-indent="6"],.am-engine-view ol[data-indent="6"],.am-engine ul[data-indent="6"],.am-engine-view ul[data-indent="6"] {\n\tpadding-left: 12em;\n}\n\n.am-engine ol[data-indent="7"],.am-engine-view ol[data-indent="7"],.am-engine ul[data-indent="7"],.am-engine-view ul[data-indent="7"] {\n\tpadding-left: 14em;\n}\n\n.am-engine ol[data-indent="8"],.am-engine-view ol[data-indent="8"],.am-engine ul[data-indent="8"],.am-engine-view ul[data-indent="8"] {\n\tpadding-left: 16em;\n}\n\n.am-engine ol[data-indent="8"],.am-engine-view ol[data-indent="8"],.am-engine ul[data-indent="8"],.am-engine-view ul[data-indent="8"] {\n\tpadding-left: 16em;\n}\n\n.am-engine ol[data-indent="9"],.am-engine-view ol[data-indent="9"],.am-engine ul[data-indent="9"],.am-engine-view ul[data-indent="9"] {\n\tpadding-left: 18em;\n}\n\n.am-engine ol[data-indent="10"],.am-engine-view ol[data-indent="10"],.am-engine ul[data-indent="10"],.am-engine-view ul[data-indent="10"] {\n\tpadding-left: 20em;\n}\n.am-engine ol[data-indent="11"],.am-engine-view ol[data-indent="11"],.am-engine ul[data-indent="11"],.am-engine-view ul[data-indent="11"] {\n\tpadding-left: 22em;\n}\n\n.am-engine ol[data-indent="12"],.am-engine-view ol[data-indent="12"],.am-engine ul[data-indent="8"],.am-engine-view ul[data-indent="12"] {\n\tpadding-left: 24em;\n}\n\n.am-engine ol[data-indent="13"],.am-engine-view ol[data-indent="13"],.am-engine ul[data-indent="13"],.am-engine-view ul[data-indent="13"] {\n\tpadding-left: 26em;\n}\n\n.am-engine ol[data-indent="14"],.am-engine-view ol[data-indent="14"],.am-engine ul[data-indent="14"],.am-engine-view ul[data-indent="14"] {\n\tpadding-left: 28em;\n}\n\n.am-engine ol[data-indent="15"],.am-engine-view ol[data-indent="15"],.am-engine ul[data-indent="15"],.am-engine-view ul[data-indent="15"] {\n\tpadding-left: 30em;\n}\n.am-engine ol[data-indent="16"],.am-engine-view ol[data-indent="16"],.am-engine ul[data-indent="16"],.am-engine-view ul[data-indent="16"] {\n\tpadding-left: 32em;\n}\n.am-engine ol[data-indent="17"],.am-engine-view ol[data-indent="17"],.am-engine ul[data-indent="17"],.am-engine-view ul[data-indent="17"] {\n\tpadding-left: 34em;\n}\n.am-engine ol[data-indent="18"],.am-engine-view ol[data-indent="18"],.am-engine ul[data-indent="18"],.am-engine-view ul[data-indent="18"] {\n\tpadding-left: 36em;\n}\n.am-engine ol[data-indent="19"],.am-engine-view ol[data-indent="19"],.am-engine ul[data-indent="19"],.am-engine-view ul[data-indent="19"] {\n\tpadding-left: 38em;\n}\n.am-engine ol[data-indent="20"],.am-engine-view ol[data-indent="20"],.am-engine ul[data-indent="20"],.am-engine-view ul[data-indent="20"] {\n\tpadding-left: 40em;\n}\n\n.am-engine .data-list,.am-engine-view .data-list {\n\tcolor: #262626;\n\ttext-indent: 0;\n}\n\n.am-engine .data-list-item,.am-engine-view .data-list-item {\n line-height: inherit;\n position: relative;\n list-style: none;\n text-indent: 0;\n}\n';en(Ui);var Li=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.cardName=void 0,e.isPasteList=!1,e.canMerge=!0,e.pasteBefore=function(t){var n=e.editor;if(e.cardName&&n){var r=n.list,i=Ut(t),o=i.allChildren();o.forEach((function(e){if("li"===e.name&&e.hasClass(r.CUSTOMZIE_LI_CLASS)){var t;if(!(null===(t=e.first())||void 0===t?void 0:t.isCard()))return e.removeClass(r.CUSTOMZIE_LI_CLASS),void e.closest("ul").removeClass(r.CUSTOMZIE_UL_CLASS);e.closest("ul").addClass(r.CUSTOMZIE_UL_CLASS)}})),e.isPasteList=o.some((function(e){return"li"===e.name}))}},e.pasteInsert=function(){var t=e.editor;if(e.cardName&&st(t)){var n=t.change,r=t.list,i=n.range.get(),o=i.getRootBlock(),a=null===o||void 0===o?void 0:o.next(),s=null===a||void 0===a?void 0:a.find("li.".concat(r.CUSTOMZIE_LI_CLASS));s&&s.length>0&&s.each((function(t){var n=Ut(t);0===n.find("[".concat(fe,"=").concat(e.cardName,"],[").concat(ge,"=").concat(e.cardName,"]")).length&&r.addReadyCardToCustomize(n,e.cardName)}))}},e.pasteAfter=function(){var t;e.isPasteList&&(null===(t=e.editor)||void 0===t||t.list.merge())},e}return(0,c.Z)(n,[{key:"init",value:function(){(0,u.Z)((0,d.Z)(n.prototype),"init",this).call(this);var e=this.editor;st(e)&&(e.on("paste:before",this.pasteBefore),e.on("paste:insert",this.pasteInsert),e.on("paste:after",this.pasteAfter))}},{key:"queryState",value:function(){var e=this.editor;return!!st(e)&&e.list.getPluginNameByNodes(e.change.blocks)===this.constructor.pluginName}},{key:"destroy",value:function(){var e=this.editor;st(e)&&(e.off("paste:before",this.pasteBefore),e.off("paste:insert",this.pasteInsert),e.off("paste:after",this.pasteAfter))}}]),n}(Ti),Qi=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.kind="mark",e.copyOnEnter=void 0,e.followStyle=!0,e.combineValueByWrap=!1,e.mergeLeval=1,e}return(0,c.Z)(n,[{key:"execute",value:function(){var e=this.editor;if(st(e)){var t=e.change,n=e.mark,r=this.createElement.apply(this,arguments),i=this.isTrigger?this.isTrigger.apply(this,arguments):!this.queryState();if(i){if(!this.followStyle&&t.range.get().collapsed)return;n.wrap(r)}else n.unwrap(r)}}},{key:"queryState",value:function(){var e=this,t=this.editor;if(st(t)){var n=t.change;if(!this.style&&!this.attributes)return n.marks.some((function(t){return t.name===e.tagName}));var r=[];return n.marks.forEach((function(t){r.push.apply(r,(0,C.Z)(Object.values(e.getStyle(t)))),r.push.apply(r,(0,C.Z)(Object.values(e.getAttributes(t))))})),0===r.length?void 0:r}}},{key:"schema",value:function(){var e=(0,u.Z)((0,d.Z)(n.prototype),"schema",this).call(this);return Array.isArray(e)?e.map((function(e){return(0,s.Z)({},e)})):(0,s.Z)({},e)}}]),n}(Si),Di=function(e){return"mark"===e.kind},Hi=function(){function e(t){(0,l.Z)(this,e),this.data={},this.components={},this.editor=void 0,this.editor=t}return(0,c.Z)(e,[{key:"init",value:function(e,t){var n=this;e.forEach((function(e){n.data[e.pluginName]=e;var r=new e(n.editor,t[e.pluginName]);n.components[e.pluginName]=r,r.init&&r.init()}))}},{key:"add",value:function(e,t){this.data[e.pluginName]=e,t=(0,s.Z)({},t);var n=this.editor;if(st(n)){var r=new e(n,t);r.init&&r.init(),this.components[e.pluginName]=r}}},{key:"findPlugin",value:function(e){var t=this.components[e];if(t)return t}},{key:"findElementPlugin",value:function(e){var t=this.findPlugin(e);if(t)return Fi(t)?t:void 0}},{key:"findMarkPlugin",value:function(e){var t=this.findPlugin(e);if(t)return Di(t)?t:void 0}},{key:"findInlinePlugin",value:function(e){var t=this.findPlugin(e);if(t)return Ni(t)?t:void 0}},{key:"findBlockPlugin",value:function(e){var t=this.findPlugin(e);if(t)return Mi(t)?t:void 0}},{key:"each",value:function(e){var t=this;Object.keys(this.data).forEach((function(n,r){!e||e(n,t.data[n],r)}))}},{key:"destroy",value:function(){var e=this;Object.keys(this.components).forEach((function(t){var n=e.components[t];n.destroy&&n.destroy()}))}}]),e}(),Oi=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.editor=t}return(0,c.Z)(e,[{key:"queryEnabled",value:function(e){var t=this.editor,n=t.plugin.components[e];if(!n||n.disabled)return!1;if((!st(t)||t.readonly)&&!1!==n.disabled)return!1;var r=t.card;return!r.active||(!(!Di(n)&&"plugin"!==n.kind||!r.active.executeMark)||!!r.active.isEditable)}},{key:"queryState",value:function(e){var t=this.editor,n=t.plugin.components[e];if(n&&n.queryState)try{for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.queryState(i)}catch(a){t.messageError("command-query",a)}}},{key:"handleExecuteBefore",value:function(){var e,t=this.editor;if(st(t)){e=t.change;var n=e.range.get();if(!n.commonAncestorNode.isRoot()&&!n.commonAncestorNode.inEditor()){var r=n.commonAncestorNode.closest(ee),i=void 0;if(r.length>0){var o=r.attributes(Ee);if(o){var a=t.card;i=a.find(o),i&&a.select(i)}}i||t.focus()}e.cacheRangeBeforeCommand()}return e}},{key:"execute",value:function(e){var t=this.editor,n=t.plugin.components[e];if(n&&n.execute){for(var r=this.handleExecuteBefore(),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];t.trigger.apply(t,["beforeCommandExecute",e].concat(o));try{var s=n.execute.apply(n,o);return null===r||void 0===r||r.combinText(),null===r||void 0===r||r.onSelect(),t.trigger.apply(t,["afterCommandExecute",e].concat(o)),s}catch(l){t.messageError("command-execute",l)}}}},{key:"executeMethod",value:function(e,t){var n=this.editor,r=n.plugin.components[e];if(r&&r[t])try{for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];var s=r[t].apply(r,o);return s}catch(l){n.messageError("command-excute-method",l)}}}]),e}(),zi=["blocks","inlines","marks","globals"],Zi=function(){function e(){(0,l.Z)(this,e),this._all=[],this._typeMap={},this._invalidKeys=[],this._tagMap={blocks:[],inlines:[],marks:[]},this.data={blocks:[],inlines:[],marks:[],globals:{}}}return(0,c.Z)(e,[{key:"add",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=v()(e),Array.isArray(e)||(e=[e]),e.forEach((function(e){var r=t.data["".concat(e.type,"s")];Pi(e)?(e.attributes&&Object.keys(e.attributes).forEach((function(n){t.data.globals[e.type]&&("style"===n?Object.keys(e.attributes.style).forEach((function(r){t.data.globals[e.type][n]&&t.data.globals[e.type][n][r]===e.attributes.style[r]&&delete e.attributes.style[r]})):t.data.globals[e.type][n]===e.attributes[n]&&delete e.attributes[n])})),r&&(n?t.data["".concat(e.type,"s")]=r.map((function(t){return t.name===e.name&&(t.attributes=O()(Object.assign({},t.attributes),e.attributes)),t})):r.push(e))):r&&(t.data.globals[e.type]=O()(Object.assign({},t.data.globals[e.type]),e.attributes))})),this.updateTagMap();var r=function(e){var t=e.attributes||{},n=t.style||{},r=0,i=0;return Object.keys(t).forEach((function(e){var n=t[e];Ri(n)&&n.required&&r++})),Object.keys(n).forEach((function(e){var t=n[e];Ri(t)&&t.required&&i++})),[r,i]},i=this.data,o=i.blocks,a=i.marks,s=i.inlines;this._all=[].concat((0,C.Z)(o),(0,C.Z)(a),(0,C.Z)(s)).sort((function(e,t){var n=r(e),i=(0,w.Z)(n,2),o=i[0],a=i[1],s=r(t),l=(0,w.Z)(s,2),c=l[0],A=l[1];return o>c?-1:o===c?a===A?0:a>A?-1:1:1}))}},{key:"updateTagMap",value:function(){var e=this;this._tagMap.marks=[],this.data.marks.forEach((function(t){~~e._tagMap.marks.indexOf(t.name)&&e._tagMap.marks.push(t.name)})),this._tagMap.blocks=[],this.data.blocks.forEach((function(t){~~e._tagMap.blocks.indexOf(t.name)&&e._tagMap.blocks.push(t.name)})),this._tagMap.inlines=[],this.data.inlines.forEach((function(t){~~e._tagMap.inlines.indexOf(t.name)&&e._tagMap.inlines.push(t.name)}))}},{key:"getTags",value:function(e){return this._tagMap[e]}},{key:"remove",value:function(e){var t=this._all.findIndex((function(t){return L()(t,e)}));t>-1&&this._all.splice(t,1);var n=this.data["".concat(e.type,"s")];n&&(t=n.findIndex((function(t){return L()(t,e)})),t>-1&&n.splice(t,1)),this._typeMap={},this.updateTagMap()}},{key:"clone",value:function(){var t=new e;return t._all=v()(this._all),t._typeMap=v()(this._typeMap),t._tagMap=v()(this._tagMap),t.data=v()(this.data),t}},{key:"find",value:function(e){var t=this,n=[];return zi.forEach((function(r){if("globals"!==r){var i=t.data[r].filter(e);n.push.apply(n,(0,C.Z)(i))}})),n}},{key:"getType",value:function(e,t){var n=gt(e)?e:e[0];if(n&&n.nodeType===Node.ELEMENT_NODE){var r=n.getAttribute($);if(r=r?r.split("-")[0]:Zt(n,!1),"CARD"===n.nodeName||!~this._invalidKeys.indexOf(r)){var i=this._typeMap[r];if(i&&(!t||t(i)))return i.type;var o=this.getRule(n,t);return o?this._typeMap[r]=o:this._invalidKeys.push(r),null===o||void 0===o?void 0:o.type}}}},{key:"getRule",value:function(e,t){var n=this,r=gt(e)?e:e[0];return t=t||function(e){return e.name===r.localName},this._all.find((function(e){return t(e)&&n.checkNode(r,e.attributes)}))}},{key:"checkNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=gt(e)?e:e[0];for(var r in t){var i;if("style"!==r){var o=t;if(!o[r])return!1;if(!this.checkValue(o,r,null!==(i=n.getAttribute(r))&&void 0!==i?i:void 0))return!1}}var a=qe(n.getAttribute("style")||""),s=t.style||{};for(var l in s){if(!s[l])return!1;if(!this.checkValue(s,l,a[l]))return!1}return!0}},{key:"checkValue",value:function(e,t,n,r){if(!e[t])return!1;var i=e[t];if(Ri(i)){if(void 0===n)return!i.required;i=i.value}else if(!r||void 0===n)return!0;if("string"===typeof i&&"@"===i.charAt(0))switch(i){case"@number":i=/^-?\d+(\.\d+)?$/;break;case"@length":i=/^-?\d+(\.\d+)?(\w*|%)$/;break;case"@color":i=/^(rgb(.+?)|#\w{3,8}|\w+)$/i;break;case"@url":i=Je;break}return"string"===typeof i?"*"===i||("class"===t?(n||"").split(/\s+/).some((function(e){return e.trim()===i})):i===n):Array.isArray(i)?"class"===t?(n||(n="*"),n.split(/\s+/).every((function(e){return""===e.trim()||~i.indexOf(e.trim())}))):i.indexOf(n)>-1:"object"===(0,o.Z)(i)&&"function"===typeof i.test?"class"===t?(n||"").split(/\s+/).every((function(e){return""===e.trim()||i.test(e.trim())})):i.test(n||""):"function"!==typeof i||i(n)}},{key:"filterStyles",value:function(e,t,n){var r=this;Object.keys(e).forEach((function(i){var o;(null===(o=t.attributes)||void 0===o?void 0:o.style)&&r.checkValue(t.attributes.style,i,e[i],!0)||(n&&n(i,e[i]),delete e[i])}))}},{key:"filterAttributes",value:function(e,t,n){var r=this;Object.keys(e).forEach((function(i){t.attributes&&r.checkValue(t.attributes,i,e[i],!0)||(n&&n(i,e[i]),delete e[i])}))}},{key:"filter",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.getRule(e);if(i){var o=this.data.globals,a=o[i.type]?i.type:void 0,s=Object.assign({},i,{attributes:O()({},i.attributes,a?o[a]:{})});this.filterAttributes(t,s,r?function(t){return e.removeAttributes(t)}:void 0),this.filterStyles(n,s,r?function(t){return e.css(t,"")}:void 0)}}},{key:"closest",value:function(e){var t=this,n=e;return this.data.blocks.forEach((function(r){if(r.name===e){var i=r;i.allowIn&&(i.allowIn.forEach((function(e){t.isAllowIn(e,n)&&(n=e)})),n=t.closest(n))}})),n}},{key:"isAllowIn",value:function(e,t){return"p"!==e&&this.data.blocks.some((function(n){if(n.name===t){var r=n;return!!(r.allowIn&&r.allowIn.indexOf(e)>-1)||void 0}}))}},{key:"addAllowIn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"p",n=this.data.blocks.find((function(e){return e.name===t}));n.allowIn||(n.allowIn=[]),~~n.allowIn.indexOf(e)&&n.allowIn.push(e)}},{key:"getAllowInTags",value:function(){var e=[];return this.data.blocks.forEach((function(t){var n=t;n.allowIn&&n.allowIn.forEach((function(t){e.indexOf(t)<0&&e.push(t)}))})),e}},{key:"getCanMergeTags",value:function(){var e=[];return this.data.blocks.forEach((function(t){var n=t;!0===n.canMerge&&e.indexOf(n.name)<0&&e.push(n.name)})),e}}]),e}(),Ri=function(e){return void 0!==e.required},Pi=function(e){return!!e["name"]},qi=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.data=[],this.editor=t}return(0,c.Z)(e,[{key:"getData",value:function(){return this.data}},{key:"clone",value:function(){var t=v()(this.data),n=new e(this.editor);return n.data=t,n}},{key:"add",value:function(e,t){this.data.push({from:e,to:t})}},{key:"transform",value:function(e,t){var n=e.name,r=e.attributes(),i=qe(r.style||""),o=!1;delete r.style,e.isCursor()&&(n=r[G].toLowerCase(),r={},i={});var a=this.data.find((function(e){if(!t||t(e)){var a=e.from,s=e.to,l=!1;if("string"===typeof a)l=a===n;else if("function"===typeof a)l=a(n,i,r);else{var c=Object.keys(a);l=c.indexOf(n)>=0&&c.some((function(e){var t=a[e];return Object.keys(t.style||{}).every((function(e){var n=t.style[e];return i[e]&&Array.isArray(n)?n.indexOf(i[e])>-1:n===i[e]}))&&Object.keys(t.attributes||{}).every((function(e){var n=t.attributes[e];return i[e]&&Array.isArray(n)?n.indexOf(i[e])>-1:n===i[e]}))}))}if(l)if("string"===typeof s)n=s,i={},r={};else{var A="function"===typeof s?s(n,i,r):s,u=A;if(A.hasOwnProperty("replace")){var d=A;u=d.node,o=d.replace}n=u.name,i=u.css(),r=u.attributes()}return l}}));return a?{rule:a,node:{name:n,style:i,attributes:r},replace:o}:void 0}}]),e}(),Ki=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"insertNewline",value:function(e,t,n){var r=this.engine.change,i=Ut("<p><br /></p>");this.engine.nodeId.generate(i),n?t.root.before(i):t.root.after(i),e.select(i,!0),e.collapse(!1),r.range.select(e)}},{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.card,i=n.range.get(),o=r.find(i.startNode);if(!o)return!0;if(o.type===nn.INLINE){var a=i.startNode.closest(Ce);a.length>0&&(i.select(o.root),i.collapse(!0),n.range.select(i));var s=i.startNode.closest(_e);s.length>0&&(i.select(o.root),i.collapse(!1),n.range.select(i))}else{var l=i.startNode.closest(Ce);if(l.length>0){e.preventDefault();var c=o.root.prev();return!c||c.isCard()?(r.focusPrevBlock(o,i,!0),n.range.select(i)):this.insertNewline(i,o,!0),!1}var A=i.startNode.closest(_e);if(A.length>0){e.preventDefault();var u=o.root.next();return!u||u.isCard()?(r.focusNextBlock(o,i,!0),n.range.select(i)):this.insertNewline(i,o,!1),!1}}return!0}}]),e}(),Wi=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"focusPrevBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.engine.change,r=n.range.get();e=e||this.engine.block.closest(r.startNode);var i=e.prev();if(i)if(i.isCard()){var o=this.engine.card.find(i);o&&o.focus(r)}else this.engine.node.isList(i)&&(i=i.last()),i&&(t&&this.engine.node.isEmptyWithTrim(i)?i.remove():(r.select(i,!0),r.collapse(!1),n.range.select(r.shrinkToTextNode())))}},{key:"trigger",value:function(e){var t=this.engine.change,n=t.range.get().cloneRange().shrinkToElementNode().shrinkToTextNode();if(n.collapsed){var r=this.engine.card.find(n.startNode);if(!r){var i=n.getPrevNode(),o=null===i||void 0===i?void 0:i.parent();if(!e["isDelete"]&&i&&i.isCard()&&(!o||!this.engine.node.isCustomize(o))){e.preventDefault();var a=n.cloneRange();return a.setStartBefore(i),a.collapse(!0),this.engine.card.remove(i),t.range.select(a.shrinkToTextNode()),a.handleBr(),!1}return!0}if(e["isDelete"])return!0;if(r.type===nn.INLINE){var s=n.startNode.closest(Ce);if(s.length>0){var l=r.root.prev();if(!l)return e.preventDefault(),t.mergeAfterDelete(),!1;var c=this.engine.card.find(l);if(c)return this.engine.card.remove(c.id),n.handleBr(),!1;n.select(r.root).collapse(!0),t.range.select(n)}var A=n.startNode.closest(_e);if(A.length>0){e.preventDefault();var u=n.cloneRange();return u.setStartBefore(r.root),u.collapse(!0),this.engine.card.remove(r.id),t.range.select(u.shrinkToTextNode()),u.handleBr(),!1}}else{var d,h=n.startNode.closest(Ce);if(h.length>0)return e.preventDefault(),(null===(d=r.root.parent())||void 0===d?void 0:d.inEditor())?t.unwrap(r.root.parent()):this.focusPrevBlock(r.root,!0),!1;var p=n.startNode.closest(_e);if(p.length>0)return e.preventDefault(),this.focusPrevBlock(r.root),this.engine.card.remove(r.id,!1),t.isEmpty()&&t.initValue(),!1}return!1!==this.engine.trigger("keydown:backspace",e)}}}]),e}(),ji=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"inline",value:function(e,t){var n=this.engine.change,r=n.range.get().cloneRange(),i=e.constructor.singleSelectable,o=r.commonAncestorNode.closest(Ce);if(o.length>0){var a=e.root.prev();return a?(r.setStartBefore(e.root[0]),r.collapse(!0)):e.focus(r,!0),n.range.select(r),!0}var s=r.commonAncestorNode.closest(_e),l=0===o.length&&0===s.length;if(s.length>0||l){var c,A;if(t.preventDefault(),l)e.select(!1),null===(c=e.toolbarModel)||void 0===c||c.hide(),e.activate(!1);else if(r.collapsed){var u=this.engine.card.find(r.startNode);if(u&&u.onSelectLeft)return u.onSelectLeft(t)}if(l||!1===i)e.focus(r,!0),e.select(!1),null===(A=e.toolbarModel)||void 0===A||A.hide(),n.range.select(r);else this.engine.card.select(e,t);return!1}return!0}},{key:"block",value:function(e,t){var n=this.engine,r=n.change,i=n.card,o=r.range.get(),a=o.commonAncestorNode.closest(Ce);if(a.length>0){var s=e.root.prev();return s?(t.preventDefault(),i.focusPrevBlock(e,o,!1),r.range.select(o),!1):void 0}var l,c,A=o.commonAncestorNode.closest(_e),u=0===a.length&&0===A.length;u&&(e.select(!1),null===(l=e.toolbarModel)||void 0===l||l.hide(),e.activate(!1));if(A.length>0){if(o.collapsed){var d=i.find(o.startNode);if(d&&d.onSelectLeft)return d.onSelectLeft(t)}return t.preventDefault(),i.select(e,t),!1}return!i.getSingleSelectedCard(o)||(t.preventDefault(),e.focus(o,!0),e.select(!1),null===(c=e.toolbarModel)||void 0===c||c.hide(),r.range.select(o),!1)}},{key:"fincPrevCard",value:function(e){if(!e.collapsed)return null;var t=e.startNode,n=e.startOffset;if(t.isText()&&0===n){var r=t.prevElement();if(r&&r.isCard())return this.engine.card.find(r)}return null}},{key:"trigger",value:function(e){var t=this.engine.change,n=t.range.get(),r=this.engine.card.getSingleCard(n);if(!r){var o=this.fincPrevCard(n);return!o||(e.preventDefault(),o.focus(n,!1),t.range.select(n),!1)}return!(0,i.ZP)("shift+left",e)&&(r.type===nn.INLINE?this.inline(r,e):this.block(r,e))}}]),e}(),Vi=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"inline",value:function(e,t){var n=this.engine.change,r=n.range.get(),i=e.constructor.singleSelectable,o=r.commonAncestorNode.closest(Ce),a=r.commonAncestorNode.closest(_e),s=0===o.length&&0===a.length;if(o.length>0||s){var l,c;if(t.preventDefault(),s)e.select(!1),e.activate(!1),null===(l=e.toolbarModel)||void 0===l||l.hide();else if(r.collapsed){var A=this.engine.card.find(r.startNode);if(A&&A.onSelectRight)return A.onSelectRight(t)}if(s||!1===i)e.focus(r,!1),e.select(!1),null===(c=e.toolbarModel)||void 0===c||c.hide(),n.range.select(r);else this.engine.card.select(e,t);return!1}if(a.length>0){var u=e.root.next();u?(r.setEndAfter(e.root[0]),r.collapse(!1)):e.focus(r,!1),n.range.select(r)}return!0}},{key:"block",value:function(e,t){var n=this.engine,r=n.change,i=n.card,o=r.range.get(),a=o.commonAncestorNode.closest(Ce);if(a.length>0){if(o.collapsed){var s=this.engine.card.find(o.startNode);if(s&&s.onSelectRight)return s.onSelectRight(t)}return t.preventDefault(),i.select(e,t),!1}var l,c,A=o.commonAncestorNode.closest(_e),u=0===a.length&&0===A.length;u&&(e.select(!1),null===(l=e.toolbarModel)||void 0===l||l.hide(),e.activate(!1));if(A.length>0){var d=e.root.next();return d?(t.preventDefault(),i.focusNextBlock(e,o,!1),r.range.select(o),!1):void 0}return!this.engine.card.getSingleSelectedCard(o)||(t.preventDefault(),e.focus(o,!1),e.select(!1),null===(c=e.toolbarModel)||void 0===c||c.hide(),r.range.select(o),!1)}},{key:"fincNextCard",value:function(e){if(!e.collapsed)return null;var t=e.startNode,n=e.startOffset;if(t.isText()){var r=t.text();if(r.length===n){var i=t.nextElement();if(i&&i.isCard())return this.engine.card.find(i)}}return null}},{key:"trigger",value:function(e){var t=this.engine.change,n=t.range.get(),r=this.engine.card.getSingleCard(n);if(!r){var o=this.fincNextCard(n);return!o||(e.preventDefault(),o.focus(n,!0),t.range.select(n),!1)}if(!(0,i.ZP)("shift+right",e))return r.type===nn.INLINE?this.inline(r,e):this.block(r,e)}}]),e}(),Gi=function(e,t){var n,r=e.change,i=r.range.get(),o=i.commonAncestorNode.closest(Ce),a=i.commonAncestorNode.closest(_e),s=0===o.length&&0===a.length;return!!s&&(t.select(!1),t.activate(!1),null===(n=t.toolbarModel)||void 0===n||n.hide(),!0)},$i=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"common",value:function(e,t){var n=this.engine,r=n.change,i=n.card,o=r.range.get();Gi(this.engine,e);var a=e.root.prev();if(a)return t.preventDefault(),i.focusPrevBlock(e,o,!1),r.range.select(o),!1}},{key:"inline",value:function(e,t){return this.common(e,t)}},{key:"block",value:function(e,t){return this.common(e,t)}},{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.card,o=t.block,a=n.range.get();if(a.collapsed){var s=o.closest(a.startNode),l=s.prev();if(null===l||void 0===l?void 0:l.isCard()){var c=r.find(l);if(c&&c.onSelectUp)return c.onSelectUp(e)}}var A=r.getSingleCard(a);return!A||((0,i.ZP)("shift+up",e)?void 0:A.type===nn.INLINE?this.inline(A,e):this.block(A,e))}}]),e}(),Yi=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"common",value:function(e,t){var n=this.engine,r=n.change,i=n.card,o=r.range.get();Gi(this.engine,e);var a=e.root.next();if(a)return t.preventDefault(),i.focusNextBlock(e,o,!1),r.range.select(o),!1}},{key:"inline",value:function(e,t){return this.common(e,t)}},{key:"block",value:function(e,t){return this.common(e,t)}},{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.block,o=t.card,a=n.range.get(),s=o.getSingleCard(a);if(a.collapsed){var l=r.closest(a.startNode),c=l.next();if(null===c||void 0===c?void 0:c.isCard()){var A=o.find(c);if(A&&A.onSelectDown)return A.onSelectDown(e)}}return!s||(!!(0,i.ZP)("shift+down",e)||(s.type===nn.INLINE?this.inline(s,e):this.block(s,e)))}}]),e}(),Xi=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"block",value:function(e,t){var n=this.engine,r=n.change,i=n.card,o=r.range.get(),a=o.commonAncestorNode.closest(Ce);if(a.length>0)return t.metaKey||t.ctrlKey||(i.focusPrevBlock(e,o,!0),r.range.select(o)),!0;var s=o.commonAncestorNode.closest(_e);return s.length>0&&(t.metaKey||t.ctrlKey||(i.focusNextBlock(e,o,!0),r.range.select(o))),!0}},{key:"trigger",value:function(e){var t=this.engine.change,n=t.range.get(),r=this.engine.card.getSingleCard(n);return!r||(r.type!==nn.BLOCK||this.block(r,e))}}]),e}(),Ji='.am-engine .card-selected [data-card-element="center"].data-card-background-selected {\n background: rgba(27, 162, 227, 0.2);\n}\n\n.am-engine .card-selected [data-card-element="center"].data-card-border-selected {\n outline: 2px solid #1890FF;\n border-radius: 2px;\n}\n\n.am-engine .card-selected [data-card-element="center"].data-card-border-selected::-moz-selection {\n background: transparent;\n}\n\n.am-engine .card-selected [data-card-element="center"].data-card-border-selected::selection {\n background: transparent;\n}\n\n.am-engine-view [data-card-element="center"] .data-card-loading,.am-engine [data-card-element="center"] .data-card-loading {\n display: inline-block;\n font-style: normal;\n vertical-align: -0.125em;\n text-align: center;\n text-transform: none;\n line-height: 0;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n margin-right: 5px;\n padding: 16px;\n width: 100%;\n}\n\n.am-engine-view [data-card-element="center"] .data-card-loading .data-card-spin,.am-engine [data-card-element="center"] .data-card-loading .data-card-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n';en(Ji);var eo=function(){function e(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,l.Z)(this,e),this.classes=void 0,this.components=void 0,this.lazyRender=void 0,this.asyncComponents=[],this.editor=void 0,this.renderTimeout=void 0,this.renderAsyncComponents=(0,a.Z)(g().mark((function e(){var t;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n.renderTimeout&&clearTimeout(n.renderTimeout),t=n.editor,n.renderTimeout=setTimeout((function(){var e=n.asyncComponents.concat();e.forEach(function(){var e=(0,a.Z)(g().mark((function e(r){return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:(0===r.root.length||t.root.inViewport(r.root,!0)&&!1!==t.trigger("card:async-render-component",r))&&(n.asyncComponents.splice(n.asyncComponents.findIndex((function(e){return e===r})),1),r.root.length>0&&r.loading&&(r.destroy&&r.destroy(),r.getCenter().empty(),n.renderComponent(r)));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),50);case 3:case"end":return e.stop()}}),e)}))),this.classes={},this.components=[],this.editor=t,this.lazyRender=r}return(0,c.Z)(e,[{key:"active",get:function(){return this.components.find((function(e){return e.activated}))}},{key:"length",get:function(){return this.components.length}},{key:"init",value:function(e){var t,n,r=this,i=this.editor;if(st(i)){var o,a,s,l,c,A,u,d=i.typing,h=new Ki(i);null===(o=d.getHandleListener("enter","keydown"))||void 0===o||o.on((function(e){return h.trigger(e)}));var p=new Wi(i);null===(a=d.getHandleListener("backspace","keydown"))||void 0===a||a.on((function(e){return p.trigger(e)}));var f=new ji(i);null===(s=d.getHandleListener("left","keydown"))||void 0===s||s.on((function(e){return f.trigger(e)}));var g=new Vi(i);null===(l=d.getHandleListener("right","keydown"))||void 0===l||l.on((function(e){return g.trigger(e)}));var m=new $i(i);null===(c=d.getHandleListener("up","keydown"))||void 0===c||c.on((function(e){return m.trigger(e)}));var v=new Yi(i);null===(A=d.getHandleListener("down","keydown"))||void 0===A||A.on((function(e){return v.trigger(e)}));var b=new Xi(i);null===(u=d.getHandleListener("default","keydown"))||void 0===u||u.on((function(e){return b.trigger(e)}))}e.forEach((function(e){r.classes[e.cardName]=e})),this.lazyRender&&(window.addEventListener("resize",this.renderAsyncComponents,{passive:!0}),null===(t=i.scrollNode)||void 0===t||null===(n=t.get())||void 0===n||n.addEventListener("scroll",this.renderAsyncComponents,{passive:!0}),window.addEventListener("scroll",this.renderAsyncComponents,{passive:!0}),i.on("card:async-render",this.renderAsyncComponents))}},{key:"add",value:function(e){this.classes[e.cardName]=e}},{key:"each",value:function(e){this.components.every((function(t,n){return!e||!1!==e(t,n)}))}},{key:"closest",value:function(e,t){if(gt(e)&&(e=Ut(e)),!e.isCard()){var n=e.closest(xe,(function(e){var n;if(!(e&&t?Ut(e).isRoot():Ut(e).isEditable()))return(null!==(n=e.parentElement)&&void 0!==n?n:e.parentNode)||void 0}));if(!n||0===n.length)return;e=n}return e}},{key:"find",value:function(e,t){if("string"!==typeof e){var n=this.closest(e,t);if(!n)return;e=n}var r=function(e){gt(e)&&(e=Ut(e));var t=e.attributes(ve);return Ye(t)},i=this.components.filter((function(t){return"string"===typeof e?t.id===e:t.root.name===(gt(e)?e.nodeName.toString().toLowerCase():e.name)&&(t.root.equal(e)||t.id===r(e).id)}));if(0!==i.length)return i[0]}},{key:"findBlock",value:function(e){if(gt(e)&&(e=Ut(e)),e.get()){var t=e.parent();if(t){var n=this.find(t);if(n)return n.type===nn.BLOCK?n:this.findBlock(n.root)}}}},{key:"getSingleCard",value:function(e){var t=this.find(e.commonAncestorNode);return t||(t=this.getSingleSelectedCard(e)),t}},{key:"getSingleSelectedCard",value:function(e){var t=e.findElements(),n=t[0];if(1===t.length&&n){var r=Ut(n);if(r.isCard())return this.find(r)}}},{key:"insertNode",value:function(e,t){var n="inline"===t.type,r=this.editor;!e.collapsed&&st(r)&&r.change.delete(e),this.gc();var i=r.inline,o=r.block,a=r.node,s=[];if(n){if(st(r)&&t.executeMark){s=r.change.marks.map((function(e){return e.clone()}));var l,c=r.card.find(e.startNode);if(null===c||void 0===c?void 0:c.queryMarks)(l=s).push.apply(l,(0,C.Z)(c.queryMarks()))}i.insert(t.root,e)}else o.insert(t.root,e,(function(e){var t=e.parent();while(t&&!t.isEditable()){e=t;var n=t.parent();if(!n||!a.isBlock(n))break;t=n}return e}),!0);this.components.push(t);var A=t.root.parent();!n&&A&&A.inEditor()&&a.isBlock(A)&&o.unwrap(A,e);for(var u=arguments.length,d=new Array(u>2?u-2:0),h=2;h<u;h++)d[h-2]=arguments[h];return this.renderComponent.apply(this,[t].concat(d)),t.focus(e,!1),t.didInsert&&t.didInsert(),s.forEach((function(e){t.executeMark(e,!0)})),t}},{key:"removeNode",value:function(e){e.destroy&&e.destroy(),this.removeComponent(e),e.root.remove()}},{key:"updateNode",value:function(e,t){e.destroy&&e.destroy();var n=e.getCenter();null===n||void 0===n||n.empty(),e.setValue(t);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];this.renderComponent.apply(this,[e].concat(i)),e.didUpdate&&e.didUpdate()}},{key:"replaceNode",value:function(e,t,n){var r=this.classes[t];if(!r)throw"".concat(t,": This card does not exist");var i=(null===n||void 0===n?void 0:n.type)||r.cardType,o=e.attributes($),a=Xe("<card ".concat(null!==o&&void 0!==o?o:"".concat($,'="').concat(o,'"'),' type="').concat(i,'" name="').concat(t,'" value="').concat($e(n),'"></card>')),s=Ut(a);return e.before(s),s.append(e),s}},{key:"activate",value:function(e,t,n){var r=this.editor;if(st(r)&&!r.readonly){var i=e.getRoot(),o=this.active;if(!i.get()||r.container.equal(i)){var a=this.find(e),s=e.closest(ne);if(!a&&s.length>0){var l=s.parent();a=l?this.find(l):void 0}var c=a?this.findBlock(a.root):void 0;if(c&&(a=c),a&&a.isCursor(e))if(s.length>0){var A=s.parent();a=A?this.find(A):void 0}else a=void 0;var u,d=a&&o&&o.root.equal(a.root);if(o&&!d)null===(u=o.toolbarModel)||void 0===u||u.hide(),o.select(!1),o.activate(!1);if(a){if(a.activatedByOther)return;var h;if(d)a.isEditable?a.select(!1):t===rn.MOUSE_DOWN&&"input"!==e.name&&0===a.root.find(".data-drag-image").length&&(null===n||void 0===n||n.preventDefault());else!1===a.constructor.singleSelectable||t===rn.CLICK&&!st(r)||this.select(a,n),a.isEditable||!1===a.constructor.autoSelected||a.select(!a.isEditable),a.activate(!0),null===(h=a.toolbarModel)||void 0===h||h.show(n);r.change.onSelect()}}else if(o){var p;null===(p=o.toolbarModel)||void 0===p||p.hide(),o.select(!1),o.activate(!1)}}}},{key:"select",value:function(e,t){var n=this.editor;if(st(n)&&!1!==e.constructor.singleSelectable&&(e.type!==nn.BLOCK||!e.activated)){var r=n.change.range.get().cloneRange();if(r.startNode.closest(ne).length>0&&(!t||t instanceof MouseEvent&&(!t.target||!this.closest(t.target,!1)))||e.isEditable||e.isMaximize)return;null===t||void 0===t||t.preventDefault();var i=e.root,o=i.parent(),a=o.children().toArray().findIndex((function(e){return e.equal(i)}));r.setStart(o,a),r.setEnd(o,a+1),n.change.range.select(r)}}},{key:"focus",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.editor;if(st(n)){var r=n.change,i=n.container,o=n.scrollNode,a=r.range.get();e.focus(a,t),r.range.select(a),this.activate(a.startNode,rn.MOUSE_DOWN),r.onSelect(),o&&a.scrollIntoViewIfNeeded(i,o)}}},{key:"insert",value:function(e,t){var n=this.editor;if(!st(n))throw"Engine not found";for(var r=this.create(e,{value:t}),i=n.change,o=i.range.toTrusty(),a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];var c=this.insertNode.apply(this,[o,r].concat(s));return i.change(),c}},{key:"update",value:function(e,t){var n=this.editor;if(st(n)){var r=n.change,i=this.find(e);if(i){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];this.updateNode.apply(this,[i,t].concat(a));var l=r.range.get();i.focus(l,!1),r.change()}}}},{key:"replace",value:function(e,t,n){this.remove(e.root);for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return this.insert.apply(this,[t,n].concat(i))}},{key:"remove",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.editor;if(st(n)){var r=n.change,i=n.list,o=n.node,a=r.range.get(),s=this.find(e);if(s){s.type===nn.INLINE?(a.setEndAfter(s.root[0]),a.collapse(!1)):this.focusPrevBlock(s,a,t);var l=s.root.parent();this.removeNode(s),i.addBr(a.startNode),l&&o.isEmpty(l)&&!n.model.mutation.isStopped&&(l.isEditable()?(o.html(l,"<p><br /></p>"),a.select(l,!0),a.shrinkToElementNode(),a.collapse(!1)):(o.html(l,"<br />"),a.select(l,!0),a.collapse(!1))),t?r.apply(a):(r.range.select(a),r.change())}}}},{key:"removeRemote",value:function(e){var t=this.editor;if(st(t)){var n=t.node,r=this.find(e);if(r){var i=r.root.parent();this.removeNode(r),i&&n.isEmpty(i)&&!t.model.mutation.isStopped&&(i.isEditable()?n.html(i,"<p><br /></p>"):n.html(i,"<br />"))}}}},{key:"create",value:function(e,t){var n,r=this.classes[e];if(!r)throw"".concat(e,": This card does not exist");var i=(null===t||void 0===t||null===(n=t.value)||void 0===n?void 0:n.type)||r.cardType;if(["inline","block"].indexOf(i)<0)throw"".concat(e,': the type of card must be "inline", "block"');(null===t||void 0===t?void 0:t.root)&&t.root.empty();var o=this.editor,a=new r({editor:o,value:null===t||void 0===t?void 0:t.value,root:null===t||void 0===t?void 0:t.root}),s=a.root;s.attributes(me,i),s.attributes(fe,e),s.attributes(ye,"true");var l=i===nn.INLINE?"span":"div",c=Ut("<".concat(l," ").concat(a.isEditable?re+"='*'":"","/>"));c.attributes(be,"center");var A=Ut("<".concat(l," ").concat(be,'="body" />'));return A.append(c),s.append(A),this.createCursor(a),i===nn.BLOCK&&o.nodeId.generate(a.root),a.init(),a}},{key:"createCursor",value:function(e){var t=this.editor,n=e.constructor,r=void 0!==n.focus?n.focus:st(t)&&!t.readonly,i=e.getCenter();i.removeAttributes(Dt);var o=e.root;o.removeAttributes(Dt);var a=e.findByKey("left"),s=e.findByKey("right");r?(i.attributes(Dt,"false"),a||i.before(Ut("<span ".concat(be,'="left" ').concat(ie,'="true">&#8203;</span>'))),s||i.after(Ut("<span ".concat(be,'="right" ').concat(ie,'="true">&#8203;</span>')))):(null===a||void 0===a||a.remove(),null===s||void 0===s||s.remove(),o.attributes(Dt,"false"))}},{key:"reRender",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];0===n.length&&(n=this.components),n.forEach((function(t){t.destroy&&t.destroy(),e.createCursor(t),t.init(),e.renderComponent(t)}))}},{key:"render",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.lazyRender,i=e?e.isCard()?e:e.find("".concat(ke)):this.editor.container.find(ke);this.gc();var o=[],a=[],s=i.toArray();s.forEach((function(e){a.find((function(t){return t.equal(e)}))||a.push(e);var t=e.find("".concat(xe,",").concat(ke)).toArray();t.forEach((function(t){if(!t.equal(e)){var n=a.findIndex((function(e){return e.equal(t)}));n>-1&&a.splice(n,1)}}))})),a.forEach((function(e){var t=e.attributes(),r=t[ge],i=t[fe],a=r||i;if(n.classes[a]){var s,l=t[ve];i&&(s=n.find(e),s&&s.root.equal(e)&&(s.destroy&&s.destroy(),n.removeComponent(s)),e.attributes(ye,"true"),t[ye]="true",e.empty()),s=n.create(a,{value:Ye(l),root:i?e:void 0}),Object.keys(t).forEach((function(e){(0===e.indexOf("data-")&&0!==e.indexOf("data-card")||e===ye)&&s.root.attributes(e,t[e])})),r&&(e.replaceWith(s.root),e.remove()),n.components.push(s),o.push(s),r&&s.root.removeAttributes(ge)}}));var l=!1;o.forEach((function(e){if(r&&e.constructor.lazyRender&&!e.isEditable){if(e.beforeRender){var t=e.beforeRender(),i=e.getCenter();void 0!==t&&i.append("string"===typeof t?Ut(t):t)}l=!0,n.asyncComponents.push(e)}else n.renderComponent(e)})),t&&t(o.length),l&&this.renderAsyncComponents()}},{key:"renderComponent",value:function(e){for(var t=this.editor,n=e.getCenter(),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=e.render.apply(e,i);if(void 0!==a&&n.append("string"===typeof a?Ut(a):a),e.contenteditable.length>0){var s=!st(t)||t.readonly?"false":"true";n.find(e.contenteditable.join(",")).each((function(e){var n=Ut(e);n.attributes(Dt)!==s&&n.attributes(Dt,s),n.attributes(G)!==te&&n.attributes(G,te),st(t)&&t.normalize(n)})),this.render(n)}e.didRender()}},{key:"removeComponent",value:function(e){var t=this;this.each((function(n,r){if(n.root.equal(e.root))return t.components.splice(r,1),!1}))}},{key:"gc",value:function(){for(var e=0;e<this.components.length;e++){var t=this.components[e];t.root[0]&&0!==t.root.closest("body").length||(t.destroy&&t.destroy(),this.components.splice(e,1),e--)}}},{key:"destroy",value:function(){var e,t;this.gc();var n=this.editor;window.removeEventListener("resize",this.renderAsyncComponents),null===(e=n.scrollNode)||void 0===e||null===(t=e.get())||void 0===t||t.removeEventListener("scroll",this.renderAsyncComponents),window.removeEventListener("scroll",this.renderAsyncComponents),n.off("card:async-render",this.renderAsyncComponents)}},{key:"focusPrevBlock",value:function(e,t,n){var r,i=this.editor;if(!st(i))throw"Engine not initialized";if("inline"===e.type){var o=i.block.closest(e.root);r=o.isEditable()?e.root.prevElement():o.prevElement()}else r=e.root.prevElement();if(n){if(!r||r.attributes(fe)){var a=Ut("<p><br /></p>");return e.root.before(a),t.select(a,!0),t.collapse(!1),void i.nodeId.generate(a)}}else{if(!r)return;var s;if(r.attributes(fe))return void(null===(s=i.card.find(r))||void 0===s||s.focus(t,!1))}t.select(r,!0).shrinkToElementNode().shrinkToTextNode().collapse(!1)}},{key:"focusNextBlock",value:function(e,t,n){var r,i=this.editor;if(!st(i))throw"Engine not initialized";if("inline"===e.type){var o=i.block.closest(e.root);r=o.isEditable()?e.root.nextElement():o.nextElement()}else r=e.root.nextElement();if(n){if(!r||r.attributes(fe)){var a=Ut("<p><br /></p>");return e.root.after(a),t.select(a,!0),t.collapse(!1),void i.nodeId.generate(a)}}else{if(!r)return;var s;if(r.attributes(fe))return void(null===(s=i.card.find(r))||void 0===s||s.focus(t,!0))}t.select(r,!0).shrinkToElementNode().shrinkToTextNode().collapse(!0)}}]),e}(),to=(0,E.Z)("rules"),no=function(){function e(t){(0,l.Z)(this,e),this.schema=void 0,Object.defineProperty(this,to,{writable:!0,value:{}}),this.schema=t}return(0,c.Z)(e,[{key:"init",value:function(){(0,_.Z)(this,to)[to]=this.getRules()}},{key:"getRules",value:function(){var e={};return this.schema.data.blocks.forEach((function(t){e[t.name]||(e[t.name]=[]),e[t.name].push(t)})),e}},{key:"create",value:function(e){gt(e)&&(e=Ut(e));var t=Zt(e);return e.attributes($,t),t}},{key:"generateAll",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,_.Z)(this,to)[to],i=Object.keys(r).join(",");pt(e)&&e.fragment&&(e=e.fragment);var o=gt(e)?e:e.get();if(o&&o.nodeType!==Node.TEXT_NODE){var a=gt(e)?e:e.get(),s=null===a||void 0===a?void 0:a.querySelectorAll(i),l=function(e){!n&&e.getAttribute($)||t.generate(e,n)};a instanceof Element&&i.includes(a.nodeName.toLowerCase())&&l(a),null===s||void 0===s||s.forEach(l)}}},{key:"generate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(gt(e)&&(e=Ut(e)),!e.isText()){var r=(0,_.Z)(this,to)[to],i=r[e.name];if(i&&0!==i.length&&i.some((function(n){return t.schema.checkNode(e,n.attributes)}))){var o=e.closest("".concat(xe,",").concat(ee),at);if(!(o.length>0&&o.attributes(G)===J)&&(!(!e.isCard()&&o.length>0&&o.isCard())||o.isEditableCard())){if(!n){var a=e.attributes($);if(a)return a}return this.create(e)}}}}},{key:"isNeed",value:function(e){var t=this,n=(0,_.Z)(this,to)[to],r=n[e.name];return!(!r||0===r.length||!r.some((function(n){return t.schema.checkNode(e,n.attributes)})))}}]),e}(),ro=function(e){return!!e.dataTransfer},io=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.editor=t}return(0,c.Z)(e,[{key:"getData",value:function(e){var t,n=ro(e)?e.dataTransfer:e.clipboardData,r=null===n||void 0===n?void 0:n.getData("text/html"),i=null===n||void 0===n?void 0:n.getData("text"),o=[];try{(null===n||void 0===n?void 0:n.items)&&n.items.length>0?Array.from(n.items).forEach((function(e){var t,n="file"===e.kind?e.getAsFile():null;null!==n&&(n.type&&n.type.indexOf("image/png")>-1&&!n.lastModified&&(n=new File([n],"image.png",{type:n.type})),n["ext"]=null===(t=i)||void 0===t?void 0:t.split(".").pop());n&&o.push(n)})):(null===n||void 0===n?void 0:n.files)&&n.files.length>0&&(o=Array.from(n.files))}catch(a){(null===n||void 0===n?void 0:n.files)&&n.files.length>0&&(o=Array.from(n.files))}return""===r&&i&&/^.+\.\w+$/.test(i)&&o.length>0?i="":""===i&&r&&/^(<meta.+?>)?<img.+?>$/.test(r)&&o.length>0?r="":(r||i)&&o.length>0&&!(null===(t=r)||void 0===t?void 0:t.startsWith("<img"))&&(r||!/^https(s)?:/.test(i||""))&&(o=[]),{html:r,text:i,files:o}}},{key:"write",value:function(e,t){var n,r,i=this.editor.getSelectionData(t);if(i){var o=i.html,a=i.text;return null===e||void 0===e||e.preventDefault(),null===e||void 0===e||null===(n=e.clipboardData)||void 0===n||n.setData("text/html",'<meta name="source" content="aomao" />'+o.replace(/\u200b/g,"")),null===e||void 0===e||null===(r=e.clipboardData)||void 0===r||r.setData("text",a.replace(/\u200b/g,"")),i}}},{key:"copy",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){var r=/<[^>]+>/g.test(e);return r?Z()(e,{format:"text/html",onCopy:function(n){n.setData("text/plain",new un(e,t.editor).toText())}}):Z()(e,{format:"text/plain"}),!0}var i=this.editor,o=window.getSelection(),a=o&&$t.from(i,o)||$t.create(i),s=a.cloneRange(),l=Ut('<div class="'.concat(se,'" ').concat(G,'="').concat(Y,'">&#8203;</div>'));l.css({position:"fixed",top:0,clip:"rect(0, 0, 0, 0)"});var c=function(){l.remove(),null===o||void 0===o||o.removeAllRanges(),null===o||void 0===o||o.addRange(s.toRange())};l.on("copy",(function(e){e.stopPropagation(),t.write(e,a),c()})),Ut(document.body).append(l),l.append(i.node.clone(Ut(e),!0)),n&&l.traverse((function(e){e.equal(l)||i.trigger("copy",e)})),l.append(Ut("&#8203;",null));var A=l.first(),u=l.last();a.select(l,!0),a.setStartAfter(A),a.setEndBefore(u),null===o||void 0===o||o.removeAllRanges(),null===o||void 0===o||o.addRange(a.toRange());var d=!1;try{if(d=document.execCommand("copy"),!d)throw"Copy failed"}catch(h){i.messageError("copy","The copy command was not executed successfully ",h),c()}return d}},{key:"cut",value:function(){var e=this.editor,t=$t.from(e);if(t&&st(e)){var n=t.commonAncestorNode,r=e.change;r.cacheRangeBeforeCommand(),r.delete(t);for(var i=e.node.isList(n)?n:n.find("ul,ol"),o=0;o<i.length;o++){var a,s=Ut(i[o]),l=s.find("li");l.each((function(e){var t,n;(""===e.innerText||Ne&&"\n"===e.innerText)&&(null===(t=null!==(n=e.parentElement)&&void 0!==n?n:e.parentNode)||void 0===t||t.removeChild(e))})),0===(null===(a=s.get())||void 0===a?void 0:a.childNodes.length)&&s.remove()}r.range.select(t)}}}]),e}(),oo=function e(t,n,r,i){var a=void 0,s=void 0,l=/\[\]$/;if(Array.isArray(n))for(s=0;s<n.length;s++){var c=n[s];r||l.test(t)?i(t,c):e(t+"["+("object"===("undefined"===typeof c?"undefined":(0,o.Z)(c))?s:"")+"]",c,r,i)}else if("[object Object]"===n.toString())for(a in n)n.hasOwnProperty(a)&&e(t+"["+a+"]",n[a],r,i);else i(t,n)},ao=function(e,t){return e+(/\?/.test(e)?"&":"?")+t},so=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=void 0,r=[],i=function(e,t){"function"===typeof t?t=t():null!==t&&void 0!==t||(t=""),r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(Array.isArray(e))for(var o=0;o<e.length;o++)i(e[o].name,e[o].value);else for(n in e)e.hasOwnProperty(n)&&oo(n,e[n],t,i);return r.join("&").replace(/%20/g,"+")},lo=function(e){return"undefined"!==typeof FormData&&e instanceof FormData},co=/^http/,Ao=/(^\w+):\/\//,uo=/^(20\d|1223)$/,ho="readyState",po="Content-Type",fo="X-Requested-With",go="XMLHttpRequest",mo="XDomainRequest",vo={traditional:!1,contentType:"application/x-www-form-urlencoded",requestedWith:go,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"},dataFilter:function(e){return e}},bo=function(){function e(t){var n;(0,l.Z)(this,e),this.options=void 0,this.headNode=void 0,this.request=void 0,this.isAborted=!1,this.isTimeout=!1,this.timeout=void 0,this.callbackData=void 0,this.callbackPrefix="request_"+new Date,this.uuid=0,this.promise=void 0,this.__resolve=void 0,this.__reject=void 0,"string"===typeof t&&(t={url:t});var r=t,i=r.url;P()(i,"//")&&(i=window.location.protocol+i),this.options=(0,s.Z)((0,s.Z)((0,s.Z)({},vo),t),{},{url:i,context:t.context||window,doc:t.doc||rt(),jsonpCallback:t.jsonpCallback||"callback",method:t.method||"GET"}),this.headNode=null===(n=this.options.doc)||void 0===n?void 0:n.getElementsByTagName("head")[0],this.initPromise(),this.init()}return(0,c.Z)(e,[{key:"initPromise",value:function(){var e=this;this.promise=new Promise((function(t,n){e.__resolve=t,e.__reject=n})).catch((function(){}))}},{key:"init",value:function(){var e=this,t=function(){var t;e.isTimeout=!0,null===(t=e.request)||void 0===t||t.abort()};this.timeout&&clearTimeout(this.timeout),this.timeout=void 0,this.options.timeout&&(this.timeout=setTimeout(t,this.options.timeout));var n=function(t,n){e.triggerError(t,n)},r=function(t){e.triggerSuccess(t)};this.getRequest(r,n).then((function(t){e.request=t}))}},{key:"abort",value:function(){var e;null===(e=this.request)||void 0===e||e.abort()}},{key:"defaultXHR",value:function(){var e=this.options,t=e.context,n=e.crossOrigin;if(t){if(!0===n){var r=t[go]?new t[go]:null;if(r&&"withCredentials"in r)return r;if(t[mo])return new t[mo];throw new Error("Browser does not support cross-origin requests")}return t[go]?new t[go]:new t.ActiveXObject("Microsoft.XMLHTTP")}}},{key:"succeed",value:function(){var e,t,n,r=this.options,i=r.url,o=r.context,a=Ao.exec(i),s=a?a[1]:"";return s||(s=(null===o||void 0===o?void 0:o.location.protocol)||""),co.test(s)?uo.test((null===(e=this.request)||void 0===e||null===(t=e.status)||void 0===t?void 0:t.toString())||""):!!(null===(n=this.request)||void 0===n?void 0:n.response)}},{key:"noop",value:function(){}},{key:"handleReadyState",value:function(e,t){return this.isAborted?t("Request is aborted",this.request):this.isTimeout?t("Request is aborted: timeout",this.request):void(this.request&&4===this.request[ho]&&(this.request.onreadystatechange=this.noop,this.succeed()?e(this.request):t(this.request.statusText,this.request)))}},{key:"setHeaders",value:function(e,t){t.Accept=t.Accept||vo.accept[this.options.type||"*"],this.options.crossOrigin||t[fo]||(t[fo]=vo.requestedWith),t[po]||lo(this.options.data)||(t[po]=this.options.contentType||vo.contentType),Object.keys(t).forEach((function(n){e.setRequestHeader(n,t[n])}))}},{key:"setCredentials",value:function(e){"undefined"!==typeof this.options.withCredentials&&"undefined"!==typeof e.withCredentials&&(e.withCredentials=!!this.options.withCredentials)}},{key:"generalCallback",value:function(e){this.callbackData=e}},{key:"getCallbackPrefix",value:function(e){return this.callbackPrefix+"_"+e}},{key:"handleJsonp",value:function(e,t,n){var r,i=this,o=this.options,a=o.jsonpCallback,s=o.jsonpCallbackName,l=o.doc,c=o.context;if(l&&c){var A=this.uuid++,u=a||"callback",d=s||this.getCallbackPrefix(A),h=new RegExp("((^|\\?|&)"+u+")=([^&]+)"),p=e.match(h),f=l.createElement("script"),g=0,m=-1!==navigator.userAgent.indexOf("MSIE 10.0");return p?"?"===p[3]?e=e.replace(h,"$1="+d):d=p[3]:e=ao(e,u+"="+d),c[d]=this.generalCallback,f.type="text/javascript",f.src=e,f.async=!0,"undefined"===typeof f["onreadystatechange"]||m||(f.htmlFor=f.id="_request_"+A),f.onload=f["onreadystatechange"]=function(){var e;return!(f[ho]&&"complete"!==f[ho]&&"loaded"!==f[ho]||g)&&(f.onload=f["onreadystatechange"]=null,f.onclick&&f.onclick(),t(i.callbackData),i.callbackData=void 0,null===(e=i.headNode)||void 0===e||e.removeChild(f),g=1,!0)},null===(r=this.headNode)||void 0===r||r.appendChild(f),{abort:function(){var e;f.onload=f["onreadystatechange"]=null,n("Request is aborted: timeout"),i.callbackData=void 0,null===(e=i.headNode)||void 0===e||e.removeChild(f),g=1}}}}},{key:"getRequest",value:function(){var e=(0,a.Z)(g().mark((function e(t,n){var r,i,a,s,l,c,A,u,d,h,p,f,m,v,b,y,w=this;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=(null===(r=this.options.method)||void 0===r?void 0:r.toUpperCase())||"GET",s=this.options,l=s.processData,c=s.traditional,A=s.type,u=s.context,d=s.xhr,h=s.async,p=s.before,u){e.next=4;break}return e.abrupt("return",Promise.resolve(void 0));case 4:if(f=this.options.url,m=this.options.data,"function"!==typeof m){e.next=10;break}return e.next=9,m();case 9:m=e.sent;case 10:if(((null===(i=this.options.contentType)||void 0===i?void 0:i.indexOf("json"))||-1)>-1&&"object"===(0,o.Z)(m)&&!lo(m)&&(m=JSON.stringify(m)),m=!1!==l&&m&&"string"!==typeof m&&!lo(m)?so(m,c||vo.traditional):m||null,v=void 0,b=!1,"jsonp"!==A&&"GET"!==a||!m||(f=ao(f,m),m=null),"jsonp"!==A){e.next=17;break}return e.abrupt("return",Promise.resolve(this.handleJsonp(f,t,n)));case 17:if(y=this.options.headers||{},"function"!==typeof y){e.next=22;break}return e.next=21,y();case 21:y=e.sent;case 22:if(v=("function"===typeof d?d(this.options):d)||this.defaultXHR(),v){e.next=25;break}return e.abrupt("return");case 25:return v.open(a,f,!1!==h),this.setHeaders(v,y),this.setCredentials(v),u[mo]&&v instanceof u[mo]?(v.onload=t,v.onerror=function(){n("http error",v)},v.onprogress=this.noop,b=!0):v.onreadystatechange=function(){w.handleReadyState(t,n)},p&&p(v),b?setTimeout((function(){var e;null===(e=v)||void 0===e||e.send(m)}),200):v.send(m),e.abrupt("return",Promise.resolve(v));case 32:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"getType",value:function(e){if(e)return e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0}},{key:"triggerSuccess",value:function(e){var t=this.options,n=t.dataFilter,r=t.context,i=t.success;if(r){var o=this.options.type,a=(n||vo.dataFilter)(e.responseText,o);o||(o=e&&this.getType(e.getResponseHeader("Content-Type")));var s="jsonp"!==o?this.request:e;try{s["responseText"]=a}catch(l){}if(a)switch(o){case"json":try{s=r.JSON.parse(a)}catch(c){return this.triggerError("Could not parse JSON in response",s)}break;case"html":s=a;break;case"xml":s=s.responseXML&&s.responseXML.parseError&&s.responseXML.parseError.errorCode&&s.responseXML.parseError.reason?null:s.responseXML;break}i&&i(s),this.triggerComplete(s),this.__resolve&&this.__resolve(s)}}},{key:"triggerError",value:function(e,t){var n=this.options.error,r=new Error(e);r["xhr"]=t,n&&n(r),this.triggerComplete(r),this.__reject&&this.__reject(r)}},{key:"triggerComplete",value:function(e){var t=this.options.complete;this.timeout&&clearTimeout(this.timeout),this.timeout=void 0,t&&t(e)}},{key:"retry",value:function(){this.initPromise(),this.init()}},{key:"then",value:function(e,t){var n;return null===(n=this.promise)||void 0===n?void 0:n.then(e,t)}},{key:"always",value:function(e){var t;return null===(t=this.promise)||void 0===t?void 0:t.then(e,e)}},{key:"fail",value:function(e){var t;return null===(t=this.promise)||void 0===t?void 0:t.then(void 0,e)}},{key:"catch",value:function(e){return this.fail(e)}}]),e}();bo.setup=function(e){Object.keys(e).forEach((function(t){vo[t]&&(vo[t]=e[t])}))};var yo={"image/jpeg":["jpeg","jpg","jpe"],"image/png":["png"],"image/gif":["gif"],"image/vnd.wap.wbmp":["wbmp"],"image/tiff":["tiff","tiff"],"image/vnd.adobe.photoshop":["psd"],"image/svg+xml":["svg","svgz"],"text/jsx":["jsx"],"text/less":["less"],"text/css":["css"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/csv":["cvs"],"text/xml":["xml"],"text/x-vcard":["vcf"],"text/x-vcalendar":["vcs"],"text/markdown":["md"],"text/plain":["txt"],"text/richtext":["rtx"],"text/rtf":["rtf"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js"],"text/yaml":["yaml","yml"],"audio/mp3":["mp3"],"audio/mp4":["mp4","mp4a"],"video/mp4":["mp4"],"audio/mpeg":["mpeg","mp2","mp3"],"audio/ogg":["oga"],"audio/wav":["wav"],"audio/wave":["wav"],"audio/webm":["weba"],"video/x-msvideo":["avi"],"video/quicktime":["mov","qt"],"video/ogg":["ogv"],"video/x-sgi-movie":["movie"],"application/rss+xml":["rss"],"application/json":["json"],"application/zip":["zip"],"application/gzip":["gzip"],"application/pdf":["pdf"],"application/postscript":["ai","eps","ps"],"application/msword":["doc","dot"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.ms-fontobject":["eot"],"application/vnd.android.package-archive":["apk"],"application/x-apple-diskimage":["dmg"],"application/x-iwork-keynote-sffkey":["key"],"application/x-iwork-pages-sffpages":["pages"],"application/x-iwork-keynote-sffnumbers":["numbers"],"application/x-iwork-numbers-sffnumbers":["numbers"]},wo=function(e){var t;if("string"===typeof e)return null!==(t=e.split(".").pop())&&void 0!==t?t:"";var n,r=yo[e.type]?yo[e.type][0]:"";!r&&"name"in e&&(r=null!==(n=e.name.split(".").pop())&&void 0!==n?n:"");return r},xo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He?2:10;if("number"!==typeof e)return"0B";var n={exponent:2,round:1};return e<1024&&(n.exponent=-1,n.round=0),e<1048576&&(n.exponent=1,n.round=0),K()(e,(0,s.Z)({base:t},n))},ko=function(){function e(t){(0,l.Z)(this,e),this.options=void 0,this.uploadingFiles=[],this.options=t}return(0,c.Z)(e,[{key:"createUid",value:function(e){return Date.now()+"-"+e}},{key:"request",value:function(){var e=(0,a.Z)(g().mark((function e(t,n){var r,i;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=12;break}return i=t[r],i.uid||(i.uid=this.createUid(r)),e.next=6,this.handleBefore(i,t);case 6:if(e.t0=e.sent,!1!==e.t0){e.next=9;break}t.splice(r,1);case 9:r++,e.next=1;break;case 12:this.upload(t,n);case 13:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=(0,a.Z)(g().mark((function e(t){var n,r=this,i=arguments;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=i.length>1&&void 0!==i[1]?i[1]:"file",t.forEach(function(){var e=(0,a.Z)(g().mark((function e(t){var i,o,a,s,l,c,A,u,d,h,p,f,m,v,b;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=new FormData,o=r.options,a=o.url,s=o.onUploading,l=o.onSuccess,c=o.onError,A=o.withCredentials,u=o.crossOrigin,d=o.headers,h=r.options.data,"function"!==typeof h){e.next=7;break}return e.next=6,h();case 6:h=e.sent;case 7:if(h)if(lo(h)){p=(0,k.Z)(h);try{for(p.s();!(f=p.n()).done;)m=(0,w.Z)(f.value,2),v=m[0],b=m[1],i.append(v,b)}catch(g){p.e(g)}finally{p.f()}}else Object.keys(h).forEach((function(e){i.append(e,h[e])}));return t.data&&Object.keys(t.data).forEach((function(e){i.append(e,t.data[e])})),i.append(n,t,t.name),e.next=12,new bo({xhr:function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",(function(e){e.lengthComputable&&s&&s(t,{percent:parseInt((e.loaded/e.total*100).toString(),10)})}),!1),e},url:a,data:i,contentType:r.options.contentType,type:r.options.type||"json",withCredentials:A,crossOrigin:u,headers:d,success:function(e){l&&l(e,t)},error:function(e){c&&c(e,t)},method:"POST",processData:!0});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"handleBefore",value:function(){var e=(0,a.Z)(g().mark((function e(t,n){var r,i,o,s,l,c,A=this;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.type,i=t.uid,o=t.name,s=t.size,l=wo(t),c=this.options.onBefore,e.t0=c,!e.t0){e.next=9;break}return e.next=7,c(t);case 7:e.t1=e.sent,e.t0=!1===e.t1;case 9:if(!e.t0){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",new Promise((function(e,c){var u=new FileReader;u.addEventListener("load",(function(){A.uploadingFiles[i]={uid:i,src:u.result,name:o,size:s,type:r,ext:l},n.every((function(e){return!!A.uploadingFiles[e.uid]}))?Promise.all((0,C.Z)(n.map((function(e){return new Promise(function(){var t=(0,a.Z)(g().mark((function t(n){return g().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!A.options.onReady){t.next=3;break}return t.next=3,A.options.onReady(A.uploadingFiles[e.uid],e);case 3:n(!0);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())})))).then((function(){e(!0)})):e(!0)}),!1),u.addEventListener("error",(function(){c(!1)})),u.readAsDataURL(t)})));case 12:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}(),Co=function(){function e(){(0,l.Z)(this,e)}return(0,c.Z)(e,[{key:"ajax",value:function(e){return new bo(e)}},{key:"upload",value:function(e,t,n){return new ko(e).request(t,n)}},{key:"getFiles",value:function(e){var t=e||{},n=t.event,r=t.accept,i=t.multiple;r=r||"*",!1===i?i=1:void 0!==i&&!0!==i||(i=100);var o=document.createElement("input");o.type="file",o.accept=r,o.style.display="none",o.multiple=i>1;var a=function e(){o.remove(),document.removeEventListener("mousedown",e)};return new Promise((function(e){var t=function t(){for(var n,r=[],s=null!==(n=o.files)&&void 0!==n?n:[],l=Math.min(s.length,i),c=0;c<l;c++)r.push(s[c]);o.removeEventListener("change",t),a(),e(r)};o.addEventListener("change",t),document.body.appendChild(o),n||(n=document.createEvent("MouseEvents"),n.initEvent("click",!0,!0));try{if(o.dispatchEvent)o.dispatchEvent(n);else{if(!o["fireEvent"])throw"";o["fireEvent"](n)}document.addEventListener("mousedown",a)}catch(r){o.removeEventListener("change",t),a(),e([])}}))}}]),e}(),Bo=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e,t){var n=this.engine,r=n.change,i=n.command,o=n.list,a=n.node,s=r.range.get(),l=this.engine.block;if(s.collapsed){var c=l.closest(s.startNode);if("li"===c.name&&o.isFirst(s))return e["isDelete"]||(e.preventDefault(),i.execute(o.getPluginNameByNode(c))),!1}else{var A=s.startNode,u=s.endNode,d=l.closest(A),h=l.closest(u);if("li"===d.name||"li"===h.name){e.preventDefault();var p=s.cloneRange(),f=A.first(),g=A.isCard()?A:f;if((null===g||void 0===g?void 0:g.isCard())&&o.isEmptyItem(d)){var m,v=d.parent();d.remove(),v&&a.isCustomize(v)&&0===(null===(m=v.get())||void 0===m?void 0:m.childNodes.length)&&v.remove()}var b,y="li"===d.name?d.parent():null,w="li"===h.name?h.parent():null;if("li"===d.name&&o.isFirst(s)&&p.setStartBefore(d),"li"===h.name&&l.isLastOffset(s,"end")&&p.setEndAfter(h),r.delete(p,t),d.inEditor()&&!d.equal(h)&&h.inEditor()&&"li"===h.name){p.shrinkToElementNode().shrinkToTextNode();var x=p.createSelection();d.append(h.children()),h.remove(),x.move()}if("li"===d.name)a.isCustomize(d)&&0===(null===(b=d.get())||void 0===b?void 0:b.childNodes.length)&&d.remove();var k=function(e){if(a.isList(e)){var t,n=(null===(t=e.get())||void 0===t?void 0:t.childNodes)||[];if(0==n.length)e.remove();else if(1===n.length){var r=e.first();(null===r||void 0===r?void 0:r.isCursor())&&(e.after(r),e.remove())}}};return y&&y.length>0&&a.isList(y)&&k(y),w&&w.length>0&&a.isList(w)&&k(w),o.addBr(d),d.equal(h)||o.addBr(h),s.setStart(p.startContainer,p.startOffset),s.collapse(!0),o.merge(),r.isEmpty()&&r.initValue(s),r.apply(s),!1}}if(l.isFirstOffset(s,"start")){var C=l.closest(s.startNode);if(a.isList(C)){var B=C.first();if(!B||B.isText())return e.preventDefault(),r.mergeAfterDelete(C),!1;C=B,s.setStart(C[0],0),s.collapse(!0),r.range.select(s)}if("li"===C.name){var _;if(a.isCustomize(C))return;e.preventDefault();var E=C.closest("ul");return(null===(_=C.parent())||void 0===_?void 0:_.isEditable())?(r.mergeAfterDelete(C),!1):(E.length>0?i.execute(o.getPluginNameByNode(E)):r.unwrap(C),!1)}return!0}}}]),e}(),_o=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.backspace=void 0,this.engine=t,this.backspace=new Bo(t)}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.command,i=t.list,o=n.range.get();o.shrinkToElementNode();var a=this.engine.block.closest(o.startNode),s=this.engine.block.closest(o.endNode);if("li"===a.name||"li"===s.name){o.collapsed||(this.backspace.trigger(e,a.name!==s.name),o=n.range.get()),e.preventDefault();var l=i.getPluginNameByNode(a);if(i.isLast(o)&&i.isFirst(o))r.execute(l);else{this.engine.block.split(),o=n.range.get();var c=this.engine.block.closest(o.endNode),A=i.getPlugins().find((function(e){return l===e.constructor.pluginName}));if(!A)return;if(A.cardName){var u=c.prev();u&&(i.addCardToCustomize(u,A.cardName),i.addBr(u)),i.addCardToCustomize(c,A.cardName),i.addBr(c);var d=c.next();d&&(i.addCardToCustomize(d,A.cardName),i.addBr(d))}i.merge(void 0,o),i.addBr(o.startNode.closest("ul")),o.setStart(c,this.engine.node.isCustomize(c)?1:0),o.collapse(!0).shrinkToTextNode(),n.apply(o)}return o.scrollIntoView(),!1}return!0}}]),e}(),Eo=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.CUSTOMZIE_UL_CLASS="data-list",this.CUSTOMZIE_LI_CLASS="data-list-item",this.INDENT_KEY="data-indent",this.STYLE_POSITION_NAME="list-style-position",this.STYLE_POSITION_VALUE="inside",this.backspaceEvent=void 0,this.editor=t}return(0,c.Z)(e,[{key:"init",value:function(){var e=this,t=this.editor;if(st(t)){var n,r,i=new _o(t);null===(n=t.typing.getHandleListener("enter","keydown"))||void 0===n||n.on((function(e){return i.trigger(e)})),this.backspaceEvent=new Bo(t),null===(r=t.typing.getHandleListener("backspace","keydown"))||void 0===r||r.on((function(t){var n;return null===(n=e.backspaceEvent)||void 0===n?void 0:n.trigger(t)}))}}},{key:"isEmptyItem",value:function(e){var t=e.children().toArray().filter((function(e){return!e.isCursor()})),n=this.editor.node;return"li"===e.name&&(n.isEmpty(e)||(1===t.length?n.isCustomize(e)&&t[0].isCard()||"br"===t[0].name:2===t.length&&n.isCustomize(e)&&!!t[0].isCard()&&"br"===t[1].name))}},{key:"isSame",value:function(e,t){if(e.name!==t.name)return!1;var n=this.editor.node;if(n.isCustomize(e)!==n.isCustomize(t))return!1;var r=parseInt(e.attributes(this.INDENT_KEY),10)||0,i=parseInt(t.attributes(this.INDENT_KEY),10)||0;return r===i}},{key:"isSpecifiedType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ul",n=arguments.length>2?arguments[2]:void 0,r=this.editor.node,i=!0;return e.forEach((function(e){var o;if(-1!==["li","p"].indexOf(e.name)||!(e.name===t||e.find(t).length>0))switch(e.name){case"li":if(n){var a,s,l=e.first();(null===(a=l)||void 0===a?void 0:a.isCursor())&&(l=l.next()),i=i&&r.isCustomize(e)&&((null===(s=l)||void 0===s?void 0:s.attributes(fe))||"")===n}else i=i&&!r.isCustomize(e);break;case"p":e.parent()&&"li"!==(null===(o=e.parent())||void 0===o?void 0:o.name)&&(i=!1);break;default:i=!1;break}})),i}},{key:"getPlugins",value:function(){var e=[],t=this.editor.plugin;return Object.keys(t.components).forEach((function(n){var r=t.components[n];r.isCurrent&&e.push(r)})),e}},{key:"getPluginNameByNode",value:function(e){var t=this,n=e.name,r=function(e){var n="";return t.getPlugins().some((function(t){if(t.isCurrent(e))return n=t.constructor.pluginName,!0})),n};return this.editor.node.isCustomize(e)?r(e):"li"===n&&e.parent()?r(e.parent()):""}},{key:"getPluginNameByNodes",value:function(e){for(var t="",n=0;n<e.length;n++){var r=e[n],i=r.parent(),o="";switch(r.name){case"li":case"ul":case"ol":o=this.getPluginNameByNode(e[n]);break;case"p":if(!i||"li"!==i.name)return"";o=this.getPluginNameByNode(i);break;default:if(this.editor.node.isBlock(r)&&r.find("ul,ol").length>0)break;return""}if(t&&o&&t!==o)return"";t=o}return t}},{key:"unwrapCustomize",value:function(e){var t=this.editor.node;if(t.isCustomize(e))switch(e.name){case"li":if(t.isCustomize(e)){var n=e.first();(null===n||void 0===n?void 0:n.isCard())&&n.remove()}return e.removeAttributes("class"),e;case"ul":return e.removeAttributes("class"),e;default:return e}return e}},{key:"unwrap",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ut("<p />"),r=0,i=this.editor,o=i.node,a=i.schema,s=a.data.globals["block"]||{},l=s.style||{};e.forEach((function(e){if(t.unwrapCustomize(e),o.isList(e)&&(r=parseInt(e.attributes(t.INDENT_KEY),10)||0,o.unwrap(e)),"li"===e.name){var i=o.clone(n,!1,!1);0!==r&&i.css("text-indent",2*r+"em"),e.removeAttributes(t.INDENT_KEY);var a=e.attributes();Object.keys(a).forEach((function(e){e!==$&&"id"!==e&&s[e]&&i.attributes(e,a[e])}));var c=e.css();c["text-align"]&&t.addAlign(i,c["text-align"]),delete c["text-align"],c[t.STYLE_POSITION_NAME]="",Object.keys(c).forEach((function(e){l[e]||(c[e]="")})),i.css(c),o.replace(e,i)}}))}},{key:"normalize",value:function(e){var t=this.editor;if(!st(t))return[];var n=t.change,r=t.block,i=t.node;e=e||n.range.get();var o=r.getBlocks(e),a=[];o.forEach((function(e,t){var n=e.parent();if("p"===e.name){if("li"===(null===n||void 0===n?void 0:n.name))return 0===t&&a.push(n),void i.unwrap(e);if(n&&["ul","ol"].indexOf(n.name)>-1)return e=i.replace(e,Ut("<li />")),void a.push(e)}if("li"===e.name&&"li"===(null===n||void 0===n?void 0:n.name))return 0===t&&a.push(n),void i.unwrap(e);["ul","ol"].indexOf(e.name)>-1&&"li"===(null===n||void 0===n?void 0:n.name)?i.unwrap(e):a.push(e)}));var s=e.endNode.closest("li");return a.some((function(e){return e[0]===s[0]}))||a.push(s),a}},{key:"split",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=t.node,i=e||n.range.toTrusty(),o=this.normalize(e);if(o.length>0&&("li"===o[0].name||"li"===o[o.length-1].name)){var a,s,l,c,A=i.createSelection(),u=o[0],d=o[o.length-1],h=[],p=[];if(u.prev()){a=u.parent();var f=0;while(o[f]&&"li"===o[f].name)h.push(o[f]),f+=1}if(d.next()){s=d.parent();var g=d.next();while(g&&"li"===g.name)p.push(g),g=g.next()}if(p.length>0&&s&&(l=r.clone(s,!1,!1),p.forEach((function(e){var t;null===(t=l)||void 0===t||t.append(e[0])})),s.after(l)),h.length>0&&a&&(c=r.clone(a,!1,!1),h.forEach((function(e){var t;null===(t=c)||void 0===t||t.append(e[0])})),a.after(c)),a&&s&&s.equal(a)&&"ol"===a.name){var m=(parseInt(a.attributes("start"),10)||1)+a.find("li").length;l.attributes("start",m)}A.move()}e||n.apply(i)}}},{key:"merge",value:function(e,t){var n=this,r=this.editor;if(st(r)){var i=r.change,o=r.block,a=r.node,s=r.schema,l=s.getCanMergeTags();if(0!==l.length){var c=t||i.range.toTrusty(),A=c.cloneRange(),u=e?void 0:A.shrinkToElementNode().createSelection();e=e||o.getBlocks(c);var d=!1;if(e.forEach((function(e){if(e=e.closest("ul,ol"),a.isList(e)&&-1!==l.indexOf(e.name)){var t=e.prev(),r=e.next();t&&n.isSame(t,e)&&(a.merge(t,e),e=t,d=!0),r&&n.isSame(r,e)&&(a.merge(e,r),d=!0)}})),d&&(e=o.getBlocks(c),e.length>0)){var h=e[0].closest("ul,ol");this.addStart(h)}null===u||void 0===u||u.move(),t||void 0===u||i.apply(A)}}}},{key:"addStart",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=t.node;if(!e){var i=t.block.getBlocks(n.range.get());if(0===i.length)return;e=i[0].closest("ul,ol")}if(e&&r.isList(e)){var o=parseInt(e.attributes(this.INDENT_KEY),10)||0,a=[],s=o,l=e.prev();while(l&&r.isList(l)){if("ol"===l.name){var c=parseInt(l.attributes(this.INDENT_KEY),10)||0,A=parseInt(l.attributes("start"),10)||1,u=l.find("li").length;if(0===c){a[c]=A+u;break}c<=s&&(s=c,a[c]=a[c]||A+u)}else s=parseInt(l.attributes(this.INDENT_KEY),10)||0;l=l.prev()}var d=e;while(d){if(r.isList(d)){var h=parseInt(d.attributes(this.INDENT_KEY),10)||0,p=parseInt(d.attributes("start"),10),f=d.find("li").length;if("ol"===d.name){var g=a[h];h>0?(g=g||1,g>1?d.attributes("start",g):d.removeAttributes("start"),a[h]=g+f):g&&g!==p?(g>1?d.attributes("start",g):d.removeAttributes("start"),a[h]=g+f):(a[h]=(p||1)+f,a=a.slice(0,h+1))}}else a=[];var m=d.next();if(!m)break;d=m}}}}},{key:"addIndent",value:function(e,t,n){if(this.editor.node.isList(e)){var r=this.getIndent(e);t=r+(t<0?-1:1),n&&t>n&&(t=n),t<1?e.removeAttributes(this.INDENT_KEY):e.attributes(this.INDENT_KEY,t)}}},{key:"getIndent",value:function(e){return this.editor.node.isList(e)&&parseInt(e.attributes(this.INDENT_KEY),10)||0}},{key:"addAlign",value:function(e,t){var n;"li"===e.name&&(t&&"left"!==t?(["center","right"].indexOf(t)>-1&&e.css((0,x.Z)({},this.STYLE_POSITION_NAME,this.STYLE_POSITION_VALUE)),e.css({"text-align":t})):e.css((n={},(0,x.Z)(n,this.STYLE_POSITION_NAME,""),(0,x.Z)(n,"text-align",""),n)))}},{key:"addCardToCustomize",value:function(e,t,n){var r,i;if(gt(e)&&(e=Ut(e)),"li"===e.name){var o=e.first();if(!((null===o||void 0===o?void 0:o.isBlockCard())||(null===o||void 0===o?void 0:o.isCard())&&o.attributes(fe)===t)){var a,s=this.editor,l=s.card,c=l.create(t,{value:n}),A=$t.create(s),u=Ut("<br />");if((null!==(r=null===(i=e.get())||void 0===i?void 0:i.childNodes.length)&&void 0!==r?r:0)>0)null===(a=e.first())||void 0===a||a.before(u);else e.append(u);A.select(u,!0),l.insertNode(A,c);var d=e.last();return"br"===(null===d||void 0===d?void 0:d.name)&&d.remove(),c}}}},{key:"addReadyCardToCustomize",value:function(e,t,n){if(gt(e)&&(e=Ut(e)),"li"===e.name){var r=e.first();if(!((null===r||void 0===r?void 0:r.isBlockCard())||(null===r||void 0===r?void 0:r.isCard())&&r.attributes(fe)===t)){var i=Ut("<span />");return e.prepend(i),this.editor.card.replaceNode(i,t,n),i}}}},{key:"addBr",value:function(e){var t=this,n=this.editor.node;if(n.isList(e))e.find("li").each((function(e){t.addBr(Ut(e))}));else if(n.isCustomize(e)){var r=e.last();while(null===(i=r)||void 0===i?void 0:i.isCursor()){var i;r=r.prev()}if(r){var o,a=e.children();if(1===a.length&&r.isCard())return void e.append(Ut("<br />"));if(a.length>2&&"br"===r.name)return void("br"!==(null===(o=r.prev())||void 0===o?void 0:o.name)&&r.remove());while(r){if(r.equal(e.first())&&(r.isCard()||""===r.text()))return void e.append(Ut("<br />"));if(r.type===Node.TEXT_NODE){if(""!==r.text())return;r=r.prev()}else if(r.type===Node.ELEMENT_NODE){if(!n.isMark(r)||""!==r.text())return;r=e.prev()}else r=r.prev()}}else e.append(Ut("<br />"))}}},{key:"insert",value:function(e,t){var n,r,i,o=this,a=this.editor;if(st(a)&&0!==e.childNodes.length){var s=a.change,l=a.node,c=a.block,A=t||s.range.toTrusty();A.collapsed||s.delete(A,!0,!0);var u=A.cloneRange().shrinkToElementNode(),d=u.startNode,h=u.startOffset,p=d;if(l.isList(d)&&(p=d.children().eq(h)),p=null===(n=p)||void 0===n?void 0:n.closest("li",(function(e){return l.isBlock(e)&&"LI"!==e.nodeName?void 0:e.parentElement||void 0})),0!==(null===(r=p)||void 0===r?void 0:r.length)&&"li"===(null===(i=p)||void 0===i?void 0:i.name)){A.shrinkToElementNode().shrinkToTextNode(),c.split(A);var f=A.createSelection("list-insert");this.split(A);var g=function(e){c.merge(e),o.merge(void 0,e),null===f||void 0===f||f.move(),t||s.apply(e)},m=Ut(e).toArray().some((function(e){return l.isBlock(e)}))?Ut(e.childNodes[0]):Ut("<p></p>").append(Ut(e)),v=A.startNode.closest("ul,ol");if(v&&l.isList(v)){var b=A.startNode.closest("li");if(l.isCustomize(v)){var y,w,x=null===(y=v.prev())||void 0===y||null===(w=y.first())||void 0===w?void 0:w.first();if(x){var k=a.card.find(x);k&&this.addCardToCustomize(b,k.name,k.getValue())}}var C=!l.isList(m)||this.isSame(v,m);if(C){var B,_;while(l.isBlock(m)){var E=m.first();if(!E||!l.isBlock(E))break;m=E}var S=null===(B=b.parent())||void 0===B||null===(_=B.prev())||void 0===_?void 0:_.last();if("li"===(null===S||void 0===S?void 0:S.name)){var F,T,M=null===S||void 0===S?void 0:S.children();if(null===M||void 0===M||M.each((function(e,t){var n;"BR"===e.nodeName&&(null===(n=M.eq(t))||void 0===n||n.remove())})),l.isCustomize(m))null===(F=m.first())||void 0===F||F.remove();if(m.isBlockCard())null===(T=S.parent())||void 0===T||T.after(m);else null===S||void 0===S||S.append(l.isBlock(m)?m.children():m),S&&this.addBr(S),l.isBlock(m)&&m.remove()}}else{var I,N,U,L,Q,D=null===(I=b.parent())||void 0===I||null===(N=I.prev())||void 0===N?void 0:N.last();if(D&&(l.isEmpty(D)||this.isEmptyItem(D)))D.remove(),0===(null===(U=D.parent())||void 0===U||null===(L=U.get())||void 0===L?void 0:L.childNodes.length)&&(null===(Q=D.parent())||void 0===Q||Q.remove())}if(0===e.childNodes.length||1===e.childNodes.length&&l.isList(e.childNodes[0])&&0===e.childNodes[0].childNodes.length){var H=b.parent();if(m.isBlockCard()){if(H){var O;this.isEmptyItem(b)&&1===(null===(O=H.get())||void 0===O?void 0:O.childNodes.length)&&H.remove();var z=[H],Z=m.prev();Z&&l.isList(Z)&&z.push(Z),this.merge(z)}}else{var R,P,q;if(l.isCustomize(b))null===(q=b.first())||void 0===q||q.remove();b.find("br").remove(),null===H||void 0===H||null===(R=H.prev())||void 0===R||null===(P=R.last())||void 0===P||P.append(b.children()),null===H||void 0===H||H.remove()}g(A)}else{var K=A.startNode.closest("li").parent();if(K){for(var W=e.childNodes.length,j=Ut(e.childNodes[W-1]),V=(!l.isList(j)||this.isSame(v,j))&&!j.isBlockCard(),G=!1,$=0;$<e.childNodes.length;$++){var Y=Ut(e.childNodes[$]);if(l.isList(e.childNodes[$])&&!this.isSame(v,Y)||Y.isBlockCard()){G=!0;break}}for(var X=K.prev(),J=X?[X]:[],ee=0;ee<(V&&!G?W-1:W);ee++){var te=Ut(e.childNodes[0]);if(l.isList(te)){var ne;if(0===(null===(ne=te.get())||void 0===ne?void 0:ne.childNodes.length)){te.remove();continue}K.before(te),J.push(te)}else{if(G){null===K||void 0===K||K.before(te);continue}if(l.isBlock(te)&&te.allChildren().forEach((function(e){e.type!==rt().TEXT_NODE&&l.isBlock(e)&&l.unwrap(e)})),l.isCustomize(K)){var re,ie=null===(re=K.first())||void 0===re?void 0:re.first();if(ie&&ie.isCard()){var oe=ie.attributes(fe)||ie.attributes("name"),ae=this.toCustomize(te,oe);ae&&(Array.isArray(ae)?ae:[ae]).forEach((function(e){null===K||void 0===K||K.before(e)}))}}else{var se=this.toNormal(te,K.name);(Array.isArray(se)?se:[se]).forEach((function(e){a.node.isList(e)&&(null===K||void 0===K||K.before(e))}))}}}if(J.length>0&&this.merge(J),!C&&l.isEmptyWidthChild(K)&&K.remove(),0!==e.childNodes.length){while(l.isBlock(j)){var le=j.last();if(!le||!l.isBlock(le))break;j=le}var ce=b;if(ce){var Ae;if(!(null===(Ae=j.parent())||void 0===Ae?void 0:Ae.fragment)){var ue=ce,de=j.prev();while(de&&de.length>0){var he=de.prev();ue.before(de),ue=de,de=he}}if("br"===j.name)j.remove();else{var pe=j.children();if(pe.each((function(e,t){var n;"BR"===e.nodeName&&(null===(n=pe.eq(t))||void 0===n||n.remove())})),l.isCustomize(ce)){var ge;if(l.isCustomize(j)){var me=j.first();(null===me||void 0===me?void 0:me.isCard())&&me.remove()}null===(ge=ce.first())||void 0===ge||ge.after(l.isBlock(j)?j.children():j)}else ce.prepend(l.isBlock(j)?j.children():j);this.addBr(ce),l.isBlock(j)&&j.remove()}}g(A)}else{if(l.isEmpty(b)||this.isEmptyItem(b)){var ve,be,ye,we,xe=null===(ve=b.parent())||void 0===ve?void 0:ve.prev();b.find("br").remove(),l.isCustomize(b)&&(null===(be=b.first())||void 0===be||be.remove()),xe&&l.isList(xe)?null===(ye=xe.last())||void 0===ye||ye.append(b.children()):xe&&xe.append(b.children()),null===(we=b.parent())||void 0===we||we.remove()}g(A)}}else g(A)}}else g(A)}}}},{key:"blockToItem",value:function(e,t,n,r){var i=Ut("<li></li>"),o=this.editor,a=o.node,s=o.schema;if(!a.isList(t))return t;var l=Ge(e.css("text-indent"))/2,c=s.data.globals["block"]||{},A=e.attributes();Object.keys(A).forEach((function(e){e!==$&&"id"!==e&&c["name"]&&i.attributes(e,A[e])}));var u=c.style||{},d=e.css();return d["text-align"]&&this.addAlign(i,d["text-align"]),delete d["text-align"],delete d[this.STYLE_POSITION_NAME],Object.keys(d).forEach((function(e){u[e]||delete d[e]})),i.css(d),e=a.replace(e,i),n&&(e.addClass(this.CUSTOMZIE_LI_CLASS),this.addCardToCustomize(e,n,r)),l&&t.attributes(this.INDENT_KEY,l),a.wrap(e,t)}},{key:"toCustomize",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ul",o=this.editor.node;if(Array.isArray(e)){var a=[];return e.forEach((function(e){o.isCustomize(e)&&r.unwrapCustomize(e),a=a.concat(r.toCustomize(e,t,n,i))})),a}var s=Ut("<".concat(i,' class="').concat(this.CUSTOMZIE_UL_CLASS,'"/>'));switch(e.name){case"li":return e.addClass(this.CUSTOMZIE_LI_CLASS),this.addCardToCustomize(e,t,n),e;case"ul":case"ol":return s.attributes(e.attributes()),e=o.replace(e,s),e;default:if("p"===e.name||o.isNestedBlock(e)&&!e.isBlockCard()){var l;if("li"===(null===(l=e.parent())||void 0===l?void 0:l.name))return o.unwrap(e),e;e=this.blockToItem(e,s,t,n)}return e}}},{key:"toNormal",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ul",r=arguments.length>2?arguments[2]:void 0,i=this.editor.node;if(Array.isArray(e)){var o=[];return e.forEach((function(e){var i=t.toNormal(e,n,r);o=o.concat(i)})),o}this.unwrapCustomize(e);var a=Ut("<".concat(n," />"));switch(e.name){case"li":case n:return e;case"ol":case"ul":return a.attributes(e.attributes()),"ul"===a.name&&a.removeAttributes("start"),e=i.replace(e,a),e;default:if("p"===e.name||i.isNestedBlock(e)&&!e.isBlockCard()){var s;if("li"===(null===(s=e.parent())||void 0===s?void 0:s.name))return i.unwrap(e),e;e=this.blockToItem(e,a),r&&e.attributes("start",r)}return e}}},{key:"isFirst",value:function(e){var t=e.startNode,n=e.startOffset,r=e.cloneRange(),i="li"===t.name?t:t.closest("li");if(!i[0])return!1;r.select(i,!0),r.setEnd(t[0],n);var o=r.cloneContents();if(!o.firstChild)return!0;var a=Ut(o.firstChild),s=Ut(o.lastChild||[]);if(1===o.childNodes.length&&"br"===a.name)return!0;if(1===o.childNodes.length&&i.hasClass(this.CUSTOMZIE_LI_CLASS)&&a.isCard())return!0;var l=this.editor.node;if(2===o.childNodes.length&&i.hasClass(this.CUSTOMZIE_LI_CLASS)&&a.isCard()&&l.isEmpty(s))return!0;var c=Ut("<div />");return c.append(o),l.isEmpty(c)}},{key:"isLast",value:function(e){var t=e.endNode,n=e.endOffset,r=e.cloneRange(),i="li"===t.name?t:t.closest("li");if(!i[0])return!1;r.select(i,!0),r.setStart(t,n);var o=r.cloneContents();if(!o.firstChild)return!0;var a=Ut(o.firstChild),s=Ut(o.lastChild||[]);if(1===o.childNodes.length&&"br"===a.name)return!0;if(1===o.childNodes.length&&i.hasClass(this.CUSTOMZIE_LI_CLASS)&&a.isCard())return!0;var l=this.editor.node;if(2===o.childNodes.length&&i.hasClass(this.CUSTOMZIE_LI_CLASS)&&a.isCard()&&l.isEmpty(s))return!0;var c=Ut("<div />");return c.append(o),l.isEmpty(c)}}]),e}(),So=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.node,i=t.block,o=n.range.get(),a=o.cloneRange().shrinkToTextNode(),s=a.collapsed,l=a.endNode,c=a.startNode,A=a.startOffset,u=a.endOffset;if(s){var d=i.closest(c);if(d.length>0&&r.isEmpty(d))return}if(l.type===Node.TEXT_NODE||c.type===Node.TEXT_NODE){if(!s){var h=l.parent();if(h&&l.type===Node.TEXT_NODE&&r.isMark(h)){var p=l.text(),f=p.substr(u);if(!/^\u200b$/.test(f))return!0;o.setEnd(l,u+1)}return!0}var g=c.parent();if(g&&c.type===Node.TEXT_NODE&&r.isMark(g)){if(A<1)return!0;var m=c.text(),v=m.substr(A-1,1);if(!/^\u200b$/.test(v))return!0;if(1===A){var b=g.prev();if(b&&!r.isEmpty(b)){var y=o.cloneRange().select(b,!0).shrinkToTextNode().collapse(!1),w=y.startNode,x=y.startOffset;o.setStart(w,x-1)}else if(!b&&r.isEmpty(g)){var k=g.parent(),C=g.getIndex();g.remove(),k&&o.setStart(k,C<=0?0:C-1)}}else o.setStart(c,A-1);return!0}if(g=c.prev()||void 0,g&&c.type===Node.TEXT_NODE&&r.isMark(g)){var B=c.text(),_=B.substr(A-1,1);if(!/^\u200b$/.test(_))return!0;if(1===A){var E=o.cloneRange().select(g,!0).shrinkToTextNode().collapse(!1),S=E.startNode,F=E.startOffset;o.setStart(S,F-1)}else o.setStart(c,A>0?A-1:0)}}return!0}}]),e}(),Fo=function(){function e(t){var n=this;(0,l.Z)(this,e),this.editor=void 0,this.pluginCaches=new Map,this.findSameParent=function(e,t){var r=n.editor.node;if(r.isMark(e)){var i=void 0;if(n.compare(e,t,!0))return!0;if(i=e.parent())return n.findSameParent(i,t)}return!1},this.editor=t}return(0,c.Z)(e,[{key:"init",value:function(){var e=this,t=this.editor;if(st(t)){var n,r=new So(t);null===(n=t.typing.getHandleListener("backspace","keydown"))||void 0===n||n.on((function(e){return r.trigger(e)})),t.on("keydown:space",(function(t){return e.triggerMarkdown(t)})),t.on("keydown:enter",(function(t){return e.triggerMarkdown(t)}))}}},{key:"triggerMarkdown",value:function(e){var t,n=this.editor;if(st(n)&&!1!==(null===(t=n.options.markdown)||void 0===t?void 0:t.mode)){var r=n.change,i=r.range.get();if(i.collapsed&&!r.isComposing()){var o=i.cloneRange().shrinkToTextNode(),a=o.startNode,s=o.startOffset,l=a.type===Node.TEXT_NODE?a:a.children().eq(s-1);if(l){var c=i.toPath(),A=l.type===Node.TEXT_NODE?l.text().substr(0,s):l.text(),u=ct(n,"zero"),d=u.renderer,h=u.options,p=u.parseInline(A,{});if(0!==p.length){var f=!1,g="";if(p.forEach((function(e){var t="",r=e.children||[];r.forEach((function(i,o){var a=i.type,s=n.trigger("markdown-it-token",{token:e,markdown:u,callback:function(e){t+=e}});!1!==s?(f||"text"===a||(f=!0),"undefined"!==typeof d.rules[a]?t+=d.rules[a](r,o,h,{},d):t+=d.renderToken(r,o,h)):f=!0})),g+=t})),f){var m=n.node;e.preventDefault(),i.setStart(l[0],0),i.setEnd(l[0],s),r.paste(g,i),r.rangePathBeforeCommand=c,i.collapse(!1),i.enlargeToElementNode();var v=Ut(g),b=v.last(),y=v.eq(v.length-1);(m.isMark(v)||b&&m.isMark(b)||y&&m.isMark(y))&&m.insertText(" ",i),r.range.select(i)}return!f}}}}}},{key:"findPlugin",value:function(e){var t=this.editor,n=t.node,r=t.plugin,i=t.schema;if(0!==e.length&&n.isMark(e)){var o=e.get().cloneNode(),a=o.outerHTML,s=this.pluginCaches.get(a);if(s)return s;for(var l in r.components){var c=r.components[l];if(Di(c)&&e.name===c.tagName){var A=c.schema();if(Array.isArray(A)?A.find((function(t){return i.checkNode(e,t.attributes)})):i.checkNode(e,A.attributes))return this.pluginCaches.set(a,c),c}}return s}}},{key:"closest",value:function(e){var t=this.editor.node,n=e.parent();while(n&&!n.isEditable()&&!t.isBlock(n)){if(t.isMark(n))return n;var r=n.parent();if(!r)break;n=r}return e}},{key:"closestNotMark",value:function(e){while(this.editor.node.isMark(e)||e.isText()){if(e.isEditable())break;var t=e.parent();if(!t)break;e=t}return e}},{key:"compare",value:function(e,t,n){if(e.name!==t.name)return!1;var r=e.attributes();delete r["style"],delete r[$];var i=t.attributes();delete i["style"],delete i[$];var o=e.css(),a=t.css();delete r["class"],delete i["class"];var s=e.get().className.trim(),l=t.get().className.trim(),c=""!==s?s.split(/\s+/):[],A=""!==l?l.split(/\s+/):[],u=this.editor.schema,d=u.find((function(t){return t.name===e.name})),h=function(e){for(var t=0;t<d.length;t++){var n=d[t];if(n.attributes&&u.checkValue(n.attributes,"class",e.join(" ").trim()))return n.attributes["class"].toString()}return e.join(" ").trim()};return n||(c=c.length>0?[h(c)]:[],A=A.length>0?[h(A)]:[]),Object.keys(r).length===Object.keys(i).length&&(!!Object.keys(r).every((function(e){return n?r[e]===i[e]:!!i[e]}))&&(Object.keys(o).length===Object.keys(a).length&&(!!Object.keys(o).every((function(e){return n?o[e]===a[e]:!!a[e]}))&&(c.length===A.length&&!!c.every((function(e){return-1!==A.indexOf(e)}))))))}},{key:"contain",value:function(e,t){var n=t.attributes(),r=n["style"]||{};delete n["style"];var i=e.attributes(),o=i["style"]||{};return delete i["style"],Object.keys(n).every((function(e){return!!i[e]}))&&Object.keys(r).every((function(e){return!o[e]}))}},{key:"unwrapEmptyMarks",value:function(e,t){var n=this.editor.node,r=e.allChildren();r.forEach((function(e){if(n.isEmpty(e)&&n.isMark(e)&&(!t||t(e))){var r=e.children();1===r.length&&r.isText()?e.remove():n.unwrap(e)}}))}},{key:"splitOnCollapsed",value:function(e,t,n){var r=this;if(e.collapsed){e.enlargeFromTextNode(),e.shrinkToElementNode();var i=e.startNode,o=i.parent(),a=i.isCard()?i:i.closest(xe),s=this.editor.node;if((0===a.length||"inline"!==a.attributes(me))&&(s.isMark(i)||o&&s.isMark(o))){var l,c,A=this.closestNotMark(i),u=e.createSelection(),d=u.getNode(A,"left"),h=void 0,p=void 0,f=[];if(n){gt(n)&&(n=Ut(n));var g=n.getPath(A.get()),m=A.clone(!0);f=g.slice(1),p=Ut(m.getChildByPath(g.slice(0,1))),h=u.getNode(m,"right",!1)}else h=u.getNode(A,"right");this.unwrapEmptyMarks(d,(function(e){return!e.isCursor()})),this.unwrapEmptyMarks(h,(function(e){t&&!Array.isArray(t)&&(t=[t]);var n=!t||0===t.length||!e.isCard()&&t.some((function(t){return r.compare(e,t)}));return n}));var v=A.children();v.each((function(e,t){var n=v.eq(t);(null===n||void 0===n?void 0:n.isCard())||null===n||void 0===n||n.remove()}));var b=void 0,y=function(e){e.each((function(t,n){var r=e.eq(n);if(null===r||void 0===r?void 0:r.isCard())return b=b?b.next():A.first(),void(b&&(e[n]=b[0]));b?(b.after(t),b=r):(b=r,A.prepend(t))}))},w=d.children(),x=w.toArray();y(w);var k=h.children(),C=k.toArray();p&&(n=null===(l=C.find((function(e){return e.equal(p)})))||void 0===l?void 0:l.getChildByPath(f)),y(k),C=k.toArray();var B=Ut("",null);if(1===x.length&&"br"===x[0].name&&(x[0].remove(),x.splice(0,1)),1===C.length&&"br"===C[0].name&&(C[0].remove(),C.splice(0,1)),C.filter((function(e){return!e.isCursor()})).length>0){for(var _=C[0],E=0;E<C.length-1;E++)if(_=C[E],!_.isCursor())break;if(s.isEmpty(_)){var S=_.first();while(S&&!S.isText())_=S,S=S.first();_.isText()?_.before(B):_.prepend(B)}else{var F=s.isMark(i)?i:i.parent(),T=B;t&&!Array.isArray(t)&&(t=[t]);var M=function(){var e=F.clone();if(!t.some((function(t){return r.compare(e,t)}))){var n=B.equal(T);T=s.wrap(T,e),n&&(B=T.first())}F=F.parent()};while(t&&t.length>0&&F&&s.isMark(F))M();_.before(T)}e.select(B).collapse(!1)}else if(x.filter((function(e){return!e.isCursor()})).length>0){var I=x[x.length-1];I.after(B),e.select(B).collapse(!1)}else e.select(A,!0).collapse(!0);var N=!1;A.children().each((function(e){var t=Ut(e);if(t.isText()){var n=e.textContent,r=(null===n||void 0===n?void 0:n.replace(/\u200b+/g,""))||"";if(n!==r&&(e.textContent=r),N){var i=t.next(),o=t.parent();(!i&&o&&!s.isInline(o)||i&&!s.isInline(i))&&r.startsWith("")?(r=r.substring(1),r?e.textContent=r:t.remove()):N=!1}r.endsWith("")&&(N=!0)}else N=!1}));var U=s;if(null!==(c=B[0].parentElement)&&void 0!==c?c:B[0].parentNode){var L=B[0],Q=null,D=0,H=function(e,t){var n=function(e){return t?e.previousSibling:e.nextSibling};while(e){if(e.nodeType!==L.nodeType)return;var r=n(e);if(e.textContent===Q){var i,o=null!==(i=e.parentElement)&&void 0!==i?i:e.parentNode;if(r&&U.isInline(r)||!r&&o&&U.isInline(o))break;null===o||void 0===o||o.removeChild(e),e=r}else{var a,s;if(t)while(Q&&(null===(l=e.textContent)||void 0===l?void 0:l.endsWith(Q))){var l,c,A=null!==(c=e.parentElement)&&void 0!==c?c:e.parentNode;if(r&&U.isInline(r)||!r&&A&&U.isInline(A))break;e.textContent=e.textContent.substring(0,e.textContent.length-D)}else while(Q&&(null===(u=e.textContent)||void 0===u?void 0:u.startsWith(Q))){var u,d,h=null!==(d=e.parentElement)&&void 0!==d?d:e.parentNode;if(r&&U.isInline(r)||!r&&h&&U.isInline(h))break;e.textContent=e.textContent.substring(Q.length)}if(0!==(null===(a=e.textContent)||void 0===a?void 0:a.length))return;var p=null!==(s=e.parentElement)&&void 0!==s?s:e.parentNode;null===p||void 0===p||p.removeChild(e),e=r}}};if(L.nodeType===Node.TEXT_NODE){var O=L.textContent;Q=O,D=Q.length,H(L.previousSibling,!0),H(L.nextSibling,!1)}}}return n}}},{key:"splitOnExpanded",value:function(e,t){if(!e.collapsed){e.enlargeToElementNode(),e.shrinkToElementNode();var n=e.startNode,r=e.endNode,i=n.isCard()?n:n.closest(xe),o=r.isCard()?r:r.closest(xe);if(!(i.length>0&&"inline"===i.attributes(me)||o.length>0&&"inline"===o.attributes(me))){var a=this.closestNotMark(n),s=this.closestNotMark(r);if(!a.equal(s)){var l=e.cloneRange();l.collapse(!0);var c=e.cloneRange();c.collapse(!1);var A=void 0,u=l.startOffset,d=c.endOffset;return void(a.contains(s)?(A=this.splitOnCollapsed(l,t,c.endNode),e.setStart(l.startContainer,l.startOffset),A&&c.setOffset(A,d,d),this.splitOnCollapsed(c,t),e.setEnd(c.startContainer,c.startOffset)):(A=this.splitOnCollapsed(c,t,l.startNode),e.setEnd(c.startContainer,c.startOffset),A&&l.setOffset(A,u,u),this.splitOnCollapsed(l,t),e.setStart(l.startContainer,l.startOffset)))}var h=this.editor.node,p=n.parent(),f=h.isMark(n)||p&&h.isMark(p),g=r.parent(),m=h.isMark(r)||g&&h.isMark(g);if(!f&&!m)return;var v=e.commonAncestorNode;v.isText()&&(v=v.parent());var b=this.closestNotMark(v),y=e.createSelection(),w=y.getNode(b,"left"),x=y.getNode(b),k=y.getNode(b,"right");this.unwrapEmptyMarks(w),this.unwrapEmptyMarks(k);var C=b.children();C.each((function(e,t){var n=C.eq(t);(null===n||void 0===n?void 0:n.isCard())||null===n||void 0===n||n.remove()}));var B=void 0,_=function(e){e.each((function(t,n){var r=e.eq(n);if(null===r||void 0===r?void 0:r.isCard())return B=B?B.next():b.first(),void(B&&(e[n]=B[0]));B?(B.after(t),B=r):(B=r,b.prepend(t))}))},E=w.children();_(E);var S=x.children(),F=S.toArray();_(S);var T=k.children();_(T),e.setStartBefore(F[0][0]),e.setEndAfter(F[F.length-1][0])}}}},{key:"split",value:function(e,t){var n=this.editor;if(st(n)){var r=n.change,i=e||r.range.toTrusty(),o=rt(i.startContainer),a=i.collapsed;if(("string"===typeof t||!Array.isArray(t)&&t&&gt(t))&&(t=Ut(t,o)),a)this.splitOnCollapsed(i,t);else{var s=i.createSelection("mark-split");this.splitOnExpanded(i,t),s.move()}e||r.apply(i)}}},{key:"wrapByNode",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.findPlugin(t),i=arguments.length>3?arguments[3]:void 0,o=this.editor.node;if(o.isMark(e)){var a;0===(null===(a=e.get())||void 0===a?void 0:a.childNodes.length)&&e.html("&#8203;");var s=e,l=s.children().toArray(),c=this.findPlugin(s),A=!1;while(o.isMark(s)&&1===l.filter((function(e){return!e.isCursor()})).length&&r&&c&&r.mergeLeval<=c.mergeLeval){var u=l.find((function(e){return!e.isCursor()}));if(o.isMark(u))s=u,l=s.children().toArray();else{if(!u.isText())break;s=u}if(r.name===c.name){A=!0;break}c=this.findPlugin(s)}o.removeZeroWidthSpace(s);var d=s.parent();if(s.isText()||A){var h=!1;while(d&&o.isMark(d)){if(this.compare(d.clone(),t,!0)){h=!0;break}if(1===d.children().toArray().filter((function(e){return!e.isCursor()})).length){var p=this.findPlugin(d);if(r&&r===p&&!0===r.combineValueByWrap){o.wrap(d,t,!0),h=!0;break}if(r&&r===p){o.unwrap(d),h=!1;break}}d=d.parent()}if(h)return!1}var f=s.allChildren();return f.forEach((function(e){if(e.type!==rt().TEXT_NODE&&o.isMark(e)){var t=n.findPlugin(e);t!==r||(null===r||void 0===r?void 0:r.combineValueByWrap)||o.unwrap(e)}})),o.wrap(s,t)}if("br"===e.name){var g=e.parent();if(g&&o.isBlock(g)){var m=t.clone(!0);return m.html("&#8203;"),o.replace(e,m),m}}else if(e.isCard()){var v=this.editor.card.find(e);if(v&&v.executeMark)return v.executeMark(t,!0)}else if(e.isText()&&!o.isEmpty(e)){o.removeZeroWidthSpace(e);var b=e.parent(),y=!1;while(b&&o.isMark(b)){if(this.compare(b.clone(),t,!0)){y=!0;break}if(1===b.children().toArray().filter((function(e){return!e.isCursor()})).length||i&&i.equal(b)){var w=this.findPlugin(b);if(r&&r===w&&!0===r.combineValueByWrap){o.wrap(b,t,!0),y=!0;break}if(r&&r===w){var x=o.unwrap(b),k=x.find((function(e){return!e.isCursor()&&o.isMark(e)}));k?b=k:x.length>0&&(b=x[0].parent()),y=!1;break}}var C=b.parent();if(!C||!o.isMark(b))break;b=C}if(y)return!1;var B=e.parent(),_=B?this.findPlugin(B):void 0,E=!1,S=function(){E=!0;var r=B.children().toArray(),i=B.clone();r.forEach((function(n){n.isCursor()||3===n.type&&/^\u200b$/.test(n.text()||"")||(e.equal(n)||n.contains(e)?e=o.wrap(o.replace(e,i),t):(n=o.wrap(n,i),o.wrap(n,t)))})),o.unwrap(B),B=n.closest(e)};while(B&&o.isMark(B)&&r&&_&&r.mergeLeval>_.mergeLeval)S();return E||o.wrap(e,t),e}}},{key:"wrap",value:function(e,t){var n=this,r=this.editor,i=st(r)?r.change:void 0;if(t||i){var o=r.node,a=t||i.range.toTrusty(),s=rt(a.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,s)),o.isMark(e)){var l=a.commonAncestorNode;l.type===Node.TEXT_NODE&&(l=l.parent());var c=r.card.find(l,!0),A=null===c||void 0===c?void 0:c.isEditable,u=A?(null===c||void 0===c?void 0:c.getSelectionNodes)?c.getSelectionNodes():[]:[l];0===u.length&&(A=!1,u.push(l));var d=o,h=this.findPlugin(e);if(a.collapsed&&(!A||!(null===c||void 0===c?void 0:c.getSelectionNodes)||1===u.length)){0===e.children().toArray().filter((function(e){return!e.isCursor()})).length&&e.append(s.createTextNode(""));var p=a.shrinkToTextNode(),f=p.startNode,g=f.parent(),m=[],v=!1;if(f.isText()){var b=!1;while(g&&d.isMark(g)){var y;if(this.compare(g.clone(),e,!0)){b=!0;break}var w=this.findPlugin(g);if(1===(null===(y=g.get())||void 0===y?void 0:y.childNodes.length)){if(h&&h===w&&!0===h.combineValueByWrap){d.wrap(g,e,!0),b=!0;break}if(h&&h===w){if(this.split(a),a.collapsed){var x=g.parent();while(x&&d.isMark(x))e=d.wrap(e,x),x=x.parent()}b=!1;break}}h&&(!w||h.mergeLeval>w.mergeLeval)?m.push(g.clone(!1)):!v&&m.length>0&&(m.push(e.clone(!1)),v=!0),g=g.parent()}if(b)return}if(m.length>0){var k=m[0];k.append(e.children());for(var C=1;C<m.length;C++)k=d.wrap(k,m[C]);e=v?k:d.wrap(k,e),this.split(a)}return d.insert(e,a),this.merge(a),a.handleBr(),void(t||null===i||void 0===i||i.apply(a))}A||(this.split(a),l=a.commonAncestorNode,l.type===Node.TEXT_NODE&&(l=l.parent()),u[0]=l);var B=A?void 0:a.createSelection();if(!B||B.anchor||B.focus){var _=!!A;if(u.forEach((function(t){t.traverse((function(r){if(A||!r.equal(null===B||void 0===B?void 0:B.anchor)){if(_){if(!A&&r.equal(null===B||void 0===B?void 0:B.focus))return _=!1,!1;var i=d.isMark(r),o=n.wrapByNode(r,e,h,t);if(o&&"boolean"!==typeof o&&i){var a;if(!A&&(null===B||void 0===B?void 0:B.focus)&&o.find("[".concat(G,'="').concat(B.focus.attributes(G),'"]')).equal(B.focus))return _=!1,!1;if((null===B||void 0===B?void 0:B.focus)&&(null===(a=o.next())||void 0===a?void 0:a.equal(B.focus)))return _=!1,!1}if("undefined"!==typeof o)return!0}}else _=!0}),!0,"editable")})),null===B||void 0===B||B.move(),A){var E=[];u.forEach((function(e){e.allChildren().forEach((function(e){e.isElement()&&o.isMark(e)&&E.push(e)}))})),this.mergeMarks(E)}else this.merge(a);t||null===i||void 0===i||i.apply(a)}else t||null===i||void 0===i||i.apply(a)}}}},{key:"mergeMarks",value:function(e){var t=this,n=this.editor.node;e.forEach((function(e){var r=e.prev(),i=e.next(),o=e.parent();if(o&&t.findSameParent(o,e))n.unwrap(e);else{r&&t.compare(r,e,!0)&&(n.merge(r,e),e=r),i&&t.compare(i,e,!0)&&n.merge(e,i);var a=[],s=e.children();s.each((function(e,t){var r=s.eq(t);r&&!r.isCursor()&&n.isMark(r)&&a.push(r)})),a.length>0&&t.mergeMarks(a)}}))}},{key:"merge",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=e||n.range.toTrusty(),i=this.findMarks(r);if(0!==i.length){var o=r.shrinkToElementNode().createSelection();this.mergeMarks(i),o.move(),r.handleBr(),e||n.apply(r)}}}},{key:"unwrapByNodes",value:function(e,t){var n=this,r=this.editor,i=r.node;e.forEach((function(e){!t||!e.isCard()&&(Array.isArray(t)?t:[t]).some((function(t){return n.compare(e,t)}))?i.unwrap(e):t?(Array.isArray(t)?t:[t]).forEach((function(t){var n,i=t.css();Object.keys(i).forEach((function(t){e.css(t,"")}));var o=null===(n=t.get())||void 0===n?void 0:n.className.split(/\s+/);o&&function(){for(var t=r.schema,n=t.find((function(t){return t.name===e.name})),i=function(r){var i=n[r];o.forEach((function(n){n=n.trim(),""!==n&&i.attributes&&t.checkValue(i.attributes,"class",n)&&e.removeClass(n)}))},a=0;a<n.length;a++)i(a)}()})):(e.removeAttributes("class"),e.removeAttributes("style"))}))}},{key:"unwrap",value:function(e,t){var n=this.editor;if(st(n)){var r=n.change,i=n.node,o=t||r.range.toTrusty(),a=rt(o.startContainer)||document;void 0===e||Array.isArray(e)||"string"!==typeof e&&!gt(e)||(e=Ut(e,a));var s=o.commonAncestorNode;s.type===Node.TEXT_NODE&&(s=s.parent());var l=n.card.find(s,!0),c=null===l||void 0===l?void 0:l.isEditable,A=c?(null===l||void 0===l?void 0:l.getSelectionNodes)?l.getSelectionNodes():[]:[s];if(0===A.length&&(c=!1,A.push(s)),c||(this.split(o,o.collapsed?e:void 0),s=o.commonAncestorNode,s.type===Node.TEXT_NODE&&(s=s.parent()),A[0]=s),!o.collapsed||c&&(null===l||void 0===l?void 0:l.getSelectionNodes)&&1!==A.length){var u=c?void 0:o.createSelection("mark-unwrap");if(u&&!u.has())return this.merge(o),void(t||r.apply(o));var d=[],h=!!c;if(A.forEach((function(t){t.traverse((function(t){if(c||!t.isText()&&(null===u||void 0===u?void 0:u.anchor))if(c||(null===u||void 0===u?void 0:u.anchor)&&!t.equal(u.anchor)){if(h&&(c||!t.equal(null===u||void 0===u?void 0:u.focus)))if(i.isMark(t)&&!t.isCard()&&(c||o.isPointInRange(t,0)))d.push(t);else if(t.isCard()){var r=n.card.find(t);r&&r.executeMark&&(Array.isArray(e)?e:[e]).forEach((function(e){r.executeMark(e,!1)}))}}else if(!c&&(h=!0,(null===u||void 0===u?void 0:u.anchor)&&t.equal(u.anchor)&&!u.anchor.prev())){var a=u.anchor.parent();while(a&&!a.isCard()&&i.isMark(a)){var s,l;if(d.push(a),a=a.parent(),a&&(null!==(s=null===(l=a.get())||void 0===l?void 0:l.childNodes.length)&&void 0!==s?s:0)>1)break}}}),!0,"editable")})),this.unwrapByNodes(d,e),null===u||void 0===u||u.move(),c){var p=[];A.forEach((function(e){e.allChildren().forEach((function(e){e.isElement()&&i.isMark(e)&&p.push(e)}))})),this.mergeMarks(p)}else this.merge(o);t||r.apply(o)}else t||r.apply(o)}}},{key:"insert",value:function(e,t){var n,r=this.editor;if(st(r)){var i=r.change,o=r.node,a=t||i.range.toTrusty();if("string"===typeof e||gt(e)){var s=rt(a.startContainer);e=Ut(e,s)}a.collapsed||i.delete(a),null===(n=o.insert(e,a))||void 0===n||n.handleBr().select(e).collapse(!1),t||i.apply(a)}}},{key:"findMarks",value:function(e){var t=this.editor,n=e.cloneRange();if(n.startNode.isRoot()&&n.shrinkToElementNode(),!n.startNode.inEditor()||t.card.find(n.startNode))return[];var r=t.node,i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.collapsed){var i=t.startNode,o=t.startOffset,a=i.findParent();if(a){var s=t.cloneRange();if(s.select(a,!0),n){s.setEnd(i,o),s.enlargeFromTextNode(),s.enlargeToElementNode(!0);var l=i.get().childNodes,c=s.endNode,A=s.endOffset,u=c.get().childNodes,d=u.item(A),h=l.item(o)||l.item(o-1);if(!e&&c.type===Node.ELEMENT_NODE&&d&&r.isBlock(d)&&(i.type!==Node.ELEMENT_NODE||h&&!r.isBlock(h)))return;s.select(a,!0),s.setStart(c,A),s.shrinkToElementNode(),s.shrinkToTextNode(),t.setStart(s.startContainer,s.startOffset),t.collapse(!0)}else{s.setStart(i,o),s.enlargeFromTextNode(),s.enlargeToElementNode(!0);var p=i.get().childNodes,f=s.startNode,g=s.startOffset,m=f.get().childNodes,v=m.item(g),b=p.item(o)||p.item(o-1);if(!e&&f.type===Node.ELEMENT_NODE&&v&&r.isBlock(v)&&(i.type!==Node.ELEMENT_NODE||b&&!r.isBlock(b)))return;s.select(a,!0),s.setEnd(f,g),s.shrinkToElementNode(),s.shrinkToTextNode(),t.setEnd(s.endContainer,s.endOffset),t.collapse(!1)}}}};if(!n.collapsed){var o=n.cloneRange(),a=n.cloneRange();o.collapse(!0),a.collapse(!1),i(!0,o,!0),i(!0,a),n.setStart(o.startContainer,o.startOffset),n.setEnd(a.startContainer,a.startOffset)}i(!1,n);var s=n.startContainer,l=n.startOffset,c=n.endContainer,A=n.endOffset,u=s,d=c;s.nodeType===Node.ELEMENT_NODE&&s.childNodes[l]&&(u=s.childNodes[l]||s),c.nodeType===Node.ELEMENT_NODE&&A>0&&c.childNodes[A-1]&&(d=c.childNodes[A-1]||s),n.collapsed&&(u=d);var h=function(e,t){e.push(t)},p=r,f=function(e){var n=[];while(e){if(e.type===Node.ELEMENT_NODE&&e.isEditable())break;if(!p.isMark(e)||e.attributes(fe)||e.attributes(be)){if(e.isCard()){var r=t.card.find(e);(null===r||void 0===r?void 0:r.queryMarks)&&n.push.apply(n,(0,C.Z)(r.queryMarks()))}}else n.push(e);var i=e.parent();if(!i)break;e=i}return n},g=f(Ut(u)),m=n.commonAncestorNode,v=t.card.find(m,!0),b=null===v||void 0===v?void 0:v.isEditable,y=b?(null===v||void 0===v?void 0:v.getSelectionNodes)?v.getSelectionNodes():[]:[m];if(0===y.length&&(b=!1,y.push(m)),(!n.collapsed||b)&&(f(Ut(d)).forEach((function(e){return h(g,e)})),s!==c||b)){var w=!1,x=!1;y.forEach((function(e){e.traverse((function(e){if(x)return!1;if(e[0]!==s){if(w){if(e[0]===c)return x=!0,!1;if(!p.isMark(e)||e.attributes(fe)||e.attributes(be)){if(e.isCard()){var n=t.card.find(e);(null===n||void 0===n?void 0:n.queryMarks)&&n.queryMarks().forEach((function(e){h(g,e)}))}}else h(g,e)}}else w=!0}),!0,"editable")}))}for(var k=0;k<g.length;k++)for(var B=k+1;B<g.length;B++)g[k][0]==g[B][0]&&(g.splice(B,1),B--);return g}},{key:"removeEmptyMarks",value:function(e,t){if(!(0===e.length||e.isEditable()||e.isCard()||e.attributes(G))){var n=this.editor.node;if(!e.attributes(G)){var r,i,o=e.parent();if(1===(null===(r=e.get())||void 0===r?void 0:r.childNodes.length)&&(null===(i=e.first())||void 0===i?void 0:i.attributes(G)))return void(n.isMark(e)?(e.before(e.first()),e.remove(),o&&this.removeEmptyMarks(o,!0)):t&&n.isBlock(e)&&e.prepend("<br />"));var a=n.html(e);""!==a&&""!==a||(n.isMark(e)?(e.remove(),o&&this.removeEmptyMarks(o,!0)):t&&n.isBlock(e)&&n.html(e,"<br />"))}}}},{key:"repairCursor",value:function(e){var t=this.editor.node;e=gt(e)?Ut(e):e;var n=t.isMark(e);if(n&&!e.isCursor()){var r=e.children();r.each((function(e,t){var n,i=r.eq(t);if((null===i||void 0===i?void 0:i.isText())&&!(null===(n=i.next())||void 0===n?void 0:n.isCursor())){var o=i.text();if(1===o.length&&/\u200b/.test(o))return void i.remove();i.text(o.replace(/\u200b/g,""))}}));var i=e.children().toArray().filter((function(e){return!e.isCursor()}));i.length<2&&(0===i.length||1===i.length&&i[0].isText()&&0===i[0].text().length)&&(i.length>0&&i[0].remove(),e.prepend(Ut("",null)));var o=e.next(),a=null===o||void 0===o?void 0:o.next();o&&a&&o.isText()&&/^\u200b$/g.test(o.text())&&!t.isInline(a)&&o.remove();var s=e.prev(),l=null===s||void 0===s?void 0:s.prev();s&&l&&s.isText()&&/^\u200b$/g.test(s.text())&&!t.isInline(l)&&s.remove()}}}]),e}(),To=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=(t.mark,t.inline),i=t.node,o=n.range.get(),a=o.cloneRange().shrinkToTextNode(),s=a.collapsed,l=a.endNode,c=a.startNode,A=a.startOffset;if(l.type===Node.TEXT_NODE||c.type===Node.TEXT_NODE){if(!s){var u=r.closest(l);if(i.isInline(u)&&!u.isCard()&&i.isEmpty(u)){if(A>1)return!0;var d=l.prev(),h=l.parent();if(h&&i.isInline(h)){if(d)return!0;var p=l.text(),f=p.substr(0,A);if(!/^\u200b$/.test(f))return!0;var g=u.next(),m=null===g||void 0===g?void 0:g.text();if(g&&g.isText()&&m&&/^\u200b/.test(m))return o.setEnd(g,1),!1}}return i.isInline(u)&&!u.isCard()&&setTimeout((function(){r.repairCursor(u)}),100),!0}var v=r.closest(c);if(i.isInline(v)){if(v.isCard())return!0;if(A>1)return!0;var b=c.prev(),y=c.parent();if(y&&i.isInline(y)){if(b)return!0;var w=c.text(),x=w.substr(0,A);if(!/\u200b$/.test(x))return!0}else{if(0!==A)return!0;while(!b&&y&&!i.isInline(y)){var k;b=y.prev(),y=null===(k=y)||void 0===k?void 0:k.parent()}if(b&&!b.isText())return!0;if(b&&!/\u200b$/.test(b.text()))return!0}var C=v.prev(),B=null===C||void 0===C?void 0:C.text();if(C&&C.isText()&&B&&/\u200b$/.test(B)){if(o.setStart(C,B.length-1),i.isEmpty(v)){var _=v.next(),E=null===_||void 0===_?void 0:_.text();_&&_.isText()&&E&&/^\u200b/.test(E)&&o.setEnd(_,1)}else o.collapse(!0);return n.range.select(o),!1}return!0}var S=c.prev(),F=c.parent(),T=void 0;if(S){if(i.isInline(S)&&!S.isCard()){var M=c.text(),I=M.substr(0,A);if(!/^\u200b$/.test(I))return!0;T=S}}else{if(0!==A)return!0;while(!S&&F&&!i.isBlock(F)){var N;S=F.prev(),F=null===(N=F)||void 0===N?void 0:N.parent()}if(S&&!S.isText())return!0;if(S){if(!/^\u200b$/.test(S.text()))return!0;if(S=S.prev(),!S||!i.isInline(S))return!0;T=S}}if(T){var U=T.last(),L=null===U||void 0===U?void 0:U.text();if(U&&U.isText()&&L&&/\u200b$/.test(L))return e.preventDefault(),o.setStart(U,L.length-1),o.collapse(!0),n.range.select(o),!1}}return!0}}]),e}(),Mo=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.inline,o=t.node,a=n.range.get().cloneRange().shrinkToTextNode(),s=a.startNode,l=a.startOffset,c=this.engine.card.getSingleCard(a);if(!c&&s.type===Node.TEXT_NODE){var A=r.closest(s);if(o.isInline(A)){if(A.isCard())return;if(l>1)return!0;var u=s.prev(),d=s.parent();if(d&&o.isInline(d)){if(u)return!0;var h=s.text(),p=h.substr(0,l);if(!/^\u200b$/.test(p))return!0}else{if(0!==l)return!0;while(!u&&d&&!o.isInline(d)){var f;u=d.prev(),d=null===(f=d)||void 0===f?void 0:f.parent()}if(u&&!u.isText())return!0;if(u&&!/^\u200b$/.test(u.text()))return!0}var g=A.prev(),m=null===g||void 0===g?void 0:g.text();if(g&&g.isText()&&m&&/\u200b$/.test(m)){e.preventDefault();var v=a.cloneRange(),b=v.collapsed;return a.setStart(g,m.length-1),b&&a.collapse(!0),n.range.select(a),!1}return!0}var y=s.prev(),w=s.parent(),x=void 0;if(y){if(o.isInline(y)&&!y.isCard()){var k=s.text(),C=k.substr(0,l);if(!/^\u200b$/.test(C))return!0;x=y}}else{if(0!==l)return!0;while(!y&&w&&!o.isBlock(w)){var B;y=w.prev(),w=null===(B=w)||void 0===B?void 0:B.parent()}if(y&&!y.isText())return!0;if(y){if(!/^\u200b$/.test(y.text()))return!0;if(y=y.prev(),!y||!o.isInline(y))return!0;x=y}}if(x){e.preventDefault();var _=x.last(),E=null===_||void 0===_?void 0:_.text();if(_&&_.isText()&&E&&/\u200b$/.test(E)){var S=a.cloneRange(),F=S.collapsed;return a.setStart(_,E.length-1),F&&!(0,i.ZP)("shift+left",e)&&a.collapse(!0),n.range.select(a),!1}}}return!0}}]),e}(),Io=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.inline,o=t.node,a=n.range.get().cloneRange().shrinkToTextNode(),s=a.endNode,l=a.endOffset,c=this.engine.card.getSingleCard(a);if(!c&&s.type===Node.TEXT_NODE){var A=r.closest(s),u=s.text();if(o.isInline(A)){if(A.isCard())return;if(l<u.length-1)return!0;var d=s.next(),h=s.parent();if(h&&o.isInline(h)){if(d)return!0;var p=u.substr(l);if(!/^\u200b$/.test(p))return!0}else{if(l!==u.length&&l!==u.length-1)return!0;while(!d&&h&&!o.isInline(h)){var f;d=h.next(),h=null===(f=h)||void 0===f?void 0:f.parent()}if(d&&!d.isText())return!0;if(d){if(!/^\u200b$/.test(d.text()))return!0;if(l===u.length-1){e.preventDefault();var g=a.cloneRange(),m=g.collapsed;return a.setEnd(d,0),m&&a.collapse(!1),n.range.select(a),!1}}}var v=A.next(),b=null===v||void 0===v?void 0:v.text();if(v&&v.isText()&&b&&/^\u200b/.test(b)){e.preventDefault();var y=a.cloneRange(),w=y.collapsed;return a.setEnd(v,1),w&&a.collapse(!1),n.range.select(a),!1}return!0}var x=s.next(),k=s.parent(),C=void 0;if(x){if(o.isInline(x)&&!x.isCard()){var B=u.substr(l);if(!/^\u200b$/.test(B))return!0;C=x}}else{if(l!==u.length)return!0;while(!x&&k&&!o.isBlock(k)){var _;x=k.next(),k=null===(_=k)||void 0===_?void 0:_.parent()}if(x&&!x.isText())return!0;if(x){if(!/^\u200b$/.test(x.text()))return!0;if(x=x.next(),!x||!o.isInline(x))return!0;C=x}}if(C){e.preventDefault();var E=C.first(),S=null===E||void 0===E?void 0:E.text();if(E&&E.isText()&&S&&/^\u200b/.test(S)){var F=a.cloneRange(),T=F.collapsed;return a.setEnd(E,1),T&&!(0,i.ZP)("shift+right",e)&&a.collapse(!1),n.range.select(a),!1}}}return!0}}]),e}(),No=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.editor=t}return(0,c.Z)(e,[{key:"init",value:function(){var e=this.editor;if(st(e)){var t,n,r,i=e.typing,o=(e.event,new To(e));null===(t=i.getHandleListener("backspace","keydown"))||void 0===t||t.on((function(e){return o.trigger(e)}));var a=new Mo(e);null===(n=i.getHandleListener("left","keydown"))||void 0===n||n.on((function(e){return a.trigger(e)}));var s=new Io(e);null===(r=i.getHandleListener("right","keydown"))||void 0===r||r.on((function(e){return s.trigger(e)}))}}},{key:"repairRange",value:function(e){var t=this.editor,n=t.change,r=t.node;e=e||n.range.get();var i=e,o=i.startNode,a=i.startOffset,s=i.endNode,l=i.endOffset,c=i.collapsed;if(c)return e;var A=this.closest(o);if(A&&r.isInline(A)&&a<=1){var u=!0,d=o;while(d&&!d.equal(A)){if(d.prev()){u=!1;break}d=d.parent()}if(u){var h=A.prev(),p=(null===h||void 0===h?void 0:h.text())||"";h&&h.isText()&&/\u200B$/g.test(p)&&e.setStart(h,p.length-1)}}var f=this.closest(s),g=f.last();if(f&&r.isInline(f)&&g&&s.equal(g)&&l>=g.text().length-1){var m=!0,v=o;while(v&&!v.equal(f)){if(v.next()){m=!1;break}v=v.parent()}if(m){var b=f.next(),y=(null===b||void 0===b?void 0:b.text())||"";b&&b.isText()&&/^\u200B/g.test(y)&&e.setEnd(b,1)}}return e}},{key:"closest",value:function(e){var t=this.editor.node,n=e.parent();while(n&&!n.isEditable()&&!t.isBlock(n)){if(t.isInline(n))return n;var r=n.parent();if(!r)break;n=r}return e}},{key:"closestNotInline",value:function(e){var t=this.editor.node;while(t.isInline(e)||t.isMark(e)||e.isText()){if(e.isEditable())break;var n=e.parent();if(!n)break;e=n}return e}},{key:"wrap",value:function(e,t){var n=this,r=this.editor;if(st(r)){var i=r.change,o=r.mark,a=r.node,s=t||i.range.toTrusty(),l=rt(s.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,l)),a.isInline(e)){if(s.collapsed)return this.insert(e,s),void(t||i.apply(s));o.split(s),this.split(s);var c=s.commonAncestorNode;if(c.type===Node.TEXT_NODE||a.isMark(c)){c=c.parent();while(a.isMark(c))c=c.parent()}var A=s.enlargeToElementNode().createSelection();if(A.has()){var u=!1,d=a.clone(e,!1),h=[];c.traverse((function(e){if(e.equal(A.anchor))u=!0;else if(u){if(e.equal(A.focus))return u=!1,!1;if(a.isInline(e))if(e.isCard())h.push(e);else{var t=e.children();a.unwrap(e),e=t}if(a.isMark(e)&&!e.isCard()||e.isText())return a.isEmpty(e)?(e.remove(),!0):(d.parent()||e.before(d),d.append(e),n.repairCursor(d),h.push(d),!0);0!==d[0].childNodes.length&&d.parent()&&(d=a.clone(d,!1,!1))}}));var p=A.anchor,f=A.focus,g=null===p||void 0===p?void 0:p.parent();if(g&&a.isRootBlock(g)&&!p.prev()&&!p.next()&&p.after("<br />"),!p.equal(f)){var m=null===f||void 0===f?void 0:f.parent();m&&a.isRootBlock(m)&&!f.prev()&&!f.next()&&f.before("<br />")}if(A.move(),h.length>0){var v=h[0];if(!v.isCard()){var b=v.first();s.setStart(b,1)}var y=h[h.length-1];if(!y.isCard()){var w=y.last();s.setEnd(w,w.text().length-1)}}t||i.apply(s)}else t||i.apply(s)}}}},{key:"unwrap",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=t.mark,i=e&&Jt(e)?e:n.range.toTrusty();this.repairRange(i),r.split(i);var o=e&&!Jt(e)?[e]:this.findInlines(i),a=i.createSelection();o.forEach((function(e){var n,r,i,o,a=e.prev();a&&a.isCursor()&&(a=a.prev());var s=e.next();s&&s.isCursor()&&(s=s.prev());var l=e.first();l&&l.isCursor()&&(l=l.next());var c=(null===(n=a)||void 0===n?void 0:n.text())||"",A=(null===(r=s)||void 0===r?void 0:r.text())||"",u=(null===(i=l)||void 0===i?void 0:i.text())||"";a&&a.isText()&&/\u200B$/g.test(c)&&(/^\u200B$/g.test(c)?a.remove():a.text(c.substr(0,c.length-1))),s&&s.isText()&&/^\u200B/g.test(A)&&(/^\u200B$/g.test(A)?s.remove():s.text(A.substr(1))),l&&l.isText()&&/^\u200B/g.test(u)&&(/^\u200B$/g.test(u)||l.get().splitText(1),l.remove());var d=e.last();d&&d.isCursor()&&(d=d.prev());var h=(null===(o=d)||void 0===o?void 0:o.text())||"";d&&d.isText()&&/\u200B$/g.test(h)&&(/^\u200B$/g.test(h)?d.remove():d.get().splitText(h.length-1).remove()),t.node.unwrap(e)})),a.move(),r.merge(i),e||n.apply(i)}}},{key:"insert",value:function(e,t){var n,r,i=this.editor;if(st(i)){var o=i.change,a=i.node,s=i.mark,l=t||o.range.toTrusty(),c=rt(l.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,c)),a.isInline(e)){l.collapsed||o.delete(l),s.split(l),this.split(l),null===(n=a.insert(e,l))||void 0===n||n.select(e).collapse(!1),"br"!==e.name&&l.handleBr();var A=0!==(null===(r=e.get())||void 0===r?void 0:r.childNodes.length);if(this.repairCursor(e),!e.isCard()&&!a.isVoid(e))if(A){var u=e.next();l.setStart(u,1),l.setEnd(u,1)}else{var d=e.last(),h=d.text();l.setStart(d,h.length-1),l.setEnd(d,h.length-1)}t||o.apply(l)}}}},{key:"unwrapEmptyInlines",value:function(e,t){var n=this.editor.node,r=e.allChildren();r.forEach((function(e){n.isEmpty(e)&&n.isInline(e)&&(!t||t(e))&&n.unwrap(e)}))}},{key:"splitOnCollapsed",value:function(e,t){var n=this;if(e.collapsed){e.enlargeFromTextNode(),e.shrinkToElementNode();var r=e.startNode,i=r.parent(),o=this.editor.node,a=r.isCard()?r:r.closest(xe);if((0===a.length||"inline"!==a.attributes(me))&&(o.isInline(r)||i&&o.isInline(i))){var s,l=this.closestNotInline(r),c=e.createSelection(),A=c.getNode(l,"left"),u=void 0,d=void 0,h=[];if(t){gt(t)&&(t=Ut(t));var p=t.getPath(l.get()),f=l.clone(!0);h=p.slice(1),d=Ut(f.getChildByPath(p.slice(0,1))),u=c.getNode(f,"right",!1)}else u=c.getNode(l,"right");this.unwrapEmptyInlines(A),this.unwrapEmptyInlines(u);var g=l.children();g.each((function(e,t){var n,r;(null===(n=g.eq(t))||void 0===n?void 0:n.isCard())||(null===(r=g.eq(t))||void 0===r||r.remove())}));var m=void 0,v=function(e){e.each((function(t,n){var r=e.eq(n);if(null===r||void 0===r?void 0:r.isCard())return m=m?m.next():l.first(),void(m&&(e[n]=m[0]));m?(m.after(t),m=r):(m=r,l.prepend(t))}))},b=A.children(),y=b.toArray();v(b);var w=u.children(),x=w.toArray();if(d&&(t=null===(s=x.find((function(e){return e.equal(d)})))||void 0===s?void 0:s.getChildByPath(h)),v(w),x=w.toArray(),1===y.length&&"br"===y[0].name&&(y[0].remove(),y.splice(0,1)),1===x.length&&"br"===x[0].name&&(x[0].remove(),x.splice(0,1)),x.filter((function(e){return!e.isCursor()})).length>0){for(var k=x[0],C=0;C<x.length-1;C++)if(k=x[C],!k.isCursor())break;e.setStartBefore(k),e.collapse(!0)}else if(y.filter((function(e){return!e.isCursor()})).length>0){for(var B=y[y.length-1],_=y.length-1;_>=0;_--)if(B=y[_],!B.isCursor())break;e.setStartAfter(B),e.collapse(!0)}else e.select(l,!0).collapse(!0);l.traverse((function(e){o.isInline(e)&&n.repairCursor(e)}))}return e.enlargeToElementNode(!o.isBlock(e.startNode),!1),t}}},{key:"splitOnExpanded",value:function(e){var t=this;if(!e.collapsed){e.enlargeToElementNode(),e.shrinkToElementNode();var n=e.startNode,r=e.endNode,i=n.isCard()?n:n.closest(xe),o=r.isCard()?r:r.closest(xe);if(!(i.length>0&&"inline"===i.attributes(me)||o.length>0&&"inline"===o.attributes(me))){var a=this.closestNotInline(n),s=this.closestNotInline(r);if(!a.equal(s)){var l=e.cloneRange();l.collapse(!0);var c=e.cloneRange();c.collapse(!1);var A=void 0,u=l.startOffset,d=c.endOffset;return void(a.contains(s)?(A=this.splitOnCollapsed(l,c.endNode),e.setStart(l.startContainer,l.startOffset),A&&c.setOffset(A,d,d),this.splitOnCollapsed(c),e.setEnd(c.startContainer,c.startOffset)):(A=this.splitOnCollapsed(c,l.startNode),e.setEnd(c.startContainer,c.startOffset),A&&l.setOffset(A,u,u),this.splitOnCollapsed(l),e.setStart(l.startContainer,l.startOffset)))}var h=this.editor.node,p=n.parent(),f=h.isInline(n)||p&&h.isInline(p),g=r.parent(),m=h.isInline(r)||g&&h.isInline(g);if(!f&&!m)return;var v=e.commonAncestorNode;v.isText()&&(v=v.parent());var b=this.closestNotInline(v),y=e.createSelection(),w=y.getNode(b,"left"),x=y.getNode(b),k=y.getNode(b,"right");this.unwrapEmptyInlines(w),this.unwrapEmptyInlines(k);var C=b.children();C.each((function(e,t){var n,r;(null===(n=C.eq(t))||void 0===n?void 0:n.isCard())||(null===(r=C.eq(t))||void 0===r||r.remove())}));var B=void 0,_=function(e){e.each((function(t,n){var r;if(null===(r=e.eq(n))||void 0===r?void 0:r.isCard())return B=B?B.next():b.first(),void(B&&(e[n]=B[0]));B?(B.after(t),B=e.eq(n)):(B=e.eq(n),b.prepend(t))}))};_(w.children());var E=x.children(),S=E.toArray();_(E),_(k.children()),b.traverse((function(e){h.isInline(e)&&t.repairCursor(e)})),e.setStartBefore(S[0][0]),e.setEndAfter(S[S.length-1][0])}}}},{key:"split",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=e||n.range.toTrusty();r.collapsed?this.splitOnCollapsed(r):this.splitOnExpanded(r),e||n.apply(r)}}},{key:"findInlines",value:function(e){var t=this.editor,n=e.cloneRange();if(n.startNode.isRoot()&&n.shrinkToElementNode(),!n.startNode.inEditor()||t.card.find(n.startNode))return[];var r=t.node,i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.collapsed){var i=t.startNode,o=t.startOffset,a=i.findParent();if(a){var s=t.cloneRange();if(s.select(a,!0),n){s.setEnd(i,o),s.enlargeFromTextNode(),s.enlargeToElementNode(!0);var l=i.children(),c=s.endNode,A=s.endOffset,u=c.children(),d=u.eq(A),h=l.eq(o)||l.eq(o-1);if(!e&&c.type===Node.ELEMENT_NODE&&d&&r.isBlock(d)&&(i.type!==Node.ELEMENT_NODE||h&&!r.isBlock(h)))return;s.select(a,!0),s.setStart(c,A),s.shrinkToElementNode(),s.shrinkToTextNode(),t.setStart(s.startContainer,s.startOffset),t.collapse(!0)}else{s.setStart(i,o),s.enlargeFromTextNode(),s.enlargeToElementNode(!0);var p=i.children(),f=s.startNode,g=s.startOffset,m=f.children(),v=m.eq(g),b=p.eq(o)||p.eq(o-1);if(!e&&f.type===Node.ELEMENT_NODE&&v&&r.isBlock(v)&&(i.type!==Node.ELEMENT_NODE||b&&!r.isBlock(b)))return;s.select(a,!0),s.setEnd(f,g),s.shrinkToElementNode(),s.shrinkToTextNode(),t.setEnd(s.endContainer,s.endOffset),t.collapse(!1)}}}};if(!n.collapsed){var o=n.cloneRange(),a=n.cloneRange();o.collapse(!0),a.collapse(!1),i(!0,o,!0),i(!0,a),n.setStart(o.startContainer,o.startOffset),n.setEnd(a.startContainer,a.startOffset)}i(!1,n);var s=n.startContainer,l=n.startOffset,c=n.endContainer,A=n.endOffset,u=s,d=c;s.nodeType===Node.ELEMENT_NODE&&s.childNodes[l]&&(u=s.childNodes[l]||s),c.nodeType===Node.ELEMENT_NODE&&A>0&&c.childNodes[A-1]&&(d=c.childNodes[A-1]||s),n.collapsed&&(u=d);var h=function(e,t){e.some((function(e){return e[0]===t[0]}))||e.push(t)},p=function(e){var t=[];while(e){if(e.isEditable())break;r.isInline(e)&&t.push(e);var n=e.parent();if(!n)break;e=n}return t},f=p(Ut(u)),g=n.commonAncestorNode,m=t.card.find(g,!0),v=null===m||void 0===m?void 0:m.isEditable,b=v?(null===m||void 0===m?void 0:m.getSelectionNodes)?m.getSelectionNodes():[]:[g];if(0===b.length&&(v=!1,b.push(g)),(!n.collapsed||v)&&(p(Ut(d)).forEach((function(e){return h(f,e)})),s!==c||v)){var y=!1,w=!1;b.forEach((function(e){e.traverse((function(e){if(w)return!1;if(e.equal(s))y=!0;else if(y){if(e.equal(c))return w=!0,!1;!r.isInline(e)||e.attributes(fe)||e.attributes(be)||h(f,e)}}))}))}return f}},{key:"repairCursor",value:function(e){var t,n,r=this.editor.node;if(gt(e)&&(e=Ut(e)),!r.isInline(e)||"false"===e.closest(xe).attributes(we)||r.isVoid(e)||e.isCard()){var i=e.prev(),o=(null===i||void 0===i?void 0:i.isText())?i.text():void 0;if(o&&/\u200b$/.test(o)){var a=null===i||void 0===i?void 0:i.prev();a&&r.isInline(a)||(1===o.length?null===i||void 0===i||i.remove():null===i||void 0===i||i.text(o.slice(0,-1)))}var s=e.next(),l=(null===s||void 0===s?void 0:s.isText())?s.text():void 0;if(l&&/^\u200b/.test(l)){var c=null===s||void 0===s?void 0:s.next();c&&r.isInline(c)||(1===l.length?null===s||void 0===s||s.remove():null===s||void 0===s||s.text(l.slice(1)))}}else{var A=e.children();A.each((function(e,t){var n=A.eq(t);if(null===n||void 0===n?void 0:n.isText()){var r=n.text();if(1===r.length&&/\u200b/.test(r))return void n.remove();n.text(r.replace(/\u200b/g,""))}})),this.repairBoth(e);var u=e.first();(null===(t=u)||void 0===t?void 0:t.isCursor())&&(u=u.next()),u&&u.type===Node.TEXT_NODE&&/^\u200B/g.test(u.text())||(u?u.isText()?u.text(""+u.text()):u.before(Ut("",null)):e.append(Ut("",null)));var d=e.last();(null===(n=d)||void 0===n?void 0:n.isCursor())&&(d=d.prev()),!d||!/^\u200B$/g.test(e.text())&&d.type===Node.TEXT_NODE&&/\u200B$/g.test(d.text())||(d.isText()?d.text(d.text()+""):d.after(Ut("",null)))}}},{key:"repairBoth",value:function(e){var t,n=this.editor.node;gt(e)&&(e=Ut(e));var r=e.get();if((null!==(t=null===r||void 0===r?void 0:r.parentElement)&&void 0!==t?t:null===r||void 0===r?void 0:r.parentNode)&&!n.isVoid(e)){var i=Ut("",null),o=e.prev(),a=null===o||void 0===o?void 0:o.prev(),s=(null===o||void 0===o?void 0:o.text())||"";!o||!o.isText()||!/\u200B$/g.test(s)||a&&n.isInline(a)&&!/\u200B.*\u200B$/g.test(s)?o&&o.isText()?o.text(s+""):e.before(n.clone(i,!0,!1)):o&&o.isText()&&/\u200B\u200B$/g.test(s)&&a&&!n.isInline(a)&&o.text(s.substr(0,s.length-1));var l=e.next(),c=(null===l||void 0===l?void 0:l.text())||"",A=null===l||void 0===l?void 0:l.next();!l||!l.isText()||!/^\u200B/g.test(c)||A&&n.isInline(A)&&!/^\u200B\u200B/g.test(c)?l&&l.isText()?l.text(""+l.text()):(e.after(n.clone(i,!0,!1)),"br"===(null===l||void 0===l?void 0:l.name)&&l.remove()):l&&l.isText()&&/\u200B\u200B$/g.test(c)&&A&&!n.isInline(A)&&l.text(c.substr(0,c.length-1))}}},{key:"flat",value:function(e,t){var n=this,r=this.editor;if(Jt(e)){var i=e.cloneRange().shrinkToElementNode().createSelection(),a=this.findInlines(e),s=[];a.forEach((function(e){if(!e.isCard()){var t=n.flat(e);t&&s.push(t)}})),i.move();var l=r.node;s.forEach((function(e){var t,n,r=null===(t=e.prev())||void 0===t?void 0:t.prev(),i=null===(n=e.next())||void 0===n?void 0:n.next();r&&l.isMark(r)&&0===r.get().childNodes.length&&r.remove(),i&&l.isMark(i)&&0===i.get().childNodes.length&&i.remove()}))}else if(!e.isCard()){var c=r.node,A=r.mark;if(c.isInline(e,t)&&"br"!==e.name){var u=this.closest(e);if(!u.equal(e)&&c.isInline(u,t))c.unwrap(e);else{var d=function(){var r=A.closest(e),i=e,o=function(){var t=r.clone(),o=e.clone(),a=r.children();a.each((function(e){if(3!==e.nodeType||!/^\u200b$/.test(e.textContent||"")){var r=Ut(e);i.equal(r)||r.contains(i)?(i=c.wrap(c.replace(i,t),o),n.repairBoth(i)):c.wrap(r,t)}})),c.unwrap(r),r=A.closest(i)};while(r&&!r.equal(e)&&c.isMark(r,t))o();return{v:i}}();if("object"===(0,o.Z)(d))return d.v}}}}}]),e}(),Uo=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.node,i=(t.list,n.range.get().shrinkToElementNode().shrinkToTextNode()),o=this.engine.block,a=o.closest(i.endNode),s=a.parent();if(s&&s.inEditor()&&r.isBlock(s)){var l;if("li"===s.name&&"p"===a.name){var c,A;1===(null===(c=a.get())||void 0===c?void 0:c.childNodes.length)&&"br"===(null===(A=a.first())||void 0===A?void 0:A.name)&&a.first().remove();var u=i.createSelection();n.unwrap(a),u.move(),a=o.closest(i.endNode)}if(i.collapsed&&(1===i.startContainer.childNodes.length&&"BR"===(null===(l=i.startContainer.firstChild)||void 0===l?void 0:l.nodeName)||o.isLastOffset(i,"end")&&o.isFirstOffset(i,"end")))return e.preventDefault(),["li"].indexOf(s.name)>=0?(o.unwrap("<".concat(s.name," />")),o.setBlocks("<".concat(s.name," />"))):(o.unwrap("<".concat(s.name," />")),o.setBlocks("<p />")),!1}return!r.isBlock(a)||s&&r.isList(s)||a.isCard()?"li"!==a.name||void 0:(e.preventDefault(),o.insertOrSplit(i,a),!1)}}]),e}(),Lo=function(){function e(t){(0,l.Z)(this,e),this.engine=void 0,this.engine=t}return(0,c.Z)(e,[{key:"trigger",value:function(e){var t=this.engine,n=t.change,r=t.node,i=t.block,o=t.card,a=n.range.get();if(a.collapsed){var s=a.getPrevNode();if(s&&r.isBlock(s)&&r.isEmptyWithTrim(s)){e.preventDefault();var l=s.parent();return s.remove(),l&&this.engine.node.isEmpty(l)&&(l.isEditable()?(this.engine.node.html(l,"<p><br /></p>"),a.select(l,!0).shrinkToElementNode().collapse(!1)):(this.engine.node.html(l,"<br />"),a.select(l,!0).collapse(!1)),n.apply(a)),!1}var c=!!o.closest(a.startNode);if(c||i.isFirstOffset(a,"start")){var A=i.closest(a.startNode);return!(!c&&r.isRootBlock(A))||(e.preventDefault(),r.isEmpty(A)&&A.html("<br />"),n.mergeAfterDelete(A),n.change(!1),!1)}var u=a.cloneRange().shrinkToElementNode().shrinkToTextNode();u.startContainer.nodeType===Node.TEXT_NODE&&function(e){var t,i,o,a,s=e,l=s.commonAncestorContainer,c=s.commonAncestorNode,A=c.parent(),u=null===A||void 0===A?void 0:A.attributes();if(e.collapsed&&1===e.startOffset&&e.startContainer===l&&l.nodeType===Node.TEXT_NODE&&(!u||!["left","right"].includes(u[be]))&&(e=e.cloneRange(),((null===(t=null!==(o=l.parentElement)&&void 0!==o?o:l.parentNode)||void 0===t||null===(i=t.childNodes)||void 0===i?void 0:i.length)||0)<=1&&1===(null===(a=l.textContent)||void 0===a?void 0:a.length))){var d=e,h=d.startNode,p=d.startOffset,f=h.parent();if(f&&r.isMark(f)&&p>0){var g=h.text(),m=g.substr(p-1,1);if(/^\u200b$/.test(m))if(1===p){var v=f.prev();if(v&&!r.isEmpty(v)){var b=e.cloneRange().select(v,!0).shrinkToTextNode().collapse(!1),y=b.startNode,w=b.startOffset;e.setStart(y,w-1)}}else e.setStart(h,p-1)}return e.collapsed&&e.select(l,!0),n.delete(e,!0),n.apply(e),!0}return!1}(u)&&(e.preventDefault(),e["isDelete"]=!0,n.change())}}}]),e}(),Qo=function(){function e(t){(0,l.Z)(this,e),this.editor=void 0,this.pluginCaches=new Map,this.editor=t}return(0,c.Z)(e,[{key:"init",value:function(){var e=this,t=this.editor;if(st(t)){var n,r,i=t.typing,o=t.event,a=new Uo(t);null===(n=i.getHandleListener("enter","keydown"))||void 0===n||n.on((function(e){return a.trigger(e)}));var s=new Lo(t);null===(r=i.getHandleListener("backspace","keydown"))||void 0===r||r.on((function(e){return s.trigger(e)})),o.on("keyup:space",(function(t){return e.triggerMarkdown(t)})),o.on("keydown:enter",(function(t){return e.triggerMarkdown(t)}))}}},{key:"triggerMarkdown",value:function(e){var t,n=this.editor;if(st(n)&&!1!==(null===(t=n.options.markdown)||void 0===t?void 0:t.mode)){var r=n.change,i=r.range.get();if(i.collapsed&&!r.isComposing()){var o=i.startNode,a=i.startOffset,s=o.type===Node.TEXT_NODE?o:o.children().eq(a-1);if(s){var l=this.closest(s);if(n.node.isRootBlock(l)){var c=s.text().trim();if(""!==c.replace(/\s|\t|\n|\r\n|\u200b/g,"")){var A=i.toPath(),u=ct(n,"zero"),d=u.parse(c,{});if(0!==d.length){var h=At(n,u,d,!1);if(h){var p=l.children();e.preventDefault(),i.select(l,!0),r.paste(h,i);var f=this.closest(i.startNode);return f.isRoot()||f.isCard()||p.each((function(e,t){t>0&&f.append(e)})),r.rangePathBeforeCommand=A,r.range.select(i),!1}return!0}}}}}}}},{key:"findPlugin",value:function(e){var t=this.editor,n=t.node,r=t.schema,i=t.plugin;if(0!==e.length&&n.isBlock(e)){var o=e.get().cloneNode(),a=o.outerHTML,s=this.pluginCaches.get(a);if(s)return s;for(var l in i.components){var c=i.components[l];if(Mi(c)&&(c.tagName&&"string"!==typeof c.tagName?c.tagName.indexOf(e.name)>-1:e.name===c.tagName)){var A=c.schema();if(Array.isArray(A)?A.find((function(t){return r.checkNode(e,t.attributes)})):r.checkNode(e,A.attributes))return this.pluginCaches.set(a,c),c}}return s}}},{key:"findTop",value:function(e,t){var n=this.editor,r=n.schema,i=n.node,o=n.list,a=r.closest(e.name),s=r.closest(t.name);if(a===parent.name||s===t.name)return t;if(r.isAllowIn(e.name,t.name))return e;if(i.isList(e)&&i.isList(t)){var l=parseInt(t.attributes(o.INDENT_KEY),10)||0,c=parseInt(e.attributes(o.INDENT_KEY),10)||0;t.attributes(o.INDENT_KEY,c?c+1:l+1)}return t}},{key:"closest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=e;while(e){if((e.isEditable()||this.editor.node.isBlock(e))&&t(e))return e;var r=e.parent();if(!r)break;e=r}return n}},{key:"wrap",value:function(e,t){var n,r=this,i=this.editor;if(st(i)){var o=i.change,a=i.node,s=i.schema,l=i.list,c=i.mark,A=t||o.range.toTrusty(),u=rt(A.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,u)),a.isBlock(e)){var d=this.getBlocks(A),h=this.findPlugin(e);if(d=d.map((function(t){var n;if(!t||t.isCard())return null;var i=e,o=null===(n=t)||void 0===n?void 0:n.parent();while(o&&!o.isEditable()){t=o;var l=o.parent();if(!l||!a.isBlock(l))break;o=l}return s.isAllowIn(i.name,t.name)?t:r.findPlugin(t)===h?t.children():null})).filter((function(e){return null!==e})),0===d.length){var p=this.closest(A.startNode);if(p.isCard()||p.isEditable()||!s.isAllowIn(e.name,p.name))return;var f=A.createSelection();return p.children().each((function(t){e.append(t)})),p.append(e),void f.move()}var g=A.createSelection();null===(n=d[0])||void 0===n||n.before(e),d.forEach((function(t){t&&(h&&t.allChildren().forEach((function(e){if(a.isMark(e)){var t,n=c.findPlugin(e);if(!n)return;(null===(t=h.disableMark)||void 0===t?void 0:t.indexOf(n.constructor.pluginName))&&a.unwrap(e)}})),e.append(t))})),g.move(),this.merge(A),l.merge(void 0,A),t||o.apply(A)}}}},{key:"unwrap",value:function(e,t){var n=this.editor;if(st(n)){var r=n.change,i=n.node,o=t||r.range.toTrusty(),a=rt(o.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,a)),i.isBlock(e)){var s=this.getSiblings(o,e);if(0!==s.length){var l=s[0].node.parent();if(null===l||void 0===l?void 0:l.inEditor()){var c=s.some((function(e){return"left"===e.position})),A=s.some((function(e){return"right"===e.position})),u=void 0;if(c){var d=l;u=i.clone(d,!1,!1),d.before(u)}var h=void 0;if(A){var p=s[s.length-1].node.parent();p&&(h=i.clone(p,!1,!1),null===p||void 0===p||p.after(h))}var f=o.createSelection(),g=i;s.forEach((function(t){var n,r,i,o=t.position,a=t.node,s=a.parent();"left"===o&&(null===(n=u)||void 0===n||n.append(a));"center"===o&&((null===s||void 0===s?void 0:s.name)===(null===(r=e)||void 0===r?void 0:r.name)&&(null===s||void 0===s?void 0:s.inEditor())&&g.unwrap(s));"right"===o&&(null===(i=h)||void 0===i||i.append(a))})),u&&"ol"===u.name&&h&&"ol"===h.name&&h.attributes("start",(parseInt(u.attributes("start"),10)||1)+u.find("li").length),f.move(),t||r.apply(o)}}}}}},{key:"getSiblings",value:function(e,t){var n=this,r=[],i=this.editor.node;if(!i.isBlock(t))return r;var o=function(e,t){var r=n.closest(e);while(r){var i=r.parent();if(!i)break;if(!r.inEditor())break;if(r.text().trim()!==i.text().trim())break;if(i.name===t)break;r=i}return r},a=o(e.startNode,t.name),s=o(e.endNode,t.name),l=a.parent(),c="left",A=null===l||void 0===l?void 0:l.first();while(A){if(A=Ut(A),!i.isBlock(A))return r;if(!A.inEditor())return r;A[0]===a[0]&&(c="center"),r.push({position:c,node:A}),A[0]===s[0]&&(c="right"),A=A.next()}return r}},{key:"split",value:function(e){var t,n,r=this.editor;if(st(r)){var i=r.change,o=r.mark,a=r.nodeId,s=e||i.range.toTrusty();s.collapsed||i.delete(s);var l=this.closest(s.startNode);if(l.isEditable()||l.inEditor()){if(l.isEditable()){var c=s.getStartOffsetNode();return c&&s.select(c,!0).shrinkToElementNode().collapse(!1),void(e||i.apply(s))}var A=s.cloneRange();A.shrinkToElementNode().shrinkToTextNode().collapse(!0);var u=o.findMarks(A).filter((function(e){var t=r.mark.findPlugin(e);return!1!==(null===t||void 0===t?void 0:t.copyOnEnter)&&!1!==(null===t||void 0===t?void 0:t.followStyle)})),d=this.getBlockByRange({block:l[0],range:s,isLeft:!1,keepDataId:!0}),h=r.node;d.traverse((function(e){!h.isVoid(e)&&(h.isInline(e)||h.isMark(e))&&h.isEmpty(e)&&e.remove()}),!0);var p=function(e){return h.isBlock(e)&&(0===e.childNodes.length||""===e.innerText)};return p(l[0])&&!p(d[0])?a.generate(l,!0):a.generate(d,!0),l.after(d),h.isEmpty(l)&&h.html(l,h.getBatchAppendHTML(u,u.length>0?"&#8203;":"<br />")),h.isEmpty(d)&&h.html(d,h.getBatchAppendHTML(u,u.length>0?"&#8203;":"<br />")),l.children().each((function(e){h.isInline(e)&&r.inline.repairCursor(e)})),d.children().each((function(e){h.isInline(e)&&r.inline.repairCursor(e)})),s.select(d,!0).shrinkToElementNode(),1===(null===(t=d.get())||void 0===t?void 0:t.childNodes.length)&&"br"===(null===(n=d.first())||void 0===n?void 0:n.name)?s.collapse(!1):s.collapse(!0),e||i.apply(s),d}}}},{key:"insert",value:function(e,t,n){var r,i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=this.editor;if(st(a)){var s=a.change,l=a.node,c=a.list,A=a.inline,u=t||s.range.toTrusty(),d=rt(u.startContainer);if(("string"===typeof e||gt(e))&&(e=Ut(e,d)),l.isBlock(e)){u.collapsed||s.delete(u);var h=this.closest(u.startNode);if(h.isEditable()||h.inEditor()){if(h.isEditable())return l.insert(e,u,o),u.collapse(!1),void(t||s.apply(u));if(l.isList(u.startNode)||u.startNode.closest("li").length>0){var p=d.createDocumentFragment();return p.appendChild(e[0]),c.insert(p,u),void(t||s.apply(u))}1===(null===(r=h.get())||void 0===r?void 0:r.childNodes.length)&&"br"===(null===(i=h.first())||void 0===i?void 0:i.name)&&u.select(h,!0).collapse(!1);var f=u.enlargeToElementNode().createSelection();if(f.has()){h=n?n(h):h;var g=f.getNode(h,"left");g.traverse((function(e){e.equal(g)||l.isBlock(e)&&(l.isEmpty(e)||c.isEmptyItem(e))&&e.remove()}));var m=f.getNode(h,"right",!0,(function(e){if(e.isCard()){var t=e.parent();if(t&&l.isCustomize(t))return!1}return!0})),v=h.children();if(l.isEmpty(h)||v.each((function(e,t){var n,r=v.eq(t);(null===r||void 0===r?void 0:r.isCard())||(null===(n=v.eq(t))||void 0===n||n.remove())})),m.traverse((function(e){e.equal(m)&&(l.isBlock(e)&&(l.isEmpty(e)||c.isEmptyItem(e))?e.remove():l.isList(e)&&c.addBr(e))})),m.length>0&&!l.isEmpty(m)&&!c.isEmptyItem(m)){var b=m.clone(!1);a.nodeId.generate(b,!0);var y=m.children();y.each((function(e,t){var n;if(null===(n=y.eq(t))||void 0===n?void 0:n.isCard()){var r=a.card.find(e);r&&b.append(r.root)}else b.append(e)})),m=b,h.after(b)}if(g.length>0&&!l.isEmpty(g)&&!c.isEmptyItem(g)){var w=void 0,x=function(e){e.each((function(t,n){var r=e.eq(n);if(r&&l.isInline(r)&&A.repairCursor(r),null===r||void 0===r?void 0:r.isCard())return w=w?w.next():h.first(),void(w&&(e[n]=w[0]));w?(w.after(t),w=r):(w=r,h.prepend(t))}))};x(g.children())}h&&h.length>0&&(u.select(h,!0),u.collapse(!1)),f.focus&&f.focus.remove(),f.anchor&&f.anchor.remove(),l.insert(e,u,o),t||s.apply(u)}else t||s.apply(u)}else t||s.apply(u)}}}},{key:"setBlocks",value:function(e,t){var n=this,r=this.editor;if(st(r)){var i=r.node,o=r.schema,a=r.mark,s=r.change,l=t||s.range.toTrusty(),c=rt(l.startContainer),A=null,u={};"string"===typeof e?(A=Ut(e,c),u=A.attributes(),u.style=A.css()):u=e;var d=this.getBlocks(l),h=l.startNode;if(h.isEditable()&&0===d.length){if(h.isCard()||h.isEditable())return;var p=A||Ut("<p></p>");if(!o.isAllowIn(p.name,h.name))return;i.setAttributes(p,u);var f=l.createSelection();h.children().each((function(e){p.append(e)}));var g=o.data.globals["block"]||{},m=h.attributes();Object.keys(m).forEach((function(e){e!==$&&"id"!==e&&g["name"]&&p.attributes(e,m[e])}));var v=g.style||{},b=h.css();return Object.keys(b).forEach((function(e){v[e]||delete b[e]})),p.css(b),h.append(p),f.move(),void(t||s.apply(l))}var y=A?this.findPlugin(A):void 0,w=l.createSelection();d.forEach((function(e){if(!e.attributes(fe)){if(A){var t=o.data.globals["block"]||{},r=e.attributes();Object.keys(r).forEach((function(e){var n;e!==$&&"id"!==e&&t["name"]&&(null===(n=A)||void 0===n||n.attributes(e,r[e]))}));var s=t.style||{},l=e.css();Object.keys(l).forEach((function(e){s[e]||delete l[e]})),A.css(l)}if(!A||n.findPlugin(e)===y&&e.name===A.name)return A&&(u=A.attributes()),void i.setAttributes(e,u);if("p"===A.name||!o.isAllowIn(e.name,A.name)){y&&e.allChildren().forEach((function(e){if(i.isMark(e)){var t=a.findPlugin(e);if(!t)return;y.disableMark&&y.disableMark.indexOf(t.constructor.pluginName)>-1&&i.unwrap(e)}}));var c=i.replace(e,A),d=c.parent();!d||d.isEditable()||o.isAllowIn(d.name,c.name)||i.unwrap(d)}}})),w.move(),t||s.apply(l)}}},{key:"merge",value:function(e){var t=this.editor;if(st(t)){var n=t.change,r=t.schema,i=e||n.range.toTrusty(),o=this.getBlocks(i);if(0!==o.length){var a=o[0].closest(X),s=r.getCanMergeTags();if(0!==s.length){var l=a.find(s.join(","));if(l.length>0){var c=i.createSelection(),A=l.next();while(A&&s.indexOf(A.name)>0){var u=A.prev(),d=A.attributes(),h=null===u||void 0===u?void 0:u.attributes();A.name===(null===u||void 0===u?void 0:u.name)&&d["class"]===(h?h["class"]:void 0)&&Object.keys(d).join(",")===Object.keys(h||{}).join(",")&&t.node.merge(u,A),A=A.next()}c.move()}e||n.apply(i)}}}}},{key:"findBlocks",value:function(e){var t,n=this.editor;if(e=e.cloneRange(),e.startNode.isRoot()&&e.shrinkToElementNode(),!e.startNode.inEditor()||(null===(t=n.card.find(e.startNode))||void 0===t?void 0:t.type)===nn.BLOCK)return[];var r=e.startContainer,i=e.startOffset,o=e.endContainer,a=e.endOffset,s=r,l=o;r.nodeType===Node.ELEMENT_NODE&&r.childNodes[i]&&(s=r.childNodes[i]||r),o.nodeType===Node.ELEMENT_NODE&&a>0&&o.childNodes[a-1]&&(l=o.childNodes[a-1]||r),e.collapsed&&(s=l);var c=function(e,t,n){e.some((function(e){return e[0]===t[0]}))||(n?e.unshift(t):e.push(t))},A=function(e){var t=[];while(e){if(e.isEditable())break;n.node.isBlock(e)&&t.push(e);var r=e.parent();if(!r)break;e=r}return t},u=this.getBlocks(e);A(Ut(s)).forEach((function(e){return c(u,e,!0)}));var d=e,h=d.commonAncestorNode,p=n.card.find(h,!0),f=null===p||void 0===p?void 0:p.isEditable,g=f&&(null===p||void 0===p?void 0:p.getSelectionNodes)?p.getSelectionNodes():[];return 0===g.length&&(f=!1),e.collapsed&&!f||(A(Ut(l)).forEach((function(e){return c(u,e)})),g.forEach((function(e){e.traverse((function(e){e.isElement()&&!e.isCard()&&n.node.isBlock(e)&&c(u,e)}),!0,"editable")}))),u}},{key:"isFirstOffset",value:function(e,t){var n=e,r=n.startNode,i=n.endNode,o=n.startOffset,a=n.endOffset,s="start"===t?r:i,l="start"===t?o:a;e=e.cloneRange();var c=this.closest(s);e.select(c,!0),e.setEnd(s[0],l);var A=this.editor;A.node.isBlock(s)||e.enlargeToElementNode();var u=e.cloneContents();if(!u.firstChild)return!0;var d=A.node;if(1===u.childNodes.length&&"br"===Ut(u.firstChild).name)return!0;var h=Ut("<div />");return h.append(u),d.isEmpty(h)}},{key:"isLastOffset",value:function(e,t){var n=e,r=n.startNode,i=n.endNode,o=n.startOffset,a=n.endOffset,s="start"===t?r:i,l="start"===t?o:a;e=e.cloneRange();var c=this.closest(s);e.select(c,!0),e.setStart(s,l);var A=this.editor.node;A.isBlock(s)||e.enlargeToElementNode();var u=e.cloneContents();if(!u.firstChild)return!0;var d=Ut("<div />");return d.append(u),0>=d.find("br").length&&A.isEmpty(d)}},{key:"getBlocks",value:function(e){e=e.cloneRange(),e.shrinkToElementNode(),e.shrinkToTextNode();var t=this.editor,n=t.node,r=this.closest(e.startNode);e.startNode.isRoot()&&(r=Ut(e.getStartOffsetNode()));var i=this.closest(e.endNode);e.endNode.isRoot()&&(i=Ut(e.getEndOffsetNode()));var o=this.closest(e.commonAncestorNode),a=[],s=!1,l=e,c=l.commonAncestorNode,A=t.card.find(c,!0),u=null===A||void 0===A?void 0:A.isEditable,d=u?(null===A||void 0===A?void 0:A.getSelectionNodes)?A.getSelectionNodes():[]:[o];return 0===d.length&&(u=!1,d.push(o)),d.forEach((function(e){e.traverse((function(e){var n=Ut(e);if(n.equal(r)&&(s=!0),(s||u)&&t.node.isBlock(n)&&!n.isCard()&&n.inEditor()&&a.push(n),n.equal(i))return s=!1,!1}),!0,"editable")})),a.length>1&&this.isFirstOffset(e,"end")&&!n.isEmpty(i)&&a.pop(),a}},{key:"getBlockByRange",value:function(e){var t=e.block,n=e.range,r=e.isLeft,i=e.clone,o=void 0!==i&&i,a=e.keepDataId,s=void 0!==a&&a;gt(t)&&(t=Ut(t));var l=this.editor,c=$t.create(l,t.document);r?(c.select(t,!0),c.setEnd(n.startContainer,n.startOffset)):(c.select(t,!0),c.setStart(n.endContainer,n.endOffset));var A=o?c.cloneContents():c.extractContents(),u=s?t.clone(!1):l.node.clone(t,!1,!1);return u.append(A),o&&u.find(xe).each((function(e){var t=Ut(e),n=t.attributes(fe);t.attributes(ge,n),t.removeAttributes(fe)})),u}},{key:"getLeftText",value:function(e,t){var n=this.editor;if(!st(n))return"";t=t||n.change.range.get();var r=this.getBlockByRange({block:e,range:t,isLeft:!0,clone:!0});return r.text().replace(/\u200B/g,"")}},{key:"removeLeftText",value:function(e,t){var n=this.editor;if(st(n)){t=t||n.change.range.get(),gt(e)&&(e=Ut(e)),t.createSelection();var r=e.find(he),i=!1;e.traverse((function(e){var t=Ut(e);if(t.equal(r))return r.remove(),void(i=!0);i&&t.isText()&&t.remove()}),!1)}}},{key:"flat",value:function(e,t){var n=this.editor;if(st(n)){var r=n.schema,i=n.node,o=r.getCanMergeTags(),a=e.parent(),s=t.fragment?t[0].parentNode:t.get();while(a&&s&&a.get()!==s&&a.inEditor()){if(e.isCard())a.before(e);else if(i.isList(a)&&"li"===e.name||o.indexOf(a.name)>-1&&i.isBlock(e)&&a.name!==e.name){var l=i.clone(a,!1,!1);l.append(e),e=l,a.before(e)}else e=i.replace(e,i.clone(this.findTop(a,e),!1,!1)),a.before(e);a.first()||a.remove(),a=e.parent()}}}},{key:"insertEmptyBlock",value:function(e,t){var n=this.editor;if(st(n)){var r=n.change,i=r.blocks,o=r.marks,a=n.node;if(this.insert(t),i[0]){var s=i[0].css();t.css(s)}var l=t.find("br");o.forEach((function(e){var t=n.mark.findPlugin(e);e=a.clone(e,!1,!1),!1!==(null===t||void 0===t?void 0:t.copyOnEnter)&&!1!==(null===t||void 0===t?void 0:t.followStyle)&&(e=a.clone(e,!1,!1),l.before(e),e.append(l),l=e)})),l=t.find("br");var c=l.parent();c&&a.isMark(c)&&(l=a.replace(l,Ut("",null))),e.select(l).shrinkToTextNode(),e.collapse(!1),e.scrollIntoView(),r.range.select(e)}}},{key:"insertOrSplit",value:function(e,t){var n,r,i,o=e.cloneRange();if(o.enlargeFromTextNode(),this.isLastOffset(e,"end")||o.endNode.type===Node.ELEMENT_NODE&&((null===(n=t.get())||void 0===n?void 0:n.childNodes.length)||0)>0&&o.endContainer.childNodes[o.endOffset]===(null===(r=t.last())||void 0===r?void 0:r.get())&&"br"===(null===(i=t.first())||void 0===i?void 0:i.name)){var a=Ut("<p><br /></p>");if("p"===t.name){var s=t.attributes();Object.keys(s).forEach((function(e){e!==$&&a.attributes(e,s[e])}))}this.insertEmptyBlock(e,a)}else this.split()}}]),e}(),Do=(0,E.Z)("_scrollNode"),Ho=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.kind="editor",this.options={lang:"zh-CN",locale:{},plugins:[],cards:[],config:{},iconFonts:"url('//at.alicdn.com/t/font_1456030_lnqmc6a6ca.woff2?t=1638071536645') format('woff2'), url('//at.alicdn.com/t/font_1456030_lnqmc6a6ca.woff?t=1638071536645') format('woff'), url('//at.alicdn.com/t/font_1456030_lnqmc6a6ca.ttf?t=1638071536645') format('truetype')"},this.container=void 0,this.language=void 0,this.root=void 0,this.card=void 0,this.plugin=void 0,this.node=void 0,this.nodeId=void 0,this.list=void 0,this.mark=void 0,this.inline=void 0,this.block=void 0,this.event=void 0,this.schema=void 0,this.conversion=void 0,this.command=void 0,this.clipboard=void 0,this.request=void 0,Object.defineProperty(this,Do,{writable:!0,value:null}),this.options=(0,s.Z)((0,s.Z)({},this.options),n);var i=this.options.iconFonts,o=document.querySelector("#am-iconfont");if(!o&&!1!==i){o=document.createElement("style"),o.setAttribute("type","text/css"),o.setAttribute("id","am-iconfont");var a='@font-face { font-family: "data-icon";';Array.isArray(i)&&(i=i.map((function(e){return"url('".concat(e.url,"') format('").concat(e.format,"')")})).join(",")),a+="src: ".concat(i,";}"),o.innerHTML=a,document.head.appendChild(o)}this.container=Ut(t),this.container.attributes(G,Y),this.language=new ki(this.options.lang||"zh-CN",O()(_i,null===n||void 0===n?void 0:n.locale)),this.event=new ht,this.command=new Oi(this),this.schema=new Zi,this.schema.add(Qt),this.conversion=new qi(this),Lt.forEach((function(e){return r.conversion.add(e.from,e.to)})),this.card=new eo(this,this.options.lazyRender),this.clipboard=new io(this),this.request=new Co,this.plugin=new Hi(this),this.node=new Rt(this),this.nodeId=new no(this.schema),this.list=new Eo(this),this.mark=new Fo(this),this.inline=new No(this),this.block=new Qo(this),this.root=Ut(this.options.root||this.container.parent()||document.body);var c=this.root.css("position");c&&"static"!==c||this.root.css("position","relative")}return(0,c.Z)(e,[{key:"scrollNode",get:function(){if((0,_.Z)(this,Do)[Do])return(0,_.Z)(this,Do)[Do];var e=this.options.scrollNode,t=e?"function"===typeof e?e():e:null,n=["auto","scroll"],r=this.container.parent();while(!t&&r&&r.length>0&&"body"!==r.name){if(n.includes(r.css("overflow"))||n.includes(r.css("overflow-y"))){t=r.get();break}r=r.parent()}return null===t&&(t=document.documentElement),(0,_.Z)(this,Do)[Do]=t?Ut(t):null,(0,_.Z)(this,Do)[Do]}},{key:"init",value:function(){this.mark.init(),this.inline.init(),this.block.init(),this.list.init();var e=this.options,t=e.plugins,n=e.cards,r=e.config;this.card.init(null!==n&&void 0!==n?n:[]);var i="function"===typeof r?r(this):null!==r&&void 0!==r?r:{};this.plugin.init(null!==t&&void 0!==t?t:[],i),this.nodeId.init()}},{key:"setScrollNode",value:function(e){(0,_.Z)(this,Do)[Do]=e?Ut(e):null}},{key:"on",value:function(e,t,n){return this.event.on(e,t,n),this}},{key:"off",value:function(e,t){return this.event.off(e,t),this}},{key:"trigger",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.event).trigger.apply(t,[e].concat(r))}},{key:"messageSuccess",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];(n=console).log.apply(n,[e,"success:".concat(t)].concat(i))}},{key:"messageError",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];(n=console).error.apply(n,[e,"error:".concat(t)].concat(i))}},{key:"messageConfirm",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return(n=console).log.apply(n,[e,"confirm:".concat(t)].concat(i)),Promise.reject(!1)}},{key:"getSelectionData",value:function(e){var t,n,r=this;if(e||(e=null!==(t=$t.from(this))&&void 0!==t?t:void 0),e){e=e.cloneRange();var i=e.startNode.closest("[".concat(fe,"]"),(function(e){var t;return Ut(e).isEditable()?void 0:(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0}));if(i.length>0&&!e.collapsed&&0===e.endOffset&&(e.endContainer.previousSibling&&e.setEndAfter(e.endContainer.previousSibling),!e.collapsed&&e.endOffset>0&&e.endContainer.childNodes[e.endOffset-1]===i[0])){var o=e.startNode.closest("[".concat(be,'="center"]'),(function(e){var t;return Ut(e).isEditable()?void 0:(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0}));o.length>0?e.setEnd(o[0],o[0].childNodes.length):e.setEnd(i[0],i[0].childNodes.length)}var a=e.commonAncestorNode;if(i=a.closest("[".concat(fe,"]"),(function(e){var t;return Ut(e).isEditable()?void 0:(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0})),i.length>0){var s=a.closest("[".concat(be,'="center"]'),(function(e){var t;return Ut(e).isEditable()?void 0:(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0}));0===s.length&&(e.select(i),a=e.commonAncestorNode)}if((a.inEditor()||a.isRoot())&&!e.collapsed){var l=function(e){if(0===e.length)return{};for(var t=e.length-1;t>0;t--){var n=e[t];n.appendChild(e[t-1])}return{inner:e[0],outter:e[e.length-1]}};if(i=a.closest("[".concat(fe,"]"),(function(e){var t;return(null!==(t=e.parentElement)&&void 0!==t?t:e.parentNode)||void 0})),i.length>0){var c=this.card.find(i);if(c&&c.getSelectionNodes){var A=c.getSelectionNodes();if(A.length>0){var u=l(A.map((function(e){return e[0]}))),d=u.inner,h=u.outter,p=A.map((function(e){return e.html()})).join(""),f=new un("<div>".concat(p,"</div>"),this);p=f.toHTML(d,h);var g=new un(p,this).toText(this.schema,!0);return{html:p,text:g}}}else if(!(null===c||void 0===c?void 0:c.isEditable))return}var m,v=this.node,b=this.list,y=e.startNode.closest("li");if(y&&v.isCustomize(y)){var w=e.endNode.closest("li");if(!y.equal(w)||b.isLast(e)&&b.isFirst(e))if(b.isFirst(e)){var x=y.parent(),k=y.getIndex();x&&e.setStart(x,k<0?0:k)}else{var C,B,_=y.parent(),E=e.createSelection(),S=E.getNode(y,"center",!0);if(null===(C=E.anchor)||void 0===C||C.remove(),null===(B=E.focus)||void 0===B||B.remove(),st(this)&&this.change.combinText(),S.length>0){var F=!1;S.each((function(e,t){var n=S.eq(t);F||"li"!==(null===n||void 0===n?void 0:n.name)?F&&(null===n||void 0===n||n.remove()):F=!0}));var T=y.first(),M=T?this.card.find(T):void 0;M&&(m=S,this.list.addCardToCustomize(m,M.name,M.getValue()),_&&v.wrap(m,null===_||void 0===_?void 0:_.clone()))}}}var I=e.enlargeToElementNode(!0).cloneContents(),N=[];if(a.isText()&&1===I.childNodes.length&&(null===(n=I.firstChild)||void 0===n?void 0:n.nodeType)===Node.TEXT_NODE){var U=a.parent();while(U&&(v.isMark(U)||v.isInline(U)))N.push(U.clone(!1).get()),U=U.parent()}I.querySelectorAll("li").forEach((function(e){var t,n,i=Ut(e),o=i.attributes($);if(o){var a=null===(t=r.container.get())||void 0===t?void 0:t.querySelector("[".concat($,"=").concat(o,"]"));v.isCustomize(i)&&!(null===(n=i.first())||void 0===n?void 0:n.isCard())&&(null===a||void 0===a?void 0:a.firstChild)&&i.prepend(v.clone(Ut(a.firstChild),!0,!1));var s=null===a||void 0===a?void 0:a.parentElement;s=s?Ut(s.cloneNode(!1)):null;var l=e.parentElement;!(a&&s&&v.isList(s))||l&&v.isList(l)||("ol"===s.name&&s.removeAttributes("start"),v.wrap(e,s))}}));var L=l(N),Q=L.inner,D=L.outter,H=[];I.childNodes.forEach((function(e){var t=Ut(e);(v.isList(t)||"li"===t.name)&&H.push(t)})),this.nodeId.generateAll(Ut(I),!0),this.list.merge(H);var O=new un(I,this),z=O.toHTML(Q,D),Z=new un(z,this).toText(this.schema,!0);return{html:z,text:Z}}}}},{key:"destroy",value:function(){this.container.removeAttributes(G),this.event.destroy(),this.plugin.destroy(),this.card.destroy(),this.container.empty()}}]),e}(),Oo=' .data-icon {\n font-family: "data-icon" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .data-icon-block-image:before {\n content: "\\ea20";\n }\n\n .data-icon-inline-image:before {\n content: "\\e601";\n }\n\n .data-icon-no-border:before {\n content: "\\e608";\n }\n\n .data-icon-line-height:before {\n content: "\\e697";\n }\n\n .data-icon-text:before {\n content: "\\e600";\n }\n\n .data-icon-comment:before {\n content: "\\e73e";\n }\n\n .data-icon-huanyuan:before {\n content: "\\e60a";\n }\n\n .data-icon-label:before {\n content: "\\e714";\n }\n\n .data-icon-video:before {\n content: "\\e741";\n }\n\n .data-icon-table:before {\n content: "\\e6a8";\n }\n\n .data-icon-h:before {\n content: "\\e7a0";\n }\n\n .data-icon-collapse-subtree:before {\n content: "\\e754";\n }\n\n .data-icon-expand-subtree:before {\n content: "\\e792";\n }\n\n .data-icon-sub-node:before {\n content: "\\e78e";\n }\n\n .data-icon-sister-node:before {\n content: "\\e784";\n }\n\n .data-icon-sup:before {\n content: "\\e790";\n }\n\n .data-icon-sub:before {\n content: "\\e75a";\n }\n\n .data-icon-maximize:before {\n content: "\\e752";\n }\n\n .data-icon-codeblock:before {\n content: "\\e709";\n }\n\n .data-icon-emoji:before {\n content: "\\e73a";\n }\n\n .data-icon-h4:before {\n content: "\\e759";\n }\n\n .data-icon-h1:before {\n content: "\\e75b";\n }\n\n .data-icon-h5:before {\n content: "\\e75c";\n }\n\n .data-icon-h2:before {\n content: "\\e75d";\n }\n\n .data-icon-h3:before {\n content: "\\e760";\n }\n\n .data-icon-h6:before {\n content: "\\e761";\n }\n\n .data-icon-liuchengtu:before {\n content: "\\e61c";\n }\n\n .data-icon-website:before {\n content: "\\e694";\n }\n\n .data-icon-preferences:before {\n content: "\\e788";\n }\n\n .data-icon-hr:before {\n content: "\\e76a";\n }\n\n .data-icon-task-list:before {\n content: "\\e79f";\n }\n\n .data-icon-unordered-list:before {\n content: "\\e777";\n }\n\n .data-icon-ordered-list:before {\n content: "\\e795";\n }\n\n .data-icon-arrow-left:before {\n content: "\\e748";\n }\n\n .data-icon-arrow-up:before {\n content: "\\e769";\n }\n\n .data-icon-arrow-right:before {\n content: "\\e779";\n }\n\n .data-icon-arrow-down:before {\n content: "\\e79a";\n }\n\n .data-icon-moremark:before {\n content: "\\e772";\n }\n\n .data-icon-clean:before {\n content: "\\e74d";\n }\n\n .data-icon-paintformat:before {\n content: "\\e756";\n }\n\n .data-icon-lock:before {\n content: "\\e768";\n }\n\n .data-icon-loading:before {\n content: "\\e76b";\n }\n\n .data-icon-unlock:before {\n content: "\\e796";\n }\n\n .data-icon-collapse:before {\n content: "\\e79e";\n }\n\n .data-icon-align-bottom:before {\n content: "\\e72b";\n }\n\n .data-icon-attachment:before {\n content: "\\e72c";\n }\n\n .data-icon-bold:before {\n content: "\\e72d";\n }\n\n .data-icon-border-color:before {\n content: "\\e72e";\n }\n\n .data-icon-border-all:before {\n content: "\\e72f";\n }\n\n .data-icon-border-inner:before {\n content: "\\e730";\n }\n\n .data-icon-border-left:before {\n content: "\\e731";\n }\n\n .data-icon-border-bottom:before {\n content: "\\e732";\n }\n\n .data-icon-border-none:before {\n content: "\\e733";\n }\n\n .data-icon-box:before {\n content: "\\e734";\n }\n\n .data-icon-border-outer:before {\n content: "\\e735";\n }\n\n .data-icon-border-right:before {\n content: "\\e736";\n }\n\n .data-icon-clear:before {\n content: "\\e737";\n }\n\n .data-icon-close:before {\n content: "\\e738";\n }\n\n .data-icon-code-example:before {\n content: "\\e739";\n }\n\n .data-icon-clip:before {\n content: "\\e73b";\n }\n\n .data-icon-border-up:before {\n content: "\\e73c";\n }\n\n .data-icon-code:before {\n content: "\\e73d";\n }\n\n .data-icon-command:before {\n content: "\\e73f";\n }\n\n .data-icon-compact-display:before {\n content: "\\e740";\n }\n\n .data-icon-copy:before {\n content: "\\e742";\n }\n\n .data-icon-download:before {\n content: "\\e743";\n }\n\n .data-icon-deletecolumn:before {\n content: "\\e744";\n }\n\n .data-icon-cut:before {\n content: "\\e745";\n }\n\n .data-icon-decreasedecimalplace:before {\n content: "\\e746";\n }\n\n .data-icon-drag:before {\n content: "\\e747";\n }\n\n .data-icon-delete:before {\n content: "\\e749";\n }\n\n .data-icon-drag-circle:before {\n content: "\\e74a";\n }\n\n .data-icon-deleterow:before {\n content: "\\e74b";\n }\n\n .data-icon-edit:before {\n content: "\\e74c";\n }\n\n .data-icon-filter:before {\n content: "\\e74e";\n }\n\n .data-icon-expand:before {\n content: "\\e74f";\n }\n\n .data-icon-error:before {\n content: "\\e750";\n }\n\n .data-icon-freezerowcoloum:before {\n content: "\\e751";\n }\n\n .data-icon-freezefirstrow:before {\n content: "\\e753";\n }\n\n .data-icon-freezzecolumn:before {\n content: "\\e755";\n }\n\n .data-icon-border-style:before {\n content: "\\e757";\n }\n\n .data-icon-gotolink:before {\n content: "\\e758";\n }\n\n .data-icon-increasedecimalplace:before {\n content: "\\e75e";\n }\n\n .data-icon-insertrowbelow:before {\n content: "\\e75f";\n }\n\n .data-icon-image:before {\n content: "\\e762";\n }\n\n .data-icon-italic:before {\n content: "\\e763";\n }\n\n .data-icon-indent:before {\n content: "\\e764";\n }\n\n .data-icon-insertrowabove:before {\n content: "\\e765";\n }\n\n .data-icon-insertrowright:before {\n content: "\\e766";\n }\n\n .data-icon-left-circle-fill:before {\n content: "\\e767";\n }\n\n .data-icon-link:before {\n content: "\\e76c";\n }\n\n .data-icon-keyboard:before {\n content: "\\e76d";\n }\n\n .data-icon-more:before {\n content: "\\e76e";\n }\n\n .data-icon-merge-cells:before {\n content: "\\e76f";\n }\n\n .data-icon-outdent:before {\n content: "\\e770";\n }\n\n .data-icon-mention:before {\n content: "\\e771";\n }\n\n .data-icon-plus:before {\n content: "\\e773";\n }\n\n .data-icon-minus-circle-o:before {\n content: "\\e774";\n }\n\n .data-icon-highlight:before {\n content: "\\e775";\n }\n\n .data-icon-paste:before {\n content: "\\e776";\n }\n\n .data-icon-insertrowleft:before {\n content: "\\e778";\n }\n\n .data-icon-quote:before {\n content: "\\e77a";\n }\n\n .data-icon-plus-circle-o:before {\n content: "\\e77b";\n }\n\n .data-icon-right-circle-fill:before {\n content: "\\e77c";\n }\n\n .data-icon-question-circle-o:before {\n content: "\\e77d";\n }\n\n .data-icon-preview:before {\n content: "\\e77e";\n }\n\n .data-icon-reload:before {\n content: "\\e77f";\n }\n\n .data-icon-rotate-left:before {\n content: "\\e780";\n }\n\n .data-icon-math:before {\n content: "\\e781";\n }\n\n .data-icon-overflow:before {\n content: "\\e782";\n }\n\n .data-icon-redo:before {\n content: "\\e783";\n }\n\n .data-icon-searchreplace:before {\n content: "\\e785";\n }\n\n .data-icon-save:before {\n content: "\\e786";\n }\n\n .data-icon-singleselect:before {\n content: "\\e787";\n }\n\n .data-icon-rotate-right:before {\n content: "\\e789";\n }\n\n .data-icon-sort-ascending:before {\n content: "\\e78a";\n }\n\n .data-icon-sort-descending:before {\n content: "\\e78b";\n }\n\n .data-icon-toc:before {\n content: "\\e78c";\n }\n\n .data-icon-solit-cells:before {\n content: "\\e78d";\n }\n\n .data-icon-translate:before {\n content: "\\e78f";\n }\n\n .data-icon-successful:before {\n content: "\\e791";\n }\n\n .data-icon-strikethrough:before {\n content: "\\e793";\n }\n\n .data-icon-undo:before {\n content: "\\e794";\n }\n\n .data-icon-underline:before {\n content: "\\e797";\n }\n\n .data-icon-unlink:before {\n content: "\\e798";\n }\n\n .data-icon-wrap:before {\n content: "\\e799";\n }\n\n .data-icon-upload:before {\n content: "\\e79b";\n }\n\n .data-icon-zoom-out:before {\n content: "\\e79c";\n }\n\n .data-icon-zoom-in:before {\n content: "\\e79d";\n }\n\n .data-icon-align-center:before {\n content: "\\e725";\n }\n\n .data-icon-align-justify:before {\n content: "\\e726";\n }\n\n .data-icon-align-left:before {\n content: "\\e727";\n }\n\n .data-icon-align-top:before {\n content: "\\e728";\n }\n\n .data-icon-align-right:before {\n content: "\\e729";\n }\n\n .data-icon-align-middle:before {\n content: "\\e72a";\n }\n\n.data-anticon {\n display: inline-block;\n font-style: normal;\n vertical-align: -0.125em;\n text-align: center;\n text-transform: none;\n line-height: 0;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n}\n\n.data-anticon svg {\n display: inline-block;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes loadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.data-anticon .data-anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n.data-anticon > * {\n line-height: 1;\n}\n\n.am-engine {\n position: relative;\n background-color: #FFFFFF;\n}\n\n.am-engine.am-engine-placeholder:before {\n content: attr(data-placeholder);\n pointer-events: none;\n position: absolute;\n color: #bbbfc4;\n height: 0;\n}\n\n.am-engine ::-moz-selection {\n background: rgba(180, 213, 254, 0.5) !important;\n color: inherit!important;\n}\n\n.am-engine ::selection {\n background: rgba(180, 213, 254, 0.5) !important;\n color: inherit!important;\n}\n\n.am-engine , .am-engine-view {\n font-family: \'Chinese Quote\', \'Segoe UI\', Roboto, \'PingFang SC\', \'Hiragino Sans GB\', \'Microsoft YaHei\', \'Helvetica Neue\', Helvetica, Arial, sans-serif, \'Apple Color Emoji\';\n\tword-wrap: break-word;\n\toutline-style: none;\n\twhite-space: pre-wrap;\n -webkit-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n font-size: 14px;\n line-height: 1.74;\n color: #262626;\n letter-spacing: .05em;\n /* pt / px 换算表https://websemantics.uk/articles/font-size-conversion/ */\n}\n\n.am-engine > *:first-child,.am-engine-view > *:first-child {\n\tmargin-top: 0 !important;\n}\n\n.am-engine p , .am-engine-view p {\n white-space: normal;\n margin: 0;\n line-height: 1.74;\n}\n\n.am-engine [contenteditable="true"],.am-engine-view [contenteditable="true"] {\n\toutline-style: none;\n}\n\n.am-engine .selection-transparent::-moz-selection,.am-engine-view .selection-transparent::-moz-selection {\n\tbackground: transparent;\n}\n\n.am-engine .selection-transparent::selection,.am-engine-view .selection-transparent::selection {\n\tbackground: transparent;\n}\n/*---------------------------卡片 begin-----------------------*/\n\n.am-engine [data-card-type], .am-engine-view [data-card-type] {\n white-space: normal;\n}\n.am-engine span[data-card-type="inline"],.am-engine-view span[data-card-type="inline"] {\n\tdisplay: inline-block;\n\ttext-indent: 0;\n\tvertical-align: baseline;\n\twhite-space: initial;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element],.am-engine-view span[data-card-type="inline"] span[data-card-element] {\n\tdisplay: inline-block;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="center"],.am-engine-view span[data-card-type="inline"] span[data-card-element="center"] {\n\tvertical-align: bottom;\n border-radius: 2px;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="left"],\n.am-engine-view span[data-card-type="inline"] span[data-card-element="left"],\n.am-engine span[data-card-type="inline"] span[data-card-element="right"],.am-engine-view span[data-card-type="inline"] span[data-card-element="right"] {\n\ttext-align: left;\n\t-webkit-user-select: text;\n\t -moz-user-select: text;\n\t user-select: text;\n min-width: 1px;\n background: transparent;\n bottom: 0;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="left"],\n.am-engine-view span[data-card-type="inline"] span[data-card-element="left"] {\n left: -1px;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="right"],.am-engine-view span[data-card-type="inline"] span[data-card-element="right"] {\n right: -1px;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="left"]::-moz-selection,\n.am-engine-view span[data-card-type="inline"] span[data-card-element="left"]::-moz-selection,\n.am-engine span[data-card-type="inline"] span[data-card-element="right"]::-moz-selection,.am-engine-view span[data-card-type="inline"] span[data-card-element="right"]::-moz-selection {\n background: transparent !important;\n}\n\n.am-engine span[data-card-type="inline"] span[data-card-element="left"]::selection,\n.am-engine-view span[data-card-type="inline"] span[data-card-element="left"]::selection,\n.am-engine span[data-card-type="inline"] span[data-card-element="right"]::selection,.am-engine-view span[data-card-type="inline"] span[data-card-element="right"]::selection {\n background: transparent !important;\n}\n\n.am-engine div[data-card-type="block"],.am-engine-view div[data-card-type="block"],.am-engine span[data-card-type="inline"].data-card-block,.am-engine-view span[data-card-type="inline"].data-card-block {\n\tdisplay: block;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"],.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"],.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"],.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"],.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"],.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"],.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"],.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"] {\n\tbottom: 0;\n\tposition: absolute;\n\twidth: 2px;\n\toverflow: hidden;\n\toutline: none;\n\ttext-align: left;\n\ttext-indent: 0;\n\t-webkit-box-flex: 0;\n\tflex: 0 0 auto;\n\t-webkit-user-select: text;\n\t-moz-user-select: text;\n\t user-select: text;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"],.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"],.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"],.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"] {\n\tleft: -2px;\n\ttext-align: left;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"],.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"],.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"],.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"] {\n\tright: -2px;\n\ttext-align: right;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"]::-moz-selection,\n.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"]::-moz-selection,\n.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"]::-moz-selection,\n.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"]::-moz-selection {\n background: transparent !important;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"]::selection,\n.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="left"]::selection,\n.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"]::selection,\n.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="left"]::selection {\n background: transparent !important;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"]::-moz-selection,\n.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"]::-moz-selection,\n.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"]::-moz-selection,\n.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"]::-moz-selection {\n\tbackground: transparent !important;\n}\n\n.am-engine div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"]::selection,\n.am-engine-view div[data-card-type="block"] > div[data-card-element="body"] > span[data-card-element="right"]::selection,\n.am-engine span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"]::selection,\n.am-engine-view span[data-card-type="inline"].data-card-block > div[data-card-element="body"] > span[data-card-element="right"]::selection {\n\tbackground: transparent !important;\n}\n\n.am-engine span[data-card-element="body"],.am-engine-view span[data-card-element="body"],.am-engine div[data-card-element="body"],.am-engine-view div[data-card-element="body"] {\n\tposition: relative;\n}\n\n.am-engine span[data-card-element="body"] [data-card-element="center"],.am-engine-view span[data-card-element="body"] [data-card-element="center"],.am-engine div[data-card-element="body"] [data-card-element="center"],.am-engine-view div[data-card-element="body"] [data-card-element="center"] {\n\t-webkit-user-select: text;\n\t-moz-user-select: text;\n\t user-select: text;\n}\n.am-engine span[data-card-element="body"] [data-element="editable"],.am-engine div[data-card-element="body"] [data-element="editable"]\n{\n cursor: text;\n}\n/*---------------------------卡片 end-----------------------*/\n';en(Oo);var zo=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(e,r){var i;(0,l.Z)(this,n),i=t.call(this,e,r),i._readonly=!1,i._container=void 0,i.kind="engine",i.typing=void 0,i.model=void 0,i.change=void 0,i.history=void 0,i.hotkey=void 0,i.options=(0,s.Z)((0,s.Z)({},i.options),r),i.history=new $r((0,A.Z)(i)),i._container=new xi(i.container,{engine:(0,A.Z)(i),lang:i.options.lang,className:i.options.className,tabIndex:i.options.tabIndex,placeholder:i.options.placeholder,autoPrepend:i.options.autoPrepend,autoAppend:i.options.autoAppend}),i.root=Ut(i.options.root||i.container.parent()||rt().body);var o=i.root.css("position");return o&&"static"!==o||i.root.css("position","relative"),i._container.init(),i.change=new yn((0,A.Z)(i),{onChange:function(e){return i.trigger("change",e)},onSelect:function(){return i.trigger("select")},onSelectStart:function(){return i.trigger("selectStart")},onSelectEnd:function(){return i.trigger("selectEnd")},onRealtimeChange:function(e){i.trigger("realtimeChange",e)},onSetValue:function(){return i.trigger("afterSetValue")}}),i.change.init(),i.typing=new bi((0,A.Z)(i)),i._readonly=void 0!==i.options.readonly&&i.options.readonly,i._container.setReadonly(i._readonly),i.hotkey=new Yr((0,A.Z)(i)),i.init(),i.isEmpty()&&i._container.showPlaceholder(),i.model=jr.from((0,A.Z)(i)),i.model.resetRoot(),i}return(0,c.Z)(n,[{key:"readonly",get:function(){return this._readonly},set:function(e){this.readonly!==e&&(e?(this.hotkey.disable(),this._container.setReadonly(!0),this.model.mutation.stop()):(this.hotkey.enable(),this._container.setReadonly(!1),this.model.mutation.start()),this._readonly=e,this.card.reRender(),this.trigger("readonly",e))}},{key:"isFocus",value:function(){return this._container.isFocus()}},{key:"isEmpty",value:function(){return this.change.isEmpty()}},{key:"focus",value:function(e){this.change.range.focus(e)}},{key:"blur",value:function(){this.change.range.blur()}},{key:"getValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.change.getValue({ignoreCursor:e});return e?Pt.removeTags(t):t}},{key:"getValueAsync",value:function(){var e=(0,a.Z)(g().mark((function e(){var t,n,r=this,i=arguments;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],n=i.length>1?i[1]:void 0,e.abrupt("return",new Promise(function(){var e=(0,a.Z)(g().mark((function e(i,a){var s,l,c;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:s=g().mark((function e(t){var i,s;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=r.plugin.components[t],e.next=3,new Promise((function(e){i.waiting?i.waiting(n).then((function(){return e(!0)})).catch(e):e(!0)}));case 3:if(s=e.sent,"object"!==(0,o.Z)(s)){e.next=7;break}return a(s),e.abrupt("return",{v:void 0});case 7:case"end":return e.stop()}}),e)})),e.t0=g().keys(r.plugin.components);case 2:if((e.t1=e.t0()).done){e.next=10;break}return l=e.t1.value,e.delegateYield(s(l),"t2",5);case 5:if(c=e.t2,"object"!==(0,o.Z)(c)){e.next=8;break}return e.abrupt("return",c.v);case 8:e.next=2;break;case 10:i(r.getValue(t));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getHtml",value:function(){var e=Ut(this.container[0].cloneNode(!0));return e.removeAttributes(Dt),e.removeAttributes("tabindex"),e.removeAttributes("autocorrect"),e.removeAttributes("autocomplete"),e.removeAttributes("spellcheck"),e.removeAttributes("data-gramm"),e.removeAttributes(yi),e.removeClass(wi),e.removeAttributes("role"),new un(e,this).toHTML()}},{key:"initDocOnReadonly",value:function(){this.readonly&&this.model.resetRoot()}},{key:"setValue",value:function(e,t){return e=this.trigger("beforeSetValue",e)||e,this.change.setValue(e,void 0,t),this.normalize(),this.nodeId.generateAll(this.container),this.initDocOnReadonly(),this}},{key:"setHtml",value:function(e,t){var n=this;return this.change.setHtml(e,(function(e){n.normalize(),n.container.allChildren("editable").forEach((function(e){n.node.isInline(e)?n.inline.repairCursor(e):n.node.isMark(e)&&n.mark.repairCursor(e)})),t&&t(e)})),this.nodeId.generateAll(this.container),this.initDocOnReadonly(),this}},{key:"setMarkdown",value:function(e,t){var n=this;return this.change.setMarkdown(e,(function(e){n.normalize(),n.container.allChildren("editable").forEach((function(e){n.node.isInline(e)?n.inline.repairCursor(e):n.node.isMark(e)&&n.mark.repairCursor(e)})),t&&t(e)})),this.nodeId.generateAll(this.container),this.initDocOnReadonly(),this}},{key:"setJsonValue",value:function(e,t){var n=this.model.toValue(e);return this.change.setValue(n,void 0,t),this.normalize(),this.nodeId.generateAll(this.container),this.initDocOnReadonly(),this}},{key:"getJsonValue",value:function(){return v()(this.model.root)}},{key:"getText",value:function(e){return new un(this.container,this).toText(this.schema,e)}},{key:"normalize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.container,n=Ut("<p />"),r=t.children();r.each((function(t,i){var o=r.eq(i);o&&(e.node.isBlock(o)?(n.get().childNodes.length>0&&o.before(n),n=Ut("<p />")):o.isCursor()||n.append(o))})),n.get().childNodes.length>0&&t.append(n),r=t.children(),r.each((function(t,n){var i=r.eq(n);if(i&&(e.node.removeMinusStyle(i,"text-indent"),e.node.isRootBlock(i))){var o=i.get().childNodes.length;if(0===o)i.append(Ut("<br />"));else{var a=i.first();1===o&&"span"===(null===a||void 0===a?void 0:a.name)&&[Ae,le,ce].indexOf(a.attributes(G))>=0&&i.prepend(Ut("<br />"))}}}))}},{key:"showPlaceholder",value:function(){this._container.showPlaceholder()}},{key:"hidePlaceholder",value:function(){this._container.hidePlaceholder()}},{key:"destroy",value:function(){this._container.destroy(),this.change.destroy(),this.hotkey.destroy(),this.typing.destroy(),this.model.destroy(),this.history.reset(),(0,u.Z)((0,d.Z)(n.prototype),"destroy",this).call(this)}}]),n}(Ho),Zo='.card-maximize-header {\r\n position: fixed !important;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n z-index: 9999;\r\n height: 56px;\r\n background: #fff;\r\n border-bottom: 1px solid #e8e8e8;\r\n width: 100%;\r\n}\r\n\r\n.card-maximize-header .header-crumb {\r\n float: left;\r\n line-height: 32px;\r\n display: flex;\r\n height: 100%;\r\n align-items: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n}\r\n\r\n.card-maximize-header .header-crumb a\r\n{\r\n color: #595959 !important;\r\n font-size: 14px;\r\n cursor: pointer;\r\n}\r\n\r\n.card-maximize-header .header-crumb .split {\r\n display: inline-block;\r\n vertical-align: middle;\r\n padding: 0 15px;\r\n font-size: 20px;\r\n padding-right: 8px;\r\n font-weight: 200;\r\n margin: 0 8px;\r\n}\r\n\r\n.card-maximize-header .header-crumb .split + a {\r\n display: inline-block;\r\n vertical-align: middle;\r\n}\r\n\r\n.card-maximize-header .header-crumb .split + a:hover {\r\n\tcolor: #8C8C8C;\r\n}\r\n\r\n.data-card-block-max > [data-card-element="body"] > [data-card-element="center"], .data-card-block-max > [data-card-element="body"] > [data-card-element="center"].data-card-background-selected {\r\n top: 96px;\r\n background: #fafafa !important;\r\n position: fixed!important;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n z-index: 124;\r\n overflow: auto;\r\n padding: 20px;\r\n}\r\n\r\n.am-engine-mobile .data-card-block-max > [data-card-element="body"] > [data-card-element="center"],.am-engine-view .data-card-block-max > [data-card-element="body"] > [data-card-element="center"] {\r\n top:56px;\r\n}';en(Zo);var Ro=function(){function e(t,n){(0,l.Z)(this,e),this.card=void 0,this.node=void 0,this.editor=void 0,this.editor=t,this.card=n}return(0,c.Z)(e,[{key:"restore",value:function(){this.card.root.removeClass("data-card-block-max"),this.node&&(this.node.remove(),this.node=void 0);var e=this.editor;st(e)&&(e.trigger("card:minimize",this.card),e.history.reset())}},{key:"maximize",value:function(){var e=this;if(!this.node){var t=this.editor,n=t.language,r=n.get("maximize","back").toString(),i=Ut('<div class="card-maximize-header" '.concat(ie,'="true" ').concat(G,'="').concat(J,'">\n <div class="header-crumb">\n <a class="split">\n <span class="data-icon data-icon-arrow-left"></span>\n </a>\n <a>').concat(r,"</a>\n </div>\n </div>"));i.on("click",(function(e){e.stopPropagation()})),this.card.root.addClass("data-card-block-max");var o=i.find(".header-crumb");o.on("click",(function(){e.card.minimize()}));var a=this.card.findByKey("body");null===a||void 0===a||a.prepend(i),st(t)&&(t.trigger("card:maximize",this.card),t.history.reset()),this.node=i}}}]),e}(),Po=".data-card-resize {\r\n position: absolute;\r\n bottom: -3px;\r\n right: 0px;\r\n left: 0px;\r\n margin: 0 auto;\r\n z-index: 2;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.data-card-resize-btn{\r\n background: #d9dbdd;\r\n border-radius: 3px;\r\n height: 6px;\r\n padding: 0 50px;\r\n display: block;\r\n}\r\n\r\n.data-card-resize-btn svg {\r\n display: block;\r\n color: #999;\r\n}\r\n\r\n.data-card-resize-btn:hover {\r\n cursor: row-resize;\r\n}";en(Po);var qo=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.editor=void 0,this.card=void 0,this.point=void 0,this.options={},this.component=void 0,this.start=!1,this.touchStart=function(e){e.preventDefault(),e.cancelBubble=!0,r.point={x:e.targetTouches[0].clientX,y:e.targetTouches[0].clientY};var t=r.options.dragStart;t&&t(r.point)},this.dragStart=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0,r.point={x:e.clientX,y:e.clientY};var t=r.options.dragStart;t&&t(r.point)},this.dragMove=function(e){if(r.point){var t=r.options.dragMove;t&&t(e.clientY-r.point.y)}},this.touchMove=function(e){if(e.preventDefault(),r.point){var t=r.options.dragMove;t&&t(e.targetTouches[0].clientY-r.point.y)}},this.dragEnd=function(e){r.point=void 0;var t=r.options.dragEnd;t&&t()},this.editor=t,this.card=n}return(0,c.Z)(e,[{key:"create",value:function(e){this.options=e;var t=Ut('<div class="data-card-resize" '.concat(G,'="').concat(J,'" draggable="true"><span class="data-card-resize-btn"><svg viewBox="0 0 3413 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="8px" height="6px"><path d="M341.333333 341.333333h2730.666667a170.666667 170.666667 0 0 0 0-341.333333H341.333333a170.666667 170.666667 0 1 0 0 341.333333zM341.333333 1024h2730.666667a170.666667 170.666667 0 0 0 0-341.333333H341.333333a170.666667 170.666667 0 0 0 0 341.333333z"></path></svg></span></div>'));Ue?(t.on("touchstart",this.touchStart),t.on("touchmove",this.touchMove),t.on("touchend",this.dragEnd),t.on("touchcancel",this.dragEnd)):(t.on("dragstart",this.dragStart),document.addEventListener("mousemove",this.dragMove),document.addEventListener("mouseup",this.dragEnd)),t.on("click",(function(e){e.stopPropagation()})),this.component=t}},{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.card.root,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:80;this.start=!1;var r=0,i=0,o=this.card;this.create({dragStart:function(){r=t.height(),e.start=!0,o.onActivate(!1)},dragMove:function(o){e.start&&(i=r+o,i=i<n?n:i,t.css("height","".concat(i,"px")))},dragEnd:function(){e.start&&(o.setValue({height:t.height()}),e.start=!1,o.onActivate(!0))}});var a=this.component;if(a){o.activated||a.hide(),t.append(a);var s=o.getValue()||{};s.height&&t.css("height","".concat(s.height,"px"))}}},{key:"show",value:function(){var e;null===(e=this.component)||void 0===e||e.show()}},{key:"hide",value:function(){var e;this.start||null===(e=this.component)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e=this.component;if(Ue){if(!e)return;e.off("touchstart",this.touchStart),e.off("touchmove",this.touchMove),e.off("touchend",this.dragEnd),e.off("touchcancel",this.dragEnd)}else null===e||void 0===e||e.off("dragstart",this.dragStart),document.removeEventListener("mousemove",this.dragMove),document.removeEventListener("mouseup",this.dragEnd);null===e||void 0===e||e.remove()}}]),e}(),Ko=(0,E.Z)("editor"),Wo=(0,E.Z)("container"),jo=(0,E.Z)("target"),Vo=(0,E.Z)("align"),Go=(0,E.Z)("offset"),$o=(0,E.Z)("root"),Yo=(0,E.Z)("onUpdate"),Xo=(0,E.Z)("updateTimeout"),Jo=(0,E.Z)("observer"),ea=function(){function e(t){var n=this;(0,l.Z)(this,e),Object.defineProperty(this,Ko,{writable:!0,value:void 0}),Object.defineProperty(this,Wo,{writable:!0,value:void 0}),Object.defineProperty(this,jo,{writable:!0,value:void 0}),Object.defineProperty(this,Vo,{writable:!0,value:"bottomLeft"}),Object.defineProperty(this,Go,{writable:!0,value:[0,0]}),Object.defineProperty(this,$o,{writable:!0,value:void 0}),Object.defineProperty(this,Yo,{writable:!0,value:void 0}),Object.defineProperty(this,Xo,{writable:!0,value:void 0}),Object.defineProperty(this,Jo,{writable:!0,value:void 0}),this.updateListener=function(){(0,_.Z)(n,Xo)[Xo]&&clearTimeout((0,_.Z)(n,Xo)[Xo]),(0,_.Z)(n,Xo)[Xo]=setTimeout((function(){n.update()}),50)},this.update=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if((0,_.Z)(n,Wo)[Wo]&&0!==(0,_.Z)(n,Wo)[Wo].length&&(0,_.Z)(n,jo)[jo]&&0!==(0,_.Z)(n,jo)[jo].length){var t=(0,D.ZP)((0,_.Z)(n,Wo)[Wo].get(),(0,_.Z)(n,jo)[jo].get(),(0,s.Z)((0,s.Z)({},Jn[(0,_.Z)(n,Vo)[Vo]]),{},{targetOffset:(0,_.Z)(n,Go)[Go]}));if((0,_.Z)(n,Yo)[Yo]&&e){var r=Object.keys(Jn).find((function(e){var n=Jn[e].points;return n[0]===t.points[0]&&n[1]===t.points[1]}));(0,_.Z)(n,Wo)[Wo].attributes("data-placement",r),(0,_.Z)(n,Yo)[Yo]((0,s.Z)((0,s.Z)({},t),{},{align:r}))}}},(0,_.Z)(this,Ko)[Ko]=t}return(0,c.Z)(e,[{key:"bind",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,_.Z)(this,Vo)[Vo],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,_.Z)(this,Go)[Go],a=arguments.length>4?arguments[4]:void 0;((0,_.Z)(this,Wo)[Wo]=e,(0,_.Z)(this,jo)[jo]=t,(0,_.Z)(this,Vo)[Vo]=i,(0,_.Z)(this,Go)[Go]=o,(0,_.Z)(this,$o)[$o]=Ut('<div style="position: absolute; top: 0px; left: 0px; width: 100%;"></div>'),(0,_.Z)(this,$o)[$o].append((0,_.Z)(this,Wo)[Wo]),(0,_.Z)(this,Ko)[Ko].root.append((0,_.Z)(this,$o)[$o]),(0,_.Z)(this,Yo)[Yo]=a,Ue||window.addEventListener("scroll",this.updateListener,{passive:!0}),window.addEventListener("resize",this.updateListener),st((0,_.Z)(this,Ko)[Ko])&&!Ue)&&(null===(n=(0,_.Z)(this,Ko)[Ko].scrollNode)||void 0===n||n.on("scroll",this.updateListener,{passive:!0}));if(t&&t.length>0){var s={width:t.width(),height:t.height()};"undefined"!==typeof ResizeObserver&&((0,_.Z)(this,Jo)[Jo]=new ResizeObserver((function(){var e=t.width(),n=t.height();e===s.width&&n===s.height||(s={width:e,height:n},r.updateListener())})),(0,_.Z)(this,Jo)[Jo].observe(t.get()))}this.update()}},{key:"setOffset",value:function(e){(0,_.Z)(this,Go)[Go]=e}},{key:"destroy",value:function(){var e,t,n;((0,_.Z)(this,Yo)[Yo]=void 0,Ue||window.removeEventListener("scroll",this.updateListener),window.removeEventListener("resize",this.updateListener),st((0,_.Z)(this,Ko)[Ko])&&!Ue)&&(null===(n=(0,_.Z)(this,Ko)[Ko].scrollNode)||void 0===n||n.off("scroll",this.updateListener));null===(e=(0,_.Z)(this,Jo)[Jo])||void 0===e||e.disconnect(),null===(t=(0,_.Z)(this,$o)[$o])||void 0===t||t.remove()}}]),e}(),ta=".data-card-dnd {\r\n position: absolute;\r\n top: 0;\r\n left: -21px;\r\n right: auto;\r\n bottom: auto;\r\n width: 18px;\r\n height: 24px;\r\n line-height: 24px;\r\n font-size: 14px;\r\n font-weight: normal;\r\n display: none;\r\n opacity: 0;\r\n z-index: 125;\r\n transition: all 0.3s ease-in-out;\r\n background: rgba(255, 255, 255, 0.9);\r\n}\r\n\r\n.data-card-dnd-active {\r\n display: block;\r\n opacity: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.data-card-dnd:hover {\r\n\tbackground: #f4f4f4;\r\n\tcolor: #595959;\r\n}\r\n\r\n.data-card-dnd-trigger {\r\n width: 18px;\r\n height: 24px;\r\n text-align: center;\r\n color: #BFBFBF;\r\n font-size: 16px;\r\n border-radius: 2px 2px;\r\n cursor: move;\r\n cursor: grab;\r\n cursor: -moz-grab;\r\n cursor: -webkit-grab;\r\n}\r\n\r\n.am-engine-view .data-toolbar-active {\r\n\tmin-width: 200px;\r\n}\r\n\r\n.data-card-toolbar.data-toolbar-block {\r\n\ttop: -48px;\r\n\tbottom: auto;\r\n\tdisplay: none;\r\n}\r\n\r\n.data-card-toolbar.data-card-toolbar-active {\r\n\tdisplay: block;\r\n}\r\n\r\n.data-card-toolbar.data-toolbar-active {\r\n\tdisplay: block;\r\n}";en(ta);var na=function(e){return-1===["button","input","dropdown","node","switch"].indexOf(e.type)},ra=(0,E.Z)("hideTimeout"),ia=(0,E.Z)("showTimeout"),oa=(0,E.Z)("defaultAlign"),aa=(0,E.Z)("dndNode"),sa=function(){function e(t,n){var r=this;(0,l.Z)(this,e),this.card=void 0,this.toolbar=void 0,this.editor=void 0,this.offset=void 0,this.position=void 0,this.dndPosition=void 0,Object.defineProperty(this,ra,{writable:!0,value:null}),Object.defineProperty(this,ia,{writable:!0,value:null}),Object.defineProperty(this,oa,{writable:!0,value:"topLeft"}),Object.defineProperty(this,aa,{writable:!0,value:null}),this.clearHide=function(){(0,_.Z)(r,ra)[ra]&&clearTimeout((0,_.Z)(r,ra)[ra]),(0,_.Z)(r,ra)[ra]=null},this.clearShow=function(){(0,_.Z)(r,ia)[ia]&&clearTimeout((0,_.Z)(r,ia)[ia]),(0,_.Z)(r,ia)[ia]=null},this.enterHide=function(){r.clearShow(),(0,_.Z)(r,ra)[ra]=setTimeout((function(){var e,t;r.hide(),(0,_.Z)(r,ra)[ra]=null;var n=r.toolbar;null===n||void 0===n||null===(e=n.root)||void 0===e||e.off("mouseenter",r.clearHide),null===n||void 0===n||null===(t=n.root)||void 0===t||t.off("mouseleave",r.enterHide)}),200)},this.enterShow=function(){r.clearHide(),(0,_.Z)(r,ia)[ia]=setTimeout((function(){var e,t;(0,_.Z)(r,ia)[ia]=null,r.show();var n=r.toolbar;null===n||void 0===n||null===(e=n.root)||void 0===e||e.on("mouseenter",r.clearHide),null===n||void 0===n||null===(t=n.root)||void 0===t||t.on("mouseleave",r.enterHide)}),200)},this.editor=t,this.card=n,this.position=new ea(t),this.dndPosition=new ea(t),this.unbindEnterShow(),st(t)&&!t.readonly||this.bindEnterShow()}return(0,c.Z)(e,[{key:"setDefaultAlign",value:function(e){(0,_.Z)(this,oa)[oa]=e}},{key:"bindEnterShow",value:function(){this.card.root.on("mouseenter",this.enterShow),this.card.root.on("mouseleave",this.enterHide)}},{key:"unbindEnterShow",value:function(){this.card.root.off("mouseenter",this.enterShow),this.card.root.off("mouseleave",this.enterHide)}},{key:"setOffset",value:function(e){this.offset=e}},{key:"getContainer",value:function(){var e;return null===(e=this.toolbar)||void 0===e?void 0:e.root}},{key:"getDefaultItem",value:function(e){var t=this,n=this.editor,r=n.language,i=n.clipboard,o=n.card;switch(e.type){case"separator":return{key:"separator",type:"node",node:e.node||Ut('<span class="data-toolbar-item-split"></span>')};case"copy":return{key:"copy",type:"button",content:e.content||'<span class="data-icon data-icon-copy"></span>',title:e.title||r.get("copy","title"),onClick:function(o,a){if(e.onClick)e.onClick(o,a);else{var s=i.copy(t.card.root[0],!0);s?n.messageSuccess("copy",r.get("copy","success")):n.messageError("copy",r.get("copy","error"))}}};case"delete":return{key:"delete",type:"button",content:e.content||'<span class="data-icon data-icon-delete"></span>',title:e.title||r.get("delete","title").toString(),onClick:function(n,r){e.onClick?e.onClick(n,r):o.remove(t.card.root)}};case"maximize":return{key:"maximize",type:"button",content:e.content||'<span class="data-icon data-icon-maximize"></span>',title:e.title||r.get("maximize","title").toString(),onClick:function(n,r){e.onClick?e.onClick(n,r):t.card.maximize()}};case"more":return{key:"more",type:"dropdown",content:e.content||'<span class="data-icon data-icon-more"></span>',title:e.title||r.get("more","title").toString(),items:e.items}}}},{key:"getItems",value:function(){var e=this;if(!this.card.toolbar)return[[],[]];var t=this.card.toolbar(),n=[];return t.forEach((function(t){if(na(t))switch(t.type){case"dnd":break;default:var r=e.getDefaultItem(t);r&&n.push(r)}else n.push(t)})),[n,t]}},{key:"create",value:function(){this.hide();var e=this.getItems(),t=(0,w.Z)(e,2),n=t[0],r=t[1];if(n.length>0){var i=r.find((function(e){return na(e)&&"dnd"===e.type}));if(i&&!Ue&&"dnd"===i.type){var o=this.editor,a=o.root,s=o.language,l=this.createDnd(i.content||'<span class="data-icon data-icon-drag"></span>',i.title||s.get("dnd","title").toString());a.append(l),(0,_.Z)(this,aa)[aa]=l}var c=new mr({items:n});c.root.addClass("data-card-toolbar"),c.root.attributes(Ee,this.card.id),c.render(Ut(document.body)),c.hide(),this.toolbar=c}}},{key:"update",value:function(){var e,t=this.getItems(),n=(0,w.Z)(t,1),r=n[0];null===(e=this.toolbar)||void 0===e||e.update({items:r})}},{key:"hide",value:function(){var e;null===(e=(0,_.Z)(this,aa)[aa])||void 0===e||e.remove(),this.dndPosition.destroy(),this.hideCardToolbar()}},{key:"show",value:function(e){this.showCardToolbar(e)}},{key:"hideCardToolbar",value:function(){var e;null===(e=this.toolbar)||void 0===e||e.destroy(),this.position.destroy()}},{key:"showDnd",value:function(){var e=this;(0,_.Z)(this,aa)[aa]&&0!==(0,_.Z)(this,aa)[aa].length&&(this.card.isMaximize?(0,_.Z)(this,aa)[aa].removeClass("data-card-dnd-active"):(0,_.Z)(this,aa)[aa].length>0&&((0,_.Z)(this,aa)[aa].addClass("data-card-dnd-active"),setTimeout((function(){e.dndPosition.bind((0,_.Z)(e,aa)[aa],e.card.root,"leftTop",e.offset)}))))}},{key:"showCardToolbar",value:function(e){var t=this;this.create();var n=this.getContainer();if(n&&n.length>0){this.showDnd();var r=this.card;n.addClass("data-toolbar-active"),n.attributes("toolbar-trigger-key",r.constructor.cardName),this.toolbar&&this.toolbar.show();var i=(0,_.Z)(this,oa)[oa],o=this.position;setTimeout((function(){o.bind(n,r.isMaximize?r.getCenter().first():r.root,(0,_.Z)(t,oa)[oa],t.offset,(function(e){t.offset&&4===t.offset.length&&"bottomLeft"===e.align&&e.align!==i?(o.setOffset([t.offset[2],t.offset[3]]),i=e.align,o.update(!1)):t.offset&&e.align===(0,_.Z)(t,oa)[oa]&&e.align!==i&&(o.setOffset(t.offset),i=e.align,o.update(!1)),i=e.align}))}),10)}}},{key:"createDnd",value:function(e,t){var n=this,r=Ut("<div ".concat(G,'="').concat(J,'" class="data-card-dnd" draggable="true" dnd-trigger-key="').concat(this.card.constructor.cardName,'" drag-card-trigger="').concat(this.card.id,'" ').concat(Dt,'="false">\n <div class="data-card-dnd-trigger">\n ').concat(e,"\n </div>\n </div>"));return r.on("mouseenter",(function(){nr.show(r,t)})),r.on("mouseleave",(function(){nr.hide()})),r.on("mousedown",(function(e){e.stopPropagation(),nr.hide(),n.hideCardToolbar()})),r.on("mouseup",(function(){n.showCardToolbar()})),r}},{key:"destroy",value:function(){this.unbindEnterShow(),this.dndPosition.destroy(),this.position.destroy()}}]),e}(),la=function(){function e(t){var n,r=t.editor,i=t.value,o=t.root;(0,l.Z)(this,e),this.editor=void 0,this.root=void 0,this.toolbarModel=void 0,this.resizeModel=void 0,this.activatedByOther=!1,this.selectedByOther=!1,this.contenteditable=[],this.defaultMaximize=void 0,this.isMaximize=!1,this._id=void 0,this.resize=void 0,this.editor=r;var a=(null===(n=i)||void 0===n?void 0:n.type)||this.constructor.cardType,s="inline"===a?"span":"div";this.root=o||Ut("<".concat(s," />")),"string"===typeof i&&(i=Ye(i)),i=i||{},i.id=this.getId(i.id),this._id=i.id,i.type=a,this.setValue(i),this.defaultMaximize=new Ro(r,this)}return(0,c.Z)(e,[{key:"isEditable",get:function(){return this.contenteditable.length>0}},{key:"activated",get:function(){return this.root.hasClass("card-activated")}},{key:"setActivated",value:function(e){e?this.root.addClass("card-activated"):this.root.removeClass("card-activated")}},{key:"selected",get:function(){return this.root.hasClass("card-selected")}},{key:"setSelected",value:function(e){e?this.root.addClass("card-selected"):this.root.removeClass("card-selected")}},{key:"id",get:function(){if(this._id)return this._id;var e=this.root.attributes(ve);if(!e)return{};var t=Ye(e);return"object"===(0,o.Z)(t)&&(null===t||void 0===t?void 0:t.id)||""}},{key:"name",get:function(){return this.root.attributes(fe)}},{key:"type",get:function(){var e=this.root.attributes(me);if(!e){var t=this.root.attributes(ve),n=Ye(t||"{}");e=(null===n||void 0===n?void 0:n.type)||this.constructor.cardType}return e},set:function(e){if(this.name&&e!==this.type){var t=this.editor.card,n=this.root.attributes(ve),r=Ye(n||"{}"),i=t.replace(this,this.name,(0,s.Z)((0,s.Z)({},r),{},{type:e}));t.render(i.root),i.activate(!1),t.activate(i.root)}}},{key:"loading",get:function(){return!!this.root.attributes(ye)}},{key:"init",value:function(){this.root.attributes(we,this.isEditable?"true":"false");var e=this.toolbarModel;null===e||void 0===e||e.hide(),null===e||void 0===e||e.destroy();var t=this.editor;this.toolbar&&(this.toolbarModel=new sa(t,this)),this.resize&&(this.resizeModel=new qo(t,this))}},{key:"getId",value:function(e){var t=[];if(this.editor.card.each((function(e){t.push(e.id)})),e&&t.indexOf(e)<0)return e;var n=Oe();while(t.indexOf(n)>=0)n=Oe();return n}},{key:"setValue",value:function(e){if(null!=e){var t=this.root.attributes(ve),n=Ye(t||"{}");(null===n||void 0===n?void 0:n.id)&&delete e["id"],e=(0,s.Z)((0,s.Z)({},n),e),e.type&&(null===n||void 0===n?void 0:n.type)!==e.type&&(this.type=e.type),this.root.attributes(ve,$e(e))}}},{key:"getValue",value:function(){var e=this.root.attributes(ve);return e?Ye(e):{}}},{key:"find",value:function(e){return this.root.find(e)}},{key:"findByKey",value:function(e){var t=this.root.first()||Ut([]);if("body"===e||0===t.length)return t;var n=t.children(),r=["left","center","right"].indexOf(e);if(r>-1)return n.toArray().find((function(t){return t.attributes(be)===e}));var i=this.type===nn.BLOCK?"div":"span",o=this.find("".concat(i,"[").concat(be,"=").concat(e,"]"));return o.name===i&&o.attributes(be)===e?o:void 0}},{key:"activate",value:function(e){e?this.activated||(this.setActivated(e),this.onActivate(e)):this.activated&&(this.setActivated(e),this.onActivate(!1))}},{key:"select",value:function(e){st(this.editor)&&!this.activatedByOther&&(e?this.selected||this.isMaximize||(this.setSelected(e),this.onSelect(e)):this.selected&&(this.setSelected(e),this.onSelect(!1)))}},{key:"getCenter",value:function(){var e=this.findByKey("center");return e||Ut([])}},{key:"isCenter",value:function(e){var t,n=e.closest(this.type===nn.BLOCK?"div[".concat(be,"=center]"):"span[".concat(be,"=center]"));return n.length>0&&!!(null===(t=this.findByKey("center"))||void 0===t?void 0:t.equal(n))}},{key:"isCursor",value:function(e){return this.isLeftCursor(e)||this.isRightCursor(e)}},{key:"isLeftCursor",value:function(e){var t;if(e.isElement()&&"left"!==e.attributes(be))return!1;var n=e.closest(Ce);return n.length>0&&!!(null===(t=this.findByKey("left"))||void 0===t?void 0:t.equal(n))}},{key:"isRightCursor",value:function(e){var t;if(e.isElement()&&"right"!==e.attributes(be))return!1;var n=e.closest(_e);return n.length>0&&!!(null===(t=this.findByKey("right"))||void 0===t?void 0:t.equal(n))}},{key:"focus",value:function(e,t){var n=this.findByKey("left"),r=this.findByKey("right");if(n&&0!==n.length&&r&&0!==r.length){var i=t?n:r;e.select(i,!0).shrinkToTextNode();var o=i.first();o&&(e.setStart(o,t?0:1),e.collapse(!0),st(this.editor)&&this.editor.change.range.select(e),this.onFocus&&this.onFocus())}}},{key:"maximize",value:function(){var e;this.isMaximize=!0,this.defaultMaximize.maximize(),null===(e=this.toolbarModel)||void 0===e||e.show()}},{key:"minimize",value:function(){var e;this.isMaximize=!1,this.defaultMaximize.restore(),null===(e=this.toolbarModel)||void 0===e||e.show()}},{key:"onSelect",value:function(e){var t=this.constructor.selectStyleType;if(t!==on.NONE){var n="data-card-".concat(t,"-selected"),r=this.getCenter();e?r.addClass(n):r.removeClass(n)}}},{key:"onSelectByOther",value:function(e,t){var n=this.getCenter(),r=this.constructor.selectStyleType;r===on.BACKGROUND?n.css("background-color",e?t.rgb:""):n.css("outline",e?"2px solid "+t.color:"");var i="card-selected-other";return e?this.root.addClass(i):this.root.removeClass(i),n}},{key:"onActivate",value:function(e){var t,n;this.resize&&(e?null===(t=this.resizeModel)||void 0===t||t.show():null===(n=this.resizeModel)||void 0===n||n.hide())}},{key:"onActivateByOther",value:function(e,t){return this.onSelectByOther(e,t)}},{key:"initToolbar",value:function(){var e,t;this.toolbar?(this.toolbarModel||(this.toolbarModel=new sa(this.editor,this)),this.activated&&this.toolbarModel.show()):(null===(e=this.toolbarModel)||void 0===e||e.hide(),null===(t=this.toolbarModel)||void 0===t||t.destroy(),this.toolbarModel=void 0)}},{key:"initResize",value:function(){if(this.resize){this.resizeModel||(this.resizeModel=new qo(this.editor,this));var e,t="function"===typeof this.resize?this.resize():this.findByKey("body");if(t&&t.length>0)null===(e=this.resizeModel)||void 0===e||e.render(t)}}},{key:"didUpdate",value:function(){this.initResize(),this.initToolbar()}},{key:"beforeRender",value:function(){var e=this.getCenter(),t=Ut("<".concat(this.type===nn.BLOCK?"div":"span",' class="').concat(ye,'" ').concat(G,'="').concat(J,'" />'));t.append('<svg viewBox="0 0 1024 1024" class="data-card-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"> <path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg>'),e.empty().append(t)}},{key:"didRender",value:function(){var e=this;this.loading&&(this.find(".".concat(ye)).remove(),setTimeout((function(){e.root.removeAttributes(ye)}),200)),this.initResize(),this.initToolbar(),this.isEditable&&this.editor.nodeId.generateAll(this.getCenter().get())}},{key:"destroy",value:function(){var e,t,n,r;null===(e=this.toolbarModel)||void 0===e||e.hide(),null===(t=this.toolbarModel)||void 0===t||t.destroy(),this.toolbarModel=void 0,null===(n=this.resizeModel)||void 0===n||n.hide(),null===(r=this.resizeModel)||void 0===r||r.destroy(),this.resizeModel=void 0}}]),e}();la.cardName=void 0,la.cardType=void 0,la.autoActivate=void 0,la.autoSelected=!0,la.singleSelectable=void 0,la.collab=!0,la.focus=void 0,la.selectStyleType=on.BORDER,la.lazyRender=!1;var ca=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(e,r){var i;return(0,l.Z)(this,n),i=t.call(this,e,r),i.kind="view",i.init(),i.container.hasClass(se)||i.container.addClass(se),i}return(0,c.Z)(n,[{key:"render",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new un(e,this),i=r.toValue(this.schema,this.conversion,!1,!0);this.container.html(i),this.card.render(this.container,(function(){n&&t.trigger("render",t.container)}))}}]),n}(Ho),Aa=".data-scrollable::-webkit-scrollbar {\r\n display: none;\r\n overflow: hidden;\r\n }\r\n .data-scrollable.scroll-x {\r\n padding-bottom: 10px;\r\n overflow-x: hidden;\r\n }\r\n \r\n .data-scrollable.scroll-y {\r\n padding-right: 10px;\r\n overflow-y: hidden;\r\n }\r\n\r\n .data-scrollable:hover .data-scrollbar {\r\n display: block;\r\n }\r\n .data-scrollable.scrolling {\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n }\r\n .data-scrollable.scrolling .data-scrollbar {\r\n display: block;\r\n }\r\n .data-scrollable .data-scrollbar {\r\n display: none;\r\n position: absolute;\r\n cursor: default;\r\n transition: opacity 0.3s ease-in-out;\r\n }\r\n .data-scrollable .data-scrollbar .data-scrollbar-trigger {\r\n position: absolute;\r\n background: #c1c1c1;\r\n border-radius: 10px;\r\n cursor: pointer;\r\n }\r\n .data-scrollable .data-scrollbar .data-scrollbar-trigger:hover {\r\n background: #888;\r\n }\r\n .data-scrollable .data-scrollbar.data-scrollbar-x {\r\n height: 8px;\r\n bottom: 0px;\r\n }\r\n .data-scrollable .data-scrollbar.data-scrollbar-x .data-scrollbar-trigger {\r\n height: 8px;\r\n min-width: 60px;\r\n }\r\n .data-scrollable .data-scrollbar.data-scrollbar-y {\r\n top: 0;\r\n width: 8px;\r\n height: 100%;\r\n right: 0px;\r\n }\r\n .data-scrollable .data-scrollbar.data-scrollbar-y .data-scrollbar-trigger {\r\n width: 8px;\r\n min-height: 60px;\r\n }\r\n .data-scrollable .scrollbar-shadow-left {\r\n position: absolute;\r\n z-index: 10;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n width: 4px;\r\n opacity: 0.8;\r\n background: linear-gradient(270deg, rgba(99, 114, 130, 0) 0, rgba(99, 114, 130, 0.16));\r\n background: -webkit-linear-gradient(right, rgba(99, 114, 130, 0), rgba(99, 114, 130, 0.16));\r\n pointer-events: none;\r\n }\r\n .data-scrollable .scrollbar-shadow-right {\r\n position: absolute;\r\n z-index: 10;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n width: 4px;\r\n opacity: 0.8;\r\n background: linear-gradient(90deg, rgba(99, 114, 130, 0) 0, rgba(99, 114, 130, 0.16));\r\n background: -webkit-linear-gradient(left, rgba(99, 114, 130, 0), rgba(99, 114, 130, 0.16));\r\n pointer-events: none;\r\n }";en(Aa);var ua=(0,E.Z)("observer"),da=(0,E.Z)("reverse"),ha=(0,E.Z)("content"),pa=(0,E.Z)("enableScroll"),fa=(0,E.Z)("scroll"),ga=(0,E.Z)("isScrolling"),ma=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(e){var r,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4?arguments[4]:void 0;return(0,l.Z)(this,n),r=t.call(this),r.container=void 0,r.x=void 0,r.y=void 0,r.shadow=void 0,r.scrollBarX=void 0,r.slideX=void 0,r.slideXDragging=void 0,r.scrollBarY=void 0,r.slideY=void 0,r.slideYDragging=void 0,r.shadowLeft=void 0,r.shadowRight=void 0,r.oWidth=0,r.oHeight=0,r.sWidth=0,r.sHeight=0,r.xWidth=0,r.yHeight=0,Object.defineProperty((0,A.Z)(r),ua,{writable:!0,value:void 0}),Object.defineProperty((0,A.Z)(r),da,{writable:!0,value:void 0}),Object.defineProperty((0,A.Z)(r),ha,{writable:!0,value:void 0}),r.shadowTimer=void 0,Object.defineProperty((0,A.Z)(r),pa,{writable:!0,value:!0}),Object.defineProperty((0,A.Z)(r),fa,{writable:!0,value:void 0}),Object.defineProperty((0,A.Z)(r),ga,{writable:!0,value:!1}),r.refresh=function(){var e=r.container.get();if(e){var t,n,i=function(){setTimeout((function(){(0,_.Z)((0,A.Z)(r),ga)[ga]=!1}),0)},o=e.scrollTop,a=null===(t=(0,_.Z)((0,A.Z)(r),ha)[ha])||void 0===t?void 0:t.get(),s=Ge(r.container.css("padding-left")),l=Ge(r.container.css("padding-right")),c=Ge(r.container.css("padding-top")),u=Ge(r.container.css("padding-bottom")),d=a?(0,_.Z)((0,A.Z)(r),ha)[ha].width()+s+l:e.scrollWidth,h=a?(0,_.Z)((0,A.Z)(r),ha)[ha].height()+c+u:e.scrollHeight;if(r.oWidth=r.getWidth(),r.oHeight=r.container.height()-Ge(r.container.css("border-top-width"))-Ge(r.container.css("border-bottom-width")),r.sWidth=d,r.sHeight=h,r.xWidth=Math.floor(r.oWidth*r.oWidth/d),r.yHeight=Math.floor(r.oHeight*r.oHeight/h),r.x){var p,f,g,m;null===(p=r.slideX)||void 0===p||p.css("width",r.xWidth+"px");var v=Math.round(r.oWidth)-s-l===r.sWidth||a&&Math.round((0,_.Z)((0,A.Z)(r),ha)[ha].width())<=Math.round(r.oWidth-s-l)?"none":"block";null===(f=r.slideX)||void 0===f||f.css("display",v),r.emit("display",v),null===(g=r.shadowLeft)||void 0===g||g.css("display",v),null===(m=r.shadowRight)||void 0===m||m.css("display",v)}if(r.y){var b,y;null===(b=r.slideY)||void 0===b||b.css("height",r.yHeight+"px");var w=Math.round(r.oHeight)-c-u===r.sHeight||a&&Math.round((0,_.Z)((0,A.Z)(r),ha)[ha].height())<=Math.round(r.oHeight-c-u)?"none":"block";null===(y=r.slideY)||void 0===y||y.css("display",w),r.emit("display",w)}if(r.x&&a&&e.scrollWidth-s-l>(0,_.Z)((0,A.Z)(r),ha)[ha].width()){(0,_.Z)((0,A.Z)(r),ga)[ga]=!0;var x=e.scrollWidth-s-l-(0,_.Z)((0,A.Z)(r),ha)[ha].width();if((0,_.Z)((0,A.Z)(r),fa)[fa]){var k=(0,_.Z)((0,A.Z)(r),fa)[fa],C=k.onScrollX,B=k.getScrollLeft;if(x=B?B(-0)+e.scrollLeft-x:e.scrollLeft-x,x<0&&(x=0),C){var E=C(x);e.scrollLeft=E>0?E:0}r.scroll({left:x})}else e.scrollLeft-=x,i();return}if(r.y&&a&&e.scrollHeight-c-u!==(0,_.Z)((0,A.Z)(r),ha)[ha].height())return(0,_.Z)((0,A.Z)(r),ga)[ga]=!0,e.scrollTop-=e.scrollHeight-c-u-(0,_.Z)((0,A.Z)(r),ha)[ha].height(),void i();var S=(null===(n=(0,_.Z)((0,A.Z)(r),fa)[fa])||void 0===n?void 0:n.getScrollLeft)?(0,_.Z)((0,A.Z)(r),fa)[fa].getScrollLeft(e.scrollLeft):e.scrollLeft;if((0,_.Z)((0,A.Z)(r),fa)[fa]){var F=(0,_.Z)((0,A.Z)(r),fa)[fa].onScrollX;if(F){(0,_.Z)((0,A.Z)(r),ga)[ga]=!0;var T=F(S);e.scrollLeft=T>0?T:0,i()}r.scroll({left:S})}else r.reRenderX(S);r.reRenderY(o)}},r.scroll=function(e){var t=0,n=0;if(!(0,_.Z)((0,A.Z)(r),fa)[fa]&&e instanceof Event){var i=e.target,o=i.scrollTop,a=i.scrollLeft;t=o,n=a}else{if(e instanceof Event)return(0,_.Z)((0,A.Z)(r),ga)[ga]?void 0:void r.refresh();var s,l;void 0===e.top&&(e.top=(null===(s=r.container.get())||void 0===s?void 0:s.scrollTop)||0);void 0===e.left&&(e.left=(null===(l=r.container.get())||void 0===l?void 0:l.scrollLeft)||0);t=e.top,n=e.left}r.reRenderX(n),r.reRenderY(t)},r.wheelXScroll=j()((function(e){var t,n;e.preventDefault();var i=(De?e.wheelDeltaX:e.wheelDelta/120||-e.detail)>0?"up":"down",o=r.container.get();if(o){var a=r.container.width(),s=(null===(t=(0,_.Z)((0,A.Z)(r),fa)[fa])||void 0===t?void 0:t.getOffsetWidth)?(0,_.Z)((0,A.Z)(r),fa)[fa].getOffsetWidth(a):a,l=Math.max(s/(De?20-Math.abs(e.wheelDelta):8),20),c=((null===(n=(0,_.Z)((0,A.Z)(r),fa)[fa])||void 0===n?void 0:n.getScrollLeft)?(0,_.Z)((0,A.Z)(r),fa)[fa].getScrollLeft(o.scrollLeft):o.scrollLeft)+("up"===i?-l:l);if(c="up"===i?Math.max(0,c):Math.min(c,r.sWidth-r.oWidth),(0,_.Z)((0,A.Z)(r),fa)[fa]){var u=(0,_.Z)((0,A.Z)(r),fa)[fa].onScrollX;if(u){var d=u(c);o.scrollLeft=d>0?d:0}r.scroll({left:c})}else o.scrollLeft=c}}),De?50:0,{trailing:!0}),r.wheelYScroll=j()((function(e){e.preventDefault();var t=(De?e.wheelDeltaX:e.wheelDelta/120||-e.detail)>0?"up":"down",n=r.container.get();if(n){var i=r.container.height(),o=Math.max(i/(De?20-Math.abs(e.wheelDelta):8),20),a=n.scrollTop+("up"===t?-o:o);a="up"===t?Math.max(0,a):Math.min(a,r.sHeight-r.oHeight),n.scrollTop=a}}),De?100:0,{trailing:!0}),r.bindWheelScroll=function(e){if((0,_.Z)((0,A.Z)(r),pa)[pa]){var t=r.x&&e.wheelDeltaX!==e.wheelDeltaY&&Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY);t?r.slideX&&"none"!==r.slideX.css("display")&&r.wheelXScroll(e):r.y&&0!==e.wheelDeltaY&&r.slideY&&"none"!==r.slideY.css("display")&&r.wheelYScroll(e)}},r.bindContainerTouchX=function(e){e.target&&(0,_.Z)((0,A.Z)(r),pa)[pa]&&(Ut(e.target).hasClass("data-scrollbar-trigger")||((0,_.Z)((0,A.Z)(r),da)[da]=!0,r.scrollXStart(e)))},r.bindContainerTouchY=function(e){e.target&&(0,_.Z)((0,A.Z)(r),pa)[pa]&&(Ut(e.target).hasClass("data-scrollbar-trigger")||((0,_.Z)((0,A.Z)(r),da)[da]=!0,r.scrollYStart(e)))},r.getEventClientOffset=function(e){return e instanceof MouseEvent?{x:e.clientX,y:e.clientY}:{x:e.touches[0].clientX,y:e.touches[0].clientY}},r.scrollX=function(e){if(r.slideXDragging){var t,n=r.slideXDragging,i=n.point,o=n.position,a=r.getEventClientOffset(e),s=(0,_.Z)((0,A.Z)(r),da)[da]?o-(a.x-i):o+(a.x-i);s=Math.max(0,Math.min(s,r.oWidth-r.xWidth)),null===(t=r.slideX)||void 0===t||t.css("left",s+"px");var l=s/(r.oWidth-r.xWidth);l=Math.min(1,l);var c=r.container.get(),u=(r.sWidth-r.oWidth)*l;if((0,_.Z)((0,A.Z)(r),fa)[fa]){var d=(0,_.Z)((0,A.Z)(r),fa)[fa].onScrollX;if(d){var h=d(u);c.scrollLeft=h>0?h:0}r.scroll({left:u})}else c.scrollLeft=u}},r.scrollY=function(e){if(r.slideYDragging){var t,n=r.slideYDragging,i=n.point,o=n.position,a=r.getEventClientOffset(e),s=(0,_.Z)((0,A.Z)(r),da)[da]?o-(a.y-i):o+(a.y-i);s=Math.max(0,Math.min(s,r.oHeight-r.yHeight)),null===(t=r.slideY)||void 0===t||t.css("top",s+"px");var l=s/(r.oHeight-r.yHeight);l=Math.min(1,l),r.container.get().scrollTop=(r.sHeight-r.oHeight)*l}},r.scrollXEnd=function(){r.slideXDragging=void 0,(0,_.Z)((0,A.Z)(r),da)[da]=!1,document.body.removeEventListener(Ue?"touchmove":"mousemove",r.scrollX),document.body.removeEventListener(Ue?"touchend":"mouseup",r.scrollXEnd),r.container.removeClass("scrolling")},r.scrollYEnd=function(){r.slideYDragging=void 0,document.body.removeEventListener(Ue?"touchmove":"mousemove",r.scrollY),document.body.removeEventListener(Ue?"touchend":"mouseup",r.scrollYEnd),r.container.removeClass("scrolling")},r.scrollXStart=function(e){var t,n=r.getEventClientOffset(e);r.container.addClass("scrolling"),r.slideXDragging={point:n.x,position:parseInt((null===(t=r.slideX)||void 0===t?void 0:t.css("left"))||"0")},document.body.addEventListener(Ue?"touchmove":"mousemove",r.scrollX,{passive:!0}),document.body.addEventListener(Ue?"touchend":"mouseup",r.scrollXEnd,{passive:!0})},r.scrollYStart=function(e){var t,n=r.getEventClientOffset(e);r.container.addClass("scrolling"),r.slideYDragging={point:n.y,position:parseInt((null===(t=r.slideY)||void 0===t?void 0:t.css("top"))||"0")},document.body.addEventListener(Ue?"touchmove":"mousemove",r.scrollY,{passive:!0}),document.body.addEventListener(Ue?"touchend":"mouseup",r.scrollYEnd,{passive:!0})},r.bindXScrollEvent=function(){var e;r.x&&(null===(e=r.slideX)||void 0===e||e.on(Ue?"touchstart":"mousedown",r.scrollXStart,{passive:!0}))},r.bindYScrollEvent=function(){var e;r.y&&(null===(e=r.slideY)||void 0===e||e.on(Ue?"touchstart":"mousedown",r.scrollYStart,{passive:!0}))},r.reRenderShadow=function(e){if(r.shadow){var t,n,i=r.container.get();if(i)null===(n=r.shadowLeft)||void 0===n||n.css("left",((0,_.Z)((0,A.Z)(r),fa)[fa]?i.scrollLeft:e)+"px");null===(t=r.shadowRight)||void 0===t||t.css("left",e+r.oWidth-4+"px")}},r.reRenderX=function(e){if(r.x){var t,n,i;null===(t=r.scrollBarX)||void 0===t||t.css("left",e+"px");var o=r.sWidth-r.oWidth,a=o<=0?0:e/o;a=Math.min(1,a),null===(n=r.slideX)||void 0===n||n.css("left",(r.oWidth-r.xWidth)*a+"px"),r.emit("change",{x:e,y:Ge((null===(i=r.scrollBarY)||void 0===i?void 0:i.css("top"))||"0")}),r.oWidth=r.getWidth(),r.reRenderShadow(e)}},r.reRenderY=function(e){if(r.y){var t,n,i;null===(t=r.scrollBarY)||void 0===t||t.css("top",e+"px");var o=r.sHeight-r.oHeight,a=o<=0?0:e/o;a=Math.min(1,a),null===(n=r.slideY)||void 0===n||n.css("top",(r.oHeight-r.yHeight)*a+"px"),r.emit("change",{x:Ge((null===(i=r.scrollBarX)||void 0===i?void 0:i.css("left"))||"0"),y:e})}},r.container=gt(e)?Ut(e):e,r.x=i,r.y=o,r.shadow=a,(0,_.Z)((0,A.Z)(r),fa)[fa]=s,r.init(),r}return(0,c.Z)(n,[{key:"setContentNode",value:function(e){(0,_.Z)(this,ha)[ha]=e&&gt(e)?Ut(e):e}},{key:"init",value:function(){var e=this.container.children(),t=!1;e.each((function(e){!t&&Ut(e).hasClass("data-scrollbar")&&(t=!0)})),t||(this.container.css("position","relative"),this.container.addClass("data-scrollable"),this.x&&(this.scrollBarX=Ut("<div ".concat(G,'="').concat(J,'" class="data-scrollbar data-scrollbar-x"><div class="data-scrollbar-trigger"></div></div>')),this.slideX=this.scrollBarX.find(".data-scrollbar-trigger"),this.container.append(this.scrollBarX),this.container.addClass("scroll-x")),this.y&&(this.scrollBarY=Ut("<div ".concat(G,'="').concat(J,'" class="data-scrollbar data-scrollbar-y"><div class="data-scrollbar-trigger"></div></div>')),this.slideY=this.scrollBarY.find(".data-scrollbar-trigger"),this.container.append(this.scrollBarY),this.container.addClass("scroll-y")),this.shadow&&(this.shadowLeft=Ut("<div ".concat(G,'="').concat(J,'" class="scrollbar-shadow-left"></div>')),this.shadowRight=Ut("<div ".concat(G,'="').concat(J,'" class="scrollbar-shadow-right"></div>')),this.container.append(this.shadowLeft),this.container.append(this.shadowRight)),this.refresh(),this.bindEvents())}},{key:"getWidth",value:function(){var e,t=this.container.get();if(!t)return 0;var n=this.container.width(),r=(null===(e=(0,_.Z)(this,fa)[fa])||void 0===e?void 0:e.getOffsetWidth)?(0,_.Z)(this,fa)[fa].getOffsetWidth(n):n;return r}},{key:"enableScroll",value:function(){(0,_.Z)(this,pa)[pa]=!0}},{key:"disableScroll",value:function(){(0,_.Z)(this,pa)[pa]=!1}},{key:"bindEvents",value:function(){Ue?(this.x&&this.container.on("touchstart",this.bindContainerTouchX,{passive:!0}),this.y&&this.container.on("touchstart",this.bindContainerTouchY,{passive:!0})):this.container.on(Ie?"DOMMouseScroll":"mousewheel",this.bindWheelScroll),this.container.on("scroll",this.scroll,{passive:!0});var e=this.container.get();e&&(window.addEventListener("resize",this.refresh),this.bindXScrollEvent(),this.bindYScrollEvent())}},{key:"destroy",value:function(){var e,t,n,r,i,o,a;(null===(e=this.slideX)||void 0===e||e.off(Ue?"touchstart":"mousedown",this.scrollXStart),null===(t=this.slideY)||void 0===t||t.off(Ue?"touchstart":"mousedown",this.scrollYStart),Ue?(this.x&&this.container.off("touchstart",this.bindContainerTouchX),this.y&&this.container.off("touchstart",this.bindContainerTouchY)):this.container.off(Ie?"DOMMouseScroll":"mousewheel",this.bindWheelScroll),this.container.off("scroll",this.scroll),this.container.removeClass("data-scrollable"),this.x)&&(null===(r=this.scrollBarX)||void 0===r||r.remove(),this.container.removeClass("scroll-x"));this.y&&(null===(i=this.scrollBarY)||void 0===i||i.remove(),this.container.removeClass("scroll-y"));this.shadow&&(null===(o=this.shadowLeft)||void 0===o||o.remove(),null===(a=this.shadowRight)||void 0===a||a.remove());null===(n=(0,_.Z)(this,ua)[ua])||void 0===n||n.disconnect(),window.removeEventListener("resize",this.refresh),window.removeEventListener("scroll",this.refresh)}}]),n}(I.EventEmitter2),va=".data-resizer {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n left: 0;\r\n bottom: 0px;\r\n right: 0;\r\n z-index: 1;\r\n outline: 2px solid #1890FF;\r\n max-width: initial !important;\r\n}\r\n.data-resizer img {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n bottom: 0;\r\n right: 0;\r\n cursor: pointer;\r\n width: 100%;\r\n height: 100%;\r\n opacity: 0.3;\r\n}\r\n.data-resizer-holder {\r\n position: absolute;\r\n width: 14px;\r\n height: 14px;\r\n border: 2px solid #fff;\r\n border-radius: 50%;\r\n background: #1890FF;\r\n display: inline-block;\r\n}\r\n.data-resizer-holder-right-top {\r\n top: -6px;\r\n right: -6px;\r\n cursor: nesw-resize;\r\n}\r\n.data-resizer-holder-right-bottom {\r\n bottom: -6px;\r\n right: -6px;\r\n cursor: nwse-resize;\r\n}\r\n.data-resizer-holder-left-bottom {\r\n bottom: -6px;\r\n left: -6px;\r\n cursor: nesw-resize;\r\n}\r\n.data-resizer-holder-left-top {\r\n left: -6px;\r\n top: -6px;\r\n cursor: nwse-resize;\r\n}\r\n\r\n.data-resizer-number {\r\n position: absolute;\r\n display: inline-block;\r\n line-height: 24px;\r\n padding: 0 4px;\r\n font-size: 12px;\r\n border-radius: 3px 3px;\r\n background: rgba(0, 0, 0, 0.86);\r\n color: rgba(255, 255, 255, 0.96);\r\n font-family: 'Lucida Console', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\r\n opacity: 0;\r\n visibility: hidden;\r\n transition: opacity 0.3s ease-in-out;\r\n transform: scale(0.8);\r\n}\r\n\r\n.data-resizer-number-right-top {\r\n top: 0px;\r\n right: -6px;\r\n transform: translateX(100%) scale(0.8);\r\n}\r\n\r\n.data-resizer-number-right-bottom {\r\n right: -6px;\r\n bottom: 0px;\r\n transform: translateX(100%) scale(0.8);\r\n}\r\n\r\n.data-resizer-number-left-bottom {\r\n left: -6px;\r\n bottom: 0px;\r\n transform: translateX(-100%) scale(0.8);\r\n}\r\n\r\n.data-resizer-number-left-top {\r\n left: -6px;\r\n top: 0px;\r\n transform: translateX(-100%) scale(0.8);\r\n}\r\n\r\n.data-resizer-number-active {\r\n opacity: 1;\r\n visibility: visible;\r\n}";en(va);var ba=function(){function e(t){var n,r=this;(0,l.Z)(this,e),this.options=void 0,this.root=void 0,this.image=void 0,this.resizerNumber=void 0,this.point={x:0,y:0},this.position=void 0,this.size=void 0,this.maxWidth=void 0,this.resizing=!1,this.onMouseMove=function(e){e.preventDefault(),e.stopPropagation();var t=window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e,n=t.clientX,i=t.clientY;if(n!==r.point.x||i!==r.point.y){var o=r.point.x-n,a=r.point.y-i;r.updateSize(o,a)}r.resizing=!0},this.onMouseUp=function(e){var t;e.preventDefault(),e.stopPropagation();var n=r.root.get();if(n){var i=n.clientWidth,o=n.clientHeight;r.size={width:i,height:o},r.resizerNumber.removeClass("data-resizer-number-".concat(r.position)),r.resizerNumber.removeClass("data-resizer-number-active"),r.position=void 0,r.resizing=!1,r.root.removeClass("data-resizing"),document.removeEventListener(Ue?"touchmove":"mousemove",r.onMouseMove),document.removeEventListener(Ue?"touchend":"mouseup",r.onMouseUp);var a=r.options.onChange;a&&a(r.size),null===(t=r.image)||void 0===t||t.hide()}},this.options=t,this.root=Ut(this.renderTemplate(t.imgUrl)),t.imgUrl&&(this.image=this.root.find("img")),null===(n=this.image)||void 0===n||n.hide(),this.resizerNumber=this.root.find(".data-resizer-number");var i=this.options,o=i.width,a=i.height;this.size={width:o,height:a},this.maxWidth=this.options.maxWidth}return(0,c.Z)(e,[{key:"renderTemplate",value:function(e){return'\n\t\t\t<span class="data-resizer">\n\t\t\t\t'.concat(e?'<img src="'.concat(e,'">'):"",'\n\t\t\t\t<span class="data-resizer-holder data-resizer-holder-right-top"></span>\n\t\t\t\t<span class="data-resizer-holder data-resizer-holder-right-bottom"></span>\n\t\t\t\t<span class="data-resizer-holder data-resizer-holder-left-bottom"></span>\n\t\t\t\t<span class="data-resizer-holder data-resizer-holder-left-top"></span>\n\t\t\t\t<span class="data-resizer-number"></span>\n\t\t\t</span>')}},{key:"onMouseDown",value:function(e,t){var n;this.resizing||(e.preventDefault(),e.stopPropagation(),this.root.css("top",["right-top","left-top"].indexOf(t)>-1?"auto":0),this.root.css("left",["left-top","left-bottom"].indexOf(t)>-1?"auto":0),this.root.css("bottom",["right-bottom","left-bottom"].indexOf(t)>-1?"auto":0),this.root.css("right",["right-top","right-bottom"].indexOf(t)>-1?"auto":0),this.point={x:window.TouchEvent&&e instanceof TouchEvent?e.touches[0].clientX:e.clientX,y:window.TouchEvent&&e instanceof TouchEvent?e.touches[0].clientY:e.clientY},this.position=t,this.resizing=!0,this.root.addClass("data-resizing"),this.resizerNumber.addClass("data-resizer-number-".concat(this.position)),this.resizerNumber.addClass("data-resizer-number-active"),null===(n=this.image)||void 0===n||n.show(),document.addEventListener(Ue?"touchmove":"mousemove",this.onMouseMove),document.addEventListener(Ue?"touchend":"mouseup",this.onMouseUp))}},{key:"updateSize",value:function(e,t){e=["right-top","right-bottom"].indexOf(this.position||"")>-1?this.size.width-e:this.size.width+e,this.setSize(e,t)}},{key:"setSize",value:function(e,t){e<24&&(e=24);var n=this.options.rate;e>this.maxWidth&&(e=this.maxWidth),t=e*n,t<24&&(t=24,e=t/n),e=Math.round(e),t=Math.round(t),this.root.css({width:e+"px",height:t+"px"}),this.resizerNumber.html("".concat(e,"·").concat(t))}},{key:"on",value:function(e,t){this.root.on(e,t)}},{key:"off",value:function(e,t){this.root.off(e,t)}},{key:"render",value:function(){var e=this,t=this.options,n=t.width,r=t.height;return this.setSize(n,r),this.root.find(".data-resizer-holder-right-top").on(Ue?"touchstart":"mousedown",(function(t){return e.onMouseDown(t,"right-top")})),this.root.find(".data-resizer-holder-right-bottom").on(Ue?"touchstart":"mousedown",(function(t){return e.onMouseDown(t,"right-bottom")})),this.root.find(".data-resizer-holder-left-bottom").on(Ue?"touchstart":"mousedown",(function(t){return e.onMouseDown(t,"left-bottom")})),this.root.find(".data-resizer-holder-left-top").on(Ue?"touchstart":"mousedown",(function(t){return e.onMouseDown(t,"left-top")})),this.root}},{key:"destroy",value:function(){this.root.remove(),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp)}}]),e}();t.ZP=zo},7279:function(e,t,n){"use strict";n.d(t,{b:function(){return A}});n(57658);var r=n(13087),i=n(62833),o=n(26334),a=n(62040),s=n(93806),l=n(24343),c=n(43629),A=function(){function e(){(0,r.Z)(this,e),this.headingTags={h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0}}return(0,i.Z)(e,[{key:"getHeadings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.headingTags;(0,c.kI)(e)||(e=(0,c.$)(e));var n=e.children();if(!n)return[];var r=[];return n.each((function(e){t[e.nodeName.toLowerCase()]&&r.push(e)})),r}},{key:"getText",value:function(e){var t=(0,c.kd)(e,(function(e){return!e.getAttribute(c.Jr)})),n="";return t.forEach((function(e){n+=e.textContent})),n}},{key:"normalize",value:function(e){var t=this;if(e=e||[],0===e.length)return[];var n=[];e.forEach((function(e){var r=(t.getText(e)||"").trim(),i=e["id"]||e[c.Mr];r&&i&&n.push({id:i,text:r,level:parseInt(e.tagName.substr(1)),depth:-1,node:e})}));var r=[];n.forEach((function(e){r.indexOf(e.level)<0&&r.push(e.level)})),r.sort();var i={};return r.forEach((function(e,t){i[e]=t+1})),n.forEach((function(e){e.depth=i[e.level]})),n}},{key:"getFromDom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.headingTags;try{var n=this.getHeadings(e,t),r=this.normalize(n);return r}catch(i){return[]}}}]),e}();function u(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var d=".data-anchor-button {\r\n\tposition: absolute;\r\n\twidth: 24px;\r\n\theight: 24px;\r\n\tline-height: 24px;\r\n\ttext-align: center;\r\n\tfont-size: 14px;\r\n\tdisplay: block;\r\n\tbackground: rgba(255, 255, 255, 0.9);\r\n\tcolor: #BFBFBF;\r\n\tborder-radius: 2px 2px;\r\n\tcursor: pointer;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\topacity: 0;\r\n\tvisibility: hidden;\r\n\t-webkit-transition: opacity 0.3s ease-in-out;\r\n\ttransition: opacity 0.3s ease-in-out;\r\n}\r\n\r\n.data-anchor-button.data-anchor-button-active {\r\n\topacity: 1;\r\n\tvisibility: visible;\r\n}\r\n\r\n.data-anchor-button .data-icon {\r\n\twidth: 18px;\r\n}\r\n\r\n.data-anchor-button:hover {\r\n\tbackground: #f4f4f4;\r\n\tcolor: #595959;\r\n}\r\n\r\n.am-engine-view h1,.am-engine-view h2,.am-engine-view h3,.am-engine-view h4,.am-engine-view h5,.am-engine-view h6 {\r\n position: relative;\r\n}\r\n\r\n.am-engine-view h1 .data-anchor-button,.am-engine-view h2 .data-anchor-button,.am-engine-view h3 .data-anchor-button,.am-engine-view h4 .data-anchor-button,.am-engine-view h5 .data-anchor-button,.am-engine-view h6 .data-anchor-button{\r\n position: absolute;\r\n left: -24px;\r\n display: none;\r\n}\r\n\r\n.am-engine-view h1:hover .data-anchor-button,.am-engine-view h2:hover .data-anchor-button,.am-engine-view h3:hover .data-anchor-button,.am-engine-view h4:hover .data-anchor-button,.am-engine-view h5:hover .data-anchor-button,.am-engine-view h6:hover .data-anchor-button {\r\n display: inline-block;\r\n opacity: 1;\r\n visibility: visible;\r\n}\r\n\r\n.am-engine-view h1 , .am-engine h1,.am-engine-view h2 , .am-engine h2,.am-engine-view h3 , .am-engine h3,.am-engine-view h4 , .am-engine h4,.am-engine-view h5 , .am-engine h5,.am-engine-view h6 , .am-engine h6 {\r\n margin: 0;\r\n word-spacing: 1px;\r\n color: #262626;\r\n font-weight: bold;\r\n padding:0;\r\n}\r\n\r\n.am-engine-view h1 , .am-engine h1 {\r\n font-size: 28px;\r\n line-height: 36px;\r\n padding: 7px 0;\r\n}\r\n\r\n.am-engine-view h2 , .am-engine h2 {\r\n font-size: 24px;\r\n line-height: 32px;\r\n padding: 7px 0;\r\n}\r\n\r\n.am-engine-view h3 , .am-engine h3 {\r\n font-size: 20px;\r\n line-height: 28px;\r\n padding: 7px 0;\r\n}\r\n\r\n.am-engine-view h4 , .am-engine h4 {\r\n font-size: 16px;\r\n line-height: 24px;\r\n padding: 7px 0;\r\n}\r\n\r\n.am-engine-view h5 , .am-engine h5 {\r\n font-size: 14px;\r\n line-height: 24px;\r\n padding: 7px 0;\r\n}\r\n\r\n.am-engine-view h6 , .am-engine h6 {\r\n font-size: 14px;\r\n line-height: 24px;\r\n padding: 7px 0;\r\n font-weight: normal;\r\n}";u(d);var h=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(){var e;(0,r.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),e.attributes={id:"@var0"},e.variable={"@var0":/^[\w\.\-]+$/},e.tagName=["h1","h2","h3","h4","h5","h6"].filter((function(t){return!e.options.enableTypes||e.options.enableTypes.indexOf(t)>-1})),e.allowIn=["blockquote","$root"],e.disableMark=e.options.disableMark||["fontsize","bold"],e.closureRef={current:{block:null}},e.onRender=function(t){var n=e.editor,r=n.language,i=(0,c.$)(t);0!==e.tagName.length&&i.find(e.tagName.join(",")).each((function(t){var i=(0,c.$)(t),o=i.attributes("id");if(o){i.find(".data-anchor-button").remove(),c.u.hide();var a=(0,c.$)('<a class="data-anchor-button" '.concat(c.Zi,'="').concat(c.UI,'"><span class="data-icon data-icon-').concat(i.name,'"></span></a>'));24!==i.height()&&a.css({top:(i.height()-24)/2+"px"}),a.on("mouseenter",(function(){c.u.show(a,r.get("copyAnchor","title").toString())})),a.on("mouseleave",(function(){c.u.hide()})),a.on("click",(function(t){t.preventDefault(),t.stopPropagation();var i=e.options.anchorCopy?e.options.anchorCopy(o):window.location.href+"/"+o;n.clipboard.copy(i)?n.messageSuccess("copy",r.get("copy","success").toString()):n.messageError("copy",r.get("copy","error").toString())})),i.prepend(a)}}))},e.updateId=function(){0!==e.tagName.length&&e.editor.container.find(e.tagName.join(",")).each((function(e){var t,n=(0,c.$)(e);if(null===(t=n.parent())||void 0===t?void 0:t.isEditable()){var r=n.attributes("id");(!r||(0,c.$)('[id="'.concat(r,'"]')).length>1)&&(r=n.attributes(c.Mr)||(0,c.TT)(n),n.attributes("id",r))}else n.removeAttributes("id")}))},e.realtimeChange=function(){e.updateId(),e.showAnchor()},e.updateAnchorPosition=function(){var t,n=e.editor;if((0,c.iC)(n)){var r=n.change,i=n.root,o=i.find(".data-anchor-button");if(0!==o.length){var a=r.range.get(),s=a.startNode.closest("h1,h2,h3,h4,h5,h6");if(0===s.length)return o.remove(),void c.u.hide();var l=(null===(t=i.get())||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0},A=s.get().getBoundingClientRect(),u=Math.round(A.left-l.left-o.get().clientWidth-1),d=Math.round(A.top-l.top+A.height/2-o.get().clientHeight/2);o.css({top:"".concat(d,"px"),left:"".concat(u,"px")})}}},e.showAnchor=function(){var t,n,r=e.editor;if((0,c.iC)(r)&&0!==e.tagName.length&&!1!==e.options.showAnchor){var i=r.change,o=r.root,a=r.clipboard,s=r.language,l=r.card,A=i.range.get(),u=o.find(".data-anchor-button"),d=A.startNode.closest(e.tagName.join(","));if(e.closureRef.current.block=d,(0===d.length||u.length>0&&0===u.find(".data-icon-".concat(d.name)).length||!r.isFocus())&&(u.remove(),c.u.hide()),0!==d.length&&!l.closest(d,!0)&&r.isFocus()&&(null===(t=d.parent())||void 0===t?void 0:t.isEditable()))if(u.find(".data-icon-".concat(d.name)).length>0)e.updateAnchorPosition();else{u=(0,c.$)('<span class="data-anchor-button" '.concat(c.Zi,'="').concat(c.UI,'"><span class="data-icon data-icon-').concat(d.name,'"></span></span>')),o.append(u);var h=(null===(n=o.get())||void 0===n?void 0:n.getBoundingClientRect())||{left:0,top:0},p=d.get().getBoundingClientRect(),f=Math.round(p.left-h.left-u.get().clientWidth-1),g=Math.round(p.top-h.top+p.height/2-u.get().clientHeight/2);u.css({top:"".concat(g,"px"),left:"".concat(f,"px")}),u.addClass("data-anchor-button-active"),u.on("mouseenter",(function(){c.u.show(u,s.get("copyAnchor","title").toString())})),u.on("mouseleave",(function(){c.u.hide()})),u.on("click",(function(t){if(t.preventDefault(),t.stopPropagation(),e.closureRef.current.block){var n=e.closureRef.current.block.attributes("id"),i=e.options.anchorCopy?e.options.anchorCopy(n):window.location.href+"/"+n;a.copy(i)?r.messageSuccess("copy",s.get("copy","success").toString()):r.messageError("copy",s.get("copy","error").toString())}}))}}},e.markdownIt=function(t){!1!==e.options.markdown&&t.enable("heading")},e.onBackspace=function(t){var n,r=e.editor;if((0,c.iC)(r)){var i=r.change,o=r.node,a=i.range.get();if(a.collapsed){var s=r.block;if(s.isFirstOffset(a,"start")){var l=s.closest(a.startNode);if(e.tagName.indexOf(l.name)>-1&&o.isEmptyWithTrim(l)&&(null===(n=l.parent())||void 0===n?void 0:n.isEditable()))return t.preventDefault(),s.setBlocks("<p />"),!1;var A=l.parent();return!(e.tagName.indexOf(l.name)>-1)||A&&o.isBlock(A)?void 0:(t.preventDefault(),i.mergeAfterDelete(l),!1)}}}},e}return(0,i.Z)(n,[{key:"init",value:function(){(0,o.Z)((0,a.Z)(n.prototype),"init",this).call(this);var e=this.editor;if((0,c.iC)(e))e.on("keydown:backspace",this.onBackspace),e.on("markdown-it",this.markdownIt),e.on("setValue",this.updateId),e.on("realtimeChange",this.realtimeChange),e.on("select",this.showAnchor),e.on("blur",this.showAnchor),window.addEventListener("resize",this.updateAnchorPosition);else{if(!1===this.options.showAnchor)return;e.on("render",this.onRender)}}},{key:"execute",value:function(e){var t=this.editor;if((0,c.iC)(t)){e&&e!==this.queryState()||(e="p");var n=this.options.enableTypes;if(!("p"!==e&&n&&n.indexOf(e)<0)){var r=t.list,i=t.block;r.split(),i.setBlocks("<".concat(e," />"))}}}},{key:"queryState",value:function(){var e=this.editor;if((0,c.iC)(e)){var t=e.change,n=t.blocks;if(0===n.length)return"";var r=this.tagName.find((function(e){return n.some((function(t){return t.name===e}))}));return r||""}}},{key:"hotkey",value:function(){var e,t,n,r,i,o,a=(null===(e=this.options.hotkey)||void 0===e?void 0:e.h1)||"mod+opt+1",s=(null===(t=this.options.hotkey)||void 0===t?void 0:t.h2)||"mod+opt+2",l=(null===(n=this.options.hotkey)||void 0===n?void 0:n.h3)||"mod+opt+3",c=(null===(r=this.options.hotkey)||void 0===r?void 0:r.h4)||"mod+opt+4",A=(null===(i=this.options.hotkey)||void 0===i?void 0:i.h5)||"mod+opt+5",u=(null===(o=this.options.hotkey)||void 0===o?void 0:o.h6)||"mod+opt+6",d=this.options.enableTypes;return[{key:a,args:"h1"},{key:s,args:"h2"},{key:l,args:"h3"},{key:c,args:"h4"},{key:A,args:"h5"},{key:u,args:"h6"}].filter((function(e){return!d||d.indexOf(e.key)>-1}))}},{key:"destroy",value:function(){var e=this.editor;(0,c.iC)(e)?(e.off("keydown:backspace",this.onBackspace),e.off("markdown-it",this.markdownIt),e.off("setValue",this.updateId),e.off("realtimeChange",this.realtimeChange),e.off("select",this.showAnchor),e.off("blur",this.showAnchor),window.removeEventListener("resize",this.updateAnchorPosition)):e.off("render",this.onRender)}}],[{key:"pluginName",get:function(){return"heading"}}]),n}(c.AT);t.Z=h},46194:function(e,t,n){"use strict";n.d(t,{nV:function(){return Et},Mq:function(){return Ft},ZP:function(){return Tt},F7:function(){return st}});n(57658);var r=n(73396),i=n(44870),o=n(87139),a=n(49242),s=n(31823),l=n.n(s),c=n(69208),A=n.n(c),u=n(43629),d=n(95082),h=n(25431),p=n(30670),f=n(3336),g=(n(32515),n(66046)),m=n(62833),v=n(13087),b=n(93806),y=n(24343),w=n(88478),x=n(52417),k=n(26334),C=n(62040),B=n(39693),_=n(72036),E=n(29662),S=n.n(E),F={engine:Object,name:{type:String,required:!0},icon:String,content:[String,Function],title:String,placement:String,hotkey:[String,Object],command:Object,autoExecute:{type:[Boolean,void 0],default:void 0},className:String,active:{type:[Boolean,void 0],default:void 0},disabled:{type:[Boolean,void 0],default:void 0},onClick:Function,onMouseDown:Function,onMouseEnter:Function,onMouseLevel:Function},T={engine:Object,name:{type:String,required:!0},direction:String,items:{type:Array,required:!0},values:{type:[String,Array,Number],required:!0},className:String,onSelect:Function,hasDot:{type:[Boolean,void 0],default:void 0}},M={engine:Object,name:{type:String,required:!0},values:[String,Array,Number],items:{type:Array,default:[]},icon:String,placement:String,content:[String,Function],title:String,disabled:{type:[Boolean,void 0],default:void 0},single:{type:[Boolean,void 0],default:void 0},className:String,direction:String,onSelect:Function,hasArrow:{type:[Boolean,void 0],default:void 0},hasDot:{type:[Boolean,void 0],default:void 0}},I={engine:{type:Object,required:!0},color:{type:String,required:!0},active:Boolean,setStroke:{type:[Boolean,void 0],default:void 0},onSelect:Function},N={engine:I.engine,colors:{type:Array,required:!0},setStroke:I.setStroke,onSelect:I.onSelect},U={engine:N.engine,colors:Array,defaultColor:{type:String,required:!0},defaultActiveColor:{type:String,required:!0},setStroke:N.setStroke,onSelect:I.onSelect,placement:String},L=(0,d.Z)({engine:F.engine,name:F.name,content:{type:[String,Function],required:!0},buttonTitle:String,dropdownTitle:String,command:F.command,autoExecute:F.autoExecute,disabled:F.disabled},A()(U,"engine")),Q={name:F.name,engine:F.engine,icon:F.icon,title:F.title,search:String,description:F.content,disabled:F.disabled,prompt:[String,Function,Object],command:F.command,autoExecute:F.autoExecute,className:F.className,placement:F.placement,onClick:Function,onMouseDown:Function},D={engine:F.engine,title:String,items:{type:Array,required:!0},onSelect:Q.onClick},H={engine:D.engine,header:String,groups:{type:Array,required:!0},disabled:F.disabled,className:Q.className,icon:Q.icon,content:F.content,onSelect:D.onSelect},O={engine:{type:Object,required:!0},items:{type:Array,default:[]},popup:{type:[Boolean,void 0],default:void 0},icon:Q.icon,content:F.content},z={engine:{type:Object,required:!0},items:{type:Array,default:[]},className:String,popup:{type:[Boolean,void 0],default:void 0},onLoad:Function},Z=function(e,t,n){var r=null===e||void 0===e?void 0:e.plugin.components[t];if(r&&r.hotkey){var i=r.hotkey();if(i){if(Array.isArray(i))if(n){var o=i.findIndex((function(e){return"object"===(0,f.Z)(e)&&e.args===n}));i=i[o>-1?o:0]}else i=i[0];return"object"===(0,f.Z)(i)&&(i=i.key),i}}},R={},P=function(e){var t=document.body,n=document.createElement("span");n.innerHTML=Array(10).join("wi"),n.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;"),t.appendChild(n);var r=function(e){return n.style.fontFamily=e,n.clientWidth},i=r("monospace"),o=r("serif"),a=r("sans-serif"),s=e((function(e){if("string"!==typeof e)return console.log("Font name is not legal !"),!1;if(void 0!==R[e])return R[e];var t=i!==r(e+",monospace")||a!==r(e+",sans-serif")||o!==r(e+",serif");return R[e]=t,t}));return t.removeChild(n),s},q=(0,r.aZ)({name:"am-button",components:{ATooltip:p.Z},props:F,setup(e){const t=(0,i.iH)();let n=e.hotkey;!e.engine||!0!==n&&void 0!==n||(n=Z(e.engine,e.command&&!Array.isArray(e.command)?e.command.name:e.name)),"string"===typeof n&&""!==n&&(n=(0,u.Yh)(n));const r=(0,i.iH)(!1);return{iconIsHtml:/^<.*>/.test((e.icon||"").trim()),isMobile:u.tq,visible:r,hotkeyText:n,element:t}},data(){return{visible:!1}},methods:{triggerMouseDown(e){e.preventDefault(),this.disabled||(this.onMouseDown&&this.onMouseDown(e,this.engine),this.visible=!1)},triggerMouseEnter(e){this.onMouseEnter&&this.onMouseEnter(e,this.engine),this.visible=!0},triggerMouseLeave(e){this.onMouseLevel&&this.onMouseLevel(e,this.engine),this.visible=!1},triggerClick(e){const t=e.target.nodeName;if("INPUT"!==t&&"TEXTAREA"!==t&&e.preventDefault(),!this.disabled&&(!this.onClick||!1!==this.onClick(e,this.engine))&&!1!==this.autoExecute){let e=this.name,t=[];this.command&&(Array.isArray(this.command)?t=this.command:(e=this.command.name,t=this.command.args)),this.engine&&this.engine.command.execute(e,...t)}}}});const K={key:0,class:"toolbar-tooltip-title"},W=["innerHTML"],j=["innerHTML"];function V(e,t,n,i,a,s){const l=(0,r.up)("a-tooltip");return(0,r.wg)(),(0,r.j4)(l,{placement:e.placement||"bottom",visible:!(!e.title&&!e.hotkeyText||e.isMobile)&&e.visible},{title:(0,r.w5)((()=>[e.title?((0,r.wg)(),(0,r.iD)("div",K,(0,o.zw)(e.title),1)):(0,r.kq)("v-if",!0),e.hotkeyText?((0,r.wg)(),(0,r.iD)("div",{key:1,class:"toolbar-tooltip-hotkey",innerHTML:e.hotkeyText},null,8,W)):(0,r.kq)("v-if",!0)])),default:(0,r.w5)((()=>[(0,r._)("button",{class:(0,o.C_)(["toolbar-button",e.className,{"toolbar-button-active":e.active,"toolbar-button-disabled":e.disabled}]),ref:"element",onClick:t[0]||(t[0]=(...t)=>e.triggerClick&&e.triggerClick(...t)),onMousedown:t[1]||(t[1]=(...t)=>e.triggerMouseDown&&e.triggerMouseDown(...t)),onMouseenter:t[2]||(t[2]=(...t)=>e.triggerMouseEnter&&e.triggerMouseEnter(...t)),onMouseleave:t[3]||(t[3]=(...t)=>e.triggerMouseLeave&&e.triggerMouseLeave(...t))},[(0,r.WI)(e.$slots,"icon",{},(()=>[e.iconIsHtml?((0,r.wg)(),(0,r.iD)("span",{key:0,innerHTML:e.icon},null,8,j)):(0,r.kq)("v-if",!0),!e.iconIsHtml&&e.icon?((0,r.wg)(),(0,r.iD)("span",{key:1,class:(0,o.C_)(`data-icon data-icon-${e.icon}`)},null,2)):(0,r.kq)("v-if",!0)])),(0,r.WI)(e.$slots,"default",{},(()=>[(0,r.Uk)((0,o.zw)("function"===typeof e.content?e.content(e.engine):e.content),1)]))],34)])),_:3},8,["placement","visible"])}function G(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var $="\n.editor-toolbar .toolbar-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: auto;\n min-width: 26px;\n margin: 0;\n text-align: center;\n padding: 0 7px;\n background-color: transparent;\n border: 1px solid transparent;\n border-radius: 3px 3px;\n font-size: 16px;\n cursor: pointer;\n color: #595959;\n outline: none;\n}\n.editor-toolbar.editor-toolbar-popup .toolbar-button {\n min-width: 24px;\n line-height: 24px;\n border-radius: 4px;\n}\n.editor-toolbar:not(.editor-toolbar-mobile) .toolbar-button {\n padding: 0 4px;\n margin: 0 1px;\n}\n.editor-toolbar:not(.editor-toolbar-mobile) .toolbar-button:hover {\n border: 1px solid transparent;\n background-color: #f5f5f5;\n}\n.editor-toolbar:not(.editor-toolbar-mobile) .toolbar-button:active,.editor-toolbar .toolbar-button-active,.editor-toolbar:not(.editor-toolbar-mobile) .toolbar-button-active:hover {\n background-color: #e8e8e8;\n border: 1px solid transparent;\n}\n.editor-toolbar .toolbar-button-disabled,.editor-toolbar:not(.editor-toolbar-mobile) .toolbar-button-disabled:hover {\n background-color: transparent;\n border: 1px solid transparent;\n box-shadow: none;\n color: #000000;\n opacity: 0.25;\n cursor: not-allowed;\n}\n";G($),q.render=V,q.__file="src/components/button.vue";var Y=function(e){var t=(0,i.iH)(!1);return(0,r.bv)((function(){if(e.value&&u.tq){var n=e.value.getBoundingClientRect();t.value=!window.visualViewport||n.left>window.visualViewport.width/2}})),t},X=(0,r.aZ)({name:"am-dropdown-list",components:{ATooltip:p.Z},props:T,setup(e){const t=(0,i.iH)(""),n=(0,i.iH)(null),o=t=>{const{command:n,key:r}=t;let{hotkey:i}=t;return!e.engine||!0!==i&&void 0!==i||(i=Z(e.engine,n&&!Array.isArray(n)?n.name:e.name,r)),"string"===typeof i&&""!==i&&(i=(0,u.Yh)(i)),i},a={};return e.items.forEach((e=>{a[e.key]=o(e)})),(0,r.bv)((()=>{if(n.value&&e.engine&&e.engine.scrollNode){const r=n.value,i=e.engine.scrollNode.get();if(!i)return;const o=r.getBoundingClientRect(),a=i.getBoundingClientRect();o.top<a.top&&(t.value="bottom"),o.bottom>a.bottom&&(t.value="top")}})),{element:n,isMobile:u.tq,hotkeys:a,placement:t}},methods:{triggerSelect(e,t){e.preventDefault(),e.stopPropagation();const n=this.items.find((e=>e.key===t));if(!n||n.disabled)return;const{autoExecute:r,command:i}=n;if((!this.onSelect||!1!==this.onSelect(e,t,this.engine))&&!1!==r){let e=this.name,n=[t];i&&(Array.isArray(i)?n=n.concat(i):(e=i.name,n=n.concat(i.args))),this.engine&&this.engine.command.execute(e,...n)}}}});const J={key:0,class:"toolbar-tooltip-title"},ee=["innerHTML"],te=["onClick"],ne={key:0,class:"data-icon data-icon-dot"},re=["innerHTML"];function ie(e,t,n,i,a,s){const l=(0,r.up)("a-tooltip");return(0,r.wg)(),(0,r.iD)("div",{ref:"element",class:(0,o.C_)(["toolbar-dropdown-list",`toolbar-dropdown-${e.direction||"vertical"}`,{[`toolbar-dropdown-placement-${e.placement}`]:!!e.placement},{"toolbar-dropdown-dot":!1!==e.hasDot},e.className])},[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.items,(({key:t,placement:n,title:i,content:a,className:s,icon:c,disabled:A})=>((0,r.wg)(),(0,r.j4)(l,{key:t,placement:n||"right"},(0,r.Nv)({default:(0,r.w5)((()=>[(0,r._)("a",{class:(0,o.C_)(["toolbar-dropdown-list-item",s,{"toolbar-dropdown-list-item-disabled":A}]),onClick:n=>e.triggerSelect(n,t)},[("string"===typeof e.values&&e.values===t||Array.isArray(e.values)&&e.values.indexOf(t)>-1)&&"horizontal"!==e.direction&&!1!==e.hasDot?((0,r.wg)(),(0,r.iD)("span",ne)):(0,r.kq)("v-if",!0),(0,r.WI)(e.$slots,"icon",{},(()=>[c?((0,r.wg)(),(0,r.iD)("span",{key:0,class:(0,o.C_)(["data-icon",`data-icon-${c}`])},null,2)):(0,r.kq)("v-if",!0)])),(0,r._)("div",{innerHTML:"function"===typeof a?a(e.engine):a},null,8,re)],10,te)])),_:2},[!i&&!e.hotkeys[t]||e.isMobile?void 0:{name:"title",fn:(0,r.w5)((()=>[i?((0,r.wg)(),(0,r.iD)("div",J,(0,o.zw)(i),1)):(0,r.kq)("v-if",!0),e.hotkeys[t]?((0,r.wg)(),(0,r.iD)("div",{key:1,class:"toolbar-tooltip-hotkey",innerHTML:e.hotkeys[t]},null,8,ee)):(0,r.kq)("v-if",!0)]))}]),1032,["placement"])))),128))],2)}X.render=ie,X.__file="src/components/dropdown-list.vue";var oe=(0,r.aZ)({name:"am-dropdown",components:{AmButton:q,AmDropdownList:X},props:M,setup(e,t){const n=(0,i.iH)("");let o=(0,i.iH)(void 0);const a=(0,i.iH)(!1),s=(0,i.iH)(void 0),l=(0,i.iH)(null),c=Y(l),A=r=>{!1!==e.single&&(r=Array.isArray(r)&&r.length>0?r[0]:r);const i=e.items.find((e=>"string"===typeof r&&e.key===r||Array.isArray(r)&&r.indexOf(e.key)>-1)),a=e.items.length>0?e.items.find((e=>!0===e.isDefault))||e.items[0]:null;i?t.slots.default?o.value=i:"function"===typeof e.content?o.value={icon:e.icon,content:e.content(e.engine)}:Array.isArray(r)&&r.length>1?o.value={icon:e.icon,content:e.content}:o.value={icon:i.icon,content:"function"===typeof i.content?i.content(e.engine):i.content}:e.icon||e.content?(!Array.isArray(r)||r.length<1)&&(o.value={icon:e.icon,content:"function"===typeof e.content?e.content(e.engine):e.content}):a&&(o.value={icon:a.icon,content:"function"===typeof a.content?a.content(e.engine):a.content}),n.value=r||(e.icon||e.content?"":a?a.key:"")},u=e=>{e.preventDefault()},d=t=>{t.preventDefault(),e.disabled||(a.value?p():h())},h=()=>{a.value=!0},p=e=>{e&&s.value&&s.value.element&&s.value.element.contains(e.target)||(a.value=!1)},f=(t,n)=>{p(),e.onSelect&&e.onSelect(t,n,e.engine)};return A(e.values),(0,r.YP)((()=>({...e})),(e=>A(e.values))),(0,r.YP)((()=>a.value),((e,t)=>{e?document.addEventListener("click",p):document.removeEventListener("click",p)})),{buttonRef:l,isRight:c,buttonContent:o,valuesVar:n,triggerMouseDown:u,triggerClick:d,show:h,hide:p,triggerSelect:f,visible:a,targetRef:s}}});const ae=["innerHTML"],se={key:0,class:"data-icon data-icon-arrow"};function le(e,t,n,i,a,s){const l=(0,r.up)("am-button"),c=(0,r.up)("am-dropdown-list");return(0,r.wg)(),(0,r.iD)("div",{class:(0,o.C_)(["toolbar-dropdown",{"toolbar-dropdown-right":e.isRight},e.className]),ref:"buttonRef",onClick:t[0]||(t[0]=(...t)=>e.triggerClick&&e.triggerClick(...t)),onMousedown:t[1]||(t[1]=(...t)=>e.triggerMouseDown&&e.triggerMouseDown(...t))},[(0,r._)("div",{class:(0,o.C_)(["toolbar-dropdown-trigger",{"toolbar-dropdown-trigger-active":e.visible,"toolbar-dropdown-trigger-arrow":!1!==e.hasArrow}])},[(0,r.Wm)(l,{name:e.name,title:e.title,active:e.visible,disabled:e.disabled,placement:e.placement,ref:"targetRef"},{default:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"default",{item:e.content},(()=>[e.buttonContent&&e.buttonContent.icon?((0,r.wg)(),(0,r.iD)("span",{key:0,class:(0,o.C_)(["data-icon",`data-icon-${e.buttonContent.icon}`])},null,2)):(0,r.kq)("v-if",!0),e.buttonContent&&!e.buttonContent.icon&&e.buttonContent.content?((0,r.wg)(),(0,r.iD)("span",{key:1,class:"toolbar-dropdown-button-text",innerHTML:e.buttonContent.content},null,8,ae)):(0,r.kq)("v-if",!0)])),!1!==e.hasArrow?((0,r.wg)(),(0,r.iD)("span",se)):(0,r.kq)("v-if",!0)])),_:3},8,["name","title","active","disabled","placement"])],2),e.visible?((0,r.wg)(),(0,r.j4)(c,{key:0,hasDot:e.hasDot,engine:e.engine,direction:e.direction,name:e.name,items:e.items,values:e.valuesVar,"on-select":e.triggerSelect},null,8,["hasDot","engine","direction","name","items","values","on-select"])):(0,r.kq)("v-if",!0)],34)}var ce="\n.toolbar-dropdown {\n position: relative;\n}\n.toolbar-dropdown .toolbar-dropdown-trigger {\n display: flex;\n align-items: stretch;\n height: 100%;\n}\n.toolbar-dropdown .toolbar-dropdown-trigger .toolbar-button {\n margin: 0;\n}\n.toolbar-dropdown .toolbar-dropdown-trigger .toolbar-dropdown-button-text {\n font-size: 12px;\n}\n.toolbar-dropdown .toolbar-dropdown-trigger-arrow .toolbar-button{\n padding-right: 20px;\n margin: 0;\n}\n.toolbar-dropdown .toolbar-dropdown-trigger-arrow .data-icon-arrow {\n position: absolute;\n right: 6px;\n top: calc(100% / 2 - 2px);\n width: 8px;\n height: 8px;\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjhweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCA4IDUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+DQogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1Mi41ICg2NzQ2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+DQogICAgPHRpdGxlPkdyb3VwIENvcHkgNjwvdGl0bGU+DQogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+DQogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9IjAuNDUiPg0KICAgICAgICA8ZyBpZD0idG9vbGJhciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMyOC4wMDAwMDAsIC0xOC4wMDAwMDApIj4NCiAgICAgICAgICAgIDxnIGlkPSJwYXJhZ3JhcGgtc3R5bGUiPg0KICAgICAgICAgICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIyNi4wMDAwMDAsIDQuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC1Db3B5LTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMi4wMDAwMDAsIDEyLjAwMDAwMCkiPg0KICAgICAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjgiIGhlaWdodD0iOCI+PC9yZWN0Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTAuNTk2MDkzNzUsMi41NTcwMzEyNSBMMy43NDUzMTI1LDYuMzc4MTI1IEMzLjg3NzM0Mzc1LDYuNTI1NzgxMjUgNC4xMDg1OTM3NSw2LjUyNTc4MTI1IDQuMjQwNjI1LDYuMzc4MTI1IEw3LjQwNTQ2ODc1LDIuNTU3MDMxMjUgQzcuNTk2MDkzNzUsMi4zNDI5Njg3NSA3LjQ0NDUzMTI1LDIuMDAzOTA2MjUgNy4xNTc4MTI1LDIuMDAzOTA2MjUgTDAuODQ0NTMxMjUsMi4wMDM5MDYyNSBDMC41NTcwMzEyNSwyLjAwMzkwNjI1IDAuNDA0Njg3NSwyLjM0Mjk2ODc1IDAuNTk2MDkzNzUsMi41NTcwMzEyNSBaIiBpZD0iU2hhcGUiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPg0KICAgICAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICA8L2c+DQogICAgPC9nPg0KPC9zdmc+);\n background-repeat: no-repeat;\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n}\n.toolbar-dropdown .toolbar-dropdown-list {\n position: absolute;\n top: 32px;\n font-size: 12px;\n background: #ffffff;\n border: 1px solid #e8e8e8;\n border-radius: 3px 3px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);\n padding: 5px 0;\n height: auto;\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n z-index: 999;\n max-height: calc(80vh);\n overflow: auto;\n}\n.toolbar-dropdown.toolbar-dropdown-right:not(.toolbar-dropdown-right) .toolbar-dropdown-list{\n left: 0px;\n}\n.editor-toolbar-mobile .toolbar-dropdown .toolbar-dropdown-list, .editor-toolbar-popup .toolbar-dropdown .toolbar-dropdown-list:not(.toolbar-dropdown-placement-bottom) {\n bottom: 32px;\n top: auto;\n overflow: auto;\n}\n.editor-toolbar-mobile .toolbar-dropdown .toolbar-dropdown-list {\n max-height: calc(30vh);\n}\n.editor-toolbar-mobile .toolbar-dropdown.toolbar-dropdown-right .toolbar-dropdown-list,.editor-toolbar-popup .toolbar-dropdown.toolbar-dropdown-right .toolbar-dropdown-list{\n right: 0px;\n}\n.toolbar-dropdown .toolbar-dropdown-list .toolbar-dropdown-list-item {\n padding: 2px 10px 2px 16px;\n line-height: 30px;\n color: #595959;\n text-align: left;\n position: relative;\n display: flex;\n white-space: nowrap;\n}\n.toolbar-dropdown .toolbar-dropdown-list .toolbar-dropdown-list-item-disabled {\n color: rgba(17, 31, 44, 0.24);\n cursor: not-allowed;\n}\n.toolbar-dropdown .toolbar-dropdown-list .toolbar-dropdown-list-item:not(.toolbar-dropdown-list-item-disabled):hover {\n color: #262626;\n background-color: #f5f5f5;\n}\n.toolbar-dropdown .toolbar-dropdown-list .toolbar-dropdown-list-item .data-icon {\n margin-right: 8px;\n}\n.toolbar-dropdown .toolbar-dropdown-list.toolbar-dropdown-horizontal .toolbar-dropdown-list-item {\n display: inline-block;\n}\n.toolbar-dropdown .toolbar-dropdown-list.toolbar-dropdown-dot .toolbar-dropdown-list-item {\n padding-left: 30px;\n padding-right: 16px;\n white-space: nowrap;\n}\n.toolbar-dropdown .toolbar-dropdown-list .toolbar-dropdown-list-item .data-icon-dot\n{\n position: absolute;\n top: 50%;\n left: 8px;\n margin-top: -7px;\n width: 14px;\n height: 14px;\n display: block;\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTRweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjQgKDY3Mzc4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5VbnRpdGxlZDwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9IjAuNDUiPgogICAgICAgIDxnIGlkPSJjaGVjayIgZmlsbD0iIzAwMDAwMCI+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIG9wYWNpdHk9IjAiIHg9IjAiIHk9IjAiIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNMTIuNDY4NzUsMi41OTc2NTYyNSBMMTEuNTEzMDg1OSwyLjU5NzY1NjI1IEMxMS4zNzkxMDE2LDIuNTk3NjU2MjUgMTEuMjUxOTUzMSwyLjY1OTE3OTY5IDExLjE2OTkyMTksMi43NjQ0NTMxMiBMNS41MzMwMDc4MSw5LjkwNTI3MzQ0IEwyLjgzMDA3ODEyLDYuNDgwNDY4NzUgQzIuNzQ2Njc5NjksNi4zNzUxOTUzMSAyLjYyMDg5ODQ0LDYuMzEzNjcxODcgMi40ODY5MTQwNiw2LjMxMzY3MTg3IEwxLjUzMTI1LDYuMzEzNjcxODcgQzEuNDM5NjQ4NDQsNi4zMTM2NzE4NyAxLjM4OTA2MjUsNi40MTg5NDUzMSAxLjQ0NTExNzE5LDYuNDkwMDM5MDYgTDUuMTg5ODQzNzUsMTEuMjM0MTc5NyBDNS4zNjQ4NDM3NSwxMS40NTU2NjQxIDUuNzAxMTcxODcsMTEuNDU1NjY0MSA1Ljg3NzUzOTA2LDExLjIzNDE3OTcgTDEyLjU1NDg4MjgsMi43NzI2NTYyNSBDMTIuNjEwOTM3NSwyLjcwMjkyOTY5IDEyLjU2MDM1MTYsMi41OTc2NTYyNSAxMi40Njg3NSwyLjU5NzY1NjI1IFoiIGlkPSJQYXRoIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=);\n background-repeat: no-repeat;\n}\n";G(ce),oe.render=le,oe.__file="src/components/dropdown.vue";var Ae=(0,m.Z)((function e(){(0,v.Z)(this,e)}));Ae.colors=void 0,Ae._map=void 0,Ae.getStroke=void 0,Ae.getColors=void 0,Ae.colors=[["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF"],["#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96"],["#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB"],["#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2"],["#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB"],["#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F"],["#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"]],Ae._map=function(){for(var e={},t=Ae.colors,n=0,r=t.length;n<r;n++)for(var i=t[n],o=0,a=i.length;o<a;o++){var s=t[n][o];e[s]={y:n,x:o}}return e}(),Ae.getStroke=function(e){var t=Ae._map[e];return t&&(2===t.y||3===t.y&&t.x>2&&t.x<5)?this.colors[4][t.x]:e},Ae.getColors=function(){return this.colors};var ue=(0,r.aZ)({name:"am-color-plicker-item",props:I,setup(e){const t=t=>{t.preventDefault(),t.stopPropagation(),e.onSelect&&e.onSelect(e.color,t)},n="transparent"===e.color,r=e.engine.language.get("toolbar","colorPicker",e.color.toUpperCase());return{title:r,special:n,triggerSelect:t}},data(){const e=this.toState(this.color||"#FFFFFF"),t=["#ffffff","#fafafa","transparent"].indexOf(e.hex)>=0;return{state:e,needBorder:t,styles:this.getStyles(e)}},computed:{refreshStyles(){return this.getStyles()}},methods:{getContrastingColor(e){if("transparent"===e.hex)return"rgba(0,0,0,0.4)";const t=(299*e.rgb.r+587*e.rgb.g+114*e.rgb.b)/1e3;return t>=210?"#8C8C8C":"#FFFFFF"},toState(e,t){let n=e.hex??e;"transparent"===n&&(n="rgba(0,0,0,0)");const r=(0,g.Vi)(n),i=r.toHsl(),o=r.toHsv(),a=r.toRgb(),s=r.toHex();0===i.s&&(i.h=t||0,o.h=t||0);const l="000000"===s&&0===a.a;return{hsl:i,hex:l?"transparent":"#".concat(s),rgb:a,hsv:o,oldHue:e["h"]||t||i.h,source:e["source"]}},getStyles(e){return{check:{fill:this.getContrastingColor(e||this.state),display:this.active?"block":"none"},block:{backgroundColor:this.color,border:this.setStroke?"1px solid ".concat(Ae.getStroke(this.color)):void 0}}}}});const de=["title"],he=(0,r._)("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},null,-1),pe=[he];function fe(e,t,n,i,a,s){return(0,r.wg)(),(0,r.iD)("span",{class:(0,o.C_)(["colorpicker-group-item",{"colorpicker-group-item-border":e.needBorder,"colorpicker-group-item-active":e.active,"colorpicker-group-item-special":e.special}]),onClick:t[0]||(t[0]=(...t)=>e.triggerSelect&&e.triggerSelect(...t)),title:e.title},[(0,r._)("span",{style:(0,o.j5)(e.refreshStyles.block)},[((0,r.wg)(),(0,r.iD)("svg",{style:(0,o.j5)(e.refreshStyles.check),viewBox:"0 0 18 18"},pe,4))],4)],10,de)}ue.render=fe,ue.__file="src/components/color/picker/item.vue";var ge=(0,r.aZ)({name:"am-color-plicker-group",components:{AmColorPickerItem:ue},props:N});const me={class:"colorpicker-group"};function ve(e,t,n,i,o,a){const s=(0,r.up)("am-color-picker-item");return(0,r.wg)(),(0,r.iD)("span",me,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.colors,(t=>((0,r.wg)(),(0,r.j4)(s,{engine:e.engine,color:t.value,active:t.active,key:t.value,"on-select":e.onSelect,"set-stroke":e.setStroke},null,8,["engine","color","active","on-select","set-stroke"])))),128))])}ge.render=ve,ge.__file="src/components/color/picker/group.vue";var be=(0,r.aZ)({name:"am-color-picker",components:{AmColorPickerItem:ue,AmColorPickerGroup:ge},props:U,setup(e,t){const n=(e,t)=>e.map((e=>e.map((e=>{const n="string"===typeof e?e:e.value;return{value:n,active:t===n}})))),r=(0,i.iH)(n(e.colors||Ae.getColors(),e.defaultActiveColor)),o=(t,i)=>{r.value=n(r.value,t),e.onSelect&&e.onSelect(t,i)},a=e.engine.language.get("toolbar","colorPicker","transparent"===e.defaultColor?"nonFillText":"defaultText");return{colors:r,triggerSelect:o,text:a}},methods:{triggerMouseDown(e){"INPUT"!==e.target.tagName&&e.preventDefault()}}});const ye={class:"colorpicker-default-text"};function we(e,t,n,i,a,s){const l=(0,r.up)("am-color-picker-item"),c=(0,r.up)("am-color-picker-group");return(0,r.wg)(),(0,r.iD)("div",{class:"colorpicker-board",onMousedown:t[1]||(t[1]=(...t)=>e.triggerMouseDown&&e.triggerMouseDown(...t))},[(0,r._)("div",{class:"colorpicker-default",onClick:t[0]||(t[0]=t=>e.triggerSelect(e.defaultColor,t))},[(0,r.Wm)(l,{engine:e.engine,color:e.defaultColor,"active-colors":[],"on-select":e.triggerSelect},null,8,["engine","color","on-select"]),(0,r._)("span",ye,(0,o.zw)(e.text),1)]),((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.colors,((t,n)=>((0,r.wg)(),(0,r.j4)(c,{engine:e.engine,colors:t,key:n,"on-select":e.triggerSelect,"set-stroke":e.setStroke},null,8,["engine","colors","on-select","set-stroke"])))),128))],32)}var xe='\n.colorpicker-default {\r\n display: flex;\r\n align-items: center;\r\n padding: 4px 8px;\r\n margin: 4px 0 8px;\r\n border-radius: 2px;\r\n cursor: pointer;\n}\n.colorpicker-default:hover {\r\n background-color: #f5f5f5;\n}\n.colorpicker-default-text {\r\n margin-left: 8px;\n}\n.colorpicker-group {\r\n display: flex;\r\n width: 100%;\r\n height: auto;\r\n position: relative;\r\n padding: 0 8px;\n}\n.colorpicker-group:nth-child(2){\r\n margin-bottom: 6px;\n}\n.colorpicker-group:last-child {\r\n margin-bottom: 0px;\n}\n.colorpicker-group-item {\r\n width: 24px;\r\n height: 24px;\r\n padding: 2px 2px;\r\n display: inline-block;\r\n border-radius: 3px 3px;\r\n border: 1px solid transparent;\r\n flex: 0 0 auto;\r\n cursor: pointer;\r\n background-color: #fff;\n}\n.colorpicker-group-item > span {\r\n position: relative;\r\n width: 18px;\r\n height: 18px;\r\n display: block;\r\n border-radius: 2px 2px;\r\n border: 1px solid transparent;\n}\n.colorpicker-group-item > span svg {\r\n position: absolute;\r\n top: -1px;\r\n left: 1px;\r\n width: 12px;\r\n height: 12px;\n}\n.colorpicker-group-item-border > span {\r\n border: 1px solid #e8e8e8;\n}\n.colorpicker-group-item-special {\r\n position: relative;\n}\n.colorpicker-group-item-special:after {\r\n content: "";\r\n display: block;\r\n position: absolute;\r\n top: 10px;\r\n left: 0px;\r\n width: 22px;\r\n height: 0;\r\n border-bottom: 2px solid #ff5151;\r\n transform: rotate(45deg);\n}\n.colorpicker-group-item:hover {\r\n border: 1px solid #d9d9d9;\r\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);\n}\r\n';G(xe),be.render=we,be.__file="src/components/color/picker/picker.vue";var ke=(0,r.aZ)({name:"am-color",components:{AmButton:q,AmColorPicker:be},props:L,setup(e){const t=(0,i.iH)(!1),n=(0,i.iH)(null),o=Y(n),a=(0,i.iH)(void 0),s=(0,i.iH)(e.defaultActiveColor),l=()=>"string"===typeof e.content?e.content:e.content(s.value,Ae.getStroke(s.value),e.disabled),c=(0,i.iH)(l()),A=e=>{e.preventDefault(),t.value?d():u()},u=()=>{t.value=!0},d=e=>{e&&a.value&&a.value.element&&a.value.element.contains(e.target)||(t.value=!1)};(0,r.YP)((()=>t.value),((e,t)=>{e?document.addEventListener("click",d):document.removeEventListener("click",d)}));const h=e=>{p(s.value,e)},p=(t,n)=>{if(d(),s.value=t,c.value="string"===typeof e.content?e.content:e.content(t,Ae.getStroke(t),e.disabled),!1!==e.autoExecute){let n=e.name,r=[t,e.defaultColor];e.command&&(Array.isArray(e.command)?r=e.command:(n=e.command.name,r=e.command.args)),e.engine&&e.engine.command.execute(n,...r)}e.onSelect&&e.onSelect(t,n)};return(0,r.Ah)((()=>document.removeEventListener("click",d))),(0,r.YP)((()=>({...e})),(()=>c.value=l())),{buttonRef:n,isRight:o,visible:t,buttonContent:c,currentColor:s,triggerSelect:p,triggerClick:h,toggleDropdown:A,targetRef:a}}});const Ce=["innerHTML"],Be=(0,r._)("span",{class:"colorpicker-button-dropdown-empty"},null,-1),_e=(0,r._)("span",{class:"data-icon data-icon-arrow"},null,-1),Ee={key:0,class:"toolbar-dropdown-list","data-element":"ui"};function Se(e,t,n,i,a,s){const l=(0,r.up)("am-button"),c=(0,r.up)("am-color-picker");return(0,r.wg)(),(0,r.iD)("div",{class:(0,o.C_)(["toolbar-dropdown","colorpicker-button",{"toolbar-dropdown-right":e.isRight}]),ref:"buttonRef"},[(0,r._)("div",{class:(0,o.C_)(["toolbar-dropdown-trigger colorpicker-button-group",{"colorpicker-button-group-active":e.visible}])},[(0,r.Wm)(l,{class:"colorpicker-button-text",name:e.name,title:e.buttonTitle,"on-click":e.triggerClick,disabled:e.disabled,placement:e.placement},{default:(0,r.w5)((()=>[(0,r._)("span",{innerHTML:e.buttonContent},null,8,Ce)])),_:1},8,["name","title","on-click","disabled","placement"]),(0,r.Wm)(l,{class:"colorpicker-button-dropdown toolbar-dropdown-trigger-arrow",name:e.name,title:e.dropdownTitle,"on-click":e.toggleDropdown,disabled:e.disabled,placement:e.placement,ref:"targetRef"},{icon:(0,r.w5)((()=>[Be])),default:(0,r.w5)((()=>[_e])),_:1},8,["name","title","on-click","disabled","placement"])],2),e.visible?((0,r.wg)(),(0,r.iD)("div",Ee,[(0,r.Wm)(c,{engine:e.engine,colors:e.colors,"default-active-color":e.currentColor,"default-color":e.defaultColor,"on-select":e.triggerSelect,"set-stroke":e.setStroke},null,8,["engine","colors","default-active-color","default-color","on-select","set-stroke"])])):(0,r.kq)("v-if",!0)],2)}var Fe="\n.editor-toolbar .colorpicker-button .colorpicker-button-group {\n padding: 0 2px;\n}\n.colorpicker-button-group .toolbar-button {\n padding: 0;\n}\n.colorpicker-button-group .colorpicker-button-text {\n margin-right: 0;\n min-width: 26px;\n border-radius: 3px 0 0 3px;\n display: block;\n}\n.editor-toolbar.editor-toolbar-popup .colorpicker-button-group .colorpicker-button-text {\n margin: 0;\n border-radius: 3px 0 0 3px;\n}\n.colorpicker-button-group .colorpicker-button-text:active {\n background-color: #e8e8e8;\n}\n.colorpicker-button-group .colorpicker-button-dropdown {\n margin-left: -1px;\n min-width: 17px;\n text-align: center;\n padding: 0 0;\n border-radius: 0 3px 3px 0;\n display: block;\n}\n.editor-toolbar.editor-toolbar-popup .colorpicker-button-group .colorpicker-button-dropdown {\n line-height: 24px;\n min-width: 17px;\n padding: 0 4px;\n margin: 0;\n margin-left: -1px;\n border-radius: 0 3px 3px 0;\n}\n.colorpicker-button-group .colorpicker-button-dropdown:hover,\n.colorpicker-button-group .colorpicker-button-dropdown:active {\n background-color: #e8e8e8;\n}\n.colorpicker-button-group .colorpicker-button-dropdown .colorpicker-button-dropdown-empty {\n display: inline-block;\n}\n.colorpicker-button-group:hover .toolbar-button {\n border: 1px solid #e8e8e8;\n}\n.colorpicker-button-group-active .toolbar-button,\n.colorpicker-button-group-active:hover .toolbar-button {\n border: 1px solid #e8e8e8;\n}\n";G(Fe),ke.render=Se,ke.__file="src/components/color/color.vue";var Te=(0,r.aZ)({name:"am-collapse-item",components:{APopover:h.Z},props:Q,setup(e){const t=(0,i.iH)(!1),n=t=>{t.preventDefault(),e.onMouseDown&&e.onMouseDown(t,e.engine)},r=t=>{if(e.disabled)return;const n=t.target.nodeName;if("INPUT"!==n&&"TEXTAREA"!==n&&t.preventDefault(),(!e.onClick||!1!==e.onClick(t,e.name,e.engine))&&!1!==e.autoExecute){let t=e.name,n=[];e.command&&(Array.isArray(e.command)?n=e.command:(t=e.command.name,n=e.command.args)),e.engine&&e.engine.command.execute(t,...n)}},o=()=>{t.value=!e.disabled},a=()=>{t.value=!1};return{iconIsHtml:/^<.*>/.test((e.icon||"").trim()),active:t,disabled:e.disabled,handleClick:r,handleMouseDown:n,triggerMouseEnter:o,triggerMouseLeave:a}}});const Me=["innerHTML"],Ie={key:0,class:"toolbar-collapse-item-text"},Ne={class:"toolbar-collapse-item-title"},Ue={key:0,class:"toolbar-collapse-item-description"};function Le(e,t,n,i,a,s){const l=(0,r.up)("a-popover");return(0,r.wg)(),(0,r.j4)(l,{placement:e.placement||"right",content:"function"===typeof e.prompt?e.prompt():e.prompt,overlayClassName:e.prompt?"":"prompt-popover-hide"},{default:(0,r.w5)((()=>[(0,r._)("div",{class:(0,o.C_)(["toolbar-collapse-item",{"toolbar-collapse-item-active":e.active},{"toolbar-collapse-item-disabled":e.disabled},e.className]),onMouseenter:t[0]||(t[0]=(...t)=>e.triggerMouseEnter&&e.triggerMouseEnter(...t)),onMouseleave:t[1]||(t[1]=(...t)=>e.triggerMouseLeave&&e.triggerMouseLeave(...t)),onClick:t[2]||(t[2]=(...t)=>e.handleClick&&e.handleClick(...t)),onMousedown:t[3]||(t[3]=(...t)=>e.handleMouseDown&&e.handleMouseDown(...t))},[(0,r.WI)(e.$slots,"icon",{},(()=>[e.iconIsHtml?((0,r.wg)(),(0,r.iD)("span",{key:0,innerHTML:e.icon},null,8,Me)):(0,r.kq)("v-if",!0),!e.iconIsHtml&&e.icon?((0,r.wg)(),(0,r.iD)("span",{key:1,class:(0,o.C_)(`data-icon data-icon-${e.icon}`)},null,2)):(0,r.kq)("v-if",!0)])),e.title?((0,r.wg)(),(0,r.iD)("div",Ie,[(0,r._)("div",Ne,(0,o.zw)(e.title),1),e.description?((0,r.wg)(),(0,r.iD)("div",Ue,(0,o.zw)("function"===typeof e.description?e.description():e.description),1)):(0,r.kq)("v-if",!0)])):(0,r.kq)("v-if",!0)],34)])),_:3},8,["placement","content","overlayClassName"])}var Qe="\n.prompt-popover-hide {\n display: none;\n}\n";G(Qe),Te.render=Le,Te.__file="src/components/collapse/item.vue";var De=(0,r.aZ)({name:"am-collapse-group",components:{AmCollapseItem:Te},props:D,setup(e){const t=(t,n,r)=>{let i;const o=e.items.find((e=>e.name===n));return o&&o.onClick&&(i=o.onClick(t,n,r)),e.onSelect&&e.onSelect(t,n,r),i};return{omit:A(),onClick:t}}});const He={class:"toolbar-collapse-group"},Oe={key:0,class:"toolbar-collapse-group-title"};function ze(e,t,n,i,a,s){const l=(0,r.up)("am-collapse-item");return(0,r.wg)(),(0,r.iD)("div",He,[e.title?((0,r.wg)(),(0,r.iD)("div",Oe,(0,o.zw)(e.title),1)):(0,r.kq)("v-if",!0),((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.items,(t=>((0,r.wg)(),(0,r.j4)(l,(0,r.dG)({key:t.name,engine:e.engine},{...e.omit(t,"onClick","onDisabled")},{"on-click":e.onClick}),null,16,["engine","on-click"])))),128))])}De.render=ze,De.__file="src/components/collapse/group.vue";var Ze=(0,r.aZ)({name:"am-collapse",components:{AmButton:q,AmCollapseGroup:De},props:H,setup(e){const t=!(e.icon||e.content),n=(0,i.iH)(t),o=(0,i.iH)(null),a=Y(o);(0,r.Ah)((()=>{t&&document.removeEventListener("click",l)}));const s=()=>{n.value=!0,setTimeout((()=>{document.addEventListener("click",l)}),10)},l=e=>{document.removeEventListener("click",l),n.value=!1},c=()=>{n.value?l():s()},A=(t,n)=>{l(),e.onSelect&&e.onSelect(t,n)};return{isCustomize:t,visible:n,collapse:o,isRight:a,triggerClick:c,triggerSelect:A}}});const Re={key:1,class:"toolbar-dropdown-list","data-element":"ui"},Pe=["innerHTML"],qe={class:"toolbar-collapse-content"};function Ke(e,t,n,i,a,s){const l=(0,r.up)("am-button"),c=(0,r.up)("am-collapse-group");return(0,r.wg)(),(0,r.iD)("div",{class:(0,o.C_)(["toolbar-dropdown toolbar-collapse",{"toolbar-dropdown-right":e.isRight},e.className]),ref:"collapse"},[e.isCustomize?(0,r.kq)("v-if",!0):((0,r.wg)(),(0,r.j4)(l,{key:0,name:"collapse",icon:e.icon,content:e.content,"on-click":e.triggerClick,active:e.visible,disabled:e.disabled},null,8,["icon","content","on-click","active","disabled"])),e.visible?((0,r.wg)(),(0,r.iD)("div",Re,[(0,r.WI)(e.$slots,"header",{},(()=>[e.header?((0,r.wg)(),(0,r.iD)("div",{key:0,class:"toolbar-collapse-header",innerHTML:e.header},null,8,Pe)):(0,r.kq)("v-if",!0)])),(0,r._)("div",qe,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.groups,((t,n)=>((0,r.wg)(),(0,r.j4)(c,(0,r.dG)({key:n,engine:e.engine},t,{"on-select":e.triggerSelect}),null,16,["engine","on-select"])))),128))])])):(0,r.kq)("v-if",!0)],2)}var We="\n.toolbar-collapse-header {\r\n color: #8c8c8c;\r\n margin: 4px 16px 0;\r\n font-size: 12px;\r\n line-height: 20px;\r\n text-align: left;\r\n padding-bottom: 8px;\r\n margin-bottom: 6px;\r\n border-bottom: 1px solid #e8e8e8;\n}\n.toolbar-collapse-header code{\r\n background-color: #f5f5f5;\r\n border-radius: 4px;\r\n padding: 2px;\r\n border: 1px solid #d9d9d9;\n}\n.toolbar-collapse-content {\r\n min-width: 200px\n}\n.toolbar-collapse-group-title {\r\n padding: 2px 16px;\r\n text-align: left;\r\n color: #8c8c8c;\r\n font-weight: 700;\r\n font-size: 12px;\r\n line-height: 24px;\n}\n.toolbar-collapse-item {\r\n display: flex;\r\n cursor: pointer;\r\n padding: 4px 16px 0;\n}\n.toolbar-collapse-item-active {\r\n background-color: #f4f4f4;\n}\n.editor-toolbar .toolbar-collapse-item-disabled, .data-toolbar-component-list .toolbar-collapse-item-disabled, .editor-toolbar:not(.editor-toolbar-mobile) .toolbar-collapse-item-disabled:hover, .data-toolbar-component-list .toolbar-collapse-item-disabled:hover {\r\n background-color: transparent;\r\n border: 1px solid transparent;\r\n box-shadow: none;\r\n color: #000000;\r\n opacity: 0.25;\r\n cursor: not-allowed;\n}\n.toolbar-collapse-item .toolbar-collapse-item-text\r\n{\r\n display: block;\r\n text-align: left;\r\n margin-left: 8px;\n}\n.toolbar-collapse-item .toolbar-collapse-item-title{\r\n display: block;\r\n color: #595959;\r\n line-height: 24px;\r\n font-size: 14px;\r\n font-weight: normal;\n}\n.toolbar-collapse-item .toolbar-collapse-item-description\r\n{\r\n display: block;\r\n font-size: 12px;\r\n color: rgba(0,0,0,.45);\n}\r\n";G(We),Ze.render=Ke,Ze.__file="src/components/collapse/collapse.vue";var je=(0,r.aZ)({name:"am-group",components:{AmButton:q,AmDropdown:oe,AmColor:ke,AmCollapse:Ze,AmPopover:h.Z},props:O,setup(){return{isMobile:u.tq}},methods:{getPopupContainer:()=>document.querySelector(".data-toolbar-popup-wrapper")||document.querySelector(".editor-toolbar")||document.body}});const Ve={key:0,class:"editor-toolbar-group"},Ge={key:1,class:"editor-toolbar-group"};function $e(e,t,n,i,a,s){const l=(0,r.up)("am-button"),c=(0,r.up)("am-dropdown"),A=(0,r.up)("am-color"),u=(0,r.up)("am-collapse"),d=(0,r.up)("am-popover");return(0,r.wg)(),(0,r.iD)(r.HY,null,[e.icon||e.content?((0,r.wg)(),(0,r.iD)("div",Ve,[(0,r.Wm)(d,{"get-popup-container":e.getPopupContainer,"overlay-class-name":"editor-toolbar-popover","arrow-point-at-center":!0,placement:e.isMobile?"topRight":void 0},{content:(0,r.w5)((()=>[(0,r._)("div",{class:(0,o.C_)(["editor-toolbar",{"editor-toolbar-mobile":e.isMobile&&!e.popup,"editor-toolbar-popup":e.popup}]),"data-element":"ui"},[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.items,((t,n)=>((0,r.wg)(),(0,r.iD)(r.HY,{key:n},["button"===t.type?((0,r.wg)(),(0,r.j4)(l,(0,r.dG)({key:0,key:n},t,{placement:"top",engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"dropdown"===t.type?((0,r.wg)(),(0,r.j4)(c,(0,r.dG)({key:1,key:n},t,{placement:"top",engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"color"===t.type?((0,r.wg)(),(0,r.j4)(A,(0,r.dG)({key:2,key:n},t,{placement:"top",engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"collapse"===t.type?((0,r.wg)(),(0,r.j4)(u,(0,r.dG)({key:3,key:n},t,{engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0)],64)))),128))],2)])),default:(0,r.w5)((()=>[(0,r.Wm)(l,{name:"group-popover",icon:e.icon,content:e.content},null,8,["icon","content"])])),_:1},8,["get-popup-container","placement"])])):(0,r.kq)("v-if",!0),e.icon||e.content?(0,r.kq)("v-if",!0):((0,r.wg)(),(0,r.iD)("div",Ge,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.items,((t,n)=>((0,r.wg)(),(0,r.iD)(r.HY,{key:n},["button"===t.type?((0,r.wg)(),(0,r.j4)(l,(0,r.dG)({key:0,key:n},t,{engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"dropdown"===t.type?((0,r.wg)(),(0,r.j4)(c,(0,r.dG)({key:1,key:n},t,{engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"color"===t.type?((0,r.wg)(),(0,r.j4)(A,(0,r.dG)({key:2,key:n},t,{engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0),"collapse"===t.type?((0,r.wg)(),(0,r.j4)(u,(0,r.dG)({key:3,key:n},t,{engine:e.engine}),null,16,["engine"])):(0,r.kq)("v-if",!0)],64)))),128))]))],64)}var Ye="\n.editor-toolbar-group {\n padding: 4px;\n width: auto;\n border-left: 1px solid #e8e8e8;\n display: flex;\n align-items: stretch;\n}\n.editor-toolbar .editor-toolbar-group:nth-child(1) {\n border-left: none;\n}\n";G(Ye),je.render=$e,je.__file="src/components/group.vue";var Xe={toolbar:{collapse:{title:"Type <code>".concat(u.MX?"⌘":"Ctrl","</code> + <code>/</code> to quickly insert a card")},undo:{title:"Undo"},redo:{title:"Redo"},paintformat:{title:"Format brush"},removeformat:{title:"Clear format"},heading:{title:"Text and title",p:"Text",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6"},fontfamily:{title:"Font family",notInstalled:"The font may not be installed",items:{default:"Default",arial:"Arial",comicSansMS:"Comic Sans MS",courierNew:"Courier New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact",timesNewRoman:"Times New Roman",trebuchetMS:"Trebuchet MS",verdana:"Verdana",fangSong:"FangSong",stFangsong:"STFangsong",stSong:"STSong",stKaiti:"STKaiti",simSun:"SimSum",microsoftYaHei:"Microsoft YaHei",kaiTi:"KaiTi",kaitiSC:"KaiTi SC",simHei:"SimHei",heitiSC:"Heiti SC",fzHei:"FZHeiTi",fzKai:"FZKaiTi",fzFangSong:"FZFangSong"}},fontsize:{title:"Font size"},fontcolor:{title:"Font color",more:"More colors"},backcolor:{title:"Background color",more:"More colors"},bold:{title:"Bold"},italic:{title:"Italic"},strikethrough:{title:"Strikethrough"},underline:{title:"Underline"},moremark:{title:"More text styles",sup:"Sup",sub:"Sub",code:"Inline code"},alignment:{title:"Alignment",left:"Align left",center:"Align center",right:"Align right",justify:"Align justify"},unorderedlist:{title:"Unordered list"},orderedlist:{title:"Ordered list"},tasklist:{title:"Task list"},indent:{title:"Ident",in:"Increase indent",out:"Reduce indent"},"line-height":{title:"Line height",default:"Default"},link:{title:"Insert Link"},quote:{title:"Insert reference"},hr:{title:"Insert dividing line"},colorPicker:{defaultText:"Default Color",nonFillText:"No fill color","#000000":"Black","#262626":"Dark Gray 3","#595959":"Dark Gray 2","#8C8C8C":"Dark Gray 1","#BFBFBF":"Gray","#D9D9D9":"Light Gray 4","#E9E9E9":"Light Gray 3","#F5F5F5":"Light Gray 2","#FAFAFA":"Light Gray 1","#FFFFFF":"White","#F5222D":"Red","#FA541C":"Chinese Red","#FA8C16":"Orange","#FADB14":"Yellow","#52C41A":"Green","#13C2C2":"Cyan","#1890FF":"Light Blue","#2F54EB":"Blue","#722ED1":"Purple","#EB2F96":"Magenta","#FFE8E6":"Red 1","#FFECE0":"Chinese Red 1","#FFEFD1":"Orange 1","#FCFCCA":"Yellow 1","#E4F7D2":"Green 1","#D3F5F0":"Cyan 1","#D4EEFC":"Light Blue 1","#DEE8FC":"Blue 1","#EFE1FA":"Purple 1","#FAE1EB":"Magenta 1","#FFA39E":"Red 2","#FFBB96":"Chinese Red 2","#FFD591":"Orange 2","#FFFB8F":"Yellow 2","#B7EB8F":"Green 2","#87E8DE":"Cyan 2","#91D5FF":"Light Blue 2","#ADC6FF":"Blue 2","#D3ADF7":"Purple 2","#FFADD2":"Magenta 2","#FF4D4F":"Red 3","#FF7A45":"Chinese Red 3","#FFA940":"Orange 3","#FFEC3D":"Yellow 3","#73D13D":"Green 3","#36CFC9":"Cyan 3","#40A9FF":"Light Blue 3","#597EF7":"Blue 3","#9254DE":"Purple 3","#F759AB":"Magenta 3","#CF1322":"Red 4","#D4380D":"Chinese Red 4","#D46B08":"Orange 4","#D4B106":"Yellow 4","#389E0D":"Green 4","#08979C":"Cyan 4","#096DD9":"Light Blue 4","#1D39C4":"Blue 4","#531DAB":"Purple 4","#C41D7F":"Magenta 4","#820014":"Red 5","#871400":"Chinese Red 5","#873800":"Orange 5","#614700":"Yellow 5","#135200":"Green 5","#00474F":"Cyan 5","#003A8C":"Light Blue 5","#061178":"Blue 5","#22075E":"Purple 5","#780650":"Magenta 5"},component:{placeholder:"Card name"},image:{title:"Image"},codeblock:{title:"Codeblock"},table:{title:"Table"},file:{title:"File"},video:{title:"Video"},math:{title:"Formula"},status:{title:"Status"},mind:{title:"Mind Map"},commonlyUsed:{title:"Commonly used"},searchEmtpy:{title:"No matching card"}}},Je={toolbar:{collapse:{title:"输入 <code>".concat(u.MX?"⌘":"Ctrl","</code> + <code>/</code> 快速插入卡片")},undo:{title:"撤销"},redo:{title:"重做"},paintformat:{title:"格式刷"},removeformat:{title:"清除格式"},heading:{title:"正文与标题",p:"正文",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},fontfamily:{title:"字体",notInstalled:"可能未安装该字体",items:{default:"默认",arial:"Arial",comicSansMS:"Comic Sans MS",courierNew:"Courier New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact",timesNewRoman:"Times New Roman",trebuchetMS:"Trebuchet MS",verdana:"Verdana",fangSong:"仿宋",stFangsong:"华文仿宋",stSong:"华文宋体",stKaiti:"华文楷体",simSun:"宋体",microsoftYaHei:"微软雅黑",kaiTi:"楷体",kaitiSC:"楷体-简",simHei:"黑体",heitiSC:"黑体-简",fzHei:"方正黑体",fzKai:"方正楷体",fzFangSong:"方正仿宋"}},fontsize:{title:"字号"},fontcolor:{title:"字体颜色",more:"更多颜色"},backcolor:{title:"背景颜色",more:"更多颜色"},bold:{title:"粗体"},italic:{title:"斜体"},strikethrough:{title:"删除线"},underline:{title:"下划线"},moremark:{title:"更多文本样式",sup:"上标",sub:"下标",code:"行内代码"},alignment:{title:"对齐方式",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},unorderedlist:{title:"无序列表"},orderedlist:{title:"有序列表"},tasklist:{title:"任务列表"},indent:{title:"缩进",in:"增加缩进",out:"减少缩进"},"line-height":{title:"行高",default:"默认"},link:{title:"链接"},quote:{title:"插入引用"},hr:{title:"插入分割线"},colorPicker:{defaultText:"默认",nonFillText:"无填充色","#000000":"黑色","#262626":"深灰 3","#595959":"深灰 2","#8C8C8C":"深灰 1","#BFBFBF":"灰色","#D9D9D9":"浅灰 4","#E9E9E9":"浅灰 3","#F5F5F5":"浅灰 2","#FAFAFA":"浅灰 1","#FFFFFF":"白色","#F5222D":"红色","#FA541C":"朱红","#FA8C16":"橙色","#FADB14":"黄色","#52C41A":"绿色","#13C2C2":"青色","#1890FF":"浅蓝","#2F54EB":"蓝色","#722ED1":"紫色","#EB2F96":"玫红","#FFE8E6":"红色 1","#FFECE0":"朱红 1","#FFEFD1":"橙色 1","#FCFCCA":"黄色 1","#E4F7D2":"绿色 1","#D3F5F0":"青色 1","#D4EEFC":"浅蓝 1","#DEE8FC":"蓝色 1","#EFE1FA":"紫色 1","#FAE1EB":"玫红 1","#FFA39E":"红色 2","#FFBB96":"朱红 2","#FFD591":"橙色 2","#FFFB8F":"黄色 2","#B7EB8F":"绿色 2","#87E8DE":"青色 2","#91D5FF":"浅蓝 2","#ADC6FF":"蓝色 2","#D3ADF7":"紫色 2","#FFADD2":"玫红 2","#FF4D4F":"红色 3","#FF7A45":"朱红 3","#FFA940":"橙色 3","#FFEC3D":"黄色 3","#73D13D":"绿色 3","#36CFC9":"青色 3","#40A9FF":"浅蓝 3","#597EF7":"蓝色 3","#9254DE":"紫色 3","#F759AB":"玫红 3","#CF1322":"红色 4","#D4380D":"朱红 4","#D46B08":"橙色 4","#D4B106":"黄色 4","#389E0D":"绿色 4","#08979C":"青色 4","#096DD9":"浅蓝 4","#1D39C4":"蓝色 4","#531DAB":"紫色 4","#C41D7F":"玫红 4","#820014":"红色 5","#871400":"朱红 5","#873800":"橙色 5","#614700":"黄色 5","#135200":"绿色 5","#00474F":"青色 5","#003A8C":"浅蓝 5","#061178":"蓝色 5","#22075E":"紫色 5","#780650":"玫红 5"},component:{placeholder:"卡片名称"},image:{title:"图片"},codeblock:{title:"代码块"},table:{title:"表格"},file:{title:"附件"},video:{title:"视频"},math:{title:"公式"},status:{title:"状态"},mind:{title:"脑图"},commonlyUsed:{title:"常用"},searchEmtpy:{title:"无匹配卡片"}}},et={"en-US":Xe,"zh-CN":Je},tt=(0,r.aZ)({name:"am-table",props:{maxRows:Number,maxCols:Number,minRows:Number,minCols:Number,onSelect:Function},setup(e){const t=(0,i.iH)(e.maxRows||10),n=(0,i.iH)(e.maxCols||10),r=(0,i.iH)(e.minRows||4),o=(0,i.iH)(e.minCols||4),a=(0,i.iH)(4),s=(0,i.iH)(4),l=(0,i.iH)(0),c=(0,i.iH)(0);return{maxRows:t,maxCols:n,minRows:r,minCols:o,currentRows:a,currentCols:s,selectedRows:l,selectedCols:c}},methods:{triggerMouseDown(e){e.preventDefault()},triggerSelect(e,t,n){this.onSelect&&this.onSelect(e,t+1,n+1)},triggerHover(e,t){const n=Math.max(this.minRows,Math.min(this.maxRows,e+2)),r=Math.max(this.minCols,Math.min(this.maxCols,t+2));this.currentRows=n,this.currentCols=r,this.selectedRows=e+1,this.selectedCols=t+1}}});const nt={"data-element":"ui",class:"data-toolbar-table-selector"},rt=["onClick","onMouseover"],it={class:"data-toolbar-table-selector-info"};function ot(e,t,n,i,a,s){return(0,r.wg)(),(0,r.iD)("div",nt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.currentRows,(n=>((0,r.wg)(),(0,r.iD)("div",{class:"data-toolbar-table-selector-tr",key:n},[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.currentCols,(i=>((0,r.wg)(),(0,r.iD)("div",{class:(0,o.C_)([{"data-toolbar-table-selector-td":!0},{actived:n-1<e.selectedRows&&i-1<e.selectedCols}]),key:{col:i},onClick:t=>e.triggerSelect(t,n-1,i-1),onMousedown:t[0]||(t[0]=t=>e.triggerMouseDown(t)),onMouseover:t=>e.triggerHover(n-1,i-1)},null,42,rt)))),128))])))),128)),(0,r._)("div",it,(0,o.zw)(void 0===e.selectedRows?0:e.selectedRows)+"x"+(0,o.zw)(void 0===e.selectedCols?0:e.selectedCols),1)])}var at="\n.data-toolbar-table-selector .data-toolbar-table-selector-tr {\r\n display: flex;\r\n flex-wrap: nowrap;\n}\n.data-toolbar-table-selector .data-toolbar-table-selector-tr .data-toolbar-table-selector-td {\r\n width: 20px;\r\n height: 16px;\r\n border: 1px solid #d9d9d9;\r\n margin-right: -1px;\r\n margin-bottom: -1px;\r\n cursor: pointer;\n}\n.data-toolbar-table-selector .data-toolbar-table-selector-tr .data-toolbar-table-selector-td.actived {\r\n background: #ddefff;\n}\n.data-toolbar-table-selector .data-toolbar-table-selector-info {\r\n text-align: center;\n}\r\n";G(at),tt.render=ot,tt.__file="src/components/table.vue";var st=[{key:"default",value:""},{key:"arial",value:"Arial"},{key:"comicSansMS",value:'"Comic Sans MS"'},{key:"courierNew",value:'"Courier New"'},{key:"georgia",value:"Georgia"},{key:"helvetica",value:"Helvetica"},{key:"impact",value:"Impact"},{key:"timesNewRoman",value:'"Times New Roman"'},{key:"trebuchetMS",value:'"Trebuchet MS"'},{key:"verdana",value:"Verdana"},{key:"fangSong",value:"FangSong, 仿宋, FZFangSong-Z02S, STFangsong, fangsong"},{key:"stFangsong",value:"STFangsong, 华文仿宋, FangSong, FZFangSong-Z02S, fangsong"},{key:"stSong",value:'STSong, 华文宋体, SimSun, "Songti SC", NSimSun, serif'},{key:"stKaiti",value:'STKaiti, 华文楷体, KaiTi, "Kaiti SC", cursive'},{key:"simSun",value:'SimSun, 宋体, "Songti SC", NSimSun, STSong, serif'},{key:"microsoftYaHei",value:'"Microsoft YaHei", 微软雅黑, "PingFang SC", SimHei, STHeiti, sans-serif'},{key:"kaiTi",value:'KaiTi, 楷体, STKaiti, "Kaiti SC", cursive'},{key:"kaitiSC",value:'"Kaiti SC"'},{key:"simHei",value:'SimHei, 黑体, "Microsoft YaHei", "PingFang SC", STHeiti, sans-serif'},{key:"heitiSC",value:'"Heiti SC"'},{key:"fzHei",value:"FZHei-B01S"},{key:"fzKai",value:"FZKai-Z03S"},{key:"fzFangSong",value:"FZFangSong-Z02S"}],lt=function(e,t){return P((function(n){return e.map((function(e){var r=e.key,i=e.value,o="default"!==r&&!i.split(",").some((function(e){return n(e.trim())}));return{key:i,faimlyName:t?t[r]:r,content:'<span style="font-family: '.concat(i,'">').concat(t?t[r]:r,"</span>"),hotkey:!1,disabled:o,title:o?t&&t["notInstalled"]||"The font may not be installed":void 0}}))}))},ct=".editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .toolbar-button {\r\n font-weight: bold;\r\n min-width: 73px;\r\n}\r\n\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h1,\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h2,\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h3,\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h4,\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h5,\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h6 {\r\n line-height: 1.6;\r\n font-weight: bold;\r\n color: #262626;\r\n}\r\n\r\n.heading-item-h1 {\r\n font-size: 28px;\r\n}\r\n\r\n.heading-item-h2 {\r\n font-size: 24px;\r\n}\r\n\r\n.heading-item-h3 {\r\n font-size: 20px;\r\n}\r\n\r\n.heading-item-h4 {\r\n font-size: 16px;\r\n}\r\n\r\n.heading-item-h5 {\r\n font-size: 14px;\r\n}\r\n\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-heading .heading-item-h6 {\r\n font-size: 14px;\r\n font-weight: normal;\r\n}\r\n\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-fontsize .toolbar-button {\r\n font-weight: bold;\r\n min-width: 58px;\r\n}\r\n\r\n.editor-toolbar .toolbar-dropdown.toolbar-dropdown-fontfamily .toolbar-button {\r\n font-size: 12px;\r\n}";G(ct);var At=function(e){var t=e.language.get("toolbar"),n=e.container.css("font-size");return[{type:"collapse",header:t["collapse"]["title"],icon:"collapse",groups:[{items:[{name:"image-uploader",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\t\t\t\t\twidth="24"\n\t\t\t\t\t\t\t\t\t\theight="24"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<g fill="none" fill-rule="evenodd">\n\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\tstroke="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth=".667"\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#FFF"\n\t\t\t\t\t\t\t\t\t\t\t\tx=".333"\n\t\t\t\t\t\t\t\t\t\t\t\ty=".333"\n\t\t\t\t\t\t\t\t\t\t\t\twidth="23.333"\n\t\t\t\t\t\t\t\t\t\t\t\theight="23.333"\n\t\t\t\t\t\t\t\t\t\t\t\trx="1.333"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<g fill-rule="nonzero">\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td="M8.625 8a1.126 1.126 0 010 2.25 1.126 1.126 0 010-2.25z"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#FFD666"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td="M17.95 14.88a.144.144 0 01-.092.033H6.14a.139.139 0 01-.14-.137.14.14 0 01.033-.089l2.981-3.45a.143.143 0 01.198-.018c.005.005.012.01.017.017l1.74 2.016 2.767-3.203a.143.143 0 01.198-.017l.018.017 4.018 4.64a.137.137 0 01-.02.191z"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#CCC"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td="M17.91 14.88a.144.144 0 01-.092.033H9.333l4.363-4.864a.143.143 0 01.198-.017l.018.017 4.018 4.64a.137.137 0 01-.02.191z"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#737373"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t</span>',title:t["image"]["title"],search:"图片,tupian,image,img"},{name:"codeblock",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\t\t\t\t\twidth="24"\n\t\t\t\t\t\t\t\t\t\theight="24"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<g fill="none" fill-rule="evenodd">\n\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\tstroke="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#FFF"\n\t\t\t\t\t\t\t\t\t\t\t\tx=".5"\n\t\t\t\t\t\t\t\t\t\t\t\ty=".5"\n\t\t\t\t\t\t\t\t\t\t\t\twidth="23"\n\t\t\t\t\t\t\t\t\t\t\t\theight="23"\n\t\t\t\t\t\t\t\t\t\t\t\trx="2"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td="M19.331 11.815c-.407-.22-.665-.678-.665-1.181V8.062c0-.202-.148-.367-.33-.367h-.933a.153.153 0 01-.153-.153v-.64c0-.084.068-.152.153-.152h.933c.651 0 1.18.588 1.18 1.312v2.572c0 .14.072.269.186.33l.843.455c.05.026.08.078.08.134v.894c0 .056-.03.108-.08.134l-.843.455a.373.373 0 00-.186.33v2.572c0 .724-.529 1.312-1.18 1.312h-.933a.153.153 0 01-.153-.153v-.64c0-.084.068-.152.153-.152h.933c.182 0 .33-.165.33-.367v-2.572c0-.503.258-.961.665-1.18l.344-.186-.344-.185zM5.044 11.815c.407-.22.665-.678.665-1.181V8.062c0-.202.148-.367.33-.367h.933a.153.153 0 00.153-.153v-.64a.153.153 0 00-.153-.152H6.04c-.651 0-1.18.588-1.18 1.312v2.572c0 .14-.072.269-.186.33l-.843.455a.153.153 0 00-.08.134v.894c0 .056.03.108.08.134l.843.455c.114.061.186.19.186.33v2.572c0 .724.529 1.312 1.18 1.312h.933a.153.153 0 00.153-.153v-.64a.153.153 0 00-.153-.152H6.04c-.182 0-.33-.165-.33-.367v-2.572c0-.503-.258-.961-.665-1.18L4.7 12l.344-.185z"\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#595959"\n\t\t\t\t\t\t\t\t\t\t\t\tfill-rule="nonzero"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#1890FF"\n\t\t\t\t\t\t\t\t\t\t\t\topacity=".25"\n\t\t\t\t\t\t\t\t\t\t\t\td="M8.25 8.25h7.5v1.125h-7.5z"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#D2E8DB"\n\t\t\t\t\t\t\t\t\t\t\t\td="M8.25 10.5h4.5v1.125h-4.5z"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#E0E0E0"\n\t\t\t\t\t\t\t\t\t\t\t\td="M8.25 12.75h4.5v1.125h-4.5zM8.25 15h6v1.125h-6z"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t</span>',title:t["codeblock"]["title"],search:"代码块,daimakuai,code"},{name:"table",command:{name:"table",args:[3,3]},placement:"rightTop",onDisabled:function(){return!!e.card.active||!e.command.queryEnabled("table")},prompt:e.card.active||!e.command.queryEnabled("table")?void 0:(0,r.h)(tt,{onSelect:function(t,n,r){e.command.execute("table",n,r)}}),icon:'<span><svg\n\t\t\t\t\t\t\t\t\twidth="24px"\n\t\t\t\t\t\t\t\t\theight="24px"\n\t\t\t\t\t\t\t\t\tview-box="0 0 24 24"\n\t\t\t\t\t\t\t\t\tversion="1.1"\n\t\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<g\n\t\t\t\t\t\t\t\t\t\tstroke="none"\n\t\t\t\t\t\t\t\t\t\tstrokeWidth="1"\n\t\t\t\t\t\t\t\t\t\tfill="none"\n\t\t\t\t\t\t\t\t\t\tfill-rule="evenodd"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<g transform="translate(-16.000000, -93.000000)">\n\t\t\t\t\t\t\t\t\t\t\t<g>\n\t\t\t\t\t\t\t\t\t\t\t\t<g transform="translate(16.000000, 53.000000)">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<g transform="translate(0.000000, 40.000000)">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<g>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth="0.666666667"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#FFFFFF"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="0.333333333"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="0.333333333"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="23.3333333"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="23.3333333"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trx="1.33333333"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<g transform="translate(5.250000, 6.750000)">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td="M0.75,0 L3.75,0 L3.75,10.5 L0.75,10.5 C0.335786438,10.5 5.07265313e-17,10.1642136 0,9.75 L0,0.75 C-5.07265313e-17,0.335786438 0.335786438,7.6089797e-17 0.75,0 Z"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#F0F0F0"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></path>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td="M0.25,2.75 L13.25,2.75 L13.25,0.75 C13.25,0.473857625 13.0261424,0.25 12.75,0.25 L0.75,0.25 C0.473857625,0.25 0.25,0.473857625 0.25,0.75 L0.25,2.75 Z"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke="#595959"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth="0.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill-opacity="0.15"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#25B864"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></path>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="0"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="5.25"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="13.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="1"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle-Copy"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="0"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="7.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="13.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="1"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="6.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="0"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="1"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="10.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle-Copy-5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="9.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="0"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="1"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="10.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke="#737373"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth="0.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tx="0.375"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ty="0.375"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth="12.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight="9.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trx="0.75"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td="M3.5,10.25 L3.5,0.25 L0.75,0.25 C0.473857625,0.25 0.25,0.473857625 0.25,0.75 L0.25,9.75 C0.25,10.0261424 0.473857625,10.25 0.75,10.25 L3.5,10.25 Z"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke="#737373"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth="0.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></path>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td="M0.25,2.75 L13.25,2.75 L13.25,0.75 C13.25,0.473857625 13.0261424,0.25 12.75,0.25 L0.75,0.25 C0.473857625,0.25 0.25,0.473857625 0.25,0.75 L0.25,2.75 Z"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid="Rectangle"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke="#737373"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth="0.5"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></path>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t</svg></span>',title:t["table"]["title"],search:"biaoge,table"},{name:"file-uploader",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\twidth="24"\n\t\t\t\t\t\t\t\t\t\theight="24"\n\t\t\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<g fill="none" fill-rule="evenodd">\n\t\t\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\t\t\tstroke="#E8E8E8"\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#FFF"\n\t\t\t\t\t\t\t\t\t\t\t\tx=".5"\n\t\t\t\t\t\t\t\t\t\t\t\ty=".5"\n\t\t\t\t\t\t\t\t\t\t\t\twidth="23"\n\t\t\t\t\t\t\t\t\t\t\t\theight="23"\n\t\t\t\t\t\t\t\t\t\t\t\trx="2"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#E0E0E0"\n\t\t\t\t\t\t\t\t\t\t\t\td="M11.25 15h8.25v1.125h-8.25zM14.25 11.25h5.25v1.125h-5.25zM14.25 8.25h5.25v1.125h-5.25z"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td="M11.216 8.324a2.593 2.593 0 00-3.791 0l-2.896 3.04a.108.108 0 00-.029.074c0 .028.01.055.029.075l.41.43c.038.041.101.041.14 0l2.896-3.04a1.841 1.841 0 012.69 0c.36.378.557.88.557 1.413 0 .534-.197 1.035-.557 1.413l-2.95 3.1-.48.502c-.446.47-1.173.47-1.62 0a1.226 1.226 0 01-.335-.851c0-.322.119-.624.335-.851l2.928-3.075a.382.382 0 01.276-.12h.001c.105 0 .201.043.274.12.075.078.115.18.115.29a.416.416 0 01-.115.288l-2.393 2.512a.108.108 0 00-.029.075c0 .028.01.054.03.074l.409.43c.038.041.102.041.14 0l2.392-2.513c.221-.232.342-.54.342-.867 0-.328-.122-.637-.342-.868a1.131 1.131 0 00-1.653 0l-.284.3-2.642 2.776a2.06 2.06 0 00-.564 1.43c0 .54.2 1.047.564 1.428.376.394.868.591 1.36.591.494 0 .986-.197 1.361-.591l3.43-3.602c.505-.532.785-1.24.785-1.991a2.867 2.867 0 00-.784-1.992z"\n\t\t\t\t\t\t\t\t\t\t\t\tfill="#595959"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t</span>',title:t["file"]["title"],search:"附件,文件,fujian,wenjian,file"},{name:"video-uploader",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">\n <g stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-16.000000, -641.000000)">\n <g>\n <g transform="translate(16.000000, 641.000000)">\n <g>\n <rect stroke="#E8E8E8" fill="#FFFFFF" x="0.5" y="0.5" width="23" height="23" rx="2"/>\n <g transform="translate(6.000000, 6.000000)" fill-rule="nonzero">\n <rect fill="#000000" opacity="0" x="0" y="0" width="12" height="12"/>\n <path d="M6,0.75 C3.10078125,0.75 0.75,3.10078125 0.75,6 C0.75,8.89921875 3.10078125,11.25 6,11.25 C8.89921875,11.25 11.25,8.89921875 11.25,6 C11.25,3.10078125 8.89921875,0.75 6,0.75 Z M6,10.359375 C3.59296875,10.359375 1.640625,8.40703125 1.640625,6 C1.640625,3.59296875 3.59296875,1.640625 6,1.640625 C8.40703125,1.640625 10.359375,3.59296875 10.359375,6 C10.359375,8.40703125 8.40703125,10.359375 6,10.359375 Z" id="Shape" fill="#595959"/>\n <path d="M7.93963415,5.8884912 L5.23140244,4.02687575 C5.13445122,3.96020395 5,4.02514402 5,4.13857268 L5,7.86180356 C5,7.97523223 5.13536585,8.03930643 5.23140244,7.97350049 L7.93963415,6.11188505 C8.02012195,6.05646952 8.02012195,5.94390673 7.93963415,5.8884912 Z" id="Shape" fill="#71D19A"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n\t\t\t\t\t\t\t\t</span>',title:t["video"]["title"],search:"视频,MP4,shipin,video"},{name:"math",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g fill="none" fill-rule="evenodd"><rect stroke="#E8E8E8" fill="#FFF" x=".5" y=".5" width="23" height="23" rx="2"/><path d="M14.073 14.18a.122.122 0 01.004.073l-.346 1.404a.122.122 0 01-.119.093H9.438a.122.122 0 01-.122-.122v-.384c0-.067.055-.122.122-.122h.61v-3.924h-.61a.122.122 0 01-.122-.122v-.384c0-.068.055-.122.122-.122h.355l-.012-.063a.976.976 0 00-.96-.8h-.487v3.845H9.35c.068 0 .122.055.122.122v.384a.122.122 0 01-.122.122H6.341a.122.122 0 01-.122-.122v-.384c0-.067.055-.122.122-.122h1.017V9.706H6.87a.976.976 0 00-.96.8l-.097.535h-.437a.122.122 0 01-.122-.132l.143-1.797A.122.122 0 015.52 9h4.654c.064 0 .117.049.122.112l.116 1.458h3.19c.06 0 .113.046.12.107l.214 1.718a.122.122 0 01-.121.137h-.339a.122.122 0 01-.117-.09l-.16-.577a.91.91 0 00-.877-.667h-1.134v1.57h.423c.26 0 .471-.211.471-.471v-.192c0-.068.055-.122.122-.122h.407c.067 0 .122.054.122.122v1.953a.122.122 0 01-.122.122h-.407a.122.122 0 01-.122-.122v-.192a.47.47 0 00-.47-.47h-.424v1.726h1.187c.34 0 .655-.177.832-.467l.291-.475h-.155a.122.122 0 01-.122-.122v-.384c0-.067.054-.122.122-.122h.577l1.468-2.004-1.305-1.92h-.659a.122.122 0 01-.122-.122v-.384c0-.067.055-.122.122-.122h2.196c.067 0 .122.055.122.122v.384a.122.122 0 01-.122.122h-.317l.718 1.057.774-1.057h-.362a.122.122 0 01-.122-.122v-.384c0-.067.055-.122.122-.122h1.87c.068 0 .123.055.123.122v.384a.122.122 0 01-.122.122h-.614l-1.238 1.69 1.518 2.234h.659c.067 0 .122.055.122.122v.384a.122.122 0 01-.122.122h-2.196a.122.122 0 01-.122-.122v-.384c0-.067.055-.122.122-.122h.317l-.931-1.37-1.004 1.37h.398c.068 0 .122.055.122.122v.384a.122.122 0 01-.122.122h-1.14z" fill-opacity=".65" fill="#000"/></g></svg>\n\t\t\t\t\t\t\t\t</span>',title:t["math"]["title"],search:"公式,数学公式,gongshi,formula,math,latex"},{name:"status",icon:'<span>\n\t\t\t\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g fill="none" fill-rule="evenodd"><rect stroke="#E8E8E8" strokeWidth=".667" fill="#FFF" x=".333" y=".333" width="23.333" height="23.333" rx="1.333"/><g transform="translate(6 6)"><path d="M2.534 6.192L.53 4.34a.667.667 0 01-.144-.788L1.98.37A.667.667 0 012.575 0h9.714c.369 0 .667.298.667.667v5.036a.667.667 0 01-.667.666H2.986a.667.667 0 01-.452-.177z" fill="#BFBFBF"/><path d="M.598 4.07a.267.267 0 00.02.226l4.125 7.146a.267.267 0 00.364.097l4.62-2.666a.267.267 0 00.097-.365L5.698 1.363a.267.267 0 00-.186-.13L2.095.648a.267.267 0 00-.295.17L.598 4.07z" stroke="#595959" strokeWidth=".8" fill="#FFF"/><path d="M3.956 3.036a.667.667 0 11-1.333 0 .667.667 0 011.333 0z" fill="#595959"/><circle fill="#595959" transform="scale(-1 1) rotate(30 0 -9.207)" cx="3.283" cy="3.047" r="1"/></g></g></svg>\n\t\t\t\t\t\t\t\t</span>',title:t["status"]["title"],search:"status,label,状态"}]}]},{type:"button",name:"undo",icon:"undo",title:t["undo"]["title"],onDisabled:function(){return!e.command.queryState("undo")||!e.command.queryEnabled("undo")},onActive:function(){return!1}},{type:"button",name:"redo",icon:"redo",title:t["redo"]["title"],onDisabled:function(){return!e.command.queryState("redo")||!e.command.queryEnabled("redo")},onActive:function(){return!1}},{type:"button",name:"paintformat",icon:"paintformat",title:t["paintformat"]["title"]},{type:"button",name:"removeformat",icon:"clean",title:t["removeformat"]["title"]},{type:"dropdown",name:"heading",className:"toolbar-dropdown-heading",title:t["heading"]["title"],items:[{key:"p",className:"heading-item-p",content:t["heading"]["p"]},{key:"h1",className:"heading-item-h1",content:t["heading"]["h1"]},{key:"h2",className:"heading-item-h2",content:t["heading"]["h2"]},{key:"h3",className:"heading-item-h3",content:t["heading"]["h3"]},{key:"h4",className:"heading-item-h4",content:t["heading"]["h4"]},{key:"h5",className:"heading-item-h5",content:t["heading"]["h5"]},{key:"h6",className:"heading-item-h6",content:t["heading"]["h6"]}]},{type:"dropdown",name:"fontsize",className:"toolbar-dropdown-fontsize",title:t["fontsize"]["title"],items:[{key:"12px",content:"12px",hotkey:!1},{key:"13px",content:"13px",hotkey:!1},{key:"14px",content:"14px",hotkey:!1},{key:"15px",content:"15px",hotkey:!1},{key:"16px",content:"16px",hotkey:!1},{key:"19px",content:"19px",hotkey:!1},{key:"22px",content:"22px",hotkey:!1},{key:"24px",content:"24px",hotkey:!1},{key:"29px",content:"29px",hotkey:!1},{key:"32px",content:"32px",hotkey:!1},{key:"40px",content:"40px",hotkey:!1},{key:"48px",content:"48px",hotkey:!1}].map((function(e){return e.key===n?(0,d.Z)((0,d.Z)({},e),{},{isDefault:!0}):e})),onDisabled:function(){var t=e.command.queryState("heading")||"p";return/^h\d$/.test(t)||!e.command.queryEnabled("fontsize")}},{type:"dropdown",name:"fontfamily",className:"toolbar-dropdown-fontfamily",title:t["fontfamily"]["title"],items:lt(st,(0,d.Z)((0,d.Z)({},t["fontfamily"]["items"]),{},{notInstalled:t["fontfamily"]["notInstalled"]})),onActive:function(t){var n,r=e.command.queryState("fontfamily");if(!r||!Array.isArray(r)||0===r.length)return"";var i=r[0].split(",").map((function(e){return e.replace(/"/g,"").trim().toLowerCase()}));return(null===(n=t.find((function(e){return i.indexOf(e["faimlyName"].trim().toLowerCase())>-1})))||void 0===n?void 0:n.key)||""}},{type:"button",name:"bold",icon:"bold",title:t["bold"]["title"],onDisabled:function(){var t=e.command.queryState("heading")||"p";return/^h\d$/.test(t)||!e.command.queryEnabled("bold")}},{type:"button",name:"italic",icon:"italic",title:t["italic"]["title"]},{type:"button",name:"strikethrough",icon:"strikethrough",title:t["strikethrough"]["title"]},{type:"button",name:"underline",icon:"underline",title:t["underline"]["title"]},{type:"dropdown",name:"moremark",icon:"moremark",single:!1,title:t["moremark"]["title"],items:[{key:"sup",icon:"sup",content:t["moremark"]["sup"],disabled:!e.command.queryEnabled("sup"),command:{name:"sup",args:[]}},{key:"sub",icon:"sub",disabled:!e.command.queryEnabled("sub"),content:t["moremark"]["sub"],command:{name:"sub",args:[]}},{key:"code",icon:"code",disabled:!e.command.queryEnabled("code"),content:t["moremark"]["code"],command:{name:"code",args:[]}}],onDisabled:function(){var t=[];return!0===e.command.queryEnabled("sup")&&t.push("sup"),!0===e.command.queryEnabled("sub")&&t.push("sub"),!0===e.command.queryEnabled("code")&&t.push("code"),0===t.length},onActive:function(){var t=[];return!0===e.command.queryState("sup")&&t.push("sup"),!0===e.command.queryState("sub")&&t.push("sub"),!0===e.command.queryState("code")&&t.push("code"),t}},{type:"color",name:"fontcolor",defaultColor:"#262626",defaultActiveColor:"#F5222D",buttonTitle:t["fontcolor"]["title"],dropdownTitle:t["fontcolor"]["more"],content:function(e,t,n){return!0===n&&(e="#BFBFBF",t="#BFBFBF"),'<svg\n\t\t\t\t\t\twidth="16px"\n\t\t\t\t\t\theight="16px"\n\t\t\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\t\t\tstyle="margin-bottom: -2"\n\t\t\t\t\t>\n\t\t\t\t\t\t<title>color-font</title>\n\t\t\t\t\t\t<desc>Created with Sketch.</desc>\n\t\t\t\t\t\t<g\n\t\t\t\t\t\t\tid="color-font"\n\t\t\t\t\t\t\tstroke="none"\n\t\t\t\t\t\t\tstrokeWidth="1"\n\t\t\t\t\t\t\tfill="none"\n\t\t\t\t\t\t\tfill-rule="evenodd"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\tid="Rectangle-55"\n\t\t\t\t\t\t\t\tstroke='.concat(t,'\n\t\t\t\t\t\t\t\tstrokeWidth="0.5"\n\t\t\t\t\t\t\t\tfill=').concat(e,'\n\t\t\t\t\t\t\t\tx="2"\n\t\t\t\t\t\t\t\ty="12.75"\n\t\t\t\t\t\t\t\twidth="12"\n\t\t\t\t\t\t\t\theight="1.5"\n\t\t\t\t\t\t\t\trx="0.125"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td="M5.29102819,11.25 L3.96365715,11.25 C3.87952002,11.25 3.8113134,11.1817934 3.8113134,11.0976562 C3.8113134,11.08076 3.81412419,11.0639814 3.81963067,11.0480076 L7.0756112,1.60269506 C7.09679504,1.5412426 7.15463644,1.5 7.21963767,1.5 L8.81868806,1.5 C8.883726,1.5 8.94159158,1.54128846 8.96274706,1.60278951 L12.2118,11.048102 C12.239168,11.1276636 12.1968568,11.2143472 12.1172952,11.2417152 C12.1013495,11.2472004 12.0846037,11.25 12.067741,11.25 L10.6761419,11.25 C10.6099165,11.25 10.5512771,11.2072154 10.531066,11.1441494 L9.69970662,8.55 L6.27433466,8.55 L5.43599205,11.1444975 C5.41567115,11.2073865 5.35711879,11.25 5.29102819,11.25 Z M8.02635163,3.18571429 L7.96199183,3.18571429 L6.63904023,7.30714286 L9.33500105,7.30714286 L8.02635163,3.18571429 Z"\n\t\t\t\t\t\t\t\tid="A"\n\t\t\t\t\t\t\t\tfill="#595959"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</g>\n\t\t\t\t\t</svg>')}},{type:"color",name:"backcolor",defaultColor:"transparent",defaultActiveColor:"#FADB14",buttonTitle:t["backcolor"]["title"],dropdownTitle:t["backcolor"]["more"],content:function(e,t,n){return!0===n&&(e="#BFBFBF",t="#BFBFBF"),'<svg\n width="16px"\n height="16px"\n viewBox="0 0 16 16"\n style="margin-bottom: -2"\n\t\t\t\t\t>\n <g stroke="none" strokeWidth="1" fill="none" fill-rule="evenodd">\n <rect stroke="'.concat(t,'" strokeWidth="0.5" fill="').concat(e,'" x="2" y="12.75" width="12" height="1.5" rx="0.125"></rect>\n <g transform="translate(2.781250, 1.375000)" fill-rule="nonzero"><path fill="#595959" d="M2.86079849,6.64817222 L2.05713835,5.84451208 C2.00832281,5.79569655 2.00832281,5.71655092 2.05713835,5.66773539 L3.61029491,4.11457882 L3.11963835,3.62392225 C3.07082281,3.57510672 3.07082281,3.49596109 3.11963835,3.44714556 L6.47839556,0.0883883476 C6.52721109,0.0395728112 6.60635672,0.0395728112 6.65517225,0.0883883476 L11.5165314,4.94974747 C11.5653469,4.998563 11.5653469,5.07770863 11.5165314,5.12652416 L8.15777416,8.48528137 C8.10895863,8.53409691 8.029813,8.53409691 7.98099747,8.48528137 L7.38889678,7.89318068 L5.83574021,9.44633725 C5.78692467,9.49515278 5.70777905,9.49515278 5.65896351,9.44633725 L5.0267407,8.81411444 L4.48856529,9.35326519 C4.39477378,9.44720966 4.26747335,9.5 4.13472392,9.5 L0.608857988,9.5 C0.470786801,9.5 0.358857988,9.38807119 0.358857988,9.25 C0.358857988,9.18363253 0.385247413,9.11998865 0.432210608,9.07309408 L2.86079849,6.64817222 Z M6.56678391,1.67937861 L4.71062861,3.53553391 L8.06938582,6.89429112 L9.92554112,5.03813582 L6.56678391,1.67937861 Z M3.64812861,5.75612373 L5.74735186,7.85534699 L6.54284699,7.05985186 L4.44362373,4.96062861 L3.64812861,5.75612373 Z" id="Combined-Shape"></path></g></g>\n\t\t\t\t\t</svg>')}},{type:"dropdown",name:"alignment",title:t["alignment"]["title"],items:[{key:"left",icon:"align-left",content:t["alignment"]["left"]},{key:"center",icon:"align-center",content:t["alignment"]["center"]},{key:"right",icon:"align-right",content:t["alignment"]["right"]},{key:"justify",icon:"align-justify",content:t["alignment"]["justify"]}]},{type:"button",name:"unorderedlist",icon:"unordered-list",title:t["unorderedlist"]["title"]},{type:"button",name:"orderedlist",icon:"ordered-list",title:t["orderedlist"]["title"]},{type:"button",name:"tasklist",icon:"task-list",title:t["tasklist"]["title"]},{type:"dropdown",name:"indent",icon:"indent",hasDot:!1,title:t["indent"]["title"],items:[{key:"in",icon:"indent",content:t["indent"]["in"]},{key:"out",icon:"outdent",content:t["indent"]["out"]}]},{type:"dropdown",name:"line-height",content:function(){return'<span class="data-icon data-icon-line-height"></span>'},title:t["line-height"]["title"],items:[{key:"default",content:t["line-height"]["default"]},{key:"1",content:"1"},{key:"1.15",content:"1.15"},{key:"1.5",content:"1.5"},{key:"2",content:"2"},{key:"2.5",content:"2.5"},{key:"3",content:"3"}]},{type:"button",name:"link",icon:"link",command:{name:"link",args:["_blank"]},title:t["link"]["title"],onDisabled:function(){var t=e.card,n=(0,u.iC)(e)?e.change.range.get():u.e6.from(e);if(!n)return!e.command.queryEnabled("link");var r=t.find(n.startNode);return!!r&&!r.isCursor(n.startNode)||n.containsCard()||!e.command.queryEnabled("link")}},{type:"button",name:"quote",icon:"quote",title:t["quote"]["title"]},{type:"button",name:"hr",icon:"hr",title:t["hr"]["title"]}]},ut=(0,r.aZ)({name:"am-toolbar",components:{AmGroup:je},props:z,setup(e){let t=(0,i.iH)([]);const n=()=>{e.engine.isFocus()&&!e.engine.readonly&&(s.value&&clearTimeout(s.value),s.value=setTimeout((()=>{const e=a.value,t=e.getBoundingClientRect(),n=(0,u.ZQ)(getComputedStyle(e).borderTopWidth),r=(0,u.ZQ)(getComputedStyle(e).borderBottomWidth),i=t.height||0;c.top=Math.max(document.body.scrollTop,document.documentElement.scrollTop)+(window.visualViewport.height||0)-i+n+r}),10))},o=()=>{u.tq&&n();const r=[],i=At(e.engine);e.items.forEach((t=>{const n={items:[]};Array.isArray(t)||(n.icon=t.icon,n.content=t.content,t=t.items),t.forEach((t=>{let r;if("string"===typeof t){const e=i.find((e=>"collapse"===t?e.type===t:"collapse"!==e.type&&e.name===t));e&&(r=e)}else{const e=i.find((e=>"collapse"===t.type?e.type===t.type:"collapse"!==e.type&&e.name===t.name));if("collapse"===t.type){const n={...l()(A()({...e},"groups"),A()({...t},"groups")),groups:[]};t.groups.forEach((t=>{const r=[];t.items.forEach((t=>{let n;e.groups.some((e=>e.items.some((e=>{const r=e.name===("string"===typeof t?t:t.name);return r&&(n={...e,..."string"===typeof t?{}:t}),r})))),n?r.push(n):"object"===typeof t&&r.push(t)})),r.length>0&&n.groups.push({...A()(t,"itmes"),items:r})})),r=n.groups.length>0?n:void 0}else"dropdown"===t.type?(r=e?l()(e,A()({...t},"type","items")):{...t},r.items=t.items):r=e?l()(e,A()({...t},"type")):{...t}}r&&("button"===r.type?r.onActive?r.active=r.onActive():e.engine.command.queryEnabled(r.name)&&(r.active=e.engine.command.queryState(r.name)):"dropdown"===r.type&&(r.onActive?r.values=r.onActive(r.items):r.values=e.engine.command.queryState(r.name)),"collapse"!==r.type?r.disabled=r.onDisabled?r.onDisabled():!e.engine.command.queryEnabled(r.name):(r.groups.forEach((t=>t.items.forEach((t=>{t.disabled=t.onDisabled?t.onDisabled():!e.engine.command.queryEnabled(t.name)})))),r.disabled=!r.groups.some((e=>e.items.some((e=>!e.disabled))))),n.items.push(r))})),n.items.length>0&&r.push(n)})),t.value=r},a=(0,i.iH)(null),s=(0,i.iH)(null),c=(0,i.qj)({top:0});let d;const h=()=>{c.top=-120,clearTimeout(d),d=setTimeout((()=>{n()}),200)},p=()=>{e.engine.readonly?h():n()};let f;const g=()=>{clearTimeout(f),f=setTimeout((()=>{o()}),100)};return(0,r.bv)((()=>{e.engine.language.add(et),e.engine.on("select",g),e.engine.on("change",g),e.engine.on("blur",g),e.engine.on("focus",g),e.engine.on("historyChange",g),u.tq?(e.engine.on("readonly",p),e.engine.on("blur",h),e.engine.isFocus()||h(),document.addEventListener("scroll",n),visualViewport.addEventListener("resize",n),visualViewport.addEventListener("scroll",n)):e.engine.on("readonly",g),g()})),(0,r.Ah)((()=>{e.engine.off("select",g),e.engine.off("change",g),e.engine.off("readonly",g),e.engine.off("blur",g),e.engine.off("focus",g),e.engine.off("historyChange",g),u.tq?(e.engine.off("readonly",p),e.engine.off("blur",h),document.removeEventListener("scroll",n),visualViewport.removeEventListener("resize",n),visualViewport.removeEventListener("scroll",n)):e.engine.off("readonly",g)})),{toolbarRef:a,mobileView:c,isMobile:u.tq,groups:t}},methods:{preventDefault(e){e.preventDefault()},triggerMouseDown(){},triggerMouseOver(e){this.preventDefault(e)},triggerMouseMove(e){this.preventDefault(e)},triggerContextMenu(e){this.preventDefault(e)}}});const dt={class:"editor-toolbar-content"};function ht(e,t,n,i,a,s){const l=(0,r.up)("am-group");return(0,r.wg)(),(0,r.iD)("div",{ref:"toolbarRef",class:(0,o.C_)(["editor-toolbar",e.className,{"editor-toolbar-mobile":e.isMobile&&!e.popup,"editor-toolbar-popup":e.popup}]),style:(0,o.j5)(e.isMobile?{top:`${e.mobileView.top}px`}:{}),"data-element":"ui",onMousedown:t[0]||(t[0]=(...t)=>e.triggerMouseDown&&e.triggerMouseDown(...t)),onMouseover:t[1]||(t[1]=(...t)=>e.triggerMouseOver&&e.triggerMouseOver(...t)),onMousemove:t[2]||(t[2]=(...t)=>e.triggerMouseMove&&e.triggerMouseMove(...t)),onContextmenu:t[3]||(t[3]=(...t)=>e.triggerContextMenu&&e.triggerContextMenu(...t))},[(0,r._)("div",dt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.groups,((t,n)=>((0,r.wg)(),(0,r.j4)(l,(0,r.dG)({key:n,engine:e.engine,popup:e.popup},t),null,16,["engine","popup"])))),128))])],38)}var pt="\n.ant-tooltip .toolbar-tooltip-title {\n font-size: 12px;\n text-align: center;\n}\n.ant-tooltip .toolbar-tooltip-hotkey {\n font-size: 12px;\n color: rgba(255, 255, 255, 0.85);\n text-align: center;\n}\n.editor-toolbar {\n position: relative;\n width: 100%;\n padding:0;\n z-index: 200;\n border-top:1px solid rgba(0,0,0,.05);\n border-bottom: 1px solid rgba(0,0,0,.05);\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.editor-toolbar .editor-toolbar-content {\n position: relative;\n flex-direction: row;\n background: transparent;\n text-align: center;\n width: 100%;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n}\n.editor-toolbar.editor-toolbar-mobile,.editor-toolbar.editor-toolbar-popover {\n position: absolute;\n left: 0;\n box-shadow: none;\n}\n.editor-toolbar.editor-toolbar-popup {\n position: initial;\n box-shadow: none;\n top: 0;\n left: 0;\n border: 0 none;\n}\n.editor-toolbar-mobile .editor-toolbar-content {\n text-align: left;\n padding: 0 12px;\n}\n.editor-toolbar-mobile .editor-toolbar-group,.editor-toolbar-popup .editor-toolbar-group {\n border: 0 none;\n padding: 0;\n}\n.editor-toolbar-popup .editor-toolbar-content {\n text-align: center;\n padding: 0;\n}\n.editor-toolbar-popover .editor-toolbar {\n position: relative;\n box-shadow: none;\n border: 0 none;\n left: 0;\n top: 0;\n display: flex;\n}\n.editor-toolbar-popover {\n border-radius: 3px;\n background: transparent;\n}\n.editor-toolbar-popover .ant-popover-inner {\n border-radius: 3px;\n}\n.editor-toolbar-popover .ant-popover-inner-content {\n padding: 2px;\n}\n.am-engine-mobile {\n margin-bottom: 40px;\n}\n";G(pt),ut.render=ht,ut.__file="src/components/toolbar.vue";var ft=(0,_.Z)("position"),gt=function(){function e(t,n){var r=this;(0,v.Z)(this,e),this.engine=void 0,this.root=void 0,this.otpions=void 0,this.vm=void 0,Object.defineProperty(this,ft,{writable:!0,value:void 0}),this.SCOPE_NAME="data-toolbar-component",this.handlePreventDefault=function(e){var t;if(0!==(null===(t=r.root)||void 0===t?void 0:t.closest("body").length))return e.preventDefault(),!1},this.otpions=n,this.engine=t,(0,B.Z)(this,ft)[ft]=new u.Ly(t)}return(0,m.Z)(e,[{key:"select",value:function(e){var t,n,r;null===(t=this.root)||void 0===t||t.find(".toolbar-collapse-item-active").removeClass("toolbar-collapse-item-active"),null===(n=this.root)||void 0===n||null===(r=n.find(".toolbar-collapse-item").eq(e))||void 0===r||r.addClass("toolbar-collapse-item-active")}},{key:"scroll",value:function(e){if(this.root){var t=this.root.find(".toolbar-collapse-item").toArray(),n=this.root.find(".toolbar-collapse-item-active"),r=t.findIndex((function(e){return e.equal(n)})),i="up"===e?r-1:r+1;i<0&&(i=t.length-1),i>=t.length&&(i=0),n=t[i],this.select(i);var o=0;this.root.find(".toolbar-collapse-group-title,.toolbar-collapse-item").each((function(e){if(n.equal(e))return!1;o+=e.clientHeight}));var a=this.root.get();a.scrollTop=o-a.clientHeight/2}}},{key:"unbindEvents",value:function(){(0,E.deleteScope)(this.SCOPE_NAME),(0,E.unbind)("enter",this.SCOPE_NAME),(0,E.unbind)("up",this.SCOPE_NAME),(0,E.unbind)("down",this.SCOPE_NAME),(0,E.unbind)("esc",this.SCOPE_NAME),this.engine.off("keydown:enter",this.handlePreventDefault)}},{key:"bindEvents",value:function(){var e=this;this.unbindEvents(),(0,E.setScope)(this.SCOPE_NAME),S()("enter",this.SCOPE_NAME,(function(t){var n,r,i;if(0!==(null===(n=e.root)||void 0===n?void 0:n.closest("body").length)){t.preventDefault();var o=null===(r=e.root)||void 0===r?void 0:r.find(".toolbar-collapse-item-active");null===o||void 0===o||null===(i=o.get())||void 0===i||i.click()}})),S()("up",this.SCOPE_NAME,(function(t){var n;0!==(null===(n=e.root)||void 0===n?void 0:n.closest("body").length)&&(t.preventDefault(),e.scroll("up"))})),S()("down",this.SCOPE_NAME,(function(t){var n;0!==(null===(n=e.root)||void 0===n?void 0:n.closest("body").length)&&(t.preventDefault(),e.scroll("down"))})),S()("esc",this.SCOPE_NAME,(function(t){t.preventDefault(),e.unbindEvents();var n=e.otpions.onCancel;n&&n()})),this.engine.on("keydown:enter",this.handlePreventDefault)}},{key:"remove",value:function(){var e;this.root&&0!==this.root.length&&(null===(e=(0,B.Z)(this,ft)[ft])||void 0===e||e.destroy(),this.vm&&this.vm.unmount(),this.root.remove(),this.root=void 0)}},{key:"render",value:function(e,t,n){var r;this.unbindEvents(),this.remove(),this.root=(0,u.$)('<div class="data-toolbar-component-list" />'),e.append(this.root);var i=this.root.get(),o=this.otpions.onSelect;n.length>0?(this.vm=(0,a.ri)(Ze,{engine:this.engine,groups:n,onSelect:o}),this.vm.mount(i)):this.root.append('<div class="data-toolbar-component-list-empty">'.concat(this.engine.language.get("toolbar","searchEmtpy","title"),"</div>")),this.select(0),this.bindEvents(),null===(r=(0,B.Z)(this,ft)[ft])||void 0===r||r.bind(this.root,t)}}]),e}(),mt=(0,_.Z)("editor"),vt=(0,_.Z)("root"),bt=(0,_.Z)("point"),yt=(0,_.Z)("align"),wt=(0,_.Z)("options"),xt=(0,_.Z)("vm"),kt=function(){function e(t){var n,r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,v.Z)(this,e),Object.defineProperty(this,mt,{writable:!0,value:void 0}),Object.defineProperty(this,vt,{writable:!0,value:void 0}),Object.defineProperty(this,bt,{writable:!0,value:{left:0,top:-9999}}),Object.defineProperty(this,yt,{writable:!0,value:"bottom"}),Object.defineProperty(this,wt,{writable:!0,value:{}}),Object.defineProperty(this,xt,{writable:!0,value:void 0}),this.onSelect=function(){var e,t=null===(e=u.e6.from((0,B.Z)(i,mt)[mt]))||void 0===e?void 0:e.cloneRange().shrinkToTextNode(),n=window.getSelection();if(t&&n&&n.focusNode&&!t.collapsed&&!(0,B.Z)(i,mt)[mt].card.getSingleSelectedCard(t)&&(t.commonAncestorNode.inEditor((0,B.Z)(i,mt)[mt].container)||t.commonAncestorNode.isRoot((0,B.Z)(i,mt)[mt].container))){var r=t.startNode.next();if((null===r||void 0===r?void 0:r.isElement())&&1===Math.abs(t.endOffset-t.startOffset)){var o=(0,B.Z)(i,mt)[mt].card.closest(r);if(o)return void i.hide()}var a=t.startNode.prev();if((null===a||void 0===a?void 0:a.isElement())&&1===Math.abs(t.startOffset-t.endOffset)){var s=(0,B.Z)(i,mt)[mt].card.closest(a);if(s)return void i.hide()}var l=t.getSubRanges();if(0===l.length||(0,B.Z)(i,mt)[mt].card.active&&!(0,B.Z)(i,mt)[mt].card.active.isEditable)i.hide();else{var c=l[0],A=l[l.length-1],d=c.cloneRange().collapse(!0).getBoundingClientRect(),h=A.cloneRange().collapse(!1).getBoundingClientRect(),p=void 0;i.showContent((function(){var e,t,r;if(p=null===(e=(0,B.Z)(i,vt)[vt].get())||void 0===e?void 0:e.getBoundingClientRect(),p){(0,B.Z)(i,yt)[yt]=A.startNode.equal(n.focusNode)&&(!c.startNode.equal(n.focusNode)||n.focusOffset>n.anchorOffset)?"bottom":"top";var o=12,a="bottom"===(0,B.Z)(i,yt)[yt]?h:d;"top"===(0,B.Z)(i,yt)[yt]&&a.top-p.height-o<window.innerHeight-((null===(t=(0,B.Z)(i,mt)[mt].scrollNode)||void 0===t?void 0:t.height())||0)?(0,B.Z)(i,yt)[yt]="bottom":"bottom"===(0,B.Z)(i,yt)[yt]&&a.bottom+p.height+o>window.innerHeight&&((0,B.Z)(i,yt)[yt]="top"),a="bottom"===(0,B.Z)(i,yt)[yt]?h:d;var s=null===(r=(0,B.Z)(i,mt)[mt].scrollNode)||void 0===r?void 0:r.get(),l=null===s||void 0===s?void 0:s.getBoundingClientRect(),u="top"===(0,B.Z)(i,yt)[yt]?a.top-p.height-o-((null===l||void 0===l?void 0:l.top)||0)+((null===s||void 0===s?void 0:s.scrollTop)||0):a.bottom+o-((null===l||void 0===l?void 0:l.top)||0)+((null===s||void 0===s?void 0:s.scrollTop)||0),f=a.left-((null===l||void 0===l?void 0:l.left)||0)+((null===s||void 0===s?void 0:s.scrollLeft)||0)+a.width-p.width/2;f<0&&(f=16),(0,B.Z)(i,bt)[bt]={left:f,top:u},(0,B.Z)(i,vt)[vt].css({left:"".concat((0,B.Z)(i,bt)[bt].left,"px"),top:"".concat((0,B.Z)(i,bt)[bt].top,"px")})}else i.hide()}))}}else i.hide()},this.hide=function(e){if(null===e||void 0===e?void 0:e.target){var t=(0,u.$)(e.target);if(t.closest(".data-toolbar-popup-wrapper").length>0||t.closest(u.m6).length>0)return}(0,B.Z)(i,vt)[vt].css({left:"0px",top:"-9999px"})},(0,B.Z)(this,wt)[wt]=o,(0,B.Z)(this,mt)[mt]=t,(0,B.Z)(this,vt)[vt]=(0,u.$)('<div class="data-toolbar-popup-wrapper"></div>'),((null===(n=(0,B.Z)(this,mt)[mt].scrollNode)||void 0===n?void 0:n.get())||document.body).appendChild((0,B.Z)(this,vt)[vt][0]),(0,u.iC)(t)?(0,B.Z)(this,mt)[mt].on("selectEnd",this.onSelect):document.addEventListener("selectionchange",this.onSelect),u.tq||window.addEventListener("scroll",this.onSelect,{passive:!0}),window.addEventListener("resize",this.onSelect),null===(r=(0,B.Z)(this,mt)[mt].scrollNode)||void 0===r||r.on("scroll",this.onSelect,{passive:!0}),document.addEventListener("mousedown",this.hide)}return(0,m.Z)(e,[{key:"showContent",value:function(e){var t,n=(0,B.Z)(this,mt)[mt].trigger("toolbar-render",(0,B.Z)(this,wt)[wt]);if(!n&&0===((0,B.Z)(this,wt)[wt].items||[]).length)return null===(t=(0,B.Z)(this,xt)[xt])||void 0===t||t.unmount(),(0,B.Z)(this,xt)[xt]=void 0,void this.hide();var r,i=ut;"object"===(0,f.Z)(n)&&(null===(r=(0,B.Z)(this,xt)[xt])||void 0===r||r.unmount(),(0,B.Z)(this,xt)[xt]=void 0,i=n);(0,B.Z)(this,xt)[xt]||((0,B.Z)(this,xt)[xt]=(0,a.ri)(i,(0,d.Z)((0,d.Z)({},(0,B.Z)(this,wt)[wt]),{},{engine:(0,B.Z)(this,mt)[mt],popup:!0})),(0,B.Z)(this,xt)[xt].mount((0,B.Z)(this,vt)[vt].get())),setTimeout((function(){e&&e()}),200)}},{key:"destroy",value:function(){var e;(0,B.Z)(this,vt)[vt].remove(),(0,u.iC)((0,B.Z)(this,mt)[mt])?(0,B.Z)(this,mt)[mt].off("select",this.onSelect):document.removeEventListener("selectionchange",this.onSelect),u.tq||window.removeEventListener("scroll",this.onSelect),window.removeEventListener("resize",this.onSelect),null===(e=(0,B.Z)(this,mt)[mt].scrollNode)||void 0===e||e.off("scroll",this.onSelect),document.removeEventListener("mousedown",this.hide),(0,B.Z)(this,xt)[xt]&&((0,B.Z)(this,xt)[xt].unmount(),(0,B.Z)(this,xt)[xt]=void 0)}}]),e}(),Ct=".data-toolbar-component-list {\n position: absolute;\n min-height: 0px;\n top: 10px;\n left: 0;\n}\n\n.data-toolbar-component-list .toolbar-dropdown-list {\n top:0px;\n position: relative;\n}\n\n.data-toolbar-component-placeholder {\n color: rgba(0,0,0,0.25);\n pointer-events: none;\n width: 76px;\n}\n\n.data-toolbar-component-list-empty {\n position: relative;\n font-size: 14px;\n background: #ffffff;\n border: 1px solid #e8e8e8;\n border-radius: 3px 3px;\n box-shadow: 0 2px 10px rgb(0 0 0 / 12%);\n padding: 5px 16px;\n line-height: 32px;\n min-width: 200px;\n height: auto;\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n z-index: 999;\n max-height: calc(80vh);\n overflow: auto;\n}\n/** ------------------- popup ---------------------- **/\n.data-toolbar-popup-wrapper {\n position: absolute;\n z-index: 9999;\n padding: 4px;\n background-color: #fff;\n border-radius: 4px;\n border: 1px solid #dee0e3;\n box-shadow: 0 4px 8px 0 rgba(31, 35, 41, 0.1);\n}\n\n.data-toolbar-popup-wrapper .editor-toolbar-popover {\n width: -webkit-max-content;\n width: -moz-max-content;\n width: max-content;\n}\n\n.data-toolbar-popup-wrapper .editor-toolbar-popover .ant-popover-inner-content {\n padding: 4px;\n background-color: #fff;\n border-radius: 4px;\n border: 1px solid #dee0e3;\n}\n\n.data-toolbar-popup-wrapper .editor-toolbar-popover .ant-popover-arrow {\n display: none;\n}\n";G(Ct);var Bt=(0,_.Z)("collapseData"),_t=(0,_.Z)("data"),Et=function(e){(0,b.Z)(n,e);var t=(0,y.Z)(n);function n(){var e;(0,v.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.keyword=void 0,e.placeholder=void 0,e.component=void 0,Object.defineProperty((0,x.Z)(e),Bt,{writable:!0,value:void 0}),Object.defineProperty((0,x.Z)(e),_t,{writable:!0,value:void 0}),e}return(0,m.Z)(n,[{key:"init",value:function(){var e=this,t=this.editor;(0,u.iC)(t)&&!u.sk&&(this.component=new gt(t,{onCancel:function(){e.changeToText()},onSelect:function(){e.remove()}}))}},{key:"setData",value:function(e){(0,B.Z)(this,_t)[_t]=e}},{key:"getData",value:function(){var e=this.editor;if(!(0,u.iC)(e))return[];var t=[],n=At(e),r=n.find((function(e){var t=e.type;return"collapse"===t})),i=[];r&&(i=r.groups);var o=[];i.forEach((function(e){o.push.apply(o,(0,w.Z)(e.items))}));var a=this.getValue();return((0,B.Z)(this,_t)[_t]||(a?a.data:[])||[]).forEach((function(n){var r=n.title,i=[];n.items.forEach((function(t){var n=t;"string"!==typeof t&&(n=t.name);var r=o.find((function(e){return e.name===n}));r?i.push((0,d.Z)((0,d.Z)((0,d.Z)({},r),"string"!==typeof t?t:{}),{},{disabled:r.onDisabled?r.onDisabled():!e.command.queryEnabled(n)})):"object"===(0,f.Z)(t)&&i.push(t)})),t.push({title:r,items:i})})),t}},{key:"search",value:function(e){var t=[];"string"===typeof e&&(e=e.toLowerCase()),(0,B.Z)(this,Bt)[Bt]||((0,B.Z)(this,Bt)[Bt]=[]),(0,B.Z)(this,Bt)[Bt].forEach((function(n){n.items.forEach((function(n){n.search&&n.search.toLowerCase().indexOf(e)>=0&&(t.find((function(e){var t=e.name;return t===n.name}))||t.push((0,d.Z)({},n)))}))}));var n=[];return t.length>0&&n.push({title:"",items:t}),n}},{key:"remove",value:function(){var e,t=this.editor;(0,u.iC)(t)&&(null===(e=this.component)||void 0===e||e.remove(),t.card.remove(this.id))}},{key:"changeToText",value:function(){var e,t,n=this.editor;if(this.root.inEditor()&&(0,u.iC)(n)){var r=(null===(e=this.keyword)||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText)||"";this.remove(),n.node.insertText(r)}}},{key:"destroy",value:function(){var e=this.component;null===e||void 0===e||e.unbindEvents(),null===e||void 0===e||e.remove()}},{key:"activate",value:function(e){var t;((0,k.Z)((0,C.Z)(n.prototype),"activate",this).call(this,e),e)||(null===(t=this.component)||void 0===t||t.unbindEvents(),this.changeToText())}},{key:"handleInput",value:function(){var e,t,n=this.editor;if((0,u.iC)(n)){var r=n.change,i=n.card;if(!r.isComposing()){var o=(null===(e=this.keyword)||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText.replace(/[\r\n]/g,""))||"",a=this.component;if(""===o)return null===a||void 0===a||a.remove(),void i.remove(this.id);var s=o.substr(1);if(""!==s){var l=this.search(s);null===a||void 0===a||a.render(n.root,this.root,l)}else null===a||void 0===a||a.render(n.root,this.root,(0,B.Z)(this,Bt)[Bt]||[])}}}},{key:"resetPlaceHolder",value:function(){var e,t,n,r;"/"===(null===(e=this.keyword)||void 0===e||null===(t=e.get())||void 0===t?void 0:t.innerText)?null===(n=this.placeholder)||void 0===n||n.css("visibility","visible"):null===(r=this.placeholder)||void 0===r||r.css("visibility","hidden")}},{key:"render",value:function(e){var t,n,r,i=this;this.setData(e);var o=this.editor;if((0,u.iC)(o)&&!u.sk){var a=o.language.get("toolbar","component");this.root.attributes("data-transient","true"),this.root.attributes(u.xT,"false");var s=(0,u.$)('<span class="data-toolbar-component-keyword" '.concat(u.xT,'="true">/</span><span class="data-toolbar-component-placeholder">').concat(a["placeholder"],"</span>")),l=this.getCenter();l.empty().append(s),this.keyword=l.find(".data-toolbar-component-keyword"),this.placeholder=l.find(".data-toolbar-component-placeholder"),null===(t=this.keyword)||void 0===t||t.on("keydown",(function(e){(0,u.P6)("enter",e)&&e.preventDefault()}));var c=Date.now();null===(n=this.keyword)||void 0===n||n.on("input",(function(){if(i.resetPlaceHolder(),Date.now()-c<200){var e,t,n=null===(e=i.keyword)||void 0===e?void 0:e.first();if(n&&n.isText()&&"/、"===n[0].nodeValue||"//"===(null===n||void 0===n||null===(t=n.get())||void 0===t?void 0:t.nodeValue)){var r,o=null===(r=n.get())||void 0===r?void 0:r.splitText(1);null===o||void 0===o||o.remove()}}setTimeout((function(){i.handleInput()}),10)})),(0,B.Z)(this,Bt)[Bt]||((0,B.Z)(this,Bt)[Bt]=this.getData()),null===(r=this.component)||void 0===r||r.render(o.root,this.root,(0,B.Z)(this,Bt)[Bt])}}}],[{key:"cardName",get:function(){return"toolbar"}},{key:"cardType",get:function(){return u.eT.INLINE}},{key:"singleSelectable",get:function(){return!1}},{key:"autoSelected",get:function(){return!1}}]),n}(u.Zb),St=function(e){return[{title:e.language.get("toolbar","commonlyUsed","title"),items:["image-uploader","codeblock","table","file-uploader","video-uploader","math","status"]}]},Ft=function(e){(0,b.Z)(n,e);var t=(0,y.Z)(n);function n(){var e;(0,v.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),e.popup=void 0,e.paserValue=function(e){return!e.isCard()||e.attributes("name")!==Et.cardName},e.paserNode=function(e){if(e[u.Jr]===Et.cardName)return!1},e.onSlash=function(t){var n=e.editor;if((0,u.iC)(n)){var r=n.change,i=r.range.get(),o=n.block.closest(i.startNode),a=o.text().trim();if("/"===a&&u.G6&&o.empty(),""===a||"/"===a&&u.G6||t.ctrlKey||t.metaKey){if(!1===e.options.config)return;if(i=r.range.get(),i.collapsed){t.preventDefault();var s=e.options.config||St(n),l=n.card.insert(Et.cardName,{},s);l.setData(s),n.card.activate(l.root),i=r.range.get();var c=l.find(".data-toolbar-component-keyword");i.select(c,!0),i.collapse(!1),r.range.select(i)}}}},e}return(0,m.Z)(n,[{key:"init",value:function(){var e=this.editor;(0,u.iC)(e)&&(e.on("keydown:slash",this.onSlash),e.on("parse:value",this.paserValue),e.on("parse:node",this.paserNode)),e.language.add(et),this.options.popup&&(this.popup=new kt(e,{items:this.options.popup.items}))}},{key:"execute",value:function(){throw new Error("Method not implemented.")}},{key:"destroy",value:function(){var e;null===(e=this.popup)||void 0===e||e.destroy();var t=this.editor;t.off("keydown:slash",this.onSlash),t.off("parse:value",this.paserValue),t.off("parse:node",this.paserNode)}}],[{key:"pluginName",get:function(){return"toolbar"}}]),n}(u.Sy);ut.install=function(e){e.component(ut.name,ut)};var Tt=ut},58388:function(e,t,n){"use strict";var r=n(44870),i=n(73396),o=function(){var e=(0,r.iH)(new Map),t=function(t){return function(n){e.value.set(t,n)}};return(0,i.Xn)((function(){e.value=new Map})),[t,e]};t.Z=o},91568:function(e,t,n){"use strict";var r=n(18974);t.Z=r.Z},25431:function(e,t,n){"use strict";var r=n(95082),i=n(73396),o=n(44870),a=n(30670),s=n(20976),l=n(87495),c=n(73770),A=n(30252),u=n(31189),d=n(34746),h=n(18513),p=n(87129),f=n(89058),g=function(){return(0,r.Z)((0,r.Z)({},(0,s.Z)()),{},{content:l.Z.any,title:l.Z.any})},m=(0,i.aZ)({compatConfig:{MODE:3},name:"APopover",props:(0,c.Z)(g(),(0,r.Z)((0,r.Z)({},(0,f.An)()),{},{trigger:"hover",transitionName:"zoom-big",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup:function(e,t){var n=t.expose,s=t.slots,l=(0,o.iH)();n({getPopupDomNode:function(){var e,t;return null===(e=l.value)||void 0===e||null===(t=e.getPopupDomNode)||void 0===t?void 0:t.call(e)}});var c=(0,d.Z)("popover",e),u=c.prefixCls,f=c.configProvider,g=(0,i.Fl)((function(){return f.getPrefixCls()})),m=function(){var t,n,r=e.title,o=void 0===r?(0,A.OU)(null===(t=s.title)||void 0===t?void 0:t.call(s)):r,a=e.content,l=void 0===a?(0,A.OU)(null===(n=s.content)||void 0===n?void 0:n.call(s)):a,c=!!(Array.isArray(o)?o.length:o),d=!!(Array.isArray(l)?l.length:o);if(c||d)return(0,i.Wm)(i.HY,null,[c&&(0,i.Wm)("div",{class:"".concat(u.value,"-title")},[o]),(0,i.Wm)("div",{class:"".concat(u.value,"-inner-content")},[l])])};return function(){return(0,i.Wm)(a.Z,(0,r.Z)((0,r.Z)({},(0,h.Z)(e,["title","content"])),{},{prefixCls:u.value,ref:l,transitionName:(0,p.mL)(g.value,"zoom-big",e.transitionName)}),{title:m,default:s.default})}}});t.Z=(0,u.nz)(m)},82450:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(95082),i=n(82482),o=n(62078),a=n(73396),s=n(37807),l=n(87495),c=n(30252),A=n(73770),u=n(44339),d=["class","style"],h=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:l.Z.any,delay:Number,indicator:l.Z.any}},p=null;function f(e,t){return!!e&&!!t&&!isNaN(Number(t))}function g(e){var t=e.indicator;p="function"===typeof t?t:function(){return(0,a.Wm)(t,null,null)}}var m=(0,a.aZ)({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:(0,A.Z)(h(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:(0,a.f3)("configProvider",u.iv)}},data:function(){var e=this.spinning,t=this.delay,n=f(e,t);return{sSpinning:e&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;(0,a.Y3)((function(){e.debouncifyUpdateSpinning(),e.updateSpinning()}))},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var t=e||this.$props,n=t.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=(0,s.Z)(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,t=this.sSpinning;t!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var t="".concat(e,"-dot"),n=(0,c.Xr)(this,"indicator");return null===n?null:(Array.isArray(n)&&(n=1===n.length?n[0]:n),(0,a.lA)(n)?(0,a.Ho)(n,{class:t}):p&&(0,a.lA)(p())?(0,a.Ho)(p(),{class:t}):(0,a.Wm)("span",{class:"".concat(t," ").concat(e,"-dot-spin")},[(0,a.Wm)("i",{class:"".concat(e,"-dot-item")},null),(0,a.Wm)("i",{class:"".concat(e,"-dot-item")},null),(0,a.Wm)("i",{class:"".concat(e,"-dot-item")},null),(0,a.Wm)("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,t,n,s=this.$props,l=s.size,A=s.prefixCls,u=s.tip,h=void 0===u?null===(e=(t=this.$slots).tip)||void 0===e?void 0:e.call(t):u,p=s.wrapperClassName,f=this.$attrs,g=f.class,m=f.style,v=(0,o.Z)(f,d),b=this.configProvider,y=b.getPrefixCls,w=b.direction,x=y("spin",A),k=this.sSpinning,C=(n={},(0,i.Z)(n,x,!0),(0,i.Z)(n,"".concat(x,"-sm"),"small"===l),(0,i.Z)(n,"".concat(x,"-lg"),"large"===l),(0,i.Z)(n,"".concat(x,"-spinning"),k),(0,i.Z)(n,"".concat(x,"-show-text"),!!h),(0,i.Z)(n,"".concat(x,"-rtl"),"rtl"===w),(0,i.Z)(n,g,!!g),n),B=(0,a.Wm)("div",(0,r.Z)((0,r.Z)({},v),{},{style:m,class:C}),[this.renderIndicator(x),h?(0,a.Wm)("div",{class:"".concat(x,"-text")},[h]):null]),_=(0,c.z9)(this);if(_&&_.length){var E,S=(E={},(0,i.Z)(E,"".concat(x,"-container"),!0),(0,i.Z)(E,"".concat(x,"-blur"),k),E);return(0,a.Wm)("div",{class:["".concat(x,"-nested-loading"),p]},[k&&(0,a.Wm)("div",{key:"loading"},[B]),(0,a.Wm)("div",{class:S,key:"container"},[_])])}return B}});m.setDefaultIndicator=g,m.install=function(e){return e.component(m.name,m),e};var v=m},47922:function(e,t,n){"use strict";n.d(t,{Z:function(){return ke}});var r=n(82482),i=n(3336),o=n(54621),a=n(95082),s=n(73396),l=n(88478),c=(n(57658),n(44870)),A=n(11976);function u(e){var t=(0,c.iH)(),n=(0,c.iH)(!1);function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.value||(A.Z.cancel(t.value),t.value=(0,A.Z)((function(){e.apply(void 0,i)})))}return(0,s.Jd)((function(){n.value=!0,A.Z.cancel(t.value)})),r}function d(e){var t=(0,c.iH)([]),n=(0,c.iH)("function"===typeof e?e():e),r=u((function(){var e=n.value;t.value.forEach((function(t){e=t(e)})),t.value=[],n.value=e}));function i(e){t.value.push(e),r()}return[n,i]}var h=n(40032),p=n(83763),f=(0,s.aZ)({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup:function(e,t){var n=t.expose,i=t.attrs,o=(0,c.iH)();function a(t){var n;null!==(n=e.tab)&&void 0!==n&&n.disabled||e.onClick(t)}function l(t){var n;t.preventDefault(),t.stopPropagation(),e.editable.onEdit("remove",{key:null===(n=e.tab)||void 0===n?void 0:n.key,event:t})}n({domRef:o});var A=(0,s.Fl)((function(){var t;return e.editable&&!1!==e.closable&&!(null!==(t=e.tab)&&void 0!==t&&t.disabled)}));return function(){var t,n,c=e.prefixCls,u=e.id,d=e.active,f=e.tab,g=f.key,m=f.tab,v=f.disabled,b=f.closeIcon,y=e.renderWrapper,w=e.removeAriaLabel,x=e.editable,k=e.onFocus,C="".concat(c,"-tab"),B=(0,s.Wm)("div",{key:g,ref:o,class:(0,p.Z)(C,(t={},(0,r.Z)(t,"".concat(C,"-with-remove"),A.value),(0,r.Z)(t,"".concat(C,"-active"),d),(0,r.Z)(t,"".concat(C,"-disabled"),v),t)),style:i.style,onClick:a},[(0,s.Wm)("div",{role:"tab","aria-selected":d,id:u&&"".concat(u,"-tab-").concat(g),class:"".concat(C,"-btn"),"aria-controls":u&&"".concat(u,"-panel-").concat(g),"aria-disabled":v,tabindex:v?null:0,onClick:function(e){e.stopPropagation(),a(e)},onKeydown:function(e){[h.Z.SPACE,h.Z.ENTER].includes(e.which)&&(e.preventDefault(),a(e))},onFocus:k},["function"===typeof m?m():m]),A.value&&(0,s.Wm)("button",{type:"button","aria-label":w||"remove",tabindex:0,class:"".concat(C,"-remove"),onClick:function(e){e.stopPropagation(),l(e)}},[(null===b||void 0===b?void 0:b())||(null===(n=x.removeIcon)||void 0===n?void 0:n.call(x))||"×"])]);return y?y(B):B}}}),g={width:0,height:0,left:0,top:0};function m(e,t){var n=(0,c.iH)(new Map);return(0,s.m0)((function(){for(var r,i=new Map,o=e.value,s=t.value.get(null===(r=o[0])||void 0===r?void 0:r.key)||g,l=s.left+s.width,c=0;c<o.length;c+=1){var A,u=o[c].key,d=t.value.get(u);if(!d)d=t.value.get(null===(A=o[c-1])||void 0===A?void 0:A.key)||g;var h=i.get(u)||(0,a.Z)({},d);h.right=l-h.left-h.width,i.set(u,h)}n.value=new Map(i)})),n}var v=n(68261),b=n(59389),y=n(43550),w=(0,s.aZ)({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void 0}},setup:function(e,t){var n=t.expose,r=t.attrs,i=(0,c.iH)();return n({domRef:i}),function(){var t=e.prefixCls,n=e.editable,o=e.locale;return n&&!1!==n.showAdd?(0,s.Wm)("button",{ref:i,type:"button",class:"".concat(t,"-nav-add"),style:r.style,"aria-label":(null===o||void 0===o?void 0:o.addAriaLabel)||"Add tab",onClick:function(e){n.onEdit("add",{event:e})}},[n.addIcon?n.addIcon():"+"]):null}}}),x=n(87495),k=n(58358),C=n(70155),B={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:x.Z.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function}},_=(0,s.aZ)({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:B,emits:["tabClick"],slots:["moreIcon"],setup:function(e,t){var n=t.attrs,i=t.slots,a=(0,k.Z)(!1),l=(0,o.Z)(a,2),c=l[0],A=l[1],u=(0,k.Z)(null),d=(0,o.Z)(u,2),f=d[0],g=d[1],m=function(t){for(var n=e.tabs.filter((function(e){return!e.disabled})),r=n.findIndex((function(e){return e.key===f.value}))||0,i=n.length,o=0;o<i;o+=1){r=(r+t+i)%i;var a=n[r];if(!a.disabled)return void g(a.key)}},x=function(t){var n=t.which;if(c.value)switch(n){case h.Z.UP:m(-1),t.preventDefault();break;case h.Z.DOWN:m(1),t.preventDefault();break;case h.Z.ESC:A(!1);break;case h.Z.SPACE:case h.Z.ENTER:null!==f.value&&e.onTabClick(f.value,t);break}else[h.Z.DOWN,h.Z.SPACE,h.Z.ENTER].includes(n)&&(A(!0),t.preventDefault())},B=(0,s.Fl)((function(){return"".concat(e.id,"-more-popup")})),_=(0,s.Fl)((function(){return null!==f.value?"".concat(B.value,"-").concat(f.value):null})),E=function(t,n){t.preventDefault(),t.stopPropagation(),e.editable.onEdit("remove",{key:n,event:t})};return(0,s.bv)((function(){(0,s.YP)(f,(function(){var e=document.getElementById(_.value);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),{flush:"post",immediate:!0})})),(0,s.YP)(c,(function(){c.value||g(null)})),function(){var t,o=e.prefixCls,a=e.id,l=e.tabs,u=e.locale,d=e.mobile,h=e.moreIcon,g=void 0===h?(null===(t=i.moreIcon)||void 0===t?void 0:t.call(i))||(0,s.Wm)(C.Z,null,null):h,m=e.moreTransitionName,k=e.editable,S=e.tabBarGutter,F=e.rtl,T=e.onTabClick,M="".concat(o,"-dropdown"),I=null===u||void 0===u?void 0:u.dropdownAriaLabel,N=(0,r.Z)({},F?"marginRight":"marginLeft",S);l.length||(N.visibility="hidden",N.order=1);var U=(0,p.Z)((0,r.Z)({},"".concat(M,"-rtl"),F)),L=d?null:(0,s.Wm)(y.Z,{prefixCls:M,trigger:["hover"],visible:c.value,transitionName:m,onVisibleChange:A,overlayClassName:U,mouseEnterDelay:.1,mouseLeaveDelay:.1},{overlay:function(){return(0,s.Wm)(v.ZP,{onClick:function(e){var t=e.key,n=e.domEvent;T(t,n),A(!1)},id:B.value,tabindex:-1,role:"listbox","aria-activedescendant":_.value,selectedKeys:[f.value],"aria-label":void 0!==I?I:"expanded dropdown"},{default:function(){return[l.map((function(t){var n,r,i=k&&!1!==t.closable&&!t.disabled;return(0,s.Wm)(b.Z,{key:t.key,id:"".concat(B.value,"-").concat(t.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(t.key),disabled:t.disabled},{default:function(){return[(0,s.Wm)("span",null,["function"===typeof t.tab?t.tab():t.tab]),i&&(0,s.Wm)("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:"".concat(M,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),E(e,t.key)}},[(null===(n=t.closeIcon)||void 0===n?void 0:n.call(t))||(null===(r=k.removeIcon)||void 0===r?void 0:r.call(k))||"×"])]}})}))]}})},default:function(){return(0,s.Wm)("button",{type:"button",class:"".concat(o,"-nav-more"),style:N,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":B.value,id:"".concat(a,"-more"),"aria-expanded":c.value,onKeydown:x},[g])}});return(0,s.Wm)("div",{class:(0,p.Z)("".concat(o,"-nav-operations"),n.class),style:n.style},[L,(0,s.Wm)(w,{prefixCls:o,locale:u,editable:k},null)])}}}),E=Symbol("tabsContextKey"),S=function(e){(0,s.JJ)(E,e)},F=function(){return(0,s.f3)(E,{tabs:(0,c.iH)([]),prefixCls:(0,c.iH)()})},T=((0,s.aZ)({compatConfig:{MODE:3},name:"TabsContextProvider",inheritAttrs:!1,props:{tabs:{type:Object,default:void 0},prefixCls:{type:String,default:void 0}},setup:function(e,t){var n=t.slots;return S((0,c.BK)(e)),function(){var e;return null===(e=n.default)||void 0===e?void 0:e.call(n)}}}),.1),M=.01,I=20,N=Math.pow(.995,I);function U(e,t){var n=(0,k.Z)(),r=(0,o.Z)(n,2),i=r[0],a=r[1],l=(0,k.Z)(0),A=(0,o.Z)(l,2),u=A[0],d=A[1],h=(0,k.Z)(0),p=(0,o.Z)(h,2),f=p[0],g=p[1],m=(0,k.Z)(),v=(0,o.Z)(m,2),b=v[0],y=v[1],w=(0,c.iH)();function x(e){var t=e.touches[0],n=t.screenX,r=t.screenY;a({x:n,y:r}),clearInterval(w.value)}function C(e){if(i.value){e.preventDefault();var n=e.touches[0],r=n.screenX,o=n.screenY,s=r-i.value.x,l=o-i.value.y;t(s,l),a({x:r,y:o});var c=Date.now();g(c-u.value),d(c),y({x:s,y:l})}}function B(){if(i.value){var e=b.value;if(a(null),y(null),e){var n=e.x/f.value,r=e.y/f.value,o=Math.abs(n),s=Math.abs(r);if(Math.max(o,s)<T)return;var l=n,c=r;w.value=setInterval((function(){Math.abs(l)<M&&Math.abs(c)<M?clearInterval(w.value):(l*=N,c*=N,t(l*I,c*I))}),I)}}}var _=(0,c.iH)();function E(e){var n=e.deltaX,r=e.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===_.value?n:r:o>a?(i=n,_.value="x"):(i=r,_.value="y"),t(-i,-i)&&e.preventDefault()}var S=(0,c.iH)({onTouchStart:x,onTouchMove:C,onTouchEnd:B,onWheel:E});function F(e){S.value.onTouchStart(e)}function U(e){S.value.onTouchMove(e)}function L(e){S.value.onTouchEnd(e)}function Q(e){S.value.onWheel(e)}(0,s.bv)((function(){var t,n;document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",L,{passive:!1}),null===(t=e.value)||void 0===t||t.addEventListener("touchstart",F,{passive:!1}),null===(n=e.value)||void 0===n||n.addEventListener("wheel",Q,{passive:!1})})),(0,s.Jd)((function(){document.removeEventListener("touchmove",U),document.removeEventListener("touchend",L)}))}function L(e,t){var n=(0,c.iH)(e);function r(e){var r="function"===typeof e?e(n.value):e;r!==n.value&&t(r,n.value),n.value=r}return[n,r]}var Q=n(44585),D=n(88704),H=n(58388),O=n(34507),z=n(37788),Z=n(37526),R=n(39016),P=n(6049),q=n(83430);function K(e,t,n,r){if(!(0,P.Z)(e))return e;t=(0,Z.Z)(t,e);var i=-1,o=t.length,a=o-1,s=e;while(null!=s&&++i<o){var l=(0,q.Z)(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var A=s[l];c=r?r(A,l,s):void 0,void 0===c&&(c=(0,P.Z)(A)?A:(0,R.Z)(t[i+1])?[]:{})}(0,z.Z)(s,l,c),s=s[l]}return e}var W=K;function j(e,t,n){var r=-1,i=t.length,o={};while(++r<i){var a=t[r],s=(0,O.Z)(e,a);n(s,a)&&W(o,(0,Z.Z)(a,e),s)}return o}var V=j,G=n(10973);function $(e,t){return V(e,t,(function(t,n){return(0,G.Z)(e,n)}))}var Y=$,X=n(33145),J=(0,X.Z)((function(e,t){return null==e?{}:Y(e,t)})),ee=J,te={width:0,height:0,left:0,top:0,right:0},ne=function(){return{id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:{type:Object,default:void 0},editable:{type:Object},moreIcon:x.Z.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:{type:Object,default:void 0},onTabClick:{type:Function},onTabScroll:{type:Function}}},re=(0,s.aZ)({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:ne(),slots:["moreIcon","leftExtra","rightExtra","tabBarExtraContent"],emits:["tabClick","tabScroll"],setup:function(e,t){var n=t.attrs,i=t.slots,u=F(),h=u.tabs,g=u.prefixCls,v=(0,c.iH)(),b=(0,c.iH)(),y=(0,c.iH)(),x=(0,c.iH)(),C=(0,H.Z)(),B=(0,o.Z)(C,2),E=B[0],S=B[1],T=(0,s.Fl)((function(){return"top"===e.tabPosition||"bottom"===e.tabPosition})),M=L(0,(function(t,n){T.value&&e.onTabScroll&&e.onTabScroll({direction:t>n?"left":"right"})})),I=(0,o.Z)(M,2),N=I[0],O=I[1],z=L(0,(function(t,n){!T.value&&e.onTabScroll&&e.onTabScroll({direction:t>n?"top":"bottom"})})),Z=(0,o.Z)(z,2),R=Z[0],P=Z[1],q=(0,k.Z)(0),K=(0,o.Z)(q,2),W=K[0],j=K[1],V=(0,k.Z)(0),G=(0,o.Z)(V,2),$=G[0],Y=G[1],X=(0,k.Z)(null),J=(0,o.Z)(X,2),ne=J[0],re=J[1],ie=(0,k.Z)(null),oe=(0,o.Z)(ie,2),ae=oe[0],se=oe[1],le=(0,k.Z)(0),ce=(0,o.Z)(le,2),Ae=ce[0],ue=ce[1],de=(0,k.Z)(0),he=(0,o.Z)(de,2),pe=he[0],fe=he[1],ge=d(new Map),me=(0,o.Z)(ge,2),ve=me[0],be=me[1],ye=m(h,ve),we=(0,s.Fl)((function(){return"".concat(g.value,"-nav-operations-hidden")})),xe=(0,c.iH)(0),ke=(0,c.iH)(0);(0,s.m0)((function(){T.value?e.rtl?(xe.value=0,ke.value=Math.max(0,W.value-ne.value)):(xe.value=Math.min(0,ne.value-W.value),ke.value=0):(xe.value=Math.min(0,ae.value-$.value),ke.value=0)}));var Ce=function(e){return e<xe.value?xe.value:e>ke.value?ke.value:e},Be=(0,c.iH)(),_e=(0,k.Z)(),Ee=(0,o.Z)(_e,2),Se=Ee[0],Fe=Ee[1],Te=function(){Fe(Date.now())},Me=function(){clearTimeout(Be.value)},Ie=function(e,t){e((function(e){var n=Ce(e+t);return n}))};U(v,(function(e,t){if(T.value){if(ne.value>=W.value)return!1;Ie(O,e)}else{if(ae.value>=$.value)return!1;Ie(P,t)}return Me(),Te(),!0})),(0,s.YP)(Se,(function(){Me(),Se.value&&(Be.value=setTimeout((function(){Fe(0)}),100))}));var Ne=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.activeKey,n=ye.value.get(t)||{width:0,height:0,left:0,right:0,top:0};if(T.value){var r=N.value;e.rtl?n.right<N.value?r=n.right:n.right+n.width>N.value+ne.value&&(r=n.right+n.width-ne.value):n.left<-N.value?r=-n.left:n.left+n.width>-N.value+ne.value&&(r=-(n.left+n.width-ne.value)),P(0),O(Ce(r))}else{var i=R.value;n.top<-R.value?i=-n.top:n.top+n.height>-R.value+ae.value&&(i=-(n.top+n.height-ae.value)),O(0),P(Ce(i))}},Ue=(0,c.iH)(0),Le=(0,c.iH)(0);(0,s.m0)((function(){var t,n,r,i,o,a,s,l=ye.value;["top","bottom"].includes(e.tabPosition)?(n="width",o=ne.value,a=W.value,s=Ae.value,r=e.rtl?"right":"left",i=Math.abs(N.value)):(n="height",o=ae.value,a=W.value,s=pe.value,r="top",i=-R.value);var c=o;a+s>o&&a<o&&(c=o-s);var A,u=h.value;if(!u.length)return A=[0,0],Ue.value=A[0],Le.value=A[1],A;for(var d=u.length,p=d,f=0;f<d;f+=1){var g=l.get(u[f].key)||te;if(g[r]+g[n]>i+c){p=f-1;break}}for(var m=0,v=d-1;v>=0;v-=1){var b=l.get(u[v].key)||te;if(b[r]<i){m=v+1;break}}return t=[m,p],Ue.value=t[0],Le.value=t[1],t}));var Qe=function(){var e,t,n,r,i,o=(null===(e=v.value)||void 0===e?void 0:e.offsetWidth)||0,a=(null===(t=v.value)||void 0===t?void 0:t.offsetHeight)||0,s=(null===(n=x.value)||void 0===n?void 0:n.$el)||{},l=s.offsetWidth||0,c=s.offsetHeight||0;re(o),se(a),ue(l),fe(c);var A=((null===(r=b.value)||void 0===r?void 0:r.offsetWidth)||0)-l,u=((null===(i=b.value)||void 0===i?void 0:i.offsetHeight)||0)-c;j(A),Y(u),be((function(){var e=new Map;return h.value.forEach((function(t){var n=t.key,r=S.value.get(n),i=(null===r||void 0===r?void 0:r.$el)||r;i&&e.set(n,{width:i.offsetWidth,height:i.offsetHeight,left:i.offsetLeft,top:i.offsetTop})})),e}))},De=(0,s.Fl)((function(){return[].concat((0,l.Z)(h.value.slice(0,Ue.value)),(0,l.Z)(h.value.slice(Le.value+1)))})),He=(0,k.Z)(),Oe=(0,o.Z)(He,2),ze=Oe[0],Ze=Oe[1],Re=(0,s.Fl)((function(){return ye.value.get(e.activeKey)})),Pe=(0,c.iH)(),qe=function(){A.Z.cancel(Pe.value)};(0,s.YP)([Re,T,function(){return e.rtl}],(function(){var t={};Re.value&&(T.value?(e.rtl?t.right=(0,D.aR)(Re.value.right):t.left=(0,D.aR)(Re.value.left),t.width=(0,D.aR)(Re.value.width)):(t.top=(0,D.aR)(Re.value.top),t.height=(0,D.aR)(Re.value.height))),qe(),Pe.value=(0,A.Z)((function(){Ze(t)}))})),(0,s.YP)([function(){return e.activeKey},Re,ye,T],(function(){Ne()}),{flush:"post"}),(0,s.YP)([function(){return e.rtl},function(){return e.tabBarGutter},function(){return e.activeKey},function(){return h.value}],(function(){Qe()}),{flush:"post"});var Ke=function(e){var t=e.position,n=e.prefixCls,r=e.extra;if(!r)return null;var i=null===r||void 0===r?void 0:r({position:t});return i?(0,s.Wm)("div",{class:"".concat(n,"-extra-content")},[i]):null};return(0,s.Jd)((function(){Me(),qe()})),function(){var t,o,l,c,A,u=e.id,d=e.animated,m=e.activeKey,k=e.rtl,C=e.editable,B=e.locale,S=e.tabPosition,F=e.tabBarGutter,M=e.onTabClick,I=n.class,U=n.style,L=g.value,D=!!De.value.length,H="".concat(L,"-nav-wrap");T.value?k?(l=N.value>0,o=N.value+ne.value<W.value):(o=N.value<0,l=-N.value+ne.value<W.value):(c=R.value<0,A=-R.value+ae.value<$.value);var O={};"top"===S||"bottom"===S?O[k?"marginRight":"marginLeft"]="number"===typeof F?"".concat(F,"px"):F:O.marginTop="number"===typeof F?"".concat(F,"px"):F;var z=h.value.map((function(e,t){var n=e.key;return(0,s.Wm)(f,{id:u,prefixCls:L,key:n,tab:e,style:0===t?void 0:O,closable:e.closable,editable:C,active:n===m,removeAriaLabel:null===B||void 0===B?void 0:B.removeAriaLabel,ref:E(n),onClick:function(e){M(n,e)},onFocus:function(){Ne(n),Te(),v.value&&(k||(v.value.scrollLeft=0),v.value.scrollTop=0)}},i)}));return(0,s.Wm)("div",{role:"tablist",class:(0,p.Z)("".concat(L,"-nav"),I),style:U,onKeydown:function(){Te()}},[(0,s.Wm)(Ke,{position:"left",prefixCls:L,extra:i.leftExtra},null),(0,s.Wm)(Q.Z,{onResize:Qe},{default:function(){return[(0,s.Wm)("div",{class:(0,p.Z)(H,(t={},(0,r.Z)(t,"".concat(H,"-ping-left"),o),(0,r.Z)(t,"".concat(H,"-ping-right"),l),(0,r.Z)(t,"".concat(H,"-ping-top"),c),(0,r.Z)(t,"".concat(H,"-ping-bottom"),A),t)),ref:v},[(0,s.Wm)(Q.Z,{onResize:Qe},{default:function(){return[(0,s.Wm)("div",{ref:b,class:"".concat(L,"-nav-list"),style:{transform:"translate(".concat(N.value,"px, ").concat(R.value,"px)"),transition:Se.value?"none":void 0}},[z,(0,s.Wm)(w,{ref:x,prefixCls:L,locale:B,editable:C,style:(0,a.Z)((0,a.Z)({},0===z.length?void 0:O),{},{visibility:D?"hidden":null})},null),(0,s.Wm)("div",{class:(0,p.Z)("".concat(L,"-ink-bar"),(0,r.Z)({},"".concat(L,"-ink-bar-animated"),d.inkBar)),style:ze.value},null)])]}})])]}}),(0,s.Wm)(_,(0,a.Z)((0,a.Z)({},e),{},{removeAriaLabel:null===B||void 0===B?void 0:B.removeAriaLabel,ref:y,prefixCls:L,tabs:De.value,class:!D&&we.value}),ee(i,["moreIcon"])),(0,s.Wm)(Ke,{position:"right",prefixCls:L,extra:i.rightExtra},null),(0,s.Wm)(Ke,{position:"right",prefixCls:L,extra:i.tabBarExtraContent},null)])}}}),ie=n(12997),oe=(0,s.aZ)({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup:function(e){var t=F(),n=t.tabs,i=t.prefixCls;return function(){var t=e.id,o=e.activeKey,a=e.animated,l=e.tabPosition,c=e.rtl,A=e.destroyInactiveTabPane,u=a.tabPane,d=i.value,h=n.value.findIndex((function(e){return e.key===o}));return(0,s.Wm)("div",{class:"".concat(d,"-content-holder")},[(0,s.Wm)("div",{class:["".concat(d,"-content"),"".concat(d,"-content-").concat(l),(0,r.Z)({},"".concat(d,"-content-animated"),u)],style:h&&u?(0,r.Z)({},c?"marginRight":"marginLeft","-".concat(h,"00%")):null},[n.value.map((function(e){return(0,ie.Tm)(e.node,{key:e.key,prefixCls:d,tabKey:e.key,id:t,animated:u,active:e.key===o,destroyInactiveTabPane:A})}))])])}}}),ae=n(87139),se=n(30252),le=n(73770),ce=n(34746),Ae=n(36906),ue=n(73),de=n(65599),he=n(87081),pe=n(11847),fe=n(18513),ge=0,me=function(){return{prefixCls:{type:String},id:{type:String},activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:{type:String},animated:{type:[Boolean,Object]},renderTabBar:{type:Function},tabBarGutter:{type:Number},tabBarStyle:{type:Object},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean},hideAdd:Boolean,type:{type:String},size:{type:String},centered:Boolean,onEdit:{type:Function},onChange:{type:Function},onTabClick:{type:Function},onTabScroll:{type:Function},"onUpdate:activeKey":{type:Function},locale:{type:Object,default:void 0},onPrevClick:Function,onNextClick:Function,tabBarExtraContent:x.Z.any}};function ve(e){return e.map((function(e){if((0,se.l$)(e)){for(var t=(0,a.Z)({},e.props||{}),n=0,r=Object.entries(t);n<r.length;n++){var i=(0,o.Z)(r[n],2),s=i[0],l=i[1];delete t[s],t[(0,ae._A)(s)]=l}var c=e.children||{},A=void 0!==e.key?e.key:void 0,u=t.tab,d=void 0===u?c.tab:u,h=t.disabled,p=t.forceRender,f=t.closable,g=t.animated,m=t.active,v=t.destroyInactiveTabPane;return(0,a.Z)((0,a.Z)({key:A},t),{},{node:e,closeIcon:c.closeIcon,tab:d,disabled:""===h||h,forceRender:""===p||p,closable:""===f||f,animated:""===g||g,active:""===m||m,destroyInactiveTabPane:""===v||v})}return null})).filter((function(e){return e}))}var be=(0,s.aZ)({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:(0,a.Z)((0,a.Z)({},(0,le.Z)(me(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{},{tabs:{type:Array}}),slots:["tabBarExtraContent","leftExtra","rightExtra","moreIcon","addIcon","removeIcon","renderTabBar"],setup:function(e,t){var n=t.attrs,l=t.slots;(0,pe.Z)(!(void 0!==e.onPrevClick)&&!(void 0!==e.onNextClick),"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),(0,pe.Z)(!(void 0!==e.tabBarExtraContent),"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),(0,pe.Z)(!(void 0!==l.tabBarExtraContent),"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");var c=(0,ce.Z)("tabs",e),A=c.prefixCls,u=c.direction,d=c.size,h=c.rootPrefixCls,f=(0,s.Fl)((function(){return"rtl"===u.value})),g=(0,s.Fl)((function(){var t=e.animated,n=e.tabPosition;return!1===t||["left","right"].includes(n)?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!0}:(0,a.Z)({inkBar:!0,tabPane:!1},"object"===(0,i.Z)(t)?t:{})})),m=(0,k.Z)(!1),v=(0,o.Z)(m,2),b=v[0],y=v[1];(0,s.bv)((function(){y((0,Ae.Z)())}));var w=(0,ue.Z)((function(){var t;return null===(t=e.tabs[0])||void 0===t?void 0:t.key}),{value:(0,s.Fl)((function(){return e.activeKey})),defaultValue:e.defaultActiveKey}),x=(0,o.Z)(w,2),C=x[0],B=x[1],_=(0,k.Z)((function(){return e.tabs.findIndex((function(e){return e.key===C.value}))})),E=(0,o.Z)(_,2),F=E[0],T=E[1];(0,s.m0)((function(){var t,n=e.tabs.findIndex((function(e){return e.key===C.value}));-1===n&&(n=Math.max(0,Math.min(F.value,e.tabs.length-1)),B(null===(t=e.tabs[n])||void 0===t?void 0:t.key));T(n)}));var M=(0,ue.Z)(null,{value:(0,s.Fl)((function(){return e.id}))}),I=(0,o.Z)(M,2),N=I[0],U=I[1],L=(0,s.Fl)((function(){return b.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition}));(0,s.bv)((function(){e.id||(U("rc-tabs-".concat(ge)),ge+=1)}));var Q=function(t,n){var r;null===(r=e.onTabClick)||void 0===r||r.call(e,t,n);var i,o=t!==C.value;(B(t),o)&&(null===(i=e.onChange)||void 0===i||i.call(e,t))};return S({tabs:(0,s.Fl)((function(){return e.tabs})),prefixCls:A}),function(){var t,i,o,c=e.id,u=e.type,m=e.tabBarGutter,v=e.tabBarStyle,y=e.locale,w=e.destroyInactiveTabPane,x=e.renderTabBar,k=void 0===x?l.renderTabBar:x,B=e.onTabScroll,_=e.hideAdd,E=e.centered,S={id:N.value,activeKey:C.value,animated:g.value,tabPosition:L.value,rtl:f.value,mobile:b.value};"editable-card"===u&&(i={onEdit:function(t,n){var r,i=n.key,o=n.event;null===(r=e.onEdit)||void 0===r||r.call(e,"add"===t?o:i,t)},removeIcon:function(){return(0,s.Wm)(de.Z,null,null)},addIcon:l.addIcon?l.addIcon:function(){return(0,s.Wm)(he.Z,null,null)},showAdd:!0!==_});var F=(0,a.Z)((0,a.Z)({},S),{},{moreTransitionName:"".concat(h.value,"-slide-up"),editable:i,locale:y,tabBarGutter:m,onTabClick:Q,onTabScroll:B,style:v});o=k?k((0,a.Z)((0,a.Z)({},F),{},{DefaultTabBar:re})):(0,s.Wm)(re,F,ee(l,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));var T=A.value;return(0,s.Wm)("div",(0,a.Z)((0,a.Z)({},n),{},{id:c,class:(0,p.Z)(T,"".concat(T,"-").concat(L.value),(t={},(0,r.Z)(t,"".concat(T,"-").concat(d.value),d.value),(0,r.Z)(t,"".concat(T,"-card"),["card","editable-card"].includes(u)),(0,r.Z)(t,"".concat(T,"-editable-card"),"editable-card"===u),(0,r.Z)(t,"".concat(T,"-centered"),E),(0,r.Z)(t,"".concat(T,"-mobile"),b.value),(0,r.Z)(t,"".concat(T,"-editable"),"editable-card"===u),(0,r.Z)(t,"".concat(T,"-rtl"),f.value),t),n.class)}),[o,(0,s.Wm)(oe,(0,a.Z)((0,a.Z)({destroyInactiveTabPane:w},S),{},{animated:g.value}),null)])}}}),ye=(0,s.aZ)({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:(0,le.Z)(me(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:["tabBarExtraContent","leftExtra","rightExtra","moreIcon","addIcon","removeIcon","renderTabBar"],setup:function(e,t){var n=t.attrs,r=t.slots,i=t.emit,o=function(e){i("update:activeKey",e),i("change",e)};return function(){var t,i=ve((0,se.Iz)(null===(t=r.default)||void 0===t?void 0:t.call(r)));return(0,s.Wm)(be,(0,a.Z)((0,a.Z)((0,a.Z)({},(0,fe.Z)(e,["onUpdate:activeKey"])),n),{},{onChange:o,tabs:i}),r)}}}),we=ye,xe=n(18914);we.TabPane=xe.Z,we.install=function(e){return e.component(we.name,we),e.component(xe.Z.name,xe.Z),e};var ke=we},18914:function(e,t,n){"use strict";var r=n(73396),i=n(44870),o=n(87495),a=function(){return{tab:o.Z.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}};t.Z=(0,r.aZ)({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:a(),slots:["closeIcon","tab"],setup:function(e,t){var n=t.attrs,o=t.slots,a=(0,i.iH)(e.forceRender);(0,r.YP)([function(){return e.active},function(){return e.destroyInactiveTabPane}],(function(){e.active?a.value=!0:e.destroyInactiveTabPane&&(a.value=!1)}),{immediate:!0});var s=(0,r.Fl)((function(){return e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"}}));return function(){var t,i=e.prefixCls,l=e.forceRender,c=e.id,A=e.active,u=e.tabKey;return(0,r.Wm)("div",{id:c&&"".concat(c,"-panel-").concat(u),role:"tabpanel",tabindex:A?0:-1,"aria-labelledby":c&&"".concat(c,"-tab-").concat(u),"aria-hidden":!A,style:[s.value,n.style],class:["".concat(i,"-tabpane"),A&&"".concat(i,"-tabpane-active"),n.class]},[(A||a.value||l)&&(null===(t=o.default)||void 0===t?void 0:t.call(o))])}}})},38343:function(e,t,n){"use strict";n.d(t,{g1:function(){return r},os:function(){return i}});function r(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},24559:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function o(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var o=r.local.endToken||null;return r.local=r.localState=null,o}var a;o=r.local.mode.token(n,r.localState);return r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),o}for(var l=e[r.state],c=0;c<l.length;c++){var A=l[c],u=(!A.data.sol||n.sol())&&n.match(A.regex);if(u){A.data.next?r.state=A.data.next:A.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=A.data.push):A.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),A.data.mode&&s(t,r,A.data.mode,A.token),A.data.indent&&r.indent.push(n.indentation()+t.indentUnit),A.data.dedent&&r.indent.pop();var d=A.token;if(d&&d.apply&&(d=d(u)),u.length>2&&A.token&&"string"!=typeof A.token){for(var h=2;h<u.length;h++)u[h]&&(r.pending||(r.pending=[])).push({text:u[h],token:A.token[h-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return n.next(),null}}function a(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!a(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function s(t,r,i,o){var s;if(i.persistent)for(var l=r.persistentStates;l&&!s;l=l.next)(i.spec?a(i.spec,l.spec):i.mode==l.mode)&&(s=l);var c=s?s.mode:i.mode||e.getMode(t,i.spec),A=s?s.state:e.startState(c);i.persistent&&!s&&(r.persistentStates={mode:c,spec:i.spec,state:A,next:r.persistentStates}),r.localState=A,r.local={mode:c,end:i.end&&n(i.end),endScan:i.end&&!1!==i.forceEnd&&n(i.end,!1),endToken:o&&o.join?o[o.length-1]:o}}function l(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function c(t,n){return function(r,i,o){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,o);if(null==r.indent||r.local||n.dontIndentStates&&l(r.state,n.dontIndentStates)>-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var c=0;c<s.length;c++){var A=s[c];if(A.data.dedent&&!1!==A.data.dedentIfLineStart){var u=A.regex.exec(i);if(u&&u[0]){a--,(A.next||A.push)&&(s=t[A.next||A.push]),i=i.slice(u[0].length);continue e}}}break}return a<0?0:r.indent[a]}}e.defineSimpleMode=function(t,n){e.defineMode(t,(function(t){return e.simpleMode(t,n)}))},e.simpleMode=function(n,r){t(r,"start");var a={},s=r.meta||{},l=!1;for(var A in r)if(A!=s&&r.hasOwnProperty(A))for(var u=a[A]=[],d=r[A],h=0;h<d.length;h++){var p=d[h];u.push(new i(p,r)),(p.indent||p.dedent)&&(l=!0)}var f={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:l?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:o(a,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:c(a,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(f[g]=s[g]);return f}}))},63348:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";function t(t,n,r){this.orientation=n,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var i=this;function o(t){var n=e.wheelEventPixels(t)["horizontal"==i.orientation?"x":"y"],r=i.pos;i.moveTo(i.pos+n),i.pos!=r&&e.e_preventDefault(t)}e.on(this.inner,"mousedown",(function(t){if(1==t.which){e.e_preventDefault(t);var n="horizontal"==i.orientation?"pageX":"pageY",r=t[n],o=i.pos;e.on(document,"mousemove",s),e.on(document,"mouseup",a)}function a(){e.off(document,"mousemove",s),e.off(document,"mouseup",a)}function s(e){if(1!=e.which)return a();i.moveTo(o+(e[n]-r)*(i.total/i.size))}})),e.on(this.node,"click",(function(t){e.e_preventDefault(t);var n,r=i.inner.getBoundingClientRect();n="horizontal"==i.orientation?t.clientX<r.left?-1:t.clientX>r.right?1:0:t.clientY<r.top?-1:t.clientY>r.bottom?1:0,i.moveTo(i.pos+n*i.screen)})),e.on(this.node,"mousewheel",o),e.on(this.node,"DOMMouseScroll",o)}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos)&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",!0)},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};var n=10;function r(e,n,r){this.addClass=e,this.horiz=new t(e,"horizontal",r),n(this.horiz.node),this.vert=new t(e,"vertical",r),n(this.vert.node),this.width=null}t.prototype.update=function(e,t,r){var i=this.screen!=t||this.total!=e||this.size!=r;i&&(this.screen=t,this.total=e,this.size=r);var o=this.screen*(this.size/this.total);o<n&&(this.size-=n-o,o=n),this.inner.style["horizontal"==this.orientation?"width":"height"]=o+"px",this.setPos(this.pos,i)},r.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,r=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=r?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(r?n:0)),this.vert.node.style.bottom=r?n+"px":"0"),r&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?n:0)-e.barLeft),this.horiz.node.style.right=i?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?n:0,bottom:r?n:0}},r.prototype.setScrollTop=function(e){this.vert.setPos(e)},r.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},r.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new r("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new r("CodeMirror-overlayscroll",e,t)}}))},69767:function(e,t,n){n(57658),function(t,n){e.exports=n()}(0,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),A=!o&&/Chrome\/(\d+)/.exec(e),u=A&&+A[1],d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),g=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),y=/\bCrOS\b/.test(e),w=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var k=b&&(c||d&&(null==x||x<12.11)),C=n||a&&s>=9;function B(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,E=function(e,t){var n=e.className,r=B(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function S(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function F(e,t){return S(e).appendChild(t)}function T(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function M(e,t,n,r){var i=T(e,t,n,r);return i.setAttribute("role","presentation"),i}function I(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function N(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}while(t&&t.shadowRoot&&t.shadowRoot.activeElement)t=t.shadowRoot.activeElement;return t}function U(e,t){var n=e.className;B(t).test(n)||(e.className+=(n?" ":"")+t)}function L(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!B(n[r]).test(t)&&(t+=" "+n[r]);return t}_=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Q=function(e){e.select()};function D(e){return e.display.wrapper.ownerDocument}function H(e){return D(e).defaultView}function O(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function Z(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?Q=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(Q=function(e){try{e.select()}catch(t){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=O(this.onTimeout,this)};function P(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}R.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},R.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var q=50,K={toString:function(){return"CodeMirror.Pass"}},W={scroll:!1},j={origin:"*mouse"},V={origin:"+move"};function G(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var $=[""];function Y(e){while($.length<=e)$.push(X($)+" ");return $[e]}function X(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ee(e,t,n){var r=0,i=n(t);while(r<e.length&&n(e[r])<=i)r++;e.splice(r,0,t)}function te(){}function ne(e,t){var n;return Object.create?n=Object.create(e):(te.prototype=e,n=new te),t&&z(t,n),n}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function oe(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ie(e))||t.test(e):ie(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\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 le(e){return e.charCodeAt(0)>=768&&se.test(e)}function ce(e,t,n){while((n<0?t>0:t<e.length)&&le(e.charAt(t)))t+=n;return t}function Ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function ue(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var de=null;function he(e,t,n){var r;de=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:de=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:de=i)}return null!=r?r:de}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var A=e.length,u=[],d=0;d<A;++d)u.push(n(e.charCodeAt(d)));for(var h=0,p=c;h<A;++h){var f=u[h];"m"==f?u[h]=p:p=f}for(var g=0,m=c;g<A;++g){var v=u[g];"1"==v&&"r"==m?u[g]="n":o.test(v)&&(m=v,"r"==v&&(u[g]="R"))}for(var b=1,y=u[0];b<A-1;++b){var w=u[b];"+"==w&&"1"==y&&"1"==u[b+1]?u[b]="1":","!=w||y!=u[b+1]||"1"!=y&&"n"!=y||(u[b]=y),y=w}for(var x=0;x<A;++x){var k=u[x];if(","==k)u[x]="N";else if("%"==k){var C=void 0;for(C=x+1;C<A&&"%"==u[C];++C);for(var B=x&&"!"==u[x-1]||C<A&&"1"==u[C]?"1":"N",_=x;_<C;++_)u[_]=B;x=C-1}}for(var E=0,S=c;E<A;++E){var F=u[E];"L"==S&&"1"==F?u[E]="L":o.test(F)&&(S=F)}for(var T=0;T<A;++T)if(i.test(u[T])){var M=void 0;for(M=T+1;M<A&&i.test(u[M]);++M);for(var I="L"==(T?u[T-1]:c),N="L"==(M<A?u[M]:c),U=I==N?I?"L":"R":c,L=T;L<M;++L)u[L]=U;T=M-1}for(var Q,D=[],H=0;H<A;)if(a.test(u[H])){var O=H;for(++H;H<A&&a.test(u[H]);++H);D.push(new l(0,O,H))}else{var z=H,Z=D.length,R="rtl"==t?1:0;for(++H;H<A&&"L"!=u[H];++H);for(var P=z;P<H;)if(s.test(u[P])){z<P&&(D.splice(Z,0,new l(1,z,P)),Z+=R);var q=P;for(++P;P<H&&s.test(u[P]);++P);D.splice(Z,0,new l(2,q,P)),Z+=R,z=P}else++P;z<H&&D.splice(Z,0,new l(1,z,H))}return"ltr"==t&&(1==D[0].level&&(Q=e.match(/^\s+/))&&(D[0].from=Q[0].length,D.unshift(new l(0,0,Q[0].length))),1==X(D).level&&(Q=e.match(/\s+$/))&&(X(D).to-=Q[0].length,D.push(new l(0,A-Q[0].length,A)))),"rtl"==t?D.reverse():D}}();function fe(e,t){var n=e.order;return null==n&&(n=e.order=pe(e.text,t)),n}var ge=[],me=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ge).concat(n)}};function ve(e,t){return e._handlers&&e._handlers[t]||ge}function be(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=P(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ye(e,t){var n=ve(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function we(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==P(n,t[r])&&n.push(t[r])}function ke(e,t){return ve(e,t).length>0}function Ce(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){be(this,e,t)}}function Be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){Be(e),_e(e)}function Fe(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Me,Ie,Ne=function(){if(a&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Ue(e){if(null==Me){var t=T("span","");F(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Me=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Me?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Le(e){if(null!=Ie)return Ie;var t=F(e,document.createTextNode("AخA")),n=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return S(e),!(!n||n.left==n.right)&&(Ie=r.right-n.right<3)}var Qe=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},De=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},He=function(){var e=T("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Oe=null;function ze(e){if(null!=Oe)return Oe;var t=F(e,T("span","x")),n=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return Oe=Math.abs(n.left-r.left)>1}var Ze={},Re={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ze[e]=t}function qe(e,t){Re[e]=t}function Ke(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[e.name];"string"==typeof t&&(t={name:t}),e=ne(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ke("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ke("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function We(e,t){t=Ke(t);var n=Ze[t.name];if(!n)return We(e,"text/plain");var r=n(e,t);if(je.hasOwnProperty(t.name)){var i=je[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var je={};function Ve(e,t){var n=je.hasOwnProperty(e)?je[e]:je[e]={};z(t,n)}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function $e(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Xe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Je(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function et(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function tt(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function nt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function rt(e){if(null==e.parent)return null;for(var t=e.parent,n=P(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n+t.first}function it(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a],l=s.height;if(t<l)break;t-=l}return n+a}function ot(e,t){return t>=e.first&&t<e.first+e.size}function at(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(e,t,n);this.line=e,this.ch=t,this.sticky=n}function lt(e,t){return e.line-t.line||e.ch-t.ch}function ct(e,t){return e.sticky==t.sticky&&0==lt(e,t)}function At(e){return st(e.line,e.ch)}function ut(e,t){return lt(e,t)<0?t:e}function dt(e,t){return lt(e,t)<0?e:t}function ht(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first)return st(e.first,0);var n=e.first+e.size-1;return t.line>n?st(n,Je(e,n).text.length):ft(t,Je(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?st(e.line,t):n<0?st(e.line,0):e}function gt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=pt(e,t[r]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(e){var t,n=this.string.charAt(this.pos);if(t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)),t)return++this.pos,n},Xe.prototype.eatWhile=function(e){var t=this.pos;while(this.eat(e));return this.pos>t},Xe.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return Z(this.string,null,this.tabSize)-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function bt(e,t,n,r){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,St(e,t.text,s.mode,n,(function(e,t){var n=l;while(c<e){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function yt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=wt(e,rt(t)),i=t.text.length>e.options.maxHighlightLength&&Ge(e.doc.mode,r.state),o=bt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new vt(r,!0,t);var o=Ft(e,t,n),a=o>r.first&&Je(r,o-1).stateAfter,s=a?vt.fromSaved(r,a,o):new vt(r,Ye(r.mode),o);return r.iter(o,t,(function(n){xt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function xt(e,t,n,r){var i=e.doc.mode,o=new Xe(t,e.options.tabSize,n);o.start=o.pos=r||0,""==t&&kt(i,n.state);while(!o.eol())Ct(i,o,n.state),o.start=o.pos}function kt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=$e(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Ct(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=$e(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,n){return t instanceof mt?new vt(e,Ge(e.mode,t.state),n,t.lookAhead):new vt(e,Ge(e.mode,t),n)},vt.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var Bt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function _t(e,t,n,r){var i,o=e.doc,a=o.mode;t=pt(o,t);var s,l=Je(o,t.line),c=wt(e,t.line,n),A=new Xe(l.text,e.options.tabSize,c);r&&(s=[]);while((r||A.pos<t.ch)&&!A.eol())A.start=A.pos,i=Ct(a,A,c.state),r&&s.push(new Bt(A,i,Ge(o.mode,c.state)));return r?s:new Bt(A,i,c.state)}function Et(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function St(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,A=null,u=new Xe(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];""==t&&Et(kt(n,r.state),o);while(!u.eol()){if(u.pos>e.options.maxHighlightLength?(s=!1,a&&xt(e,t,r,u.pos),u.pos=t.length,l=null):l=Et(Ct(n,u,r.state,d),o),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||A!=l){while(c<u.start)c=Math.min(u.start,c+5e3),i(c,A);A=l}u.start=u.pos}while(c<u.pos){var p=Math.min(u.pos,c+5e3);i(p,A),c=p}}function Ft(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Je(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof mt?c.lookAhead:0)<=o.modeFrontier))return s;var A=Z(l.text,null,e.options.tabSize);(null==i||r>A)&&(i=s-1,r=A)}return i}function Tt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Je(e,r).stateAfter;if(i&&(!(i instanceof mt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Mt=!1,It=!1;function Nt(){Mt=!0}function Ut(){It=!0}function Lt(e,t,n){this.marker=e,this.from=t,this.to=n}function Qt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Dt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ht(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ot(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Lt(a,o.from,l?null:o.to))}}return r}function zt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Lt(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Zt(e,t){if(t.full)return null;var n=ot(e,t.from.line)&&Je(e,t.from.line).markedSpans,r=ot(e,t.to.line)&&Je(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==lt(t.from,t.to),s=Ot(n,i,a),l=zt(r,o,a),c=1==t.text.length,A=X(t.text).length+(c?i:0);if(s)for(var u=0;u<s.length;++u){var d=s[u];if(null==d.to){var h=Qt(l,d.marker);h?c&&(d.to=null==h.to?null:h.to+A):d.to=i}}if(l)for(var p=0;p<l.length;++p){var f=l[p];if(null!=f.to&&(f.to+=A),null==f.from){var g=Qt(s,f.marker);g||(f.from=A,c&&(s||(s=[])).push(f))}else f.from+=A,c&&(s||(s=[])).push(f)}s&&(s=Rt(s)),l&&l!=s&&(l=Rt(l));var m=[s];if(!c){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new Lt(s[y].marker,null,null));for(var w=0;w<b;++w)m.push(v);m.push(l)}return m}function Rt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Pt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=P(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(lt(c.to,s.from)<0||lt(c.from,s.to)>0)){var A=[l,1],u=lt(c.from,s.from),d=lt(c.to,s.to);(u<0||!a.inclusiveLeft&&!u)&&A.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&A.push({from:s.to,to:c.to}),i.splice.apply(i,A),l+=A.length-3}}return i}function qt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Kt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Wt(e){return e.inclusiveLeft?-1:0}function jt(e){return e.inclusiveRight?1:0}function Vt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=lt(r.from,i.from)||Wt(e)-Wt(t);if(o)return-o;var a=lt(r.to,i.to)||jt(e)-jt(t);return a||t.id-e.id}function Gt(e,t){var n,r=It&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||Vt(n,i.marker)<0)&&(n=i.marker);return n}function $t(e){return Gt(e,!0)}function Yt(e){return Gt(e,!1)}function Xt(e,t){var n,r=It&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Vt(n,o.marker)<0)&&(n=o.marker)}return n}function Jt(e,t,n,r,i){var o=Je(e,t),a=It&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),A=lt(c.from,n)||Wt(l.marker)-Wt(i),u=lt(c.to,r)||jt(l.marker)-jt(i);if(!(A>=0&&u<=0||A<=0&&u>=0)&&(A<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?lt(c.to,n)>=0:lt(c.to,n)>0)||A>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?lt(c.from,r)<=0:lt(c.from,r)<0)))return!0}}}function en(e){var t;while(t=$t(e))e=t.find(-1,!0).line;return e}function tn(e){var t;while(t=Yt(e))e=t.find(1,!0).line;return e}function nn(e){var t,n;while(t=Yt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function rn(e,t){var n=Je(e,t),r=en(n);return n==r?t:rt(r)}function on(e,t){if(t>e.lastLine())return t;var n,r=Je(e,t);if(!an(e,r))return t;while(n=Yt(r))r=n.find(1,!0).line;return rt(r)+1}function an(e,t){var n=It&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&sn(e,t,r))return!0}}function sn(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return sn(e,r.line,Qt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&sn(e,t,i))return!0}function ln(e){e=en(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function cn(e){if(0==e.height)return 0;var t,n=e.text.length,r=e;while(t=$t(r)){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}r=e;while(t=Yt(r)){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function An(e){var t=e.display,n=e.doc;t.maxLine=Je(n,n.first),t.maxLineLength=cn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=cn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var un=function(e,t,n){this.text=e,Kt(this,t),this.height=n?n(this):1};function dn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),qt(e),Kt(e,n);var i=r?r(e):1;i!=e.height&&nt(e,i)}function hn(e){e.parent=null,qt(e)}un.prototype.lineNo=function(){return rt(this)},Ce(un);var pn={},fn={};function gn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:pn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=bn,Le(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=wn(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&rt(o);kn(o,r,yt(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=L(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=L(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ue(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=L(r.pre.className,r.textClass||"")),r}function vn(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function bn(e,t,n,r,i,o,l){if(t){var c,A=e.splitSpaces?yn(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){c=document.createDocumentFragment();var h=0;while(1){u.lastIndex=h;var p=u.exec(t),f=p?p.index-h:t.length-h;if(f){var g=document.createTextNode(A.slice(h,h+f));a&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+f,g),e.col+=f,e.pos+=f}if(!p)break;h+=f+1;var m=void 0;if("\t"==p[0]){var v=e.cm.options.tabSize,b=v-e.col%v;m=c.appendChild(T("span",Y(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=c.appendChild(T("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(T("span",[m])):c.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,c=document.createTextNode(A),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==A.charCodeAt(t.length-1),n||r||i||d||o||l){var y=n||"";r&&(y+=r),i&&(y+=i);var w=T("span",[c],y,o);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return e.content.appendChild(w)}e.content.appendChild(c)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function wn(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,A=c+r.length;;){for(var u=void 0,d=0;d<t.length;d++)if(u=t[d],u.to>c&&u.from<=c)break;if(u.to>=A)return e(n,r,i,o,a,s,l);e(n,r.slice(0,u.to-c),i,o,null,s,l),o=null,r=r.slice(u.to-c),c=u.to}}}function xn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function kn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,A,u,d,h=i.length,p=0,f=1,g="",m=0;;){if(m==p){l=c=A=s="",d=null,u=null,m=1/0;for(var v=[],b=void 0,y=0;y<r.length;++y){var w=r[y],x=w.marker;if("bookmark"==x.type&&w.from==p&&x.widgetNode)v.push(x);else if(w.from<=p&&(null==w.to||w.to>p||x.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==p&&(A+=" "+x.startStyle),x.endStyle&&w.to==m&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var k in x.attributes)(d||(d={}))[k]=x.attributes[k];x.collapsed&&(!u||Vt(u.marker,x)<0)&&(u=w)}else w.from>p&&m>w.from&&(m=w.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==m&&(c+=" "+b[C]);if(!u||u.from==p)for(var B=0;B<v.length;++B)xn(t,0,v[B]);if(u&&(u.from||0)==p){if(xn(t,(null==u.to?h+1:u.to)-p,u.marker,null==u.from),null==u.to)return;u.to==p&&(u=!1)}}if(p>=h)break;var _=Math.min(h,m);while(1){if(g){var E=p+g.length;if(!u){var S=E>_?g.slice(0,_-p):g;t.addToken(t,S,a?a+l:l,A,p+S.length==m?c:"",s,d)}if(E>=_){g=g.slice(_-p),p=_;break}p=E,A=""}g=i.slice(o,o=n[f++]),a=gn(n[f++],t.cm.options)}}else for(var F=1;F<n.length;F+=2)t.addToken(t,i.slice(o,o=n[F]),gn(n[F+1],t.cm.options))}function Cn(e,t,n){this.line=t,this.rest=nn(t),this.size=this.rest?rt(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=an(e,t)}function Bn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Cn(e.doc,Je(e.doc,o),o);r=o+a.size,i.push(a)}return i}var _n=null;function En(e){_n?_n.ops.push(e):e.ownsGroup=_n={ops:[e],delayedCallbacks:[]}}function Sn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)while(i.cursorActivityCalled<i.cursorActivityHandlers.length)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Fn(e,t){var n=e.ownsGroup;if(n)try{Sn(n)}finally{_n=null,t(n)}}var Tn=null;function Mn(e,t){var n=ve(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);_n?r=_n.delayedCallbacks:Tn?r=Tn:(r=Tn=[],setTimeout(In,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function In(){var e=Tn;Tn=null;for(var t=0;t<e.length;++t)e[t]()}function Nn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Dn(e,t):"gutter"==o?On(e,t,n,r):"class"==o?Hn(e,t):"widget"==o&&zn(e,t,r)}t.changes=null}function Un(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function Ln(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Un(t);t.background=r.insertBefore(T("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Qn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):mn(e,t)}function Dn(e,t){var n=t.text.className,r=Qn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Hn(e,t)):n&&(t.text.className=n)}function Hn(e,t){Ln(e,t),t.line.wrapClass?Un(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function On(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Un(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Un(t),s=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(T("div",at(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,A=o.hasOwnProperty(c)&&o[c];A&&s.appendChild(T("div",[A],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function zn(e,t,n){t.alignable&&(t.alignable=null);for(var r=B("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Rn(e,t,n)}function Zn(e,t,n,r){var i=Qn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Hn(e,t),On(e,t,n,r),Rn(e,t,r),t.node}function Rn(e,t,n){if(Pn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Pn(e,t.rest[r],t,n,!1)}function Pn(e,t,n,r,i){if(t.widgets)for(var o=Un(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),qn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Mn(l,"redraw")}}function qn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Kn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!I(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),F(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Wn(e,t){for(var n=Fe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function jn(e){return e.lineSpace.offsetTop}function Vn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=F(e.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function $n(e){return q-e.display.nativeBarWidth}function Yn(e){return e.display.scroller.clientWidth-$n(e)-e.display.barWidth}function Xn(e){return e.display.scroller.clientHeight-$n(e)-e.display.barHeight}function Jn(e,t,n){var r=e.options.lineWrapping,i=r&&Yn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function er(e,t,n){if(e.line==t)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]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(rt(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function tr(e,t){t=en(t);var n=rt(t),r=e.display.externalMeasured=new Cn(e.doc,t,n);r.lineN=n;var i=r.built=mn(e,r);return r.text=i.pre,F(e.display.lineMeasure,i.pre),r}function nr(e,t,n,r){return or(e,ir(e,t),n,r)}function rr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function ir(e,t){var n=rt(t),r=rr(e,n);r&&!r.text?r=null:r&&r.changes&&(Nn(e,r,n,Nr(e)),e.curOp.forceUpdate=!0),r||(r=tr(e,t));var i=er(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function or(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Jn(e,t.view,t.rect),t.hasHeights=!0),o=Ar(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ar,sr={left:0,right:0,top:0,bottom:0};function lr(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?(i=t-s,o=i+1):(c==e.length-3||t==l&&e[c+3]>t)&&(o=l-s,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)while(c&&e[c-2]==e[c-3]&&e[c-1].insertLeft)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)while(c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function cr(e,t){var n=sr;if("left"==t){for(var r=0;r<e.length;r++)if((n=e[r]).left!=n.right)break}else for(var i=e.length-1;i>=0;i--)if((n=e[i]).left!=n.right)break;return n}function Ar(e,t,n,r){var i,o=lr(t.map,n,r),l=o.node,c=o.start,A=o.end,u=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){while(c&&le(t.line.text.charAt(o.coverStart+c)))--c;while(o.coverStart+A<o.coverEnd&&le(t.line.text.charAt(o.coverStart+A)))++A;if(i=a&&s<9&&0==c&&A==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():cr(_(l,c,A).getClientRects(),r),i.left||i.right||0==c)break;A=c,c-=1,u="right"}a&&s<11&&(i=ur(e.display.measure,i))}else{var h;c>0&&(u=r="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Ir(e.display),top:p.top,bottom:p.bottom}:sr}for(var f=i.top-t.rect.top,g=i.bottom-t.rect.top,m=(f+g)/2,v=t.view.measure.heights,b=0;b<v.length-1;b++)if(m<v[b])break;var y=b?v[b-1]:0,w=v[b],x={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:w};return i.left||i.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=f,x.rbottom=g),x}function ur(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!ze(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function dr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function hr(e){e.display.externalMeasure=null,S(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)dr(e.display.view[t])}function pr(e){hr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(e){return A&&m?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function gr(e){return A&&m?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function mr(e){var t=en(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=Kn(n[i]));return r}function vr(e,t,n,r,i){if(!i){var o=mr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=ln(t);if("local"==r?a+=jn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:gr(D(e)));var l=s.left+("window"==r?0:fr(D(e)));n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function br(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=fr(D(e)),i-=gr(D(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function yr(e,t,n,r,i){return r||(r=Je(e.doc,t.line)),vr(e,r,nr(e,r,t.ch,i),n)}function wr(e,t,n,r,i,o){function a(t,a){var s=or(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,vr(e,r,s,n)}r=r||Je(e.doc,t.line),i||(i=ir(e,r));var s=fe(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function A(e,t,n){var r=s[t],i=1==r.level;return a(n?e-1:e,i!=n)}var u=he(s,l,c),d=de,h=A(l,u,"before"==c);return null!=d&&(h.other=A(l,d,"before"!=c)),h}function xr(e,t){var n=0;t=pt(e.doc,t),e.options.lineWrapping||(n=Ir(e.display)*t.ch);var r=Je(e.doc,t.line),i=ln(r)+jn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function kr(e,t,n,r,i){var o=st(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Cr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return kr(r.first,0,null,-1,-1);var i=it(r,n),o=r.first+r.size-1;if(i>o)return kr(r.first+r.size-1,Je(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Je(r,i);;){var s=Sr(e,a,i,t,n),l=Xt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Je(r,i=c.line)}}function Br(e,t,n,r){r-=mr(t);var i=t.text.length,o=Ae((function(t){return or(e,n,t-1).bottom<=r}),i,0);return i=Ae((function(t){return or(e,n,t).top>r}),o,i),{begin:o,end:i}}function _r(e,t,n,r){n||(n=ir(e,t));var i=vr(e,t,or(e,n,r),"line").top;return Br(e,t,n,i)}function Er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Sr(e,t,n,r,i){i-=ln(t);var o=ir(e,t),a=mr(t),s=0,l=t.text.length,c=!0,A=fe(t,e.doc.direction);if(A){var u=(e.options.lineWrapping?Tr:Fr)(e,t,n,o,A,r,i);c=1!=u.level,s=c?u.from:u.to-1,l=c?u.to:u.from-1}var d,h,p=null,f=null,g=Ae((function(t){var n=or(e,o,t);return n.top+=a,n.bottom+=a,!!Er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,f=n),!0)}),s,l),m=!1;if(f){var v=r-f.left<f.right-r,b=v==c;g=p+(b?0:1),h=b?"after":"before",d=v?f.left:f.right}else{c||g!=l&&g!=s||g++,h=0==g?"after":g==t.text.length?"before":or(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var y=wr(e,st(n,g,h),"line",t,o);d=y.left,m=i<y.top?-1:i>=y.bottom?1:0}return g=ce(t.text,g,1),kr(n,g,h,m,r-d)}function Fr(e,t,n,r,i,o,a){var s=Ae((function(s){var l=i[s],c=1!=l.level;return Er(wr(e,st(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,A=wr(e,st(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Er(A,o,a,!0)&&A.top>a&&(l=i[s-1])}return l}function Tr(e,t,n,r,i,o,a){var s=Br(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var A=null,u=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=c||h.to<=l)){var p=1!=h.level,f=or(e,r,p?Math.min(c,h.to)-1:Math.max(l,h.from)).right,g=f<o?o-f+1e9:f-o;(!A||u>g)&&(A=h,u=g)}}return A||(A=i[i.length-1]),A.from<l&&(A={from:l,to:A.to,level:A.level}),A.to>c&&(A={from:A.from,to:c,level:A.level}),A}function Mr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ar){ar=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ar.appendChild(document.createTextNode("x")),ar.appendChild(T("br"));ar.appendChild(document.createTextNode("x"))}F(e.measure,ar);var n=ar.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),S(e.measure),n||1}function Ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");F(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Nr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Lr(e){var t=Mr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ir(e.display)-3);return function(i){if(an(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Qr(e){var t=e.doc,n=Lr(e);t.iter((function(e){var t=n(e);t!=e.height&&nt(e,t)}))}function Dr(e,t,n,r){var i=e.display;if(!n&&"true"==Fe(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(u){return null}var l,c=Cr(e,o,a);if(r&&c.xRel>0&&(l=Je(e.doc,c.line).text).length==c.ch){var A=Z(l,l.length,e.options.tabSize)-l.length;c=st(c.line,Math.max(0,Math.round((o-Gn(e.display).left)/Ir(e.display))-A))}return c}function Hr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Or(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)It&&rn(e.doc,t)<i.viewTo&&Zr(e);else if(n<=i.viewFrom)It&&on(e.doc,n+r)>i.viewFrom?Zr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Zr(e);else if(t<=i.viewFrom){var o=Rr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Zr(e)}else if(n>=i.viewTo){var a=Rr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Zr(e)}else{var s=Rr(e,t,t,-1),l=Rr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Bn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Zr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function zr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Hr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==P(a,n)&&a.push(n)}}}function Zr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rr(e,t,n,r){var i,o=Hr(e,t),a=e.display.view;if(!It||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}while(rn(e.doc,n)!=n){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Pr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Bn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Bn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Hr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Bn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Hr(e,n)))),r.viewTo=n}function qr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Kr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Wr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var A=a(e,l);A&&jr(e,A,i)}else(c||e.options.showCursorWhenSelecting)&&jr(e,l.head,i);c||Gr(e,l,o)}}return r}function jr(e,t,n){var r=wr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(T("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=yr(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Vr(e,t){return e.top-t.top||e.left-t.left}function Gr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Gn(e.display),s=a.left,l=Math.max(r.sizerWidth,Yn(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function A(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function u(t,n,r){var o,a,u=Je(i,t),d=u.text.length;function h(n,r){return yr(e,st(t,n),"div",u,r)}function p(t,n,r){var i=_r(e,u,null,t),o="ltr"==n==("after"==r)?"left":"right",a="after"==r?i.begin:i.end-(/\s/.test(u.text.charAt(i.end-1))?2:1);return h(a,o)[o]}var f=fe(u,i.direction);return ue(f,n||0,null==r?d:r,(function(e,t,i,u){var g="ltr"==i,m=h(e,g?"left":"right"),v=h(t-1,g?"right":"left"),b=null==n&&0==e,y=null==r&&t==d,w=0==u,x=!f||u==f.length-1;if(v.top-m.top<=3){var k=(c?b:y)&&w,C=(c?y:b)&&x,B=k?s:(g?m:v).left,_=C?l:(g?v:m).right;A(B,m.top,_-B,m.bottom)}else{var E,S,F,T;g?(E=c&&b&&w?s:m.left,S=c?l:p(e,i,"before"),F=c?s:p(t,i,"after"),T=c&&y&&x?l:v.right):(E=c?p(e,i,"before"):s,S=!c&&b&&w?l:m.right,F=!c&&y&&x?s:v.left,T=c?p(t,i,"after"):l),A(E,m.top,S-E,m.bottom),m.bottom<v.top&&A(s,m.bottom,null,v.top),A(F,v.top,T-F,v.bottom)}(!o||Vr(m,o)<0)&&(o=m),Vr(v,o)<0&&(o=v),(!a||Vr(m,a)<0)&&(a=m),Vr(v,a)<0&&(a=v)})),{start:o,end:a}}var d=t.from(),h=t.to();if(d.line==h.line)u(d.line,d.ch,h.ch);else{var p=Je(i,d.line),f=Je(i,h.line),g=en(p)==en(f),m=u(d.line,d.ch,g?p.text.length+1:null).end,v=u(h.line,g?0:null,h.ch).start;g&&(m.top<v.top-2?(A(m.right,m.top,null,m.bottom),A(s,v.top,v.left,v.bottom)):A(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&A(s,m.bottom,null,v.top)}n.appendChild(o)}function $r(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ei(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Jr(e))}function Xr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ei(e))}),100)}function Jr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,U(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$r(e))}function ei(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ti(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],A=e.options.lineWrapping,u=void 0,d=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var h=c.node.offsetTop+c.node.offsetHeight;u=h-n,n=h}else{var p=c.node.getBoundingClientRect();u=p.bottom-p.top,!A&&c.text.firstChild&&(d=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var f=c.line.height-u;if((f>.005||f<-.005)&&(i<r&&(o-=f),nt(c.line,u),ni(c.line),c.rest))for(var g=0;g<c.rest.length;g++)ni(c.rest[g]);if(d>e.display.sizerWidth){var m=Math.ceil(d/Ir(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ni(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ri(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-jn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=it(t,r),a=it(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=it(t,ln(Je(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=it(t,ln(Je(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ii(e,t){if(!we(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var a=T("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-jn(e.display))+"px;\n height: "+(t.bottom-t.top+$n(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function oi(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?st(t.line,t.ch+1,"before"):t,t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=wr(e,t),l=n&&n!=t?wr(e,n):s;i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r};var c=si(e,i),A=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=c.scrollTop&&(pi(e,c.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(a=!0)),null!=c.scrollLeft&&(gi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(a=!0)),!a)break}return i}function ai(e,t){var n=si(e,t);null!=n.scrollTop&&pi(e,n.scrollTop),null!=n.scrollLeft&&gi(e,n.scrollLeft)}function si(e,t){var n=e.display,r=Mr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Xn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Vn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var A=Math.min(t.top,(c?s:t.bottom)-o);A!=i&&(a.scrollTop=A)}var u=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-u,h=Yn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+u-(p?0:10)):t.right>h+d-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function li(e,t){null!=t&&(di(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ci(e){di(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ai(e,t,n){null==t&&null==n||di(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ui(e,t){di(e),e.curOp.scrollToPos=t}function di(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=xr(e,t.from),r=xr(e,t.to);hi(e,n,r,t.margin)}}function hi(e,t,n,r){var i=si(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ai(e,i.scrollLeft,i.scrollTop)}function pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Ki(e,{top:t}),fi(e,t,!0),n&&Ki(e),Di(e,100))}function fi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function gi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Gi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Vn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+$n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vi=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),me(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),me(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new R,this.disableVert=new R},vi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bi=function(){};function yi(e,t){t||(t=mi(e));var n=e.display.barWidth,r=e.display.barHeight;wi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ti(e),wi(e,mi(e)),n=e.display.barWidth,r=e.display.barHeight}function wi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}bi.prototype.update=function(){return{bottom:0,right:0}},bi.prototype.setScrollLeft=function(){},bi.prototype.setScrollTop=function(){},bi.prototype.clear=function(){};var xi={native:vi,null:bi};function ki(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?gi(e,t):pi(e,t)}),e),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)}var Ci=0;function Bi(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:++Ci,markArrays:null},En(e.curOp)}function _i(e){var t=e.curOp;t&&Fn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ei(e)}))}function Ei(e){for(var t=e.ops,n=0;n<t.length;n++)Si(t[n]);for(var r=0;r<t.length;r++)Fi(t[r]);for(var i=0;i<t.length;i++)Ti(t[i]);for(var o=0;o<t.length;o++)Mi(t[o]);for(var a=0;a<t.length;a++)Ii(t[a])}function Si(e){var t=e.cm,n=t.display;zi(t),e.updateMaxLine&&An(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Fi(e){e.updatedDisplay=e.mustUpdate&&Pi(e.cm,e.update)}function Ti(e){var t=e.cm,n=t.display;e.updatedDisplay&&ti(t),e.barMeasure=mi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=nr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+$n(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Mi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&gi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(D(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yi(t,e.barMeasure),e.updatedDisplay&&Vi(t,e.barMeasure),e.selectionChanged&&$r(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Yr(e.cm)}function Ii(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&qi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&gi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=oi(t,pt(r,e.scrollToPos.from),pt(r,e.scrollToPos.to),e.scrollToPos.margin);ii(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||ye(o[s],"hide");if(a)for(var l=0;l<a.length;++l)a[l].lines.length&&ye(a[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ni(e,t){if(e.curOp)return t();Bi(e);try{return t()}finally{_i(e)}}function Ui(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Bi(e);try{return t.apply(e,arguments)}finally{_i(e)}}}function Li(e){return function(){if(this.curOp)return e.apply(this,arguments);Bi(this);try{return e.apply(this,arguments)}finally{_i(this)}}}function Qi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Bi(t);try{return e.apply(this,arguments)}finally{_i(t)}}}function Di(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,O(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=wt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,l=bt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,A=l.classes;A?o.styleClasses=A:c&&(o.styleClasses=null);for(var u=!a||a.length!=o.styles.length||c!=A&&(!c||!A||c.bgClass!=A.bgClass||c.textClass!=A.textClass),d=0;!u&&d<a.length;++d)u=a[d]!=o.styles[d];u&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&xt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Di(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ni(e,(function(){for(var t=0;t<i.length;t++)zr(e,i[t],"text")}))}}var Oi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ri(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Yn(e),this.force=n,this.dims=Nr(e),this.events=[]};function zi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=$n(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=$n(e)+"px",t.scrollbarsClipped=!0)}function Zi(e){if(e.hasFocus())return null;var t=N(D(e));if(!t||!I(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=H(e).getSelection();r.anchorNode&&r.extend&&I(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ri(e){if(e&&e.activeElt&&e.activeElt!=N(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function Pi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Zr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==qr(e))return!1;$i(e)&&(Zr(e),t.dims=Nr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),It&&(o=rn(e.doc,o),a=on(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Pr(e,o,a),n.viewOffset=ln(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=qr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Zi(e);return l>4&&(n.lineDiv.style.display="none"),Wi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ri(c),S(n.cursorDiv),S(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Di(e,400)),n.updateLineNumbers=null,!0}function qi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))r&&(t.visible=ri(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Vn(e.display)-Xn(e),n.top)}),t.visible=ri(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Pi(e,t))break;ti(e);var i=mi(e);Kr(e),yi(e,i),Vi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,t){var n=new Oi(e,t);if(Pi(e,n)){ti(e),qi(e,n);var r=mi(e);Kr(e),yi(e,r),Vi(e,r),n.finish()}}function Wi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,A=r.viewFrom,u=0;u<c.length;u++){var d=c[u];if(d.hidden);else if(d.node&&d.node.parentNode==o){while(a!=d.node)a=s(a);var h=i&&null!=t&&t<=A&&d.lineNumber;d.changes&&(P(d.changes,"gutter")>-1&&(h=!1),Nn(e,d,A,n)),h&&(S(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(at(e.options,A)))),a=d.node.nextSibling}else{var p=Zn(e,d,A,n);o.insertBefore(p,a)}A+=d.size}while(a)a=s(a)}function ji(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Mn(e,"gutterChanged",e)}function Vi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+$n(e)+"px"}function Gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ur(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function $i(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=at(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ji(e.display),!0}return!1}function Yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Xi(e){var t=e.gutters,n=e.gutterSpecs;S(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(T("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ji(e)}function Ji(e){Xi(e.display),Or(e),Gi(e)}function eo(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=M("div",null,"CodeMirror-code"),o.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=T("div",null,"CodeMirror-cursors"),o.measure=T("div",null,"CodeMirror-measure"),o.lineMeasure=T("div",null,"CodeMirror-measure"),o.lineSpace=M("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=M("div",[o.lineSpace],"CodeMirror-lines");o.mover=T("div",[c],null,"position: relative"),o.sizer=T("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=T("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),o.gutters=T("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=T("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=T("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),A&&u>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Yi(i.gutters,i.lineNumbers),Xi(o),r.init(o)}Oi.prototype.signal=function(e,t){ke(e,t)&&this.events.push(arguments)},Oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var to=0,no=null;function ro(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function io(e){var t=ro(e);return t.x*=no,t.y*=no,t}function oo(e,t){A&&102==u&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var r=ro(t),i=r.x,o=r.y,a=no;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,c=s.scroller,h=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight;if(i&&h||o&&p){if(o&&b&&l)e:for(var f=t.target,g=s.view;f!=c;f=f.parentNode)for(var m=0;m<g.length;m++)if(g[m].node==f){e.display.currentWheelTarget=f;break e}if(i&&!n&&!d&&null!=a)return o&&p&&pi(e,Math.max(0,c.scrollTop+o*a)),gi(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&p)&&Be(t),void(s.wheelStartX=null);if(o&&null!=a){var v=o*a,y=e.doc.scrollTop,w=y+s.wrapper.clientHeight;v<0?y=Math.max(0,y+v-50):w=Math.min(e.doc.height,w+v+50),Ki(e,{top:y,bottom:w})}to<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(no=(no*to+n)/(to+1),++to)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?no=-.53:n?no=15:A?no=-.7:h&&(no=-1/3);var ao=function(e,t){this.ranges=e,this.primIndex=t};ao.prototype.primary=function(){return this.ranges[this.primIndex]},ao.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ct(n.anchor,r.anchor)||!ct(n.head,r.head))return!1}return!0},ao.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new so(At(this.ranges[t].anchor),At(this.ranges[t].head));return new ao(e,this.primIndex)},ao.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ao.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(lt(t,r.from())>=0&&lt(e,r.to())<=0)return n}return-1};var so=function(e,t){this.anchor=e,this.head=t};function lo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return lt(e.from(),t.from())})),n=P(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=lt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=dt(s.from(),a.from()),A=ut(s.to(),a.to()),u=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new so(u?A:c,u?c:A))}}return new ao(t,n)}function co(e,t){return new ao([new so(e,t||e)],0)}function Ao(e){return e.text?st(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return Ao(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ao(t).ch-t.to.ch),st(n,r)}function ho(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new so(uo(i.anchor,t),uo(i.head,t)))}return lo(e.cm,n,e.sel.primIndex)}function po(e,t,n){return e.line==t.line?st(n.line,e.ch-t.ch+n.ch):st(n.line+(e.line-t.line),e.ch)}function fo(e,t,n){for(var r=[],i=st(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=po(s.from,i,o),c=po(Ao(s),i,o);if(i=s.to,o=c,"around"==n){var A=e.sel.ranges[a],u=lt(A.head,A.anchor)<0;r[a]=new so(u?c:l,u?l:c)}else r[a]=new so(l,l)}return new ao(r,e.sel.primIndex)}function go(e){e.doc.mode=We(e.options,e.doc.modeOption),mo(e)}function mo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Di(e,100),e.state.modeGen++,e.curOp&&Or(e)}function vo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function bo(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){dn(e,n,i,r),Mn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new un(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,A=Je(e,s.line),u=Je(e,l.line),d=X(c),h=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(vo(e,t)){var f=a(0,c.length-1);o(u,u.text,h),p&&e.remove(s.line,p),f.length&&e.insert(s.line,f)}else if(A==u)if(1==c.length)o(A,A.text.slice(0,s.ch)+d+A.text.slice(l.ch),h);else{var g=a(1,c.length-1);g.push(new un(d+A.text.slice(l.ch),h,r)),o(A,A.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)o(A,A.text.slice(0,s.ch)+c[0]+u.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{o(A,A.text.slice(0,s.ch)+c[0],i(0)),o(u,d+u.text.slice(l.ch),h);var m=a(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}Mn(e,"change",e,t)}function yo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function wo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Qr(e),go(e),xo(e),e.options.direction=t.direction,e.options.lineWrapping||An(e),e.options.mode=t.modeOption,Or(e)}function xo(e){("rtl"==e.doc.direction?U:E)(e.display.lineDiv,"CodeMirror-rtl")}function ko(e){Ni(e,(function(){xo(e),Or(e)}))}function Co(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 Bo(e,t){var n={from:At(t.from),to:Ao(t),text:et(e,t.from,t.to)};return Io(e,n,t.from.line,t.to.line+1),yo(e,(function(e){return Io(e,n,t.from.line,t.to.line+1)}),!0),n}function _o(e){while(e.length){var t=X(e);if(!t.ranges)break;e.pop()}}function Eo(e,t){return t?(_o(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}function So(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Eo(i,i.lastOp==r)))a=X(o.changes),0==lt(t.from,t.to)&&0==lt(t.from,a.to)?a.to=Ao(t):o.changes.push(Bo(e,t));else{var l=X(i.done);l&&l.ranges||Mo(e.sel,i.done),o={changes:[Bo(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function Fo(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function To(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Fo(e,o,X(i.done),t))?i.done[i.done.length-1]=t:Mo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&_o(i.undone)}function Mo(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Io(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function No(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Uo(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(No(n[i]));return r}function Lo(e,t){var n=Uo(e,t),r=Zt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function Qo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ao.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],A=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var u in c)(A=u.match(/^spans_(\d+)$/))&&P(t,Number(A[1]))>-1&&(X(s)[u]=c[u],delete c[u])}}}return r}function Do(e,t,n,r){if(r){var i=e.anchor;if(n){var o=lt(t,i)<0;o!=lt(n,i)<0?(i=t,t=n):o!=lt(t,n)<0&&(t=n)}return new so(i,t)}return new so(n||t,t)}function Ho(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),qo(e,new ao([Do(e.sel.primary(),t,n,i)],0),r)}function Oo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Do(e.sel.ranges[o],t[o],null,i);var a=lo(e.cm,r,e.sel.primIndex);qo(e,a,n)}function zo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,qo(e,lo(e.cm,i,e.sel.primIndex),r)}function Zo(e,t,n,r){qo(e,co(t,n),r)}function Ro(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new so(pt(e,t[n].anchor),pt(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,r),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?lo(e.cm,r.ranges,r.ranges.length-1):t}function Po(e,t,n){var r=e.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=t,Ko(e,t,n)):qo(e,t,n)}function qo(e,t,n){Ko(e,t,n),To(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ko(e,t,n){(ke(e,"beforeSelectionChange")||e.cm&&ke(e.cm,"beforeSelectionChange"))&&(t=Ro(e,t,n));var r=n&&n.bias||(lt(t.primary().head,e.sel.primary().head)<0?-1:1);Wo(e,Vo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ci(e.cm)}function Wo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),Mn(e,"cursorActivity",e))}function jo(e){Wo(e,Vo(e,e.sel,null,!1))}function Vo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=$o(e,a.anchor,s&&s.anchor,n,r),c=a.head==a.anchor?l:$o(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new so(l,c))}return i?lo(e.cm,i,t.primIndex):t}function Go(e,t,n,r,i){var o=Je(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,A="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(A?s.to>=t.ch:s.to>t.ch))){if(i&&(ye(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u=l.find(r<0?1:-1),d=void 0;if((r<0?A:c)&&(u=Yo(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(d=lt(u,n))&&(r<0?d<0:d>0))return Go(e,u,t,r,i)}var h=l.find(r<0?-1:1);return(r<0?c:A)&&(h=Yo(e,h,r,h.line==t.line?o:null)),h?Go(e,h,t,r,i):null}}return t}function $o(e,t,n,r,i){var o=r||1,a=Go(e,t,n,o,i)||!i&&Go(e,t,n,o,!0)||Go(e,t,n,-o,i)||!i&&Go(e,t,n,-o,!0);return a||(e.cantEdit=!0,st(e.first,0))}function Yo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?pt(e,st(t.line-1)):null:n>0&&t.ch==(r||Je(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+n)}function Xo(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),W)}function Jo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=pt(e,t)),n&&(r.to=pt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ye(e,"beforeChange",e,r),e.cm&&ye(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 ea(e,t,n){if(e.cm){if(!e.cm.curOp)return Ui(e.cm,ea)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"))||(t=Jo(e,t,!0),t)){var r=Mt&&!n&&Pt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ta(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ta(e,t)}}function ta(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var n=ho(e,t);So(e,t,n,e.cm?e.cm.curOp.id:NaN),ia(e,t,n,Zt(e,t));var r=[];yo(e,(function(e,n){n||-1!=P(r,e.history)||(ca(e.history,t),r.push(e.history)),ia(e,t,null,Zt(e,t))}))}}function na(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length;c++)if(i=s[c],n?i.ranges&&!i.equals(e.sel):!i.ranges)break;if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(i=s.pop(),!i.ranges){if(r)return void s.push(i);break}if(Mo(i,l),n&&!i.equals(e.sel))return void qo(e,i,{clearRedo:!1});a=i}var A=[];Mo(a,l),l.push({changes:A,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var u=ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,u&&!Jo(e,r,!1))return s.length=0,{};A.push(Bo(e,r));var o=n?ho(e,r):X(s);ia(e,r,o,Lo(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ao(r)});var a=[];yo(e,(function(e,t){t||-1!=P(a,e.history)||(ca(e.history,r),a.push(e.history)),ia(e,r,null,Lo(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function ra(e,t){if(0!=t&&(e.first+=t,e.sel=new ao(J(e.sel.ranges,(function(e){return new so(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Or(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)zr(e.cm,r,"gutter")}}function ia(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ui(e.cm,ia)(e,t,n,r);if(t.to.line<e.first)ra(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ra(e,i),t={from:st(e.first,0),to:st(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:st(o,Je(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=et(e,t.from,t.to),n||(n=ho(e,t)),e.cm?oa(e.cm,t,r):bo(e,t,r),Ko(e,n,W),e.cantEdit&&$o(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function oa(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=rt(en(Je(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&xe(e),bo(r,t,n,Lr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=cn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Tt(r,o.line),Di(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Or(e):o.line!=a.line||1!=t.text.length||vo(e.doc,t)?Or(e,o.line,a.line+1,c):zr(e,o.line,"text");var A=ke(e,"changes"),u=ke(e,"change");if(u||A){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};u&&Mn(e,"change",e,d),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function aa(e,t,n,r,i){var o;r||(r=n),lt(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ea(e,{from:n,to:r,text:t,origin:i})}function sa(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function la(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)sa(o.ranges[s].anchor,t,n,r),sa(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=st(c.from.line+r,c.from.ch),c.to=st(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function ca(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;la(e.done,n,r,i),la(e.undone,n,r,i)}function Aa(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Je(e,ht(e,t)):i=rt(t),null==i?null:(r(o,i)&&e.cm&&zr(e.cm,i,n),o)}function ua(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function da(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}so.prototype.from=function(){return dt(this.anchor,this.head)},so.prototype.to=function(){return ut(this.anchor,this.head)},so.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ua.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,hn(i),Mn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},da.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ua))){var s=[];this.collapse(s),this.children=[new ua(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new ua(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new da(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=P(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new da(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ha=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function pa(e,t,n){ln(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&li(e,n)}function fa(e,t,n,r){var i=new ha(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Aa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!an(e,t)){var r=ln(t)<e.scrollTop;nt(t,t.height+Kn(i)),r&&li(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Mn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:rt(t)),i}ha.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=rt(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Kn(this);nt(n,Math.max(0,n.height-o)),e&&(Ni(e,(function(){pa(e,n,-o),zr(e,r,"widget")})),Mn(e,"lineWidgetCleared",e,this,r))}},ha.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Kn(this)-t;i&&(an(this.doc,r)||nt(r,r.height+i),n&&Ni(n,(function(){n.curOp.forceUpdate=!0,pa(n,r,i),Mn(n,"lineWidgetChanged",n,e,rt(r))})))},Ce(ha);var ga=0,ma=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ga};function va(e,t,n,r,i){if(r&&r.shared)return ya(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ui(e.cm,va)(e,t,n,r,i);var o=new ma(e,i),a=lt(t,n);if(r&&z(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Jt(e,t.line,t,n,o)||t.line!=n.line&&Jt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ut()}o.addToHistory&&So(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&en(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&nt(r,0),Ht(r,new Lt(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){an(e,t)&&nt(t,0)})),o.clearOnEnter&&me(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Nt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ga,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Or(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var A=t.line;A<=n.line;A++)zr(c,A,"text");o.atomic&&jo(c.doc),Mn(c,"markerAdded",c,o)}return o}ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Bi(e),ke(this,"clear")){var n=this.find();n&&Mn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Qt(a.markedSpans,this);e&&!this.collapsed?zr(e,rt(a),"text"):e&&(null!=s.to&&(i=rt(a)),null!=s.from&&(r=rt(a))),a.markedSpans=Dt(a.markedSpans,s),null==s.from&&this.collapsed&&!an(this.doc,a)&&e&&nt(a,Mr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=en(this.lines[l]),A=cn(c);A>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Or(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&jo(e.doc)),e&&Mn(e,"markerCleared",e,this,r,i),t&&_i(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Qt(o.markedSpans,this);if(null!=a.from&&(n=st(t?o:rt(o),a.from),-1==e))return n;if(null!=a.to&&(r=st(t?o:rt(o),a.to),1==e))return r}return n&&{from:n,to:r}},ma.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Ni(r,(function(){var i=t.line,o=rt(t.line),a=rr(r,o);if(a&&(dr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!an(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=Kn(n)-s;l&&nt(i,i.height+l)}Mn(r,"markerChanged",r,e)}))},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=P(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(P(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ce(ma);var ba=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ya(e,t,n,r,i){r=z(r),r.shared=!1;var o=[va(e,t,n,r,i)],a=o[0],s=r.widgetNode;return yo(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(va(e,pt(e,t),pt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=X(o)})),new ba(o,a)}function wa(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),(function(e){return e.parent}))}function xa(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(lt(o,a)){var s=va(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function ka(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];yo(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==P(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}ba.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Mn(this,"clear")}},ba.prototype.find=function(e,t){return this.primary.find(e,t)},Ce(ba);var Ca=0,Ba=function(e,t,n,r,i){if(!(this instanceof Ba))return new Ba(e,t,n,r,i);null==n&&(n=0),da.call(this,[new ua([new un("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=st(n,0);this.sel=co(o),this.history=new Co(null),this.id=++Ca,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),bo(this,{from:o,to:o,text:e}),qo(this,co(o),W)};Ba.prototype=ne(da.prototype,{constructor:Ba,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=tt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Qi((function(e){var t=st(this.first,0),n=this.first+this.size-1;ea(this,{from:t,to:st(n,Je(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ai(this.cm,0,0),qo(this,co(t),W)})),replaceRange:function(e,t,n,r){t=pt(this,t),n=n?pt(this,n):t,aa(this,e,t,n,r)},getRange:function(e,t,n){var r=et(this,pt(this,e),pt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ot(this,e))return Je(this,e)},getLineNumber:function(e){return rt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Je(this,e)),en(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||!1===e?n.to():n.from(),t},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Qi((function(e,t,n){Zo(this,pt(this,"number"==typeof e?st(e,t||0):e),null,n)})),setSelection:Qi((function(e,t,n){Zo(this,pt(this,e),pt(this,t||e),n)})),extendSelection:Qi((function(e,t,n){Ho(this,pt(this,e),t&&pt(this,t),n)})),extendSelections:Qi((function(e,t){Oo(this,gt(this,e),t)})),extendSelectionsBy:Qi((function(e,t){var n=J(this.sel.ranges,e);Oo(this,gt(this,n),t)})),setSelections:Qi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new so(pt(this,e[i].anchor),pt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),qo(this,lo(this.cm,r,t),n)}})),addSelection:Qi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new so(pt(this,e),pt(this,t||e))),qo(this,lo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=et(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=et(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Qi((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&fo(this,r,t),l=r.length-1;l>=0;l--)ea(this,r[l]);s?Po(this,s):this.cm&&ci(this.cm)})),undo:Qi((function(){na(this,"undo")})),redo:Qi((function(){na(this,"redo")})),undoSelection:Qi((function(){na(this,"undo",!0)})),redoSelection:Qi((function(){na(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Co(this.history),yo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Qo(this.history.done),undone:Qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Co(this.history);t.done=Qo(e.done.slice(0),null,!0),t.undone=Qo(e.undone.slice(0),null,!0)},setGutterMarker:Qi((function(e,t,n){return Aa(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ae(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Qi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Aa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!ot(this,e))return null;if(t=e,e=Je(this,e),!e)return null}else if(t=rt(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Qi((function(e,t,n){return Aa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(B(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Qi((function(e,t,n){return Aa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(B(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Qi((function(e,t,n){return fa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return va(this,pt(this,e),pt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=pt(this,e),va(this,e,e,n,"bookmark")},findMarksAt:function(e){e=pt(this,e);var t=[],n=Je(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=pt(this,e),t=pt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),pt(this,st(n,t))},indexFromPos:function(e){e=pt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ba(tt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ba(tt(this,t,n),e.mode||this.modeOption,t,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}],xa(r,wa(this)),r},unlinkDoc:function(e){if(e instanceof Os&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ka(wa(this));break}}if(e.history==this.history){var r=[e.id];yo(e,(function(e){return r.push(e.id)}),!0),e.history=new Co(null),e.history.done=Qo(this.history.done,r),e.history.undone=Qo(this.history.undone,r)}},iterLinkedDocs:function(e){yo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Qe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Qi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&ko(this.cm))}))}),Ba.prototype.eachLine=Ba.prototype.iter;var _a=0;function Ea(e){var t=this;if(Ta(t),!we(t,e)&&!Wn(t.display,e)){Be(e),a&&(_a=+new Date);var n=Dr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&Ui(t,(function(){n=pt(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ea(t.doc,e),Po(t.doc,co(pt(t.doc,n),pt(t.doc,Ao(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==P(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},A=0;A<r.length;A++)c(r[A],A);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Ko(t.doc,co(n,n)),d)for(var h=0;h<d.length;++h)aa(t.doc,"",d[h].anchor,d[h].head,"drag");t.replaceSelection(u,"around","paste"),t.display.input.focus()}}catch(p){}}}}function Sa(e,t){if(a&&(!e.state.draggingText||+new Date-_a<100))Se(t);else if(!we(e,t)&&!Wn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Fa(e,t){var n=Dr(e,t);if(n){var r=document.createDocumentFragment();jr(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),F(e.display.dragCursor,r)}}function Ta(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ma(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ia=!1;function Na(){Ia||(Ua(),Ia=!0)}function Ua(){var e;me(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ma(La)}),100))})),me(window,"blur",(function(){return Ma(ei)}))}function La(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Qa={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"},Da=0;Da<10;Da++)Qa[Da+48]=Qa[Da+96]=String(Da);for(var Ha=65;Ha<=90;Ha++)Qa[Ha]=String.fromCharCode(Ha);for(var Oa=1;Oa<=12;Oa++)Qa[Oa+111]=Qa[Oa+63235]="F"+Oa;var za={};function Za(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ra(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=J(n.split(" "),Za),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Pa(e,t,n,r){t=ja(t);var i=t.call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Pa(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Pa(e,t.fallthrough[o],n,r);if(a)return a}}}function qa(e){var t="string"==typeof e?e:Qa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ka(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Wa(e,t){if(d&&34==e.keyCode&&e["char"])return!1;var n=Qa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ka(n,e,t))}function ja(e){return"string"==typeof e?za[e]:e}function Va(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){var o=t(n[i]);while(r.length&&lt(o.from,X(r).to)<=0){var a=r.pop();if(lt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Ni(e,(function(){for(var t=r.length-1;t>=0;t--)aa(e.doc,"",r[t].from,r[t].to,"+delete");ci(e)}))}function Ga(e,t,n){var r=ce(e.text,t+n,n);return r<0||r>e.text.length?null:r}function $a(e,t,n){var r=Ga(e,t.ch,n);return null==r?null:new st(t.line,r,n<0?"after":"before")}function Ya(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(n,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var A=ir(t,n);a=i<0?n.text.length-1:0;var u=or(t,A,a).top;a=Ae((function(e){return or(t,A,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Ga(n,a,1))}else a=i<0?s.to:s.from;return new st(r,a,c)}}return new st(r,i<0?n.text.length:0,i<0?"before":"after")}function Xa(e,t,n,r){var i=fe(t,e.doc.direction);if(!i)return $a(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=he(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return $a(t,n,r);var s,l=function(e,n){return Ga(t,e instanceof st?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||ir(e,t),_r(e,t,s,n)):{begin:0,end:t.text.length}},A=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var u=1==a.level==r<0,d=l(n,u?1:-1);if(null!=d&&(u?d<=a.to&&d<=A.end:d>=a.from&&d>=A.begin)){var h=u?"before":"after";return new st(n.line,d,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new st(n.line,l(e,1),"before"):new st(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},f=p(o+r,r,A);if(f)return f;var g=r>0?A.end:l(A.begin,-1);return null==g||r>0&&g==t.text.length||(f=p(r>0?0:i.length-1,r,c(g)),!f)?null:f}za.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za["default"]=b?za.macDefault:za.pcDefault;var Ja={selectAll:Xo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),W)},killLine:function(e){return Va(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Va(e,(function(t){return{from:st(t.from().line,0),to:pt(e.doc,st(t.to().line+1,0))}}))},delLineLeft:function(e){return Va(e,(function(e){return{from:st(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Va(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}}))},delWrappedLineRight:function(e){return Va(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.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(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return es(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ns(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return ts(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ns(e,t.head):r}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=Z(e.getLine(o.line),o.ch,r);t.push(Y(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ni(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Je(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new st(i.line,i.ch-1)),i.ch>0)i=new st(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),st(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Je(e.doc,i.line-1).text;a&&(i=new st(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),st(i.line-1,a.length-1),i,"+transpose"))}n.push(new so(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Ni(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ci(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function es(e,t){var n=Je(e.doc,t),r=en(n);return r!=n&&(t=rt(r)),Ya(!0,e,r,t,1)}function ts(e,t){var n=Je(e.doc,t),r=tn(n);return r!=n&&(t=rt(r)),Ya(!0,e,n,t,-1)}function ns(e,t){var n=es(e,t.line),r=Je(e.doc,n.line),i=fe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return st(n.line,a?0:o,n.sticky)}return n}function rs(e,t,n){if("string"==typeof t&&(t=Ja[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=K}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function is(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Pa(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Pa(t,e.options.extraKeys,n,e)||Pa(t,e.options.keyMap,n,e)}var os=new R;function as(e,t,n,r){var i=e.state.keySeq;if(i){if(qa(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:os.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),ss(e,i+" "+t,n,r))return!0}return ss(e,t,n,r)}function ss(e,t,n,r){var i=is(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Mn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Be(n),$r(e)),!!i}function ls(e,t){var n=Wa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?as(e,"Shift-"+n,t,(function(t){return rs(e,t,!0)}))||as(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return rs(e,t)})):as(e,n,t,(function(t){return rs(e,t)})))}function cs(e,t,n){return as(e,"'"+n+"'",t,(function(t){return rs(e,t,!0)}))}var As=null;function us(e){var t=this;if((!e.target||e.target==t.display.input.getField())&&(t.curOp.focus=N(D(t)),!we(t,e))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ls(t,e);d&&(As=i?r:null,i||88!=r||He||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ds(t)}}function ds(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),be(document,"keyup",n),be(document,"mouseover",n))}U(t,"CodeMirror-crosshair"),me(document,"keyup",n),me(document,"mouseover",n)}function hs(e){16==e.keyCode&&(this.doc.sel.shift=!1),we(this,e)}function ps(e){var t=this;if((!e.target||e.target==t.display.input.getField())&&!(Wn(t.display,e)||we(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==As)return As=null,void Be(e);if(!d||e.which&&!(e.which<10)||!ls(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(cs(t,e,i)||t.display.input.onKeyPress(e))}}}var fs,gs,ms=400,vs=function(e,t,n){this.time=e,this.pos=t,this.button=n};function bs(e,t){var n=+new Date;return gs&&gs.compare(n,e,t)?(fs=gs=null,"triple"):fs&&fs.compare(n,e,t)?(gs=new vs(n,e,t),fs=null,"double"):(fs=new vs(n,e,t),gs=null,"single")}function ys(e){var t=this,n=t.display;if(!(we(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Wn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Fs(t,e)){var r=Dr(t,e),i=Te(e),o=r?bs(r,i):"single";H(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&ws(t,i,r,o,e)||(1==i?r?ks(t,r,o,e):Fe(e)==n.scroller&&Be(e):2==i?(r&&Ho(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Xr(t)))}}function ws(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,as(e,Ka(o,i),i,(function(t){if("string"==typeof t&&(t=Ja[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=K}finally{e.state.suppressEdits=!1}return r}))}function xs(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=y?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}function ks(e,t,n,r){a?setTimeout(O(Yr,e),0):e.curOp.focus=N(D(e));var i,o=xs(e,n,r),s=e.doc.sel;e.options.dragDrop&&Ne&&!e.isReadOnly()&&"single"==n&&(i=s.contains(t))>-1&&(lt((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(lt(i.to(),t)>0||t.xRel<0)?Cs(e,r,t,o):_s(e,r,t,o)}function Cs(e,t,n,r){var i=e.display,o=!1,c=Ui(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Xr(e)),be(i.wrapper.ownerDocument,"mouseup",c),be(i.wrapper.ownerDocument,"mousemove",A),be(i.scroller,"dragstart",u),be(i.scroller,"drop",c),o||(Be(t),r.addNew||Ho(e.doc,n,null,null,r.extend),l&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),A=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},u=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,me(i.wrapper.ownerDocument,"mouseup",c),me(i.wrapper.ownerDocument,"mousemove",A),me(i.scroller,"dragstart",u),me(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Bs(e,t,n){if("char"==n)return new so(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new so(st(t.line,0),pt(e.doc,st(t.line+1,0)));var r=n(e,t);return new so(r.from,r.to)}function _s(e,t,n,r){a&&Xr(e);var i=e.display,o=e.doc;Be(t);var s,l,c=o.sel,A=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?A[l]:new so(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new so(n,n)),n=Dr(e,t,!0,!0),l=-1;else{var u=Bs(e,n,r.unit);s=r.extend?Do(s,u.anchor,u.head,r.extend):u}r.addNew?-1==l?(l=A.length,qo(o,lo(e,A.concat([s]),l),{scroll:!1,origin:"*mouse"})):A.length>1&&A[l].empty()&&"char"==r.unit&&!r.extend?(qo(o,lo(e,A.slice(0,l).concat(A.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):zo(o,l,s,j):(l=0,qo(o,new ao([s],0),j),c=o.sel);var d=n;function h(t){if(0!=lt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,A=Z(Je(o,n.line).text,n.ch,a),u=Z(Je(o,t.line).text,t.ch,a),h=Math.min(A,u),p=Math.max(A,u),f=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));f<=g;f++){var m=Je(o,f).text,v=G(m,h,a);h==p?i.push(new so(st(f,v),st(f,v))):m.length>v&&i.push(new so(st(f,v),st(f,G(m,p,a))))}i.length||i.push(new so(n,n)),qo(o,lo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,y=s,w=Bs(e,t,r.unit),x=y.anchor;lt(w.anchor,x)>0?(b=w.head,x=dt(y.from(),w.anchor)):(b=w.anchor,x=ut(y.to(),w.head));var k=c.ranges.slice(0);k[l]=Es(e,new so(pt(o,x),b)),qo(o,lo(e,k,l),j)}}var p=i.wrapper.getBoundingClientRect(),f=0;function g(t){var n=++f,a=Dr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=lt(a,d)){e.curOp.focus=N(D(e)),h(a);var s=ri(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ui(e,(function(){f==n&&g(t)})),150)}else{var l=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;l&&setTimeout(Ui(e,(function(){f==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function m(t){e.state.selectingText=!1,f=1/0,t&&(Be(t),i.input.focus()),be(i.wrapper.ownerDocument,"mousemove",v),be(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var v=Ui(e,(function(e){0!==e.buttons&&Te(e)?g(e):m(e)})),b=Ui(e,m);e.state.selectingText=b,me(i.wrapper.ownerDocument,"mousemove",v),me(i.wrapper.ownerDocument,"mouseup",b)}function Es(e,t){var n=t.anchor,r=t.head,i=Je(e.doc,n.line);if(0==lt(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var a=he(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var A=he(o,r.ch,r.sticky),u=A-a||(r.ch-n.ch)*(1==s.level?-1:1);l=A==c-1||A==c?u<0:u>0}var d=o[c+(l?-1:0)],h=l==(1==d.level),p=h?d.from:d.to,f=h?"after":"before";return n.ch==p&&n.sticky==f?t:new so(new st(n.line,p,f),r)}function Ss(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(d){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ke(e,n))return Ee(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i){var A=it(e.doc,o),u=e.display.gutterSpecs[l];return ye(e,n,e,A,u.className,t),Ee(t)}}}function Fs(e,t){return Ss(e,t,"gutterClick",!0)}function Ts(e,t){Wn(e.display,t)||Ms(e,t)||we(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ms(e,t){return!!ke(e,"gutterContextMenu")&&Ss(e,t,"gutterContextMenu",!1)}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pr(e)}vs.prototype.compare=function(e,t,n){return this.time+ms>e&&0==lt(t,this.pos)&&n==this.button};var Ns={toString:function(){return"CodeMirror.Init"}},Us={},Ls={};function Qs(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ns&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ns,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,go(e)}),!0),n("indentUnit",2,go,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){mo(e),pr(e),Or(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(st(r,o))}r++}));for(var i=n.length-1;i>=0;i--)aa(e.doc,t,n[i],st(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ns&&e.refresh()})),n("specialCharPlaceholder",vn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Is(e),Ji(e)}),!0),n("keyMap","default",(function(e,t,n){var r=ja(t),i=n!=Ns&&ja(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Hs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Ji(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ur(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),n("scrollbarStyle","native",(function(e){ki(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Ji(e)}),!0),n("firstLineNumber",1,Ji,!0),n("lineNumberFormatter",(function(e){return e}),Ji,!0),n("showCursorWhenSelecting",!1,Kr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ei(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ds),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Kr,!0),n("singleCursorHeightPerLine",!0,Kr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Ds(e,t,n){var r=n&&n!=Ns;if(!t!=!r){var i=e.display.dragFunctions,o=t?me:be;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Hs(e){e.options.lineWrapping?(U(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),An(e)),Qr(e),Or(e),pr(e),setTimeout((function(){return yi(e)}),100)}function Os(e,t){var n=this;if(!(this instanceof Os))return new Os(e,t);this.options=t=t?z(t):{},z(Us,t,!1);var r=t.value;"string"==typeof r?r=new Ba(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Os.inputStyles[t.inputStyle](this),o=this.display=new eo(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ki(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 R,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),zs(this),Na(),Bi(this),this.curOp.forceUpdate=!0,wo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Jr(n)}),20):ei(this),Ls)Ls.hasOwnProperty(c)&&Ls[c](this,t[c],Ns);$i(this),t.finishInit&&t.finishInit(this);for(var A=0;A<Zs.length;++A)Zs[A](this);_i(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function zs(e){var t=e.display;me(t.scroller,"mousedown",Ui(e,ys)),me(t.scroller,"dblclick",a&&s<11?Ui(e,(function(t){if(!we(e,t)){var n=Dr(e,t);if(n&&!Fs(e,t)&&!Wn(e.display,t)){Be(t);var r=e.findWordAt(n);Ho(e.doc,r.anchor,r.head)}}})):function(t){return we(e,t)||Be(t)}),me(t.scroller,"contextmenu",(function(t){return Ts(e,t)})),me(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ts(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),r=t.activeTouch,r.end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}me(t.scroller,"touchstart",(function(i){if(!we(e,i)&&!o(i)&&!Fs(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Wn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new so(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new so(st(a.line,0),pt(e.doc,st(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Be(n)}i()})),me(t.scroller,"touchcancel",i),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(pi(e,t.scroller.scrollTop),gi(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return oo(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return oo(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){we(e,t)||Se(t)},over:function(t){we(e,t)||(Fa(e,t),Se(t))},start:function(t){return Sa(e,t)},drop:Ui(e,Ea),leave:function(t){we(e,t)||Ta(e)}};var c=t.input.getField();me(c,"keyup",(function(t){return hs.call(e,t)})),me(c,"keydown",Ui(e,us)),me(c,"keypress",Ui(e,ps)),me(c,"focus",(function(t){return Jr(e,t)})),me(c,"blur",(function(t){return ei(e,t)}))}Os.defaults=Us,Os.optionHandlers=Ls;var Zs=[];function Rs(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=wt(e,t).state:n="prev");var a=e.options.tabSize,s=Je(o,t),l=Z(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,A=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(c=o.mode.indent(i,s.text.slice(A.length),s.text),c==K||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Z(Je(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var u="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)d+=a,u+="\t";if(d<c&&(u+=Y(c-d)),u!=A)return aa(o,u,st(t,0),st(t,A.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var f=o.sel.ranges[p];if(f.head.line==t&&f.head.ch<A.length){var g=st(t,A.length);zo(o,p,new so(g,g));break}}}Os.defineInitHook=function(e){return Zs.push(e)};var Ps=null;function qs(e){Ps=e}function Ks(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=Qe(t),c=null;if(s&&r.ranges.length>1)if(Ps&&Ps.text.join("\n")==t){if(r.ranges.length%Ps.text.length==0){c=[];for(var A=0;A<Ps.text.length;A++)c.push(o.splitLines(Ps.text[A]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=J(l,(function(e){return[e]})));for(var u=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var h=r.ranges[d],p=h.from(),f=h.to();h.empty()&&(n&&n>0?p=st(p.line,p.ch-n):e.state.overwrite&&!s?f=st(f.line,Math.min(Je(o,f.line).text.length,f.ch+X(l).length)):s&&Ps&&Ps.lineWise&&Ps.text.join("\n")==l.join("\n")&&(p=f=st(p.line,0)));var g={from:p,to:f,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ea(e.doc,g),Mn(e,"inputRead",e,g)}t&&!s&&js(e,t),ci(e),e.curOp.updateInput<2&&(e.curOp.updateInput=u),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ws(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Ni(t,(function(){return Ks(t,n,0,null,"paste")})),!0}function js(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Rs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Je(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Rs(e,i.head.line,"smart"));a&&Mn(e,"electricInput",e,i.head.line)}}}function Vs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:st(i,0),head:st(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Gs(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function $s(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function Ys(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){H(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ui(this,t[e])(this,n,i),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ja(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Li((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Or(this)})),removeOverlay:Li((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Or(this)}})),indentLine:Li((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ot(this.doc,e)&&Rs(this,e,t,n)})),indentSelection:Li((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Rs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ci(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Rs(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&zo(this.doc,r,new so(o,c[r].to()),W)}}})),getTokenAt:function(e,t){return _t(this,e,t)},getLineTokens:function(e,t){return _t(this,st(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,n=yt(this,Je(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==P(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=ht(n,null==e?n.first+n.size-1:e),wt(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?pt(this.doc,e):e?r.from():r.to(),wr(this,n,t||"page")},charCoords:function(e,t){return yr(this,pt(this.doc,e),t||"page")},coordsChar:function(e,t){return e=br(this,e,t||"page"),Cr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=br(this,{top:e,left:0},t||"page").top,it(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Je(this.doc,e)}else r=e;return vr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-ln(r):0)},defaultTextHeight:function(){return Mr(this.display)},defaultCharWidth:function(){return Ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=wr(this,pt(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ai(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Li(us),triggerOnKeyPress:Li(ps),triggerOnKeyUp:hs,triggerOnMouseDown:Li(ys),execCommand:function(e){if(Ja.hasOwnProperty(e))return Ja[e].call(null,this)},triggerElectric:Li((function(e){js(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=pt(this.doc,e),a=0;a<t;++a)if(o=Xs(this.doc,o,i,n,r),o.hitSide)break;return o},moveH:Li((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Xs(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),V)})),deleteH:Li((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Va(this,(function(n){var i=Xs(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=pt(this.doc,e),s=0;s<t;++s){var l=wr(this,a,"div");if(null==o?o=l.left:l.left=o,a=Js(this,l,i,n),a.hitSide)break}return a},moveV:Li((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=wr(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Js(n,s,e,t);return"page"==t&&a==r.sel.primary()&&li(n,yr(n,l,"div").top-s.top),l}),V),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=this.doc,n=Je(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=n.length||!r?++i:--r;var a=n.charAt(r),s=oe(a,o)?function(e){return oe(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!oe(e)};while(r>0&&s(n.charAt(r-1)))--r;while(i<n.length&&s(n.charAt(i)))++i}return new so(st(e.line,r),st(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?U(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N(D(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Li((function(e,t){Ai(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-$n(this)-this.display.barHeight,width:e.scrollWidth-$n(this)-this.display.barWidth,clientHeight:Xn(this),clientWidth:Yn(this)}},scrollIntoView:Li((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?ui(this,e):hi(this,e.from,e.to,e.margin)})),setSize:Li((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&hr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){zr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return Ni(this,e)},startOperation:function(){return Bi(this)},endOperation:function(){return _i(this)},refresh:Li((function(){var e=this.display.cachedTextHeight;Or(this),this.curOp.forceUpdate=!0,pr(this),Ai(this,this.doc.scrollLeft,this.doc.scrollTop),ji(this.display),(null==e||Math.abs(e-Mr(this.display))>.5||this.options.lineWrapping)&&Qr(this),ye(this,"refresh",this)})),swapDoc:Li((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wo(this,e),pr(this),this.display.input.reset(),Ai(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Mn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ce(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Xs(e,t,n,r,i){var o=t,a=n,s=Je(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new st(n,t.ch,t.sticky),s=Je(e,n))}function A(o){var a;if("codepoint"==r){var A=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(A))a=null;else{var u=n>0?A>=55296&&A<56320:A>=56320&&A<57343;a=new st(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u?2:1))),-n)}}else a=i?Xa(e.cm,s,t,n):$a(s,t,n);if(null==a){if(o||!c())return!1;t=Ya(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)A();else if("column"==r)A(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!A(!p))break;var f=s.text.charAt(t.ch)||"\n",g=oe(f,h)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||p||g||(g="s"),u&&u!=g){n<0&&(n=1,A(),t.sticky="after");break}if(g&&(u=g),n>0&&!A(!p))break}var m=$o(e,t,o,a,!0);return ct(o,m)&&(m.hitSide=!0),m}function Js(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,H(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*Mr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=Cr(e,s,i),!o.outside)break;if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var el=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function tl(e,t){var n=rr(e,t.line);if(!n||n.hidden)return null;var r=Je(e.doc,t.line),i=er(n,r,t.line),o=fe(r,e.doc.direction),a="left";if(o){var s=he(o,t.ch);a=s%2?"right":"left"}var l=lr(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function nl(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rl(e,t){return t&&(e.bad=!0),e}function il(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function A(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(A(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(st(r,0),st(i+1,0),c(+h));return void(p.length&&(o=p[0].find(0))&&u(et(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&A();for(var g=0;g<t.childNodes.length;g++)d(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),f&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;;){if(d(t),t==n)break;t=t.nextSibling,l=!1}return o}function ol(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return rl(e.clipPos(st(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return al(o,t,n)}}function al(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!I(r,t))return rl(st(rt(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?X(e.rest):e.line;return rl(st(rt(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));while(s.parentNode!=r)s=s.parentNode;var l=e.measure,c=l.maps;function A(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var A=rt(i<0?e.line:e.rest[i]),u=o[a]+r;return(r<0||s!=t)&&(u=o[a+(r?1:0)]),st(A,u)}}}var u=A(a,s,n);if(u)return rl(u,i);for(var d=s.nextSibling,h=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(u=A(d,d.firstChild,0),u)return rl(st(u.line,u.ch-h),i);h+=d.textContent.length}for(var p=s.previousSibling,f=n;p;p=p.previousSibling){if(u=A(p,p.firstChild,-1),u)return rl(st(u.line,u.ch+f),i);f+=p.textContent.length}}el.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!we(r,e)){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Vs(r);qs({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,W),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Ps.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=$s(),l=s.firstChild;Gs(l),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Ps.text.join("\n");var c=N(i.ownerDocument);Q(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Gs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),me(i,"paste",(function(e){!o(e)||we(r,e)||Ws(e,r)||s<=11&&setTimeout(Ui(r,(function(){return t.updateFromDOM()})),20)})),me(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),me(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),me(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),me(i,"touchstart",(function(){return n.forceCompositionEnd()})),me(i,"input",(function(){t.composing||t.readFromDOMSoon()})),me(i,"copy",a),me(i,"cut",a)},el.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},el.prototype.prepareSelection=function(){var e=Wr(this.cm,!1);return e.focus=N(this.div.ownerDocument)==this.div,e},el.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},el.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},el.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=ol(t,e.anchorNode,e.anchorOffset),s=ol(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=lt(dt(a,s),i)||0!=lt(ut(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&tl(t,i)||{node:l[0].measure.map[2],offset:0},A=o.line<t.display.viewTo&&tl(t,o);if(!A){var u=l[l.length-1].measure,d=u.maps?u.maps[u.maps.length-1]:u.map;A={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&A){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=_(c.node,c.offset,A.offset,A.node)}catch(f){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},el.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)},el.prototype.showMultipleSelections=function(e){F(this.cm.display.cursorDiv,e.cursors),F(this.cm.display.selectionDiv,e.selection)},el.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},el.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},el.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&N(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},el.prototype.blur=function(){this.div.blur()},el.prototype.getField=function(){return this.div},el.prototype.supportsTouch=function(){return!0},el.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Ni(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},el.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},el.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&A&&this.cm.display.gutterSpecs.length&&nl(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ol(t,e.anchorNode,e.anchorOffset),r=ol(t,e.focusNode,e.focusOffset);n&&r&&Ni(t,(function(){qo(t.doc,co(n,r),W),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},el.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=st(a.line-1,Je(r.doc,a.line-1).length)),s.ch==Je(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=st(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Hr(r,a.line))?(t=rt(i.view[0].line),n=i.view[0].node):(t=rt(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,A=Hr(r,s.line);if(A==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=rt(i.view[A+1].line)-1,c=i.view[A+1].node.previousSibling),!n)return!1;var u=r.doc.splitLines(il(r,n,c,t,l)),d=et(r.doc,st(t,0),st(l,Je(r.doc,l).text.length));while(u.length>1&&d.length>1)if(X(u)==X(d))u.pop(),d.pop(),l--;else{if(u[0]!=d[0])break;u.shift(),d.shift(),t++}var h=0,p=0,f=u[0],g=d[0],m=Math.min(f.length,g.length);while(h<m&&f.charCodeAt(h)==g.charCodeAt(h))++h;var v=X(u),b=X(d),y=Math.min(v.length-(1==u.length?h:0),b.length-(1==d.length?h:0));while(p<y&&v.charCodeAt(v.length-p-1)==b.charCodeAt(b.length-p-1))++p;if(1==u.length&&1==d.length&&t==a.line)while(h&&h>a.ch&&v.charCodeAt(v.length-p-1)==b.charCodeAt(b.length-p-1))h--,p++;u[u.length-1]=v.slice(0,v.length-p).replace(/^\u200b+/,""),u[0]=u[0].slice(h).replace(/\u200b+$/,"");var w=st(t,h),x=st(l,d.length?X(d).length-p:0);return u.length>1||u[0]||lt(w,x)?(aa(r.doc,u,w,x,"+input"),!0):void 0},el.prototype.ensurePolled=function(){this.forceCompositionEnd()},el.prototype.reset=function(){this.forceCompositionEnd()},el.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},el.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},el.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ni(this.cm,(function(){return Or(e.cm)}))},el.prototype.setUneditable=function(e){e.contentEditable="false"},el.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ui(this.cm,Ks)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},el.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},el.prototype.onContextMenu=function(){},el.prototype.resetPosition=function(){},el.prototype.needsContentAttribute=!0;var sl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ll(e,t){if(t=t?z(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(me(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(be(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Os((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function cl(e){e.off=be,e.on=me,e.wheelEventPixels=io,e.Doc=Ba,e.splitLines=Qe,e.countColumn=Z,e.findColumn=G,e.isWordChar=ie,e.Pass=K,e.signal=ye,e.Line=un,e.changeEnd=Ao,e.scrollbarModel=xi,e.Pos=st,e.cmpPos=lt,e.modes=Ze,e.mimeModes=Re,e.resolveMode=Ke,e.getMode=We,e.modeExtensions=je,e.extendMode=Ve,e.copyState=Ge,e.startState=Ye,e.innerMode=$e,e.commands=Ja,e.keyMap=za,e.keyName=Wa,e.isModifierKey=qa,e.lookupKey=Pa,e.normalizeKeyMap=Ra,e.StringStream=Xe,e.SharedTextMarker=ba,e.TextMarker=ma,e.LineWidget=ha,e.e_preventDefault=Be,e.e_stopPropagation=_e,e.e_stop=Se,e.addClass=U,e.contains=I,e.rmClass=E,e.keyNames=Qa}sl.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!we(r,e)){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Vs(r);qs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,W):(n.prevInput="",i.value=t.text.join("\n"),Q(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),me(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),me(i,"paste",(function(e){we(r,e)||Ws(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",(function(t){if(!Wn(e,t)&&!we(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),me(e.lineSpace,"selectstart",(function(t){Wn(e,t)||Be(t)})),me(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),me(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},sl.prototype.createField=function(e){this.wrapper=$s(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Gs(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},sl.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},sl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Wr(e);if(e.options.moveInputWithCursor){var i=wr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},sl.prototype.showSelection=function(e){var t=this.cm,n=t.display;F(n.cursorDiv,e.cursors),F(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},sl.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Q(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},sl.prototype.getField=function(){return this.textarea},sl.prototype.supportsTouch=function(){return!1},sl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},sl.prototype.blur=function(){this.textarea.blur()},sl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sl.prototype.receivedFocus=function(){this.slowPoll()},sl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},sl.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},sl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||De(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}var l=0,c=Math.min(r.length,i.length);while(l<c&&r.charCodeAt(l)==i.charCodeAt(l))++l;return Ni(t,(function(){Ks(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},sl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sl.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},sl.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Dr(n,e),c=r.scroller.scrollTop;if(o&&!d){var A=n.options.resetSelectionOnContextMenu;A&&-1==n.doc.sel.contains(o)&&Ui(n,qo)(n.doc,co(o),W);var u,h=i.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=i.ownerDocument.defaultView.scrollY),r.input.focus(),l&&i.ownerDocument.defaultView.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),C){Se(e);var g=function(){be(window,"mouseup",g),setTimeout(v,20)};me(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Ui(n,Xo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},sl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},sl.prototype.setUneditable=function(){},sl.prototype.needsContentAttribute=!1,Qs(Os),Ys(Os);var Al="iter insert remove copy getEditor constructor".split(" ");for(var ul in Ba.prototype)Ba.prototype.hasOwnProperty(ul)&&P(Al,ul)<0&&(Os.prototype[ul]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ba.prototype[ul]));return Ce(Ba),Os.inputStyles={textarea:sl,contenteditable:el},Os.defineMode=function(e){Os.defaults.mode||"null"==e||(Os.defaults.mode=e),Pe.apply(this,arguments)},Os.defineMIME=qe,Os.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Os.defineMIME("text/plain","null"),Os.defineExtension=function(e,t){Os.prototype[e]=t},Os.defineDocExtension=function(e,t){Ba.prototype[e]=t},Os.fromTextArea=ll,cl(Os),Os.version="5.65.14",Os}))},8365:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return"function"===typeof e?e(t):e.propertyIsEnumerable(t)}e.defineMode("clike",(function(a,l){var c,A,u=a.indentUnit,d=l.statementIndentUnit||u,h=l.dontAlignCalls,p=l.keywords||{},f=l.types||{},g=l.builtin||{},m=l.blockKeywords||{},v=l.defKeywords||{},b=l.atoms||{},y=l.hooks||{},w=l.multiLineStrings,x=!1!==l.indentStatements,k=!1!==l.indentSwitch,C=l.namespaceSeparator,B=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,_=l.numberStart||/[\d\.]/,E=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,S=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,F=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,T=l.isReservedIdentifier||!1;function M(e,t){var n=e.next();if(y[n]){var r=y[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=I(n),t.tokenize(e,t);if(_.test(n)){if(e.backUp(1),e.match(E))return"number";e.next()}if(B.test(n))return c=n,null;if("/"==n){if(e.eat("*"))return t.tokenize=N,N(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(S.test(n)){while(!e.match(/^\/[\/*]/,!1)&&e.eat(S));return"operator"}if(e.eatWhile(F),C)while(e.match(C))e.eatWhile(F);var i=e.current();return s(p,i)?(s(m,i)&&(c="newstatement"),s(v,i)&&(A=!0),"keyword"):s(f,i)?"type":s(g,i)||T&&T(i)?(s(m,i)&&(c="newstatement"),"builtin"):s(b,i)?"atom":"variable"}function I(e){return function(t,n){var r,i=!1,o=!1;while(null!=(r=t.next())){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!w)&&(n.tokenize=null),"string"}}function N(e,t){var n,r=!1;while(n=e.next()){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function U(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-u,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return U(e,t),null;c=A=null;var s=(t.tokenize||M)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))while("statement"==t.context.type)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){while("statement"==a.type)a=r(t);"}"==a.type&&(a=r(t));while("statement"==a.type)a=r(t)}else c==a.type?r(t):x&&(("}"==a.type||"top"==a.type)&&";"!=c||"statement"==a.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),y.token){var u=y.token(e,t,s);void 0!==u&&(s=u)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=A?"def":s||c,U(e,t),s},indent:function(t,n){if(t.tokenize!=M&&null!=t.tokenize||t.typeAtEndOfLine&&o(t.context))return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)while("statement"==r.type&&l.dontIndentStatements.test(r.info))r=r.prev;if(y.indent){var s=y.indent(t,r,n,u);if("number"==typeof s)return s}var c=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){while("top"!=r.type&&"}"!=r.type)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:d):!r.align||h&&")"==r.type?")"!=r.type||a?r.indented+(a?0:u)+(a||!c||/^(?:case|default)\b/.test(n)?0:u):r.indented+d:r.column+(a?0:1)},electricInput:k?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",A="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",u="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",d=a("int long char short double float unsigned signed void bool"),h=a("SEL instancetype id Class Protocol BOOL");function p(e){return s(d,e)||/.+_t$/.test(e)}function f(e){return p(e)||s(h,e)}var g="case do else for if switch while struct enum union",m="struct enum union";function v(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=v;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function b(e,t){return"type"==t.prevToken&&"type"}function y(e){return!(!e||e.length<2)&&("_"==e[0]&&("_"==e[1]||e[1]!==e[1].toLowerCase()))}function w(e){return e.eatWhile(/[\w\.']/),"number"}function x(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=B,B(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function k(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function C(e,t){var n;while(null!=(n=e.next()))if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function B(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),r=e.match(new RegExp(".*?\\)"+n+'"'));return r?t.tokenize=null:e.skipToEnd(),"string"}function _(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function E(e,t){var n=!1;while(!e.eol()){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function S(e){return function(t,n){var r;while(r=t.next()){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=S(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=S(e+1),n.tokenize(t,n)}return"comment"}}function F(e){return function(t,n){var r,i=!1,o=!1;while(!t.eol()){if(!e&&!i&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!o&&e||(n.tokenize=null),"string"}}_(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(l),types:p,blockKeywords:a(g),defKeywords:a(m),typeFirstDefinitions:!0,atoms:a("NULL true false"),isReservedIdentifier:y,hooks:{"#":v,"*":b},modeProps:{fold:["brace","include"]}}),_(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(l+" "+c),types:p,blockKeywords:a(g+" class try catch"),defKeywords:a(m+" class namespace"),typeFirstDefinitions:!0,atoms:a("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:y,hooks:{"#":v,"*":b,u:x,U:x,L:x,R:x,0:w,1:w,2:w,3:w,4:w,5:w,6:w,7:w,8:w,9:w,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&k(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),_("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:a("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")},'"':function(e,t){return!!e.match(/""$/)&&(t.tokenize=E,t.tokenize(e,t))}},modeProps:{fold:["brace","import"]}}),_("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=C,C(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),_("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class enum do else finally for forSome if match switch try while"),defKeywords:a("class enum def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=E,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=S(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),_("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=F(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=S(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),_(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":v},modeProps:{fold:["brace","include"]}}),_("text/x-nesc",{name:"clike",keywords:a(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:p,blockKeywords:a(g),atoms:a("null true false"),hooks:{"#":v},modeProps:{fold:["brace","include"]}}),_("text/x-objectivec",{name:"clike",keywords:a(l+" "+A),types:f,builtin:a(u),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a(m+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:y,hooks:{"#":v,"*":b},modeProps:{fold:["brace","include"]}}),_("text/x-objectivec++",{name:"clike",keywords:a(l+" "+A+" "+c),types:f,builtin:a(u),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a(m+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:y,hooks:{"#":v,"*":b,u:x,U:x,L:x,R:x,0:w,1:w,2:w,3:w,4:w,5:w,6:w,7:w,8:w,9:w,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&k(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),_("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:p,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":v},modeProps:{fold:["brace","include"]}});var T=null;function M(e){return function(t,n){var r,i=!1,o=!1;while(!t.eol()){if(!i&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!i&&t.match("``")){T=M(e),o=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return o&&(n.tokenize=null),"string"}}_("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=M(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!T||!e.match("`"))&&(t.tokenize=T,T=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}))},70189:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("cmake",(function(){var e=/({)?[a-zA-Z0-9_]+(})?/;function t(e,t){var n,r,i=!1;while(!e.eol()&&(n=e.next())!=t.pending){if("$"===n&&"\\"!=r&&'"'==t.pending){i=!0;break}r=n}return i&&e.backUp(1),n==t.pending?t.continueString=!1:t.continueString=!0,"string"}function n(n,r){var i=n.next();return"$"===i?n.match(e)?"variable-2":"variable":r.continueString?(n.backUp(1),t(n,r)):n.match(/(\s+)?\w+\(/)||n.match(/(\s+)?\w+\ \(/)?(n.backUp(1),"def"):"#"==i?(n.skipToEnd(),"comment"):"'"==i||'"'==i?(r.pending=i,t(n,r)):"("==i||")"==i?"bracket":i.match(/[0-9]/)?"number":(n.eatWhile(/[\w-]/),null)}return{startState:function(){var e={inDefinition:!1,inInclude:!1,continueString:!1,pending:!1};return e},token:function(e,t){return e.eatSpace()?null:n(e,t)}}})),e.defineMIME("text/x-cmake","cmake")}))},16880:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var i,o,a=t.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},A=n.mediaFeatures||{},u=n.mediaValueKeywords||{},d=n.propertyKeywords||{},h=n.nonStandardPropertyKeywords||{},p=n.fontProperties||{},f=n.counterDescriptors||{},g=n.colorKeywords||{},m=n.valueKeywords||{},v=n.allowNested,b=n.lineComment,y=!0===n.supportsAtComponent,w=!1!==t.highlightNonStandardPropertyKeywords;function x(e,t){return i=t,e}function k(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?x(null,"compare"):'"'==n||"'"==n?(t.tokenize=C(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==n?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?x(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=B),x("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function C(e){return function(t,n){var r,i=!1;while(null!=(r=t.next())){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),x("string","string")}}function B(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),x(null,"(")}function _(e,t,n){this.type=e,this.indent=t,this.prev=n}function E(e,t,n,r){return e.context=new _(n,t.indentation()+(!1===r?0:a),e.context),n}function S(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function F(e,t,n){return I[n.context.type](e,t,n)}function T(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return F(e,t,n)}function M(e){var t=e.current().toLowerCase();o=m.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var I={top:function(e,t,n){if("{"==e)return E(n,t,"block");if("}"==e&&n.context.prev)return S(n);if(y&&/@component/i.test(e))return E(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return E(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return E(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return E(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return E(n,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return E(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return d.hasOwnProperty(r)?(o="property","maybeprop"):h.hasOwnProperty(r)?(o=w?"string-2":"property","maybeprop"):v?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?I.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?E(n,t,"prop"):F(e,t,n)},prop:function(e,t,n){if(";"==e)return S(n);if("{"==e&&v)return E(n,t,"propBlock");if("}"==e||"{"==e)return T(e,t,n);if("("==e)return E(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)M(t);else if("interpolation"==e)return E(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?S(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?T(e,t,n):")"==e?S(n):"("==e?E(n,t,"parens"):"interpolation"==e?E(n,t,"interpolation"):("word"==e&&M(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):F(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):I.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return E(n,t,"atBlock_parens");if("}"==e||";"==e)return T(e,t,n);if("{"==e)return S(n)&&E(n,t,v?"block":"top");if("interpolation"==e)return E(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":A.hasOwnProperty(r)?"property":u.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":h.hasOwnProperty(r)?w?"string-2":"property":m.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?T(e,t,n):"{"==e?S(n)&&E(n,t,v?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?S(n):"{"==e||"}"==e?T(e,t,n,2):I.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?E(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):F(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,S(n)):"word"==e?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!f.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?E(n,t,"top"):F(e,t,n)},at:function(e,t,n){return";"==e?S(n):"{"==e||"}"==e?T(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?S(n):"{"==e||";"==e?T(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new _(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=I[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):(n=n.prev,i=n.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(l),A=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=t(A),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],h=t(d),p=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=t(p),g=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],m=t(g),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],b=t(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(y),x=n.concat(i).concat(a).concat(l).concat(A).concat(d).concat(v).concat(y);function k(e,t){var n,r=!1;while(null!=(n=e.next())){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:f,counterDescriptors:m,colorKeywords:b,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:w,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:w,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:f,counterDescriptors:m,colorKeywords:b,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}))},30029:function(e,t,n){n(57658),function(e){e(n(69767),n(8365))}((function(e){"use strict";var t="this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required sealed base interface when inline".split(" "),n="try catch finally do else for if switch while".split(" "),r="true false null".split(" "),i="void bool num int double dynamic var String Null Never".split(" ");function o(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function a(e){(e.interpolationStack||(e.interpolationStack=[])).push(e.tokenize)}function s(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()}function l(e){return e.interpolationStack?e.interpolationStack.length:0}function c(e,t,n,r){var i=!1;if(t.eat(e)){if(!t.eat(e))return"string";i=!0}function o(t,n){var o=!1;while(!t.eol()){if(!r&&!o&&"$"==t.peek())return a(n),n.tokenize=A,"string";var s=t.next();if(s==e&&!o&&(!i||t.match(e+e))){n.tokenize=null;break}o=!r&&!o&&"\\"==s}return"string"}return n.tokenize=o,o(t,n)}function A(e,t){return e.eat("$"),e.eat("{")?t.tokenize=null:t.tokenize=u,null}function u(e,t){return e.eatWhile(/[\w_]/),t.tokenize=s(t),"variable"}function d(e){return function(t,n){var r;while(r=t.next()){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=d(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=d(e+1),n.tokenize(t,n)}return"comment"}}e.defineMIME("application/dart",{name:"clike",keywords:o(t),blockKeywords:o(n),builtin:o(i),atoms:o(r),hooks:{"@":function(e){return e.eatWhile(/[\w\$_\.]/),"meta"},"'":function(e,t){return c("'",e,t,!1)},'"':function(e,t){return c('"',e,t,!1)},r:function(e,t){var n=e.peek();return("'"==n||'"'==n)&&c(e.next(),e,t,!0)},"}":function(e,t){return l(t)>0&&(t.tokenize=s(t),null)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=d(1),t.tokenize(e,t))},token:function(e,t,n){if("variable"==n){var r=RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$","g");if(r.test(e.current()))return"variable-2"}}}}),e.registerHelper("hintWords","application/dart",t.concat(r).concat(i)),e.defineMode("dart",(function(t){return e.getMode(t,"application/dart")}),"clike")}))},44258:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("diff",(function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||0===n)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var r=e[t.peek()]||t.skipToEnd();return-1===n?t.skipToEnd():t.pos=n,r}}})),e.defineMIME("text/x-diff","diff")}))},48314:function(e,t,n){(function(e){e(n(69767),n(24559))})((function(e){"use strict";var t="from",n=new RegExp("^(\\s*)\\b("+t+")\\b","i"),r=["run","cmd","entrypoint","shell"],i=new RegExp("^(\\s*)("+r.join("|")+")(\\s+\\[)","i"),o="expose",a=new RegExp("^(\\s*)("+o+")(\\s+)","i"),s=["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"],l=[t,o].concat(r).concat(s),c="("+l.join("|")+")",A=new RegExp("^(\\s*)"+c+"(\\s*)(#.*)?$","i"),u=new RegExp("^(\\s*)"+c+"(\\s+)","i");e.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:n,token:[null,"keyword"],sol:!0,next:"from"},{regex:A,token:[null,"keyword",null,"error"],sol:!0},{regex:i,token:[null,"keyword",null],sol:!0,next:"array"},{regex:a,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:u,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),e.defineMIME("text/x-dockerfile","dockerfile")}))},69150:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";e.defineMIME("text/x-erlang","erlang"),e.defineMode("erlang",(function(t){var n=["-type","-spec","-export_type","-opaque"],r=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],i=/[\->,;]/,o=["->",";",","],a=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],s=/[\+\-\*\/<>=\|:!]/,l=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],c=/[<\(\[\{]/,A=["<<","(","[","{"],u=/[>\)\]\}]/,d=["}","]",")",">>"],h=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],p=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],f=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,g=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function m(e,t){if(t.in_string)return t.in_string=!y(e),B(t,e,"string");if(t.in_atom)return t.in_atom=!w(e),B(t,e,"atom");if(e.eatSpace())return B(t,e,"whitespace");if(!F(t)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return C(e.current(),n)?B(t,e,"type"):B(t,e,"attribute");var m=e.next();if("%"==m)return e.skipToEnd(),B(t,e,"comment");if(":"==m)return B(t,e,"colon");if("?"==m)return e.eatSpace(),e.eatWhile(f),B(t,e,"macro");if("#"==m)return e.eatSpace(),e.eatWhile(f),B(t,e,"record");if("$"==m)return"\\"!=e.next()||e.match(g)?B(t,e,"number"):B(t,e,"error");if("."==m)return B(t,e,"dot");if("'"==m){if(!(t.in_atom=!w(e))){if(e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),B(t,e,"fun");if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1))return B(t,e,"function")}return B(t,e,"atom")}if('"'==m)return t.in_string=!y(e),B(t,e,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(m))return e.eatWhile(f),B(t,e,"variable");if(/[a-z_ß-öø-ÿ]/.test(m)){if(e.eatWhile(f),e.match(/\s*\/\s*[0-9]/,!1))return e.match(/\s*\/\s*[0-9]/,!0),B(t,e,"fun");var x=e.current();return C(x,r)?B(t,e,"keyword"):C(x,a)?B(t,e,"operator"):e.match(/\s*\(/,!1)?!C(x,p)||":"==F(t).token&&"erlang"!=F(t,2).token?C(x,h)?B(t,e,"guard"):B(t,e,"function"):B(t,e,"builtin"):":"==k(e)?B(t,e,"erlang"==x?"builtin":"function"):C(x,["true","false"])?B(t,e,"boolean"):B(t,e,"atom")}var _=/[0-9]/,E=/[0-9a-zA-Z]/;return _.test(m)?(e.eatWhile(_),e.eat("#")?e.eatWhile(E)||e.backUp(1):e.eat(".")&&(e.eatWhile(_)?e.eat(/[eE]/)&&(e.eat(/[-+]/)?e.eatWhile(_)||e.backUp(2):e.eatWhile(_)||e.backUp(1)):e.backUp(1)),B(t,e,"number")):v(e,c,A)?B(t,e,"open_paren"):v(e,u,d)?B(t,e,"close_paren"):b(e,i,o)?B(t,e,"separator"):b(e,s,l)?B(t,e,"operator"):B(t,e,null)}function v(e,t,n){if(1==e.current().length&&t.test(e.current())){e.backUp(1);while(t.test(e.peek()))if(e.next(),C(e.current(),n))return!0;e.backUp(e.current().length-1)}return!1}function b(e,t,n){if(1==e.current().length&&t.test(e.current())){while(t.test(e.peek()))e.next();while(0<e.current().length){if(C(e.current(),n))return!0;e.backUp(1)}e.next()}return!1}function y(e){return x(e,'"',"\\")}function w(e){return x(e,"'","\\")}function x(e,t,n){while(!e.eol()){var r=e.next();if(r==t)return!0;r==n&&e.next()}return!1}function k(e){var t=e.match(/^\s*([^\s%])/,!1);return t?t[1]:""}function C(e,t){return-1<t.indexOf(e)}function B(e,t,n){switch(T(e,E(n,t)),n){case"atom":return"atom";case"attribute":return"attribute";case"boolean":return"atom";case"builtin":return"builtin";case"close_paren":return null;case"colon":return null;case"comment":return"comment";case"dot":return null;case"error":return"error";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"variable-2";case"number":return"number";case"open_paren":return null;case"operator":return"operator";case"record":return"bracket";case"separator":return null;case"string":return"string";case"type":return"def";case"variable":return"variable";default:return null}}function _(e,t,n,r){return{token:e,column:t,indent:n,type:r}}function E(e,t){return _(t.current(),t.column(),t.indentation(),e)}function S(e){return _(e,0,0,e)}function F(e,t){var n=e.tokenStack.length,r=t||1;return!(n<r)&&e.tokenStack[n-r]}function T(e,t){"comment"!=t.type&&"whitespace"!=t.type&&(e.tokenStack=M(e.tokenStack,t),e.tokenStack=I(e.tokenStack))}function M(e,t){var n=e.length-1;return 0<n&&"record"===e[n].type&&"dot"===t.type?e.pop():0<n&&"group"===e[n].type?(e.pop(),e.push(t)):e.push(t),e}function I(e){if(!e.length)return e;var t=e.length-1;if("dot"===e[t].type)return[];if(t>1&&"fun"===e[t].type&&"fun"===e[t-1].token)return e.slice(0,t-1);switch(e[t].token){case"}":return N(e,{g:["{"]});case"]":return N(e,{i:["["]});case")":return N(e,{i:["("]});case">>":return N(e,{i:["<<"]});case"end":return N(e,{i:["begin","case","fun","if","receive","try"]});case",":return N(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return N(e,{r:["when"],m:["try","if","case","receive"]});case";":return N(e,{E:["case","fun","if","receive","try","when"]});case"catch":return N(e,{e:["try"]});case"of":return N(e,{e:["case"]});case"after":return N(e,{e:["receive","try"]});default:return e}}function N(e,t){for(var n in t)for(var r=e.length-1,i=t[n],o=r-1;-1<o;o--)if(C(e[o].token,i)){var a=e.slice(0,o);switch(n){case"m":return a.concat(e[o]).concat(e[r]);case"r":return a.concat(e[r]);case"i":return a;case"g":return a.concat(S("group"));case"E":return a.concat(e[o]);case"e":return a.concat(e[o])}}return"E"==n?[]:e}function U(n,r){var i,o=t.indentUnit,a=L(r),s=F(n,1),l=F(n,2);return n.in_string||n.in_atom?e.Pass:l?"when"==s.token?s.column+o:"when"===a&&"function"===l.type?l.indent+o:"("===a&&"fun"===s.token?s.column+3:"catch"===a&&(i=H(n,["try"]))?i.column:C(a,["end","after","of"])?(i=H(n,["begin","case","fun","if","receive","try"]),i?i.column:e.Pass):C(a,d)?(i=H(n,A),i?i.column:e.Pass):C(s.token,[",","|","||"])||C(a,[",","|","||"])?(i=Q(n),i?i.column+i.token.length:o):"->"==s.token?C(l.token,["receive","case","if","try"])?l.column+o+o:l.column+o:C(s.token,A)?s.column+s.token.length:(i=D(n),z(i)?i.column+o:0):0}function L(e){var t=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return z(t)&&0===t.index?t[0]:""}function Q(e){var t=e.tokenStack.slice(0,-1),n=O(t,"type",["open_paren"]);return!!z(t[n])&&t[n]}function D(e){var t=e.tokenStack,n=O(t,"type",["open_paren","separator","keyword"]),r=O(t,"type",["operator"]);return z(n)&&z(r)&&n<r?t[n+1]:!!z(n)&&t[n]}function H(e,t){var n=e.tokenStack,r=O(n,"token",t);return!!z(n[r])&&n[r]}function O(e,t,n){for(var r=e.length-1;-1<r;r--)if(C(e[r][t],n))return r;return!1}function z(e){return!1!==e&&null!=e}return{startState:function(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:function(e,t){return m(e,t)},indent:function(e,t){return U(e,t)},lineComment:"%"}}))}))},3341:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("go",(function(t){var n,r=t.indentUnit,i={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},o={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},a=/[+\-*&^%:=<>!|\/]/;function s(e,t){var r=e.next();if('"'==r||"'"==r||"`"==r)return t.tokenize=l(r),t.tokenize(e,t);if(/[\d\.]/.test(r))return"."==r?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==r?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(r))return n=r,null;if("/"==r){if(e.eat("*"))return t.tokenize=c,c(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(r))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var s=e.current();return i.propertyIsEnumerable(s)?("case"!=s&&"default"!=s||(n="case"),"keyword"):o.propertyIsEnumerable(s)?"atom":"variable"}function l(e){return function(t,n){var r,i=!1,o=!1;while(null!=(r=t.next())){if(r==e&&!i){o=!0;break}i=!i&&"`"!=e&&"\\"==r}return(o||!i&&"`"!=e)&&(n.tokenize=s),"string"}}function c(e,t){var n,r=!1;while(n=e.next()){if("/"==n&&r){t.tokenize=s;break}r="*"==n}return"comment"}function A(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function u(e,t,n){return e.context=new A(e.indented,t,n,null,e.context)}function d(e){if(e.context.prev){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}return{startState:function(e){return{tokenize:null,context:new A((e||0)-r,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"case"==r.type&&(r.type="}")),e.eatSpace())return null;n=null;var i=(t.tokenize||s)(e,t);return"comment"==i||(null==r.align&&(r.align=!0),"{"==n?u(t,e.column(),"}"):"["==n?u(t,e.column(),"]"):"("==n?u(t,e.column(),")"):"case"==n?r.type="case":("}"==n&&"}"==r.type||n==r.type)&&d(t),t.startOfLine=!1),i},indent:function(t,n){if(t.tokenize!=s&&null!=t.tokenize)return e.Pass;var i=t.context,o=n&&n.charAt(0);if("case"==i.type&&/^(?:case|default)\b/.test(n))return t.context.type="}",i.indented;var a=o==i.type;return i.align?i.column+(a?0:1):i.indented+(a?0:r)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-go","go")}))},18511:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";e.defineMode("groovy",(function(t){function n(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var r,i=n("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while"),o=n("catch class def do else enum finally for if interface switch trait try while"),a=n("return break continue"),s=n("null true false this");function l(e,t){var n=e.next();if('"'==n||"'"==n)return c(n,e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return r=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if("/"==n){if(e.eat("*"))return t.tokenize.push(d),d(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";if(h(t.lastToken,!1))return c(n,e,t)}if("-"==n&&e.eat(">"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==n)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==t.lastToken)return"property";if(e.eat(":"))return r="proplabel","property";var l=e.current();return s.propertyIsEnumerable(l)?"atom":i.propertyIsEnumerable(l)?(o.propertyIsEnumerable(l)?r="newstatement":a.propertyIsEnumerable(l)&&(r="standalone"),"keyword"):"variable"}function c(e,t,n){var r=!1;if("/"!=e&&t.eat(e)){if(!t.eat(e))return"string";r=!0}function i(t,n){var i,o=!1,a=!r;while(null!=(i=t.next())){if(i==e&&!o){if(!r)break;if(t.match(e+e)){a=!0;break}}if('"'==e&&"$"==i&&!o){if(t.eat("{"))return n.tokenize.push(A()),"string";if(t.match(/^\w/,!1))return n.tokenize.push(u),"string"}o=!o&&"\\"==i}return a&&n.tokenize.pop(),"string"}return n.tokenize.push(i),i(t,n)}function A(){var e=1;function t(t,n){if("}"==t.peek()){if(e--,0==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else"{"==t.peek()&&e++;return l(t,n)}return t.isBase=!0,t}function u(e,t){var n=e.match(/^(\.|[\w\$_]+)/);return n?"."==n[0]?null:"variable":(t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t))}function d(e,t){var n,r=!1;while(n=e.next()){if("/"==n&&r){t.tokenize.pop();break}r="*"==n}return"comment"}function h(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function p(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function f(e,t,n){return e.context=new p(e.indented,t,n,null,e.context)}function g(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return l.isBase=!0,{startState:function(e){return{tokenize:[l],context:new p((e||0)-t.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"statement"!=n.type||h(t.lastToken,!0)||(g(t),n=t.context)),e.eatSpace())return null;r=null;var i=t.tokenize[t.tokenize.length-1](e,t);if("comment"==i)return i;if(null==n.align&&(n.align=!0),";"!=r&&":"!=r||"statement"!=n.type)if("->"==r&&"statement"==n.type&&"}"==n.prev.type)g(t),t.context.align=!1;else if("{"==r)f(t,e.column(),"}");else if("["==r)f(t,e.column(),"]");else if("("==r)f(t,e.column(),")");else if("}"==r){while("statement"==n.type)n=g(t);"}"==n.type&&(n=g(t));while("statement"==n.type)n=g(t)}else r==n.type?g(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==r)&&f(t,e.column(),"statement");else g(t);return t.startOfLine=!1,t.lastToken=r||i,i},indent:function(n,r){if(!n.tokenize[n.tokenize.length-1].isBase)return e.Pass;var i=r&&r.charAt(0),o=n.context;"statement"!=o.type||h(n.lastToken,!0)||(o=o.prev);var a=i==o.type;return"statement"==o.type?o.indented+("{"==i?0:t.indentUnit):o.align?o.column+(a?0:1):o.indented+(a?0:t.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-groovy","groovy")}))},42797:function(e,t,n){(function(e){e(n(69767),n(61804),n(16107),n(16880))})((function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function l(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(o(t,r[0])))return r[2]}}e.defineMode("htmlmixed",(function(r,i){var o=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),c={},A=i&&i.tags,u=i&&i.scriptTypes;if(s(t,c),A&&s(A,c),u)for(var d=u.length-1;d>=0;d--)c.script.unshift(["type",u[d].matches,u[d].mode]);function h(t,i){var s,A=o.token(t,i.htmlState),u=/\btag\b/.test(A);if(u&&!/[<>\s\/]/.test(t.current())&&(s=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(s))i.inTag=s+" ";else if(i.inTag&&u&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var p=">"==t.current()&&l(c[d[1]],d[2]),f=e.getMode(r,p),g=a(d[1],!0),m=a(d[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=h,t.localState=t.localMode=null,null):n(e,m,t.localMode.token(e,t.localState))},i.localMode=f,i.localState=e.startState(f,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return A}return{startState:function(){var t=e.startState(o);return{token:h,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?o.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}))},62470:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("http",(function(){function e(e,t){return e.skipToEnd(),t.cur=a,"error"}function t(t,r){return t.match(/^HTTP\/\d\.\d/)?(r.cur=n,"keyword"):t.match(/^[A-Z]+/)&&/[ \t]/.test(t.peek())?(r.cur=i,"keyword"):e(t,r)}function n(t,n){var i=t.match(/^\d+/);if(!i)return e(t,n);n.cur=r;var o=Number(i[0]);return o>=100&&o<200?"positive informational":o>=200&&o<300?"positive success":o>=300&&o<400?"positive redirect":o>=400&&o<500?"negative client-error":o>=500&&o<600?"negative server-error":"error"}function r(e,t){return e.skipToEnd(),t.cur=a,null}function i(e,t){return e.eatWhile(/\S/),t.cur=o,"string-2"}function o(t,n){return t.match(/^HTTP\/\d\.\d$/)?(n.cur=a,"keyword"):e(t,n)}function a(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?"atom":(e.skipToEnd(),"error"):(e.skipToEnd(),"string")}function s(e){return e.skipToEnd(),null}return{token:function(e,t){var n=t.cur;return n!=a&&n!=s&&e.eatSpace()?null:n(e,t)},blankLine:function(e){e.cur=s},startState:function(){return{cur:t}}}})),e.defineMIME("message/http","http")}))},16107:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,A=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(e){var t,n=!1,r=!1;while(null!=(t=e.next())){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function g(e,t,n){return r=e,i=n,t}function m(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=v(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&e.eat(">"))return g("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):it(e,t,1)?(f(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==n)return t.tokenize=y,y(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==n&&e.eatWhile(u))return g("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(h.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?g("."):g("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var r=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(r)){var i=d[r];return g(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function v(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(p))return n.tokenize=m,g("jsonld-keyword","meta");while(null!=(r=t.next())){if(r==e&&!i)break;i=!i&&"\\"==r}return i||(n.tokenize=m),g("string","string")}}function b(e,t){var n,r=!1;while(n=e.next()){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return g("comment","comment")}function y(e,t){var n,r=!1;while(null!=(n=e.next())){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=m;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}var w="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(A){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=w.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;var c=e.string.charAt(a-1);if(c==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function C(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function B(e,t){if(!c)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function _(e,t,n,r,i){var o=e.cc;E.state=e,E.stream=i,E.marked=null,E.cc=o,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);while(1){var a=o.length?o.pop():l?K:P;if(a(n,r)){while(o.length&&o[o.length-1].lex)o.pop()();return E.marked?E.marked:"variable"==n&&B(e,r)?"variable-2":t}}}var E={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function F(){return S.apply(null,arguments),!0}function T(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function M(e){var t=E.state;if(E.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=I(e,t.context);if(null!=r)return void(t.context=r)}else if(!T(e,t.localVars))return void(t.localVars=new L(e,t.localVars));n.globalVars&&!T(e,t.globalVars)&&(t.globalVars=new L(e,t.globalVars))}}function I(e,t){if(t){if(t.block){var n=I(e,t.prev);return n?n==t.prev?t:new U(n,t.vars,!0):null}return T(e,t.vars)?t:new U(t.prev,new L(e,t.vars),!1)}return null}function N(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function U(e,t,n){this.prev=e,this.vars=t,this.block=n}function L(e,t){this.name=e,this.next=t}var Q=new L("this",new L("arguments",null));function D(){E.state.context=new U(E.state.context,E.state.localVars,!1),E.state.localVars=Q}function H(){E.state.context=new U(E.state.context,E.state.localVars,!0),E.state.localVars=null}function O(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function z(e,t){var n=function(){var n=E.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new C(r,E.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function Z(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function R(e){function t(n){return n==e?F():";"==e||"}"==n||")"==n||"]"==n?S():F(t)}return t}function P(e,t){return"var"==e?F(z("vardef",t),Se,R(";"),Z):"keyword a"==e?F(z("form"),j,P,Z):"keyword b"==e?F(z("form"),P,Z):"keyword d"==e?E.stream.match(/^\s*$/,!1)?F():F(z("stat"),G,R(";"),Z):"debugger"==e?F(R(";")):"{"==e?F(z("}"),H,de,Z,O):";"==e?F():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==Z&&E.state.cc.pop()(),F(z("form"),j,P,Z,Ue)):"function"==e?F(He):"for"==e?F(z("form"),H,Le,P,O,Z):"class"==e||A&&"interface"==t?(E.marked="keyword",F(z("form","class"==e?e:t),Pe,Z)):"variable"==e?A&&"declare"==t?(E.marked="keyword",F(P)):A&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?F(tt):"type"==t?F(ze,R("operator"),me,R(";")):F(z("form"),Fe,R("{"),z("}"),de,Z,Z)):A&&"namespace"==t?(E.marked="keyword",F(z("form"),K,P,Z)):A&&"abstract"==t?(E.marked="keyword",F(P)):F(z("stat"),oe):"switch"==e?F(z("form"),j,R("{"),z("}","switch"),H,de,Z,Z,O):"case"==e?F(K,R(":")):"default"==e?F(R(":")):"catch"==e?F(z("form"),D,q,P,Z,O):"export"==e?F(z("stat"),je,Z):"import"==e?F(z("stat"),Ge,Z):"async"==e?F(P):"@"==t?F(K,P):S(z("stat"),K,R(";"),Z)}function q(e){if("("==e)return F(Ze,R(")"))}function K(e,t){return V(e,t,!1)}function W(e,t){return V(e,t,!0)}function j(e){return"("!=e?S():F(z(")"),G,R(")"),Z)}function V(e,t,n){if(E.state.fatArrowAt==E.stream.start){var r=n?te:ee;if("("==e)return F(D,z(")"),Ae(Ze,")"),Z,R("=>"),r,O);if("variable"==e)return S(D,Fe,R("=>"),r,O)}var i=n?Y:$;return k.hasOwnProperty(e)?F(i):"function"==e?F(He,i):"class"==e||A&&"interface"==t?(E.marked="keyword",F(z("form"),Re,Z)):"keyword c"==e||"async"==e?F(n?W:K):"("==e?F(z(")"),G,R(")"),Z,i):"operator"==e||"spread"==e?F(n?W:K):"["==e?F(z("]"),et,Z,i):"{"==e?ue(se,"}",null,i):"quasi"==e?S(X,i):"new"==e?F(ne(n)):F()}function G(e){return e.match(/[;\}\)\],]/)?S():S(K)}function $(e,t){return","==e?F(G):Y(e,t,!1)}function Y(e,t,n){var r=0==n?$:Y,i=0==n?K:W;return"=>"==e?F(D,n?te:ee,O):"operator"==e?/\+\+|--/.test(t)||A&&"!"==t?F(r):A&&"<"==t&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?F(z(">"),Ae(me,">"),Z,r):"?"==t?F(K,R(":"),i):F(i):"quasi"==e?S(X,r):";"!=e?"("==e?ue(W,")","call",r):"."==e?F(ae,r):"["==e?F(z("]"),G,R("]"),Z,r):A&&"as"==t?(E.marked="keyword",F(me,r)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),F(i)):void 0:void 0}function X(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?F(X):F(G,J)}function J(e){if("}"==e)return E.marked="string-2",E.state.tokenize=y,F(X)}function ee(e){return x(E.stream,E.state),S("{"==e?P:K)}function te(e){return x(E.stream,E.state),S("{"==e?P:W)}function ne(e){return function(t){return"."==t?F(e?ie:re):"variable"==t&&A?F(Be,e?Y:$):S(e?W:K)}}function re(e,t){if("target"==t)return E.marked="keyword",F($)}function ie(e,t){if("target"==t)return E.marked="keyword",F(Y)}function oe(e){return":"==e?F(Z,P):S($,R(";"),Z)}function ae(e){if("variable"==e)return E.marked="property",F()}function se(e,t){return"async"==e?(E.marked="property",F(se)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?F(le):(A&&E.state.fatArrowAt==E.stream.start&&(n=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+n[0].length),F(ce))):"number"==e||"string"==e?(E.marked=s?"property":E.style+" property",F(ce)):"jsonld-keyword"==e?F(ce):A&&N(t)?(E.marked="keyword",F(se)):"["==e?F(K,he,R("]"),ce):"spread"==e?F(W,ce):"*"==t?(E.marked="keyword",F(se)):":"==e?S(ce):void 0;var n}function le(e){return"variable"!=e?S(ce):(E.marked="property",F(He))}function ce(e){return":"==e?F(W):"("==e?S(He):void 0}function Ae(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=E.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),F((function(n,r){return n==t||r==t?S():S(e)}),r)}return i==t||o==t?F():n&&n.indexOf(";")>-1?S(e):F(R(t))}return function(n,i){return n==t||i==t?F():S(e,r)}}function ue(e,t,n){for(var r=3;r<arguments.length;r++)E.cc.push(arguments[r]);return F(z(t,n),Ae(e,t),Z)}function de(e){return"}"==e?F():S(P,de)}function he(e,t){if(A){if(":"==e)return F(me);if("?"==t)return F(he)}}function pe(e,t){if(A&&(":"==e||"in"==t))return F(me)}function fe(e){if(A&&":"==e)return E.stream.match(/^\s*\w+\s+is\b/,!1)?F(K,ge,me):F(me)}function ge(e,t){if("is"==t)return E.marked="keyword",F()}function me(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(E.marked="keyword",F("typeof"==t?W:me)):"variable"==e||"void"==t?(E.marked="type",F(Ce)):"|"==t||"&"==t?F(me):"string"==e||"number"==e||"atom"==e?F(Ce):"["==e?F(z("]"),Ae(me,"]",","),Z,Ce):"{"==e?F(z("}"),be,Z,Ce):"("==e?F(Ae(ke,")"),ve,Ce):"<"==e?F(Ae(me,">"),me):"quasi"==e?S(we,Ce):void 0}function ve(e){if("=>"==e)return F(me)}function be(e){return e.match(/[\}\)\]]/)?F():","==e||";"==e?F(be):S(ye,be)}function ye(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",F(ye)):"?"==t||"number"==e||"string"==e?F(ye):":"==e?F(me):"["==e?F(R("variable"),pe,R("]"),ye):"("==e?S(Oe,ye):e.match(/[;\}\)\],]/)?void 0:F()}function we(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?F(we):F(me,xe)}function xe(e){if("}"==e)return E.marked="string-2",E.state.tokenize=y,F(we)}function ke(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?F(ke):":"==e?F(me):"spread"==e?F(ke):S(me)}function Ce(e,t){return"<"==t?F(z(">"),Ae(me,">"),Z,Ce):"|"==t||"."==e||"&"==t?F(me):"["==e?F(me,R("]"),Ce):"extends"==t||"implements"==t?(E.marked="keyword",F(me)):"?"==t?F(me,R(":"),me):void 0}function Be(e,t){if("<"==t)return F(z(">"),Ae(me,">"),Z,Ce)}function _e(){return S(me,Ee)}function Ee(e,t){if("="==t)return F(me)}function Se(e,t){return"enum"==t?(E.marked="keyword",F(tt)):S(Fe,he,Ie,Ne)}function Fe(e,t){return A&&N(t)?(E.marked="keyword",F(Fe)):"variable"==e?(M(t),F()):"spread"==e?F(Fe):"["==e?ue(Me,"]"):"{"==e?ue(Te,"}"):void 0}function Te(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?F(Fe):"}"==e?S():"["==e?F(K,R("]"),R(":"),Te):F(R(":"),Fe,Ie)):(M(t),F(Ie))}function Me(){return S(Fe,Ie)}function Ie(e,t){if("="==t)return F(W)}function Ne(e){if(","==e)return F(Se)}function Ue(e,t){if("keyword b"==e&&"else"==t)return F(z("form","else"),P,Z)}function Le(e,t){return"await"==t?F(Le):"("==e?F(z(")"),Qe,Z):void 0}function Qe(e){return"var"==e?F(Se,De):"variable"==e?F(De):S(De)}function De(e,t){return")"==e?F():";"==e?F(De):"in"==t||"of"==t?(E.marked="keyword",F(K,De)):S(K,De)}function He(e,t){return"*"==t?(E.marked="keyword",F(He)):"variable"==e?(M(t),F(He)):"("==e?F(D,z(")"),Ae(Ze,")"),Z,fe,P,O):A&&"<"==t?F(z(">"),Ae(_e,">"),Z,He):void 0}function Oe(e,t){return"*"==t?(E.marked="keyword",F(Oe)):"variable"==e?(M(t),F(Oe)):"("==e?F(D,z(")"),Ae(Ze,")"),Z,fe,O):A&&"<"==t?F(z(">"),Ae(_e,">"),Z,Oe):void 0}function ze(e,t){return"keyword"==e||"variable"==e?(E.marked="type",F(ze)):"<"==t?F(z(">"),Ae(_e,">"),Z):void 0}function Ze(e,t){return"@"==t&&F(K,Ze),"spread"==e?F(Ze):A&&N(t)?(E.marked="keyword",F(Ze)):A&&"this"==e?F(he,Ie):S(Fe,he,Ie)}function Re(e,t){return"variable"==e?Pe(e,t):qe(e,t)}function Pe(e,t){if("variable"==e)return M(t),F(qe)}function qe(e,t){return"<"==t?F(z(">"),Ae(_e,">"),Z,qe):"extends"==t||"implements"==t||A&&","==e?("implements"==t&&(E.marked="keyword"),F(A?me:K,qe)):"{"==e?F(z("}"),Ke,Z):void 0}function Ke(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||A&&N(t))&&E.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",F(Ke)):"variable"==e||"keyword"==E.style?(E.marked="property",F(We,Ke)):"number"==e||"string"==e?F(We,Ke):"["==e?F(K,he,R("]"),We,Ke):"*"==t?(E.marked="keyword",F(Ke)):A&&"("==e?S(Oe,Ke):";"==e||","==e?F(Ke):"}"==e?F():"@"==t?F(K,Ke):void 0}function We(e,t){if("!"==t)return F(We);if("?"==t)return F(We);if(":"==e)return F(me,Ie);if("="==t)return F(W);var n=E.state.lexical.prev,r=n&&"interface"==n.info;return S(r?Oe:He)}function je(e,t){return"*"==t?(E.marked="keyword",F(Je,R(";"))):"default"==t?(E.marked="keyword",F(K,R(";"))):"{"==e?F(Ae(Ve,"}"),Je,R(";")):S(P)}function Ve(e,t){return"as"==t?(E.marked="keyword",F(R("variable"))):"variable"==e?S(W,Ve):void 0}function Ge(e){return"string"==e?F():"("==e?S(K):"."==e?S($):S($e,Ye,Je)}function $e(e,t){return"{"==e?ue($e,"}"):("variable"==e&&M(t),"*"==t&&(E.marked="keyword"),F(Xe))}function Ye(e){if(","==e)return F($e,Ye)}function Xe(e,t){if("as"==t)return E.marked="keyword",F($e)}function Je(e,t){if("from"==t)return E.marked="keyword",F(K)}function et(e){return"]"==e?F():S(Ae(W,"]"))}function tt(){return S(z("form"),Fe,R("{"),z("}"),Ae(nt,"}"),Z,Z)}function nt(){return S(Fe,Ie)}function rt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,n){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return D.lex=H.lex=!0,O.lex=!0,Z.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new C((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new U(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=b&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",_(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==b||t.tokenize==y)return e.Pass;if(t.tokenize!=m)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var A=t.cc[c];if(A==Z)l=l.prev;else if(A!=Ue&&A!=O)break}while(("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==$||i==Y)&&!/^[,\.=+\-*:?[\(]/.test(r)))l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,d=s==u;return"vardef"==u?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==u&&"{"==s?l.indented:"form"==u?l.indented+o:"stat"==u?l.indented+(rt(t,r)?a||o:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:it,skipExpression:function(t){_(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}))},59228:function(e,t,n){(function(e){e(n(69767),n(61804),n(16107))})((function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",(function(r,i){var o=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),a=e.getMode(r,i&&i.base||"javascript");function s(e){var t=e.tagName;e.tagName=null;var n=o.indent(e,"","");return e.tagName=t,n}function l(e,t){return t.context.mode==o?c(e,t,t.context):A(e,t,t.context)}function c(n,i,c){if(2==c.depth)return n.match(/^.*?\*\//)?c.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){o.skipAttribute(c.state);var A=s(c.state),u=c.state.context;if(u&&n.match(/^[^>]*>\s*$/,!1)){while(u.prev&&!u.startOfLine)u=u.prev;u.startOfLine?A-=r.indentUnit:c.prev.state.lexical&&(A=c.prev.state.lexical.indented)}else 1==c.depth&&(A+=r.indentUnit);return i.context=new t(e.startState(a,A),a,0,i.context),null}if(1==c.depth){if("<"==n.peek())return o.skipAttribute(c.state),i.context=new t(e.startState(o,s(c.state)),o,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return c.depth=2,l(n,i)}var d,h=o.token(n,c.state),p=n.current();return/\btag\b/.test(h)?/>$/.test(p)?c.state.context?c.depth=0:i.context=i.context.prev:/^</.test(p)&&(c.depth=1):!h&&(d=p.indexOf("{"))>-1&&n.backUp(p.length-d),h}function A(n,r,i){if("<"==n.peek()&&a.expressionAllowed(n,i.state))return r.context=new t(e.startState(o,a.indent(i.state,"","")),o,0,r.context),a.skipExpression(i.state),null;var s=a.token(n,i.state);if(!s&&null!=i.depth){var l=n.current();"{"==l?i.depth++:"}"==l&&0==--i.depth&&(r.context=r.context.prev)}return s}return{startState:function(){return{context:new t(e.startState(a),a)}},copyState:function(e){return{context:n(e.context)}},token:l,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}}),"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}))},36608:function(e,t,n){n(57658),function(e){e(n(69767),n(61804),n(98310))}((function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(a[s]=n.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,A=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,m=" ";function v(e,t,n){return t.f=t.inline=n,n(e,t)}function b(e,t,n){return t.f=t.block=n,n(e,t)}function y(e){return!e||!/\S/.test(e.string)}function w(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==k){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=E,t.block=x,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function x(t,r){var i=t.column()===r.indentation,s=y(r.prevLine.stream),h=r.indentedCode,g=r.prevLine.hr,m=!1!==r.list,b=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var w=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,m)){r.list=null;while(w<r.listStack[r.listStack.length-1])r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=w-r.listStack[r.listStack.length-1])}var x=!s&&!g&&!r.prevLine.header&&(!m||!h)&&!r.prevLine.fencedCodeEnd,k=(!1===r.list||g||s)&&r.indentation<=b&&t.match(l),_=null;if(r.indentationDiff>=4&&(h||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=b&&(_=t.match(u))&&_[1].length<=6)return r.quote=0,r.header=_[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,B(r);if(r.indentation<=b&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),B(r);if(!k&&!r.setext&&i&&r.indentation<=b&&(_=t.match(c))){var E=_[1]?"ol":"ul";return r.indentation=w+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(A,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+E]),B(r)}return i&&r.indentation<=b&&(_=t.match(p,!0))?(r.quote=0,r.fencedEndRE=new RegExp(_[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(_[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,B(r)):r.setext||!(x&&m||r.quote||!1!==r.list||r.code||k||f.test(t.string))&&(_=t.lookAhead(1))&&(_=_.match(d))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==_[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,B(r)):k?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr):"["===t.peek()?v(t,r,I):v(t,r,r.inline)}function k(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=E,n.block=x,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=B(t)),t.localMode=t.localState=null,t.block=x,t.f=E,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?b(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function B(e){var t=[];if(e.formatting){t.push(a.formatting),"string"===typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function _(e,t){if(e.match(h,!0))return B(t)}function E(t,i){var o=i.text(t,i);if("undefined"!==typeof o)return o;if(i.list)return i.list=null,B(i);if(i.taskList){var s=" "===t.match(A,!0)[1];return s?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,B(i)}if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),B(i);var l=t.next();if(i.linkTitle){i.linkTitle=!1;var c=l;"("===l&&(c=")"),c=(c+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var u="^\\s*(?:[^"+c+"\\\\]+|\\\\\\\\|\\\\.)"+c;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===l){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var p=B(i);return i.code=0,p}return i.formatting=d,B(i)}return i.code=h,B(i)}if(i.code)return B(i);if("\\"===l&&(t.next(),n.highlightFormatting)){var f=B(i),m=a.formatting+"-escape";return f?f+" "+m:m}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),B(i);if("["===l&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),B(i);if("]"===l&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");f=B(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=F,f}if("["===l&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),B(i);if("]"===l&&i.linkText){n.highlightFormatting&&(i.formatting="link");f=B(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?F:E,f}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link");f=B(i);return f?f+=" ":f="",f+a.linkInline}if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link");f=B(i);return f?f+=" ":f="",f+a.linkEmail}if(n.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),b(t,i,k)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===l||"_"===l){var w=1,x=1==t.pos?" ":t.string.charAt(t.pos-2);while(w<3&&t.eat(l))w++;var C=t.peek()||" ",_=!/\s/.test(C)&&(!g.test(C)||/\s/.test(x)||g.test(x)),T=!/\s/.test(x)&&(!g.test(x)||/\s/.test(C)||g.test(C)),M=null,I=null;if(w%2&&(i.em||!_||"*"!==l&&T&&!g.test(x)?i.em!=l||!T||"*"!==l&&_&&!g.test(C)||(M=!1):M=!0),w>1&&(i.strong||!_||"*"!==l&&T&&!g.test(x)?i.strong!=l||!T||"*"!==l&&_&&!g.test(C)||(I=!1):I=!0),null!=I||null!=M){n.highlightFormatting&&(i.formatting=null==M?"strong":null==I?"em":"strong em"),!0===M&&(i.em=l),!0===I&&(i.strong=l);p=B(i);return!1===M&&(i.em=!1),!1===I&&(i.strong=!1),p}}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return B(i);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough){n.highlightFormatting&&(i.formatting="strikethrough");p=B(i);return i.strikethrough=!1,p}if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),B(i)}else if(" "===l&&t.match("~~",!0)){if(" "===t.peek())return B(i);t.backUp(2)}if(n.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var N=B(i);return i.emoji=!1,N}return" "===l&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),B(i)}function S(e,t){var r=e.next();if(">"===r){t.f=t.inline=E,n.highlightFormatting&&(t.formatting="link");var i=B(t);return i?i+=" ":i="",i+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function F(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=M("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,B(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=E,n.highlightFormatting&&(r.formatting="link-string");var o=B(r);return r.linkHref=!1,o}return t.match(T[e]),r.linkHref=!0,B(r)}}function I(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=N,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,B(t)):v(e,t,E)}function N(e,t){if(e.match("]:",!0)){t.f=t.inline=U,n.highlightFormatting&&(t.formatting="link");var r=B(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function U(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=E,a.linkHref+" url")}var L={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:E,text:_,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=k)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,m).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==k?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:L}},indent:function(t,n,i){return t.block==k&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:w,getType:B,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return L}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}))},98310:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}))},152:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";e.defineMode("nginx",(function(e){function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var n,r=t("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),i=t("http mail events server types location upstream charset_map limit_except if geo map"),o=t("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),a=e.indentUnit;function s(e,t){return n=t,e}function l(e,t){e.eatWhile(/[\w\$_]/);var n=e.current();if(r.propertyIsEnumerable(n))return"keyword";if(i.propertyIsEnumerable(n))return"variable-2";if(o.propertyIsEnumerable(n))return"string-2";var a=e.next();return"@"==a?(e.eatWhile(/[\w\\\-]/),s("meta",e.current())):"/"==a&&e.eat("*")?(t.tokenize=c,c(e,t)):"<"==a&&e.eat("!")?(t.tokenize=A,A(e,t)):"="!=a?"~"!=a&&"|"!=a||!e.eat("=")?'"'==a||"'"==a?(t.tokenize=u(a),t.tokenize(e,t)):"#"==a?(e.skipToEnd(),s("comment","comment")):"!"==a?(e.match(/^\s*\w*/),s("keyword","important")):/\d/.test(a)?(e.eatWhile(/[\w.%]/),s("number","unit")):/[,.+>*\/]/.test(a)?s(null,"select-op"):/[;{}:\[\]]/.test(a)?s(null,a):(e.eatWhile(/[\w\\\-]/),s("variable","variable")):s(null,"compare"):void s(null,"compare")}function c(e,t){var n,r=!1;while(null!=(n=e.next())){if(r&&"/"==n){t.tokenize=l;break}r="*"==n}return s("comment","comment")}function A(e,t){var n,r=0;while(null!=(n=e.next())){if(r>=2&&">"==n){t.tokenize=l;break}r="-"==n?r+1:0}return s("comment","comment")}function u(e){return function(t,n){var r,i=!1;while(null!=(r=t.next())){if(r==e&&!i)break;i=!i&&"\\"==r}return i||(n.tokenize=l),s("string","string")}}return{startState:function(e){return{tokenize:l,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;n=null;var r=t.tokenize(e,t),i=t.stack[t.stack.length-1];return"hash"==n&&"rule"==i?r="atom":"variable"==r&&("rule"==i?r="number":i&&"@media{"!=i||(r="tag")),"rule"==i&&/^[\{\};]$/.test(n)&&t.stack.pop(),"{"==n?"@media"==i?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):"}"==n?t.stack.pop():"@media"==n?t.stack.push("@media"):"{"==i&&"comment"!=n&&t.stack.push("rule"),r},indent:function(e,t){var n=e.stack.length;return/^\}/.test(t)&&(n-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+n*a},electricChars:"}"}})),e.defineMIME("text/x-nginx-conf","nginx")}))},86788:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("octave",(function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var t=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),n=new RegExp("^[\\(\\[\\{\\},:=;\\.]"),r=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),i=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),o=new RegExp("^((>>=)|(<<=))"),a=new RegExp("^[\\]\\)]"),s=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),l=e(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),c=e(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function A(e,t){return e.sol()||"'"!==e.peek()?(t.tokenize=d,d(e,t)):(e.next(),t.tokenize=d,"operator")}function u(e,t){return e.match(/^.*%}/)?(t.tokenize=d,"comment"):(e.skipToEnd(),"comment")}function d(h,p){if(h.eatSpace())return null;if(h.match("%{"))return p.tokenize=u,h.skipToEnd(),"comment";if(h.match(/^[%#]/))return h.skipToEnd(),"comment";if(h.match(/^[0-9\.+-]/,!1)){if(h.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return h.tokenize=d,"number";if(h.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(h.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(h.match(e(["nan","NaN","inf","Inf"])))return"number";var f=h.match(/^"(?:[^"]|"")*("|$)/)||h.match(/^'(?:[^']|'')*('|$)/);return f?f[1]?"string":"string error":h.match(c)?"keyword":h.match(l)?"builtin":h.match(s)?"variable":h.match(t)||h.match(r)?"operator":h.match(n)||h.match(i)||h.match(o)?null:h.match(a)?(p.tokenize=A,null):(h.next(),"error")}return{startState:function(){return{tokenize:d}},token:function(e,t){var n=t.tokenize(e,t);return"number"!==n&&"variable"!==n||(t.tokenize=A),n},lineComment:"%",fold:"indent"}})),e.defineMIME("text/x-octave","octave")}))},14240:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("pascal",(function(){function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var t=e("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),n={null:!0},r=/[+\-*&%=<>!?|\/]/;function i(e,i){var l=e.next();if("#"==l&&i.startOfLine)return e.skipToEnd(),"meta";if('"'==l||"'"==l)return i.tokenize=o(l),i.tokenize(e,i);if("("==l&&e.eat("*"))return i.tokenize=a,a(e,i);if("{"==l)return i.tokenize=s,s(e,i);if(/[\[\]\(\),;\:\.]/.test(l))return null;if(/\d/.test(l))return e.eatWhile(/[\w\.]/),"number";if("/"==l&&e.eat("/"))return e.skipToEnd(),"comment";if(r.test(l))return e.eatWhile(r),"operator";e.eatWhile(/[\w\$_]/);var c=e.current();return t.propertyIsEnumerable(c)?"keyword":n.propertyIsEnumerable(c)?"atom":"variable"}function o(e){return function(t,n){var r,i=!1,o=!1;while(null!=(r=t.next())){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return!o&&i||(n.tokenize=null),"string"}}function a(e,t){var n,r=!1;while(n=e.next()){if(")"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function s(e,t){var n;while(n=e.next())if("}"==n){t.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(e,t){if(e.eatSpace())return null;var n=(t.tokenize||i)(e,t);return n},electricChars:"{}"}})),e.defineMIME("text/x-pascal","pascal")}))},91909:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";function t(e,t){return e.string.charAt(e.pos+(t||0))}function n(e,t){if(t){var n=e.pos-t;return e.string.substr(n>=0?n:0,t)}return e.string.substr(0,e.pos-1)}function r(e,t){var n=e.string.length,r=n-e.pos+1;return e.string.substr(e.pos,t&&t<n?t:r)}function i(e,t){var n,r=e.pos+t;r<=0?e.pos=0:r>=(n=e.string.length-1)?e.pos=n:e.pos=r}e.defineMode("perl",(function(){var e={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},o="string-2",a=/[goseximacplud]/;function s(e,t,n,r,i){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){var o,a=!1,s=0;while(o=e.next()){if(o===n[s]&&!a)return void 0!==n[++s]?(t.chain=n[s],t.style=r,t.tail=i):i&&e.eatWhile(i),t.tokenize=c,r;a=!a&&"\\"==o}return r},t.tokenize(e,t)}function l(e,t,n){return t.tokenize=function(e,t){return e.string==n&&(t.tokenize=c),e.skipToEnd(),"string"},t.tokenize(e,t)}function c(c,A){if(c.eatSpace())return null;if(A.chain)return s(c,A,A.chain,A.style,A.tail);if(c.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(c.match(/^<<(?=[_a-zA-Z])/))return c.eatWhile(/\w/),l(c,A,c.current().substr(2));if(c.sol()&&c.match(/^\=item(?!\w)/))return l(c,A,"=cut");var u=c.next();if('"'==u||"'"==u){if(n(c,3)=="<<"+u){var d=c.pos;c.eatWhile(/\w/);var h=c.current().substr(1);if(h&&c.eat(u))return l(c,A,h);c.pos=d}return s(c,A,[u],"string")}if("q"==u){var p=t(c,-2);if(!p||!/\w/.test(p))if(p=t(c,0),"x"==p){if(p=t(c,1),"("==p)return i(c,2),s(c,A,[")"],o,a);if("["==p)return i(c,2),s(c,A,["]"],o,a);if("{"==p)return i(c,2),s(c,A,["}"],o,a);if("<"==p)return i(c,2),s(c,A,[">"],o,a);if(/[\^'"!~\/]/.test(p))return i(c,1),s(c,A,[c.eat(p)],o,a)}else if("q"==p){if(p=t(c,1),"("==p)return i(c,2),s(c,A,[")"],"string");if("["==p)return i(c,2),s(c,A,["]"],"string");if("{"==p)return i(c,2),s(c,A,["}"],"string");if("<"==p)return i(c,2),s(c,A,[">"],"string");if(/[\^'"!~\/]/.test(p))return i(c,1),s(c,A,[c.eat(p)],"string")}else if("w"==p){if(p=t(c,1),"("==p)return i(c,2),s(c,A,[")"],"bracket");if("["==p)return i(c,2),s(c,A,["]"],"bracket");if("{"==p)return i(c,2),s(c,A,["}"],"bracket");if("<"==p)return i(c,2),s(c,A,[">"],"bracket");if(/[\^'"!~\/]/.test(p))return i(c,1),s(c,A,[c.eat(p)],"bracket")}else if("r"==p){if(p=t(c,1),"("==p)return i(c,2),s(c,A,[")"],o,a);if("["==p)return i(c,2),s(c,A,["]"],o,a);if("{"==p)return i(c,2),s(c,A,["}"],o,a);if("<"==p)return i(c,2),s(c,A,[">"],o,a);if(/[\^'"!~\/]/.test(p))return i(c,1),s(c,A,[c.eat(p)],o,a)}else if(/[\^'"!~\/(\[{<]/.test(p)){if("("==p)return i(c,1),s(c,A,[")"],"string");if("["==p)return i(c,1),s(c,A,["]"],"string");if("{"==p)return i(c,1),s(c,A,["}"],"string");if("<"==p)return i(c,1),s(c,A,[">"],"string");if(/[\^'"!~\/]/.test(p))return s(c,A,[c.eat(p)],"string")}}if("m"==u){p=t(c,-2);if((!p||!/\w/.test(p))&&(p=c.eat(/[(\[{<\^'"!~\/]/),p)){if(/[\^'"!~\/]/.test(p))return s(c,A,[p],o,a);if("("==p)return s(c,A,[")"],o,a);if("["==p)return s(c,A,["]"],o,a);if("{"==p)return s(c,A,["}"],o,a);if("<"==p)return s(c,A,[">"],o,a)}}if("s"==u){p=/[\/>\]})\w]/.test(t(c,-2));if(!p&&(p=c.eat(/[(\[{<\^'"!~\/]/),p))return s(c,A,"["==p?["]","]"]:"{"==p?["}","}"]:"<"==p?[">",">"]:"("==p?[")",")"]:[p,p],o,a)}if("y"==u){p=/[\/>\]})\w]/.test(t(c,-2));if(!p&&(p=c.eat(/[(\[{<\^'"!~\/]/),p))return s(c,A,"["==p?["]","]"]:"{"==p?["}","}"]:"<"==p?[">",">"]:"("==p?[")",")"]:[p,p],o,a)}if("t"==u){p=/[\/>\]})\w]/.test(t(c,-2));if(!p&&(p=c.eat("r"),p&&(p=c.eat(/[(\[{<\^'"!~\/]/),p)))return s(c,A,"["==p?["]","]"]:"{"==p?["}","}"]:"<"==p?[">",">"]:"("==p?[")",")"]:[p,p],o,a)}if("`"==u)return s(c,A,[u],"variable-2");if("/"==u)return/~\s*$/.test(n(c))?s(c,A,[u],o,a):"operator";if("$"==u){d=c.pos;if(c.eatWhile(/\d/)||c.eat("{")&&c.eatWhile(/\d/)&&c.eat("}"))return"variable-2";c.pos=d}if(/[$@%]/.test(u)){d=c.pos;if(c.eat("^")&&c.eat(/[A-Z]/)||!/[@$%&]/.test(t(c,-2))&&c.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){p=c.current();if(e[p])return"variable-2"}c.pos=d}if(/[$@%&]/.test(u)&&(c.eatWhile(/[\w$]/)||c.eat("{")&&c.eatWhile(/[\w$]/)&&c.eat("}"))){p=c.current();return e[p]?"variable-2":"variable"}if("#"==u&&"$"!=t(c,-2))return c.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(u)){d=c.pos;if(c.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),e[c.current()])return"operator";c.pos=d}if("_"==u&&1==c.pos){if("_END__"==r(c,6))return s(c,A,["\0"],"comment");if("_DATA__"==r(c,7))return s(c,A,["\0"],"variable-2");if("_C__"==r(c,7))return s(c,A,["\0"],"string")}if(/\w/.test(u)){d=c.pos;if("{"==t(c,-2)&&("}"==t(c,0)||c.eatWhile(/\w/)&&"}"==t(c,0)))return"string";c.pos=d}if(/[A-Z]/.test(u)){var f=t(c,-2);d=c.pos;if(c.eatWhile(/[A-Z_]/),!/[\da-z]/.test(t(c,0))){p=e[c.current()];return p?(p[1]&&(p=p[0]),":"!=f?1==p?"keyword":2==p?"def":3==p?"atom":4==p?"operator":5==p?"variable-2":"meta":"meta"):"meta"}c.pos=d}if(/[a-zA-Z_]/.test(u)){f=t(c,-2);c.eatWhile(/\w/);p=e[c.current()];return p?(p[1]&&(p=p[0]),":"!=f?1==p?"keyword":2==p?"def":3==p?"atom":4==p?"operator":5==p?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:c,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||c)(e,t)},lineComment:"#"}})),e.registerHelper("wordChars","perl",/[\w$]/),e.defineMIME("text/x-perl","perl")}))},89099:function(e,t,n){n(57658),function(e){e(n(69767),n(42797),n(8365))}((function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t,i){return 0==e.length?r(t):function(o,a){for(var s=e[0],l=0;l<s.length;l++)if(o.match(s[l][0]))return a.tokenize=n(e.slice(1),t),s[l][1];return a.tokenize=r(t,i),"string"}}function r(e,t){return function(n,r){return i(n,r,e,t)}}function i(e,t,r,i){if(!1!==i&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==i&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=n([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,i)),e.match(/^->\w/,!1)&&(t.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],r,i)),"variable-2";var o=!1;while(!e.eol()&&(o||!1===i||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1))){if(!o&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",a="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",s="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,a,s].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var l={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class enum function interface namespace trait"),atoms:t(a),builtin:t(s),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var n;if(n=e.match(/^<<\s*/)){var i=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(n[0].length+(i?2:1));if(i&&e.eat(i),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=r(o,"'"!=i),"string"}return!1},"#":function(e){while(!e.eol()&&!e.match("?>",!1))e.next();return"comment"},"/":function(e){if(e.eat("/")){while(!e.eol()&&!e.match("?>",!1))e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&! --t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",(function(t,n){var r=e.getMode(t,n&&n.htmlMode||"text/html"),i=e.getMode(t,l);function o(t,n){var o=n.curMode==i;if(t.sol()&&n.pending&&'"'!=n.pending&&"'"!=n.pending&&(n.pending=null),o)return o&&null==n.php.tokenize&&t.match("?>")?(n.curMode=r,n.curState=n.html,n.php.context.prev||(n.php=null),"meta"):i.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=i,n.php||(n.php=e.startState(i,r.indent(n.html,"",""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){while(!t.eol()&&t.next()!=n.pending);var a="string"}else if(n.pending&&t.pos<n.pending.end){t.pos=n.pending.end;a=n.pending.style}else a=r.token(t,n.curState);n.pending&&(n.pending=null);var s,l=t.current(),c=l.search(/<\?/);return-1!=c&&("string"==a&&(s=l.match(/[\'\"]$/))&&!/\?>/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:a},t.backUp(l.length-c)),a}return{startState:function(){var t=e.startState(r),o=n.startOpen?e.startState(i):null;return{html:t,php:o,curMode:n.startOpen?i:r,curState:n.startOpen?o:t,pending:null}},copyState:function(t){var n,o=t.html,a=e.copyState(r,o),s=t.php,l=s&&e.copyState(i,s);return n=t.curMode==r?a:l,{html:a,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:o,indent:function(e,t,n){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?r.indent(e.html,t,n):e.curMode.indent(e.curState,t,n)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}}),"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)}))},38722:function(e,t,n){n(57658),function(e){"use strict";e(n(69767))}((function(e){"use strict";e.defineMode("powershell",(function(){function e(e,t){t=t||{};for(var n=void 0!==t.prefix?t.prefix:"^",r=void 0!==t.suffix?t.suffix:"\\b",i=0;i<e.length;i++)e[i]instanceof RegExp?e[i]=e[i].source:e[i]=e[i].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(n+"("+e.join("|")+")"+r,"i")}var t="(?=[^A-Za-z\\d\\-_]|$)",n=/[\w\-:]/,r=e([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:t}),i=/[\[\]{},;`\\\.]|@[({]/,o=e(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),a=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,s=e([o,a],{suffix:""}),l=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,c=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,A=/[A-Z]:|%|\?/i,u=e([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),d=e([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),h=e([A,u,d],{suffix:t}),p={keyword:r,number:l,operator:s,builtin:h,punctuation:i,identifier:c};function f(e,t){var r=t.returnStack[t.returnStack.length-1];if(r&&r.shouldReturnFrom(t))return t.tokenize=r.tokenize,t.returnStack.pop(),t.tokenize(e,t);if(e.eatSpace())return null;if(e.eat("("))return t.bracketNesting+=1,"punctuation";if(e.eat(")"))return t.bracketNesting-=1,"punctuation";for(var i in p)if(e.match(p[i]))return i;var o=e.next();if("'"===o)return g(e,t);if("$"===o)return k(e,t);if('"'===o)return m(e,t);if("<"===o&&e.eat("#"))return t.tokenize=x,x(e,t);if("#"===o)return e.skipToEnd(),"comment";if("@"===o){var a=e.eat(/["']/);if(a&&e.eol())return t.tokenize=B,t.startQuote=a[0],B(e,t);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(n))return k(e,t)}return"error"}function g(e,t){var n;while(null!=(n=e.peek()))if(e.next(),"'"===n&&!e.eat("'"))return t.tokenize=f,"string";return"error"}function m(e,t){var n;while(null!=(n=e.peek())){if("$"===n)return t.tokenize=v,"string";if(e.next(),"`"!==n){if('"'===n&&!e.eat('"'))return t.tokenize=f,"string"}else e.next()}return"error"}function v(e,t){return w(e,t,m)}function b(e,t){return t.tokenize=B,t.startQuote='"',B(e,t)}function y(e,t){return w(e,t,b)}function w(e,t,n){if(e.match("$(")){var r=t.bracketNesting;return t.returnStack.push({shouldReturnFrom:function(e){return e.bracketNesting===r},tokenize:n}),t.tokenize=f,t.bracketNesting+=1,"punctuation"}return e.next(),t.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:n}),t.tokenize=k,t.tokenize(e,t)}function x(e,t){var n,r=!1;while(null!=(n=e.next())){if(r&&">"==n){t.tokenize=f;break}r="#"===n}return"comment"}function k(e,t){var r=e.peek();return e.eat("{")?(t.tokenize=C,C(e,t)):void 0!=r&&r.match(n)?(e.eatWhile(n),t.tokenize=f,"variable-2"):(t.tokenize=f,"error")}function C(e,t){var n;while(null!=(n=e.next()))if("}"===n){t.tokenize=f;break}return"variable-2"}function B(e,t){var n=t.startQuote;if(e.sol()&&e.match(new RegExp(n+"@")))t.tokenize=f;else if('"'===n)while(!e.eol()){var r=e.peek();if("$"===r)return t.tokenize=y,"string";e.next(),"`"===r&&e.next()}else e.skipToEnd();return"string"}var _={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:f}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return _})),e.defineMIME("application/x-powershell","powershell")}))},4668:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var n=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],r=t(n);e.registerHelper("hintWords","protobuf",n);var i=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");function o(e){if(e.eatSpace())return null;if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(r)?"keyword":e.match(i)?"variable":(e.next(),null)}e.defineMode("protobuf",(function(){return{token:o,fold:"brace"}})),e.defineMIME("text/x-protobuf","protobuf")}))},72989:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",(function(a,s){for(var l="error",c=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,A=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],u=0;u<A.length;u++)A[u]||A.splice(u--,1);var d=s.hangingIndent||a.indentUnit,h=r,p=i;void 0!=s.extra_keywords&&(h=h.concat(s.extra_keywords)),void 0!=s.extra_builtins&&(p=p.concat(s.extra_builtins));var f=!(s.version&&Number(s.version)<3);if(f){var g=s.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;h=h.concat(["nonlocal","None","aiter","anext","async","await","breakpoint","match","case"]),p=p.concat(["ascii","bytes","exec","print"]);var m=new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|\"{3}|['\"]))","i")}else{g=s.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;h=h.concat(["exec","print"]),p=p.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","None"]);m=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var v=t(h),b=t(p);function y(e,t){var n=e.sol()&&"\\"!=t.lastToken;if(n&&(t.indent=e.indentation()),n&&"py"==o(t).type){var r=o(t).offset;if(e.eatSpace()){var i=e.indentation();return i>r?C(t):i<r&&_(e,t)&&"#"!=e.peek()&&(t.errorToken=!0),null}var a=w(e,t);return r>0&&_(e,t)&&(a+=" "+l),a}return w(e,t)}function w(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(m)){var a=-1!==e.current().toLowerCase().indexOf("f");return a?(t.tokenize=x(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=k(e.current(),t.tokenize),t.tokenize(e,t))}for(var s=0;s<A.length;s++)if(e.match(A[s]))return"operator";return e.match(c)?"punctuation":"."==t.lastToken&&e.match(g)?"property":e.match(v)||e.match(n)?"keyword":e.match(b)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(g)?"def"==t.lastToken||"class"==t.lastToken?"def":"variable":(e.next(),r?null:l)}function x(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=w(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,a){while(!o.eol())if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return a.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return a.tokenize=i(0),o.current()?r:a.tokenize(o,a);if(o.match("}}"))return r;if(o.match("}"))return l;o.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return l;a.tokenize=t}return r}return o.isString=!0,o}function k(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){while(!i.eol())if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return l;o.tokenize=t}return r}return i.isString=!0,i}function C(e){while("py"!=o(e).type)e.scopes.pop();e.scopes.push({offset:o(e).offset+a.indentUnit,type:"py",align:null})}function B(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+d,type:n,align:r})}function _(e,t){var n=e.indentation();while(t.scopes.length>1&&o(t).offset>n){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function E(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(g,!1)?"meta":f?"operator":l;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&C(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&B(e,t,"])}".slice(i,i+1)),i="])}".indexOf(r),-1!=i){if(o(t).type!=r)return l;t.indent=t.scopes.pop().offset-d}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}var S={startState:function(e){return{tokenize:y,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=E(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+l:r},indent:function(t,n){if(t.tokenize!=y)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?d:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return S})),e.defineMIME("text/x-python","python");var a=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:a("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})}))},33991:function(e,t,n){n(92087),function(e){e(n(69767))}((function(e){"use strict";e.registerHelper("wordChars","r",/[\w.]/),e.defineMode("r",(function(t){function n(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}var r=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],i=["list","quote","bquote","eval","return","call","parse","deparse"],o=["if","else","repeat","while","function","for","in","next","break"],a=["if","else","repeat","while","function","for"];e.registerHelper("hintWords","r",r.concat(i,o));var s,l=n(r),c=n(i),A=n(o),u=n(a),d=/[+\-*\/^<>=!&|~$:]/;function h(e,t){s=null;var n=e.next();if("#"==n)return e.skipToEnd(),"comment";if("0"==n&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==n&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==n||'"'==n)return t.tokenize=p(n),"string";if("`"==n)return e.match(/[^`]+`/),"variable-3";if("."==n&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var r=e.current();return l.propertyIsEnumerable(r)?"atom":A.propertyIsEnumerable(r)?(u.propertyIsEnumerable(r)&&!e.match(/\s*if(\s+|$)/,!1)&&(s="block"),"keyword"):c.propertyIsEnumerable(r)?"builtin":"variable"}return"%"==n?(e.skipTo("%")&&e.next(),"operator variable-2"):"<"==n&&e.eat("-")||"<"==n&&e.match("<-")||"-"==n&&e.match(/>>?/)?"operator arrow":"="==n&&t.ctx.argList?"arg-is":d.test(n)?"$"==n?"operator dollar":(e.eatWhile(d),"operator"):/[\(\){}\[\];]/.test(n)?(s=n,";"==n?"semi":null):null}function p(e){return function(t,n){if(t.eat("\\")){var r=t.next();return"x"==r?t.match(/^[a-f0-9]{2}/i):("u"==r||"U"==r)&&t.eat("{")&&t.skipTo("}")?t.next():"u"==r?t.match(/^[a-f0-9]{4}/i):"U"==r?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(r)&&t.match(/^[0-7]{1,2}/),"string-2"}var i;while(null!=(i=t.next())){if(i==e){n.tokenize=h;break}if("\\"==i){t.backUp(1);break}}return"string"}}var f=1,g=2,m=4;function v(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function b(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function y(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:h,ctx:{type:"top",indent:-t.indentUnit,flags:g},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(0==(3&t.ctx.flags)&&(t.ctx.flags|=g),t.ctx.flags&m&&y(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"!=n&&0==(t.ctx.flags&g)&&b(t,f),";"!=s&&"{"!=s&&"}"!=s||"block"!=t.ctx.type||y(t),"{"==s?v(t,"}",e):"("==s?(v(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==s?v(t,"]",e):"block"==s?v(t,"block",e):s==t.ctx.type?y(t):"block"==t.ctx.type&&"comment"!=n&&b(t,m),t.afterIdent="variable"==n||"keyword"==n,n},indent:function(e,n){if(e.tokenize!=h)return 0;var r=n&&n.charAt(0),i=e.ctx,o=r==i.type;return i.flags&m&&(i=i.prev),"block"==i.type?i.indent+("{"==r?0:t.indentUnit):i.flags&f?i.column+(o?0:1):i.indent+(o?0:t.indentUnit)},lineComment:"#"}})),e.defineMIME("text/x-rsrc","r")}))},14040:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";function t(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}var n=["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"],r=t(n),i=t(["def","class","case","for","while","until","module","catch","loop","proc","begin"]),o=t(["end","until"]),a={"[":"]","{":"}","(":")"},s={"]":"[","}":"{",")":"("};e.defineMode("ruby",(function(t){var n;function l(e,t,n){return n.tokenize.push(e),e(t,n)}function c(e,t){if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(f),"comment";if(e.eatSpace())return null;var r,i=e.next();if("`"==i||"'"==i||'"'==i)return l(h(i,"string",'"'==i||"`"==i),e,t);if("/"==i)return A(e)?l(h(i,"string-2",!0),e,t):"operator";if("%"==i){var o="string",s=!0;e.eat("s")?o="atom":e.eat(/[WQ]/)?o="string":e.eat(/[r]/)?o="string-2":e.eat(/[wxq]/)&&(o="string",s=!1);var c=e.eat(/[^\w\s=]/);return c?(a.propertyIsEnumerable(c)&&(c=a[c]),l(h(c,o,s,!0),e,t)):"operator"}if("#"==i)return e.skipToEnd(),"comment";if("<"==i&&(r=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return l(p(r[2],r[1]),e,t);if("0"==i)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(i))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==i){while(e.match(/^\\[CM]-/));return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==i)return e.eat("'")?l(h("'","atom",!1),e,t):e.eat('"')?l(h('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==i&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==i)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(i))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=i||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(i))return n=i,null;if("-"==i&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(i)){var u=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=i||u||(n="."),"operator"}return null}return n="|",null}function A(e){var t,n=e.pos,r=0,i=!1,o=!1;while(null!=(t=e.next()))if(o)o=!1;else{if("[{(".indexOf(t)>-1)r++;else if("]})".indexOf(t)>-1){if(r--,r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}function u(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=u(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=u(e+1));return c(t,n)}}function d(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,c(t,n))}}function h(e,t,n,r){return function(i,o){var a,s=!1;"read-quoted-paused"===o.context.type&&(o.context=o.context.prev,i.eat("}"));while(null!=(a=i.next())){if(a==e&&(r||!s)){o.tokenize.pop();break}if(n&&"#"==a&&!s){if(i.eat("{")){"}"==e&&(o.context={prev:o.context,type:"read-quoted-paused"}),o.tokenize.push(u());break}if(/[@\$]/.test(i.peek())){o.tokenize.push(d());break}}s=!s&&"\\"==a}return t}}function p(e,t){return function(n,r){return t&&n.eatSpace(),n.match(e)?r.tokenize.pop():n.skipToEnd(),"string"}}function f(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[c],indented:0,context:{type:"top",indented:-t.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){n=null,e.sol()&&(t.indented=e.indentation());var a,s=t.tokenize[t.tokenize.length-1](e,t),l=n;if("ident"==s){var c=e.current();s="."==t.lastTok?"property":r.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(c)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable","keyword"==s&&(l=c,i.propertyIsEnumerable(c)?a="indent":o.propertyIsEnumerable(c)?a="dedent":"if"!=c&&"unless"!=c||e.column()!=e.indentation()?"do"==c&&t.context.indented<t.indented&&(a="indent"):a="indent")}return(n||s&&"comment"!=s)&&(t.lastTok=l),"|"==n&&(t.varList=!t.varList),"indent"==a||/[\(\[\{]/.test(n)?t.context={prev:t.context,type:n||s,indented:t.indented}:("dedent"==a||/[\)\]\}]/.test(n))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine="\\"==n||"operator"==s),s},indent:function(n,r){if(n.tokenize[n.tokenize.length-1]!=c)return e.Pass;var i=r&&r.charAt(0),o=n.context,a=o.type==s[i]||"keyword"==o.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(r);return o.indented+(a?0:t.indentUnit)+(n.continuedLine?t.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-ruby","ruby"),e.registerHelper("hintWords","ruby",n)}))},84984:function(e,t,n){(function(e){e(n(69767),n(24559))})((function(e){"use strict";e.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),e.defineMIME("text/x-rustsrc","rust"),e.defineMIME("text/rust","rust")}))},67462:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("shell",(function(){var t={};function n(e,n){for(var r=0;r<n.length;r++)t[n[r]]=e}var r=["true","false"],i=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],o=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function a(e,n){if(e.eatSpace())return null;var r=e.sol(),i=e.next();if("\\"===i)return e.next(),null;if("'"===i||'"'===i||"`"===i)return n.tokens.unshift(s(i,"`"===i?"quote":"string")),u(e,n);if("#"===i)return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===i)return n.tokens.unshift(c),u(e,n);if("+"===i||"="===i)return"operator";if("-"===i)return e.eat("-"),e.eatWhile(/\w/),"attribute";if("<"==i){if(e.match("<<"))return"operator";var o=e.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(o)return n.tokens.unshift(A(o[1])),"string-2"}if(/\d/.test(i)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var a=e.current();return"="===e.peek()&&/\w+/.test(a)?"def":t.hasOwnProperty(a)?t[a]:null}function s(e,t){var n="("==e?")":"{"==e?"}":e;return function(r,i){var o,a=!1;while(null!=(o=r.next())){if(o===n&&!a){i.tokens.shift();break}if("$"===o&&!a&&"'"!==e&&r.peek()!=n){a=!0,r.backUp(1),i.tokens.unshift(c);break}if(!a&&e!==n&&o===e)return i.tokens.unshift(s(e,t)),u(r,i);if(!a&&/['"]/.test(o)&&!/['"]/.test(e)){i.tokens.unshift(l(o,"string")),r.backUp(1);break}a=!a&&"\\"===o}return t}}function l(e,t){return function(n,r){return r.tokens[0]=s(e,t),n.next(),u(n,r)}}e.registerHelper("hintWords","shell",r.concat(i,o)),n("atom",r),n("keyword",i),n("builtin",o);var c=function(e,t){t.tokens.length>1&&e.eat("$");var n=e.next();return/['"({]/.test(n)?(t.tokens[0]=s(n,"("==n?"quote":"{"==n?"def":"string"),u(e,t)):(/\d/.test(n)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function A(e){return function(t,n){return t.sol()&&t.string==e&&n.tokens.shift(),t.skipToEnd(),"string-2"}}function u(e,t){return(t.tokens[0]||a)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return u(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),e.defineMIME("text/x-sh","shell"),e.defineMIME("application/x-sh","shell")}))},12492:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";function t(e){var t;while(null!=(t=e.next()))if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){var t;while(null!=(t=e.next()))if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function r(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function i(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,n){var r=n.client||{},i=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||a(s),c=n.keywords||a(o),A=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=n.support||{},d=n.hooks||{},h=n.dateSQL||{date:!0,time:!0,timestamp:!0},p=!1!==n.backslashStringEscapes,f=n.brackets||/^[\{}\(\)\[\]]/,g=n.punctuation||/^[;.,:]/;function m(e,t){var n=e.next();if(d[n]){var o=d[n](e,t);if(!1!==o)return o}if(u.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]*'/)))return"number";if(u.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]*'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&u.doubleQuote)return t.tokenize=v(n),t.tokenize(e,t);if((u.nCharCast&&("n"==n||"N"==n)||u.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(u.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&u.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=v(e.next(),!0))(e,t)},"keyword";if(u.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(u.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!u.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(A.test(n))return e.eatWhile(A),"operator";if(f.test(n))return"bracket";if(g.test(n))return e.eatWhile(g),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return h.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":i.hasOwnProperty(a)?"atom":l.hasOwnProperty(a)?"type":c.hasOwnProperty(a)?"keyword":r.hasOwnProperty(a)?"builtin":null}return u.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function v(e,t){return function(n,r){var i,o=!1;while(null!=(i=n.next())){if(i==e&&!o){r.tokenize=m;break}o=(p||t)&&!o&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):m:t.skipToEnd(),"comment"}}function y(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function w(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:m,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==m&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?y(e,t,")"):"["==r?y(e,t,"]"):t.context&&t.context.type==r&&w(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:u.commentSlashSlash?"//":u.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:n}}));var o="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";e.defineMIME("text/x-sql",{name:"sql",keywords:a(o+"begin"),builtin:a(s),atoms:a("false true null unknown"),dateSQL:a("date time timestamp"),support:a("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:a("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:a(o+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:a("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:a("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:a("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),e.defineMIME("text/x-mysql",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-mariadb",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-sqlite",{name:"sql",client:a("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:a(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:a("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:a("date time timestamp datetime"),support:a("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':n,"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:a("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:a("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:a("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:a("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:a("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:a("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:a("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:a("date time timestamp"),support:a("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:a("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:a("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:a("date timestamp"),support:a("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:a("source"),keywords:a(o+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:a("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:a("false true"),builtin:a("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:a("source"),keywords:a("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:a("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:a("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:a("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:a("date time timestamp"),support:a("doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:a("source"),keywords:a("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:a("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("time"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-trino",{name:"sql",keywords:a("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:a("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:a("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:a("date time timestamp zone"),support:a("decimallessFloat zerolessFloat hexNumber")})}))},70284:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var n=t(["_","var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super","convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is","break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while","defer","return","inout","mutating","nonmutating","isolated","nonisolated","catch","do","rethrows","throw","throws","async","await","try","didSet","get","set","willSet","assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right","Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]),r=t(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),i=t(["true","false","nil","self","super","_"]),o=t(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),a="+-/*%=|&<>~^?!",s=":;,.(){}[]",l=/^\-?0b[01][01_]*/,c=/^\-?0o[0-7][0-7_]*/,A=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,u=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,d=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,h=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,p=/^\#[A-Za-z]+/,f=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function g(e,t,g){if(e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;var m,y=e.peek();if("/"==y){if(e.match("//"))return e.skipToEnd(),"comment";if(e.match("/*"))return t.tokenize.push(b),b(e,t)}if(e.match(p))return"builtin";if(e.match(f))return"attribute";if(e.match(l))return"number";if(e.match(c))return"number";if(e.match(A))return"number";if(e.match(u))return"number";if(e.match(h))return"property";if(a.indexOf(y)>-1)return e.next(),"operator";if(s.indexOf(y)>-1)return e.next(),e.match(".."),"punctuation";if(m=e.match(/("""|"|')/)){var w=v.bind(null,m[0]);return t.tokenize.push(w),w(e,t)}if(e.match(d)){var x=e.current();return o.hasOwnProperty(x)?"variable-2":i.hasOwnProperty(x)?"atom":n.hasOwnProperty(x)?(r.hasOwnProperty(x)&&(t.prev="define"),"keyword"):"define"==g?"def":"variable"}return e.next(),null}function m(){var e=0;return function(t,n,r){var i=g(t,n,r);if("punctuation"==i)if("("==t.current())++e;else if(")"==t.current()){if(0==e)return t.backUp(1),n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);--e}return i}}function v(e,t,n){var r,i=1==e.length,o=!1;while(r=t.peek())if(o){if(t.next(),"("==r)return n.tokenize.push(m()),"string";o=!1}else{if(t.match(e))return n.tokenize.pop(),"string";t.next(),o="\\"==r}return i&&n.tokenize.pop(),"string"}function b(e,t){var n;while(n=e.next())if("/"===n&&e.eat("*"))t.tokenize.push(b);else if("*"===n&&e.eat("/")){t.tokenize.pop();break}return"comment"}function y(e,t,n){this.prev=e,this.align=t,this.indented=n}function w(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new y(e.context,n,e.indented)}function x(e){e.context&&(e.indented=e.context.indented,e.context=e.context.prev)}e.defineMode("swift",(function(e){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(e,t){var n=t.prev;t.prev=null;var r=t.tokenize[t.tokenize.length-1]||g,i=r(e,t,n);if(i&&"comment"!=i?t.prev||(t.prev=i):t.prev=n,"punctuation"==i){var o=/[\(\[\{]|([\]\)\}])/.exec(e.current());o&&(o[1]?x:w)(t,e)}return i},indent:function(t,n){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return null!=r.align?r.align-(i?1:0):r.indented+(i?0:e.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}})),e.defineMIME("text/x-swift","swift")}))},53810:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("vb",(function(t,n){var r="error";function i(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var o=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),a=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),s=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),l=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),c=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),A=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),u=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],d=["else","elseif","case","catch","finally"],h=["next","loop"],p=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],f=i(p),g=["#const","#else","#elseif","#end","#if","#region","addhandler","addressof","alias","as","byref","byval","cbool","cbyte","cchar","cdate","cdbl","cdec","cint","clng","cobj","compare","const","continue","csbyte","cshort","csng","cstr","cuint","culng","cushort","declare","default","delegate","dim","directcast","each","erase","error","event","exit","explicit","false","for","friend","gettype","goto","handles","implements","imports","infer","inherits","interface","isfalse","istrue","lib","me","mod","mustinherit","mustoverride","my","mybase","myclass","namespace","narrowing","new","nothing","notinheritable","notoverridable","of","off","on","operator","option","optional","out","overloads","overridable","overrides","paramarray","partial","private","protected","public","raiseevent","readonly","redim","removehandler","resume","return","shadows","shared","static","step","stop","strict","then","throw","to","true","trycast","typeof","until","until","when","widening","withevents","writeonly"],m=["object","boolean","char","string","byte","sbyte","short","ushort","int16","uint16","integer","uinteger","int32","uint32","long","ulong","int64","uint64","decimal","single","double","float","date","datetime","intptr","uintptr"],v=i(g),b=i(m),y='"',w=i(u),x=i(d),k=i(h),C=i(["end"]),B=i(["do"]),_=null;function E(e,t){t.currentIndent++}function S(e,t){t.currentIndent--}function F(e,t){if(e.eatSpace())return null;var n=e.peek();if("'"===n)return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var i=!1;if((e.match(/^\d*\.\d+F?/i)||e.match(/^\d+\.\d*F?/)||e.match(/^\.\d+F?/))&&(i=!0),i)return e.eat(/J/i),"number";var u=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?u=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),u=!0):e.match(/^0(?![\dx])/i)&&(u=!0),u)return e.eat(/L/i),"number"}return e.match(y)?(t.tokenize=T(e.current()),t.tokenize(e,t)):e.match(c)||e.match(l)?null:e.match(s)||e.match(o)||e.match(f)?"operator":e.match(a)?null:e.match(B)?(E(e,t),t.doInCurrentLine=!0,"keyword"):e.match(w)?(t.doInCurrentLine?t.doInCurrentLine=!1:E(e,t),"keyword"):e.match(x)?"keyword":e.match(C)?(S(e,t),S(e,t),"keyword"):e.match(k)?(S(e,t),"keyword"):e.match(b)||e.match(v)?"keyword":e.match(A)?"variable":(e.next(),r)}function T(e){var t=1==e.length,i="string";return function(o,a){while(!o.eol()){if(o.eatWhile(/[^'"]/),o.match(e))return a.tokenize=F,i;o.eat(/['"]/)}if(t){if(n.singleLineStringErrors)return r;a.tokenize=F}return i}}function M(e,t){var n=t.tokenize(e,t),i=e.current();if("."===i)return n=t.tokenize(e,t),"variable"===n?"variable":r;var o="[({".indexOf(i);return-1!==o&&E(e,t),"dedent"===_&&S(e,t)?r:(o="])}".indexOf(i),-1!==o&&S(e,t)?r:n)}e.registerHelper("hintWords","vb",u.concat(d).concat(h).concat(p).concat(g).concat(m));var I={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:F,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=M(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(k)||r.match(C)||r.match(x)?t.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.indentUnit},lineComment:"'"};return I})),e.defineMIME("text/x-vb","vb")}))},43004:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("velocity",(function(){function e(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var t=e("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),n=e("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),r=e("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),i=/[+\-*&%=<>!?:\/|]/;function o(e,t,n){return t.tokenize=n,n(e,t)}function a(e,a){var A=a.beforeParams;a.beforeParams=!1;var u=e.next();if("'"==u&&!a.inString&&a.inParams)return a.lastTokenWasBuiltin=!1,o(e,a,s(u));if('"'!=u){if(/[\[\]{}\(\),;\.]/.test(u))return"("==u&&A?a.inParams=!0:")"==u&&(a.inParams=!1,a.lastTokenWasBuiltin=!0),null;if(/\d/.test(u))return a.lastTokenWasBuiltin=!1,e.eatWhile(/[\w\.]/),"number";if("#"==u&&e.eat("*"))return a.lastTokenWasBuiltin=!1,o(e,a,l);if("#"==u&&e.match(/ *\[ *\[/))return a.lastTokenWasBuiltin=!1,o(e,a,c);if("#"==u&&e.eat("#"))return a.lastTokenWasBuiltin=!1,e.skipToEnd(),"comment";if("$"==u)return e.eat("!"),e.eatWhile(/[\w\d\$_\.{}-]/),r&&r.propertyIsEnumerable(e.current())?"keyword":(a.lastTokenWasBuiltin=!0,a.beforeParams=!0,"builtin");if(i.test(u))return a.lastTokenWasBuiltin=!1,e.eatWhile(i),"operator";e.eatWhile(/[\w\$_{}@]/);var d=e.current();return t&&t.propertyIsEnumerable(d)?"keyword":n&&n.propertyIsEnumerable(d)||e.current().match(/^#@?[a-z0-9_]+ *$/i)&&"("==e.peek()&&(!n||!n.propertyIsEnumerable(d.toLowerCase()))?(a.beforeParams=!0,a.lastTokenWasBuiltin=!1,"keyword"):a.inString?(a.lastTokenWasBuiltin=!1,"string"):e.pos>d.length&&"."==e.string.charAt(e.pos-d.length-1)&&a.lastTokenWasBuiltin?"builtin":(a.lastTokenWasBuiltin=!1,null)}return a.lastTokenWasBuiltin=!1,a.inString?(a.inString=!1,"string"):a.inParams?o(e,a,s(u)):void 0}function s(e){return function(t,n){var r,i=!1,o=!1;while(null!=(r=t.next())){if(r==e&&!i){o=!0;break}if('"'==e&&"$"==t.peek()&&!i){n.inString=!0,o=!0;break}i=!i&&"\\"==r}return o&&(n.tokenize=a),"string"}}function l(e,t){var n,r=!1;while(n=e.next()){if("#"==n&&r){t.tokenize=a;break}r="*"==n}return"comment"}function c(e,t){var n,r=0;while(n=e.next()){if("#"==n&&2==r){t.tokenize=a;break}"]"==n?r++:" "!=n&&(r=0)}return"meta"}return{startState:function(){return{tokenize:a,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}})),e.defineMIME("text/velocity","velocity")}))},61804:function(e,t,n){n(57658),function(e){e(n(69767))}((function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var A in c)l[A]=c[A];for(var A in i)l[A]=i[A];function u(e,t){function n(n){return t.tokenize=n,n(e,t)}var r,i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(f(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==i?(r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"):(e.eatWhile(/[^&<]/),null)}function d(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=u,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=u,t.state=y,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=h(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e){var t=function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=u;break}n.next()}return e}}function f(e){return function(t,n){var r;while(null!=(r=t.next())){if("<"==r)return n.tokenize=f(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=u;break}return n.tokenize=f(e-1),n.tokenize(t,n)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function m(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function b(e,t){var n;while(1){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(g(n))||!l.contextGrabbers[g(n)].hasOwnProperty(g(t)))return;v(e)}}function y(e,t,n){return"openTag"==e?(n.tagStart=t.column(),w):"closeTag"==e?x:y}function w(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",B):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",B(e,t,n)):(a="error",w)}function x(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",k):(a="tag error",C)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,t,n)):(a="error",C)}function k(e,t,n){return"endTag"!=e?(a="error",k):(v(n),y)}function C(e,t,n){return a="error",k(e,t,n)}function B(e,t,n){if("word"==e)return a="attribute",_;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(g(r))?b(n,r):(b(n,r),n.context=new m(n,r,i==n.indented)),y}return a="error",B}function _(e,t,n){return"equals"==e?E:(l.allowMissing||(a="error"),B(e,t,n))}function E(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(a="string",B):(a="error",B(e,t,n))}function S(e,t,n){return"string"==e?S:B(e,t,n)}return u.isInText=!0,{startState:function(e){var t={tokenize:u,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=u)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])while(i){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(g(i.tagName)))break;i=i.prev}else if(o)while(i){var a=l.contextGrabbers[g(i.tagName)];if(!a||!a.hasOwnProperty(g(o[2])))break;i=i.prev}while(i&&i.prev&&!i.startOfLine)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=B)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}))},37406:function(e,t,n){(function(e){e(n(69767))})((function(e){"use strict";e.defineMode("yaml",(function(){var e=["true","false","on","off","yes","no"],t=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,n){var r=e.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&e.indentation()>n.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match("---"))return"def";if(e.match("..."))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return e.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}))},51945:function(e,t,n){"use strict";var r=n(83545),i={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";function a(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function s(e,t){var n,s,l,c,A,u,d=!1;t||(t={}),n=t.debug||!1;try{l=r(),c=document.createRange(),A=document.getSelection(),u=document.createElement("span"),u.textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i["default"];window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),A.addRange(c);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");d=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),s=a("message"in t?t.message:o),window.prompt(s,e)}}finally{A&&("function"==typeof A.removeRange?A.removeRange(c):A.removeAllRanges()),u&&document.body.removeChild(u),l()}return d}e.exports=s},40255:function(e,t,n){n(57658),n(82801),n(1439),n(87585),n(55315),
/*!
* Cropper.js v1.6.0
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2023-08-26T08:14:27.943Z
*/
function(t,n){e.exports=n()}(0,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t=p(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return l(e)||c(e)||A(e)||d()}function l(e){if(Array.isArray(e))return u(e)}function c(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function A(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=h(e,"string");return"symbol"===typeof t?t:String(t)}var f="undefined"!==typeof window&&"undefined"!==typeof window.document,g=f?window:{},m=!(!f||!g.document.documentElement)&&"ontouchstart"in g.document.documentElement,v=!!f&&"PointerEvent"in g,b="cropper",y="all",w="crop",x="move",k="zoom",C="e",B="w",_="s",E="n",S="ne",F="nw",T="se",M="sw",I="".concat(b,"-crop"),N="".concat(b,"-disabled"),U="".concat(b,"-hidden"),L="".concat(b,"-hide"),Q="".concat(b,"-invisible"),D="".concat(b,"-modal"),H="".concat(b,"-move"),O="".concat(b,"Action"),z="".concat(b,"Preview"),Z="crop",R="move",P="none",q="crop",K="cropend",W="cropmove",j="cropstart",V="dblclick",G=m?"touchstart":"mousedown",$=m?"touchmove":"mousemove",Y=m?"touchend touchcancel":"mouseup",X=v?"pointerdown":G,J=v?"pointermove":$,ee=v?"pointerup pointercancel":Y,te="ready",ne="resize",re="wheel",ie="zoom",oe="image/jpeg",ae=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,se=/^data:/,le=/^data:image\/jpeg;base64,/,ce=/^img|canvas$/i,Ae=200,ue=100,de={viewMode:0,dragMode:Z,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Ae,minContainerHeight:ue,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},he='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',pe=Number.isNaN||g.isNaN;function fe(e){return"number"===typeof e&&!pe(e)}var ge=function(e){return e>0&&e<1/0};function me(e){return"undefined"===typeof e}function ve(e){return"object"===n(e)&&null!==e}var be=Object.prototype.hasOwnProperty;function ye(e){if(!ve(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&be.call(n,"isPrototypeOf")}catch(r){return!1}}function we(e){return"function"===typeof e}var xe=Array.prototype.slice;function ke(e){return Array.from?Array.from(e):xe.call(e)}function Ce(e,t){return e&&we(t)&&(Array.isArray(e)||fe(e.length)?ke(e).forEach((function(n,r){t.call(e,n,r,e)})):ve(e)&&Object.keys(e).forEach((function(n){t.call(e,e[n],n,e)}))),e}var Be=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ve(e)&&n.length>0&&n.forEach((function(t){ve(t)&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},_e=/\.\d*(?:0|9){12}\d*$/;function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return _e.test(e)?Math.round(e*t)/t:e}var Se=/^width|height|left|top|marginLeft|marginTop$/;function Fe(e,t){var n=e.style;Ce(t,(function(e,t){Se.test(t)&&fe(e)&&(e="".concat(e,"px")),n[t]=e}))}function Te(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Me(e,t){if(t)if(fe(e.length))Ce(e,(function(e){Me(e,t)}));else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Ie(e,t){t&&(fe(e.length)?Ce(e,(function(e){Ie(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function Ne(e,t,n){t&&(fe(e.length)?Ce(e,(function(e){Ne(e,t,n)})):n?Me(e,t):Ie(e,t))}var Ue=/([a-z\d])([A-Z])/g;function Le(e){return e.replace(Ue,"$1-$2").toLowerCase()}function Qe(e,t){return ve(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Le(t)))}function De(e,t,n){ve(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Le(t)),n)}function He(e,t){if(ve(e[t]))try{delete e[t]}catch(n){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(n){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Le(t)))}var Oe=/\s\s*/,ze=function(){var e=!1;if(f){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});g.addEventListener("test",n,r),g.removeEventListener("test",n,r)}return e}();function Ze(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(Oe).forEach((function(t){if(!ze){var o=e.listeners;o&&o[t]&&o[t][n]&&(i=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,i,r)}))}function Re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n;t.trim().split(Oe).forEach((function(t){if(r.once&&!ze){var o=e.listeners,a=void 0===o?{}:o;i=function(){delete a[t][n],e.removeEventListener(t,i,r);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],r),a[t][n]=i,e.listeners=a}e.addEventListener(t,i,r)}))}function Pe(e,t,n){var r;return we(Event)&&we(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,!0,!0,n)),e.dispatchEvent(r)}function qe(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ke=g.location,We=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function je(e){var t=e.match(We);return null!==t&&(t[1]!==Ke.protocol||t[2]!==Ke.hostname||t[3]!==Ke.port)}function Ve(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function Ge(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,o=e.translateY,a=[];fe(i)&&0!==i&&a.push("translateX(".concat(i,"px)")),fe(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),fe(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),fe(n)&&1!==n&&a.push("scaleX(".concat(n,")")),fe(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function $e(e){var n=t({},e),r=0;return Ce(e,(function(e,t){delete n[t],Ce(n,(function(t){var n=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(n*n+i*i),l=Math.sqrt(o*o+a*a),c=(l-s)/s;Math.abs(c)>Math.abs(r)&&(r=c)}))})),r}function Ye(e,n){var r=e.pageX,i=e.pageY,o={endX:r,endY:i};return n?o:t({startX:r,startY:i},o)}function Xe(e){var t=0,n=0,r=0;return Ce(e,(function(e){var i=e.startX,o=e.startY;t+=i,n+=o,r+=1})),t/=r,n/=r,{pageX:t,pageY:n}}function Je(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=ge(r),a=ge(n);if(o&&a){var s=n*t;"contain"===i&&s>r||"cover"===i&&s<r?n=r/t:r=n*t}else o?n=r/t:a&&(r=n*t);return{width:r,height:n}}function et(e){var t=e.width,n=e.height,r=e.degree;if(r=Math.abs(r)%180,90===r)return{width:n,height:t};var i=r%90*Math.PI/180,o=Math.sin(i),a=Math.cos(i),s=t*a+n*o,l=t*o+n*a;return r>90?{width:l,height:s}:{width:s,height:l}}function tt(e,t,n,r){var i=t.aspectRatio,o=t.naturalWidth,a=t.naturalHeight,l=t.rotate,c=void 0===l?0:l,A=t.scaleX,u=void 0===A?1:A,d=t.scaleY,h=void 0===d?1:d,p=n.aspectRatio,f=n.naturalWidth,g=n.naturalHeight,m=r.fillColor,v=void 0===m?"transparent":m,b=r.imageSmoothingEnabled,y=void 0===b||b,w=r.imageSmoothingQuality,x=void 0===w?"low":w,k=r.maxWidth,C=void 0===k?1/0:k,B=r.maxHeight,_=void 0===B?1/0:B,E=r.minWidth,S=void 0===E?0:E,F=r.minHeight,T=void 0===F?0:F,M=document.createElement("canvas"),I=M.getContext("2d"),N=Je({aspectRatio:p,width:C,height:_}),U=Je({aspectRatio:p,width:S,height:T},"cover"),L=Math.min(N.width,Math.max(U.width,f)),Q=Math.min(N.height,Math.max(U.height,g)),D=Je({aspectRatio:i,width:C,height:_}),H=Je({aspectRatio:i,width:S,height:T},"cover"),O=Math.min(D.width,Math.max(H.width,o)),z=Math.min(D.height,Math.max(H.height,a)),Z=[-O/2,-z/2,O,z];return M.width=Ee(L),M.height=Ee(Q),I.fillStyle=v,I.fillRect(0,0,L,Q),I.save(),I.translate(L/2,Q/2),I.rotate(c*Math.PI/180),I.scale(u,h),I.imageSmoothingEnabled=y,I.imageSmoothingQuality=x,I.drawImage.apply(I,[e].concat(s(Z.map((function(e){return Math.floor(Ee(e))}))))),I.restore(),M}var nt=String.fromCharCode;function rt(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=nt(e.getUint8(i));return r}var it=/^data:.*,/;function ot(e){var t=e.replace(it,""),n=atob(t),r=new ArrayBuffer(n.length),i=new Uint8Array(r);return Ce(i,(function(e,t){i[t]=n.charCodeAt(t)})),r}function at(e,t){var n=[],r=8192,i=new Uint8Array(e);while(i.length>0)n.push(nt.apply(null,ke(i.subarray(0,r)))),i=i.subarray(r);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}function st(e){var t,n=new DataView(e);try{var r,i,o;if(255===n.getUint8(0)&&216===n.getUint8(1)){var a=n.byteLength,s=2;while(s+1<a){if(255===n.getUint8(s)&&225===n.getUint8(s+1)){i=s;break}s+=1}}if(i){var l=i+4,c=i+10;if("Exif"===rt(n,l,4)){var A=n.getUint16(c);if(r=18761===A,(r||19789===A)&&42===n.getUint16(c+2,r)){var u=n.getUint32(c+4,r);u>=8&&(o=c+u)}}}if(o){var d,h,p=n.getUint16(o,r);for(h=0;h<p;h+=1)if(d=o+12*h+2,274===n.getUint16(d,r)){d+=8,t=n.getUint16(d,r),n.setUint16(d,1,r);break}}}catch(f){t=1}return t}function lt(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:r}}var ct={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,i=Number(t.minContainerWidth),o=Number(t.minContainerHeight);Me(r,U),Ie(e,U);var a={width:Math.max(n.offsetWidth,i>=0?i:Ae),height:Math.max(n.offsetHeight,o>=0?o:ue)};this.containerData=a,Fe(r,{width:a.width,height:a.height}),Me(e,U),Ie(r,U)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180===90,i=r?t.naturalHeight:t.naturalWidth,o=r?t.naturalWidth:t.naturalHeight,a=i/o,s=e.width,l=e.height;e.height*a>e.width?3===n?s=e.height*a:l=e.width/a:3===n?l=e.width/a:s=e.height*a;var c={aspectRatio:a,naturalWidth:i,naturalHeight:o,width:s,height:l};this.canvasData=c,this.limited=1===n||2===n,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(e.width-c.width)/2,c.top=(e.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Be({},c)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,l=this.cropped&&o;if(e){var c=Number(n.minCanvasWidth)||0,A=Number(n.minCanvasHeight)||0;a>1?(c=Math.max(c,r.width),A=Math.max(A,r.height),3===a&&(A*s>c?c=A*s:A=c/s)):a>0&&(c?c=Math.max(c,l?o.width:0):A?A=Math.max(A,l?o.height:0):l&&(c=o.width,A=o.height,A*s>c?c=A*s:A=c/s));var u=Je({aspectRatio:s,width:c,height:A});c=u.width,A=u.height,i.minWidth=c,i.minHeight=A,i.maxWidth=1/0,i.maxHeight=1/0}if(t)if(a>(l?0:1)){var d=r.width-i.width,h=r.height-i.height;i.minLeft=Math.min(0,d),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,d),i.maxTop=Math.max(0,h),l&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a&&(i.width>=r.width&&(i.minLeft=Math.min(0,d),i.maxLeft=Math.max(0,d)),i.height>=r.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var i=et({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),o=i.width,a=i.height,s=n.width*(o/n.naturalWidth),l=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(l-n.height)/2,n.width=s,n.height=l,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,Fe(this.canvas,Be({width:n.width,height:n.height},Ge({translateX:n.left,translateY:n.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);Be(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),Fe(this.image,Be({width:n.width,height:n.height},Ge(Be({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,r=Number(e.autoCropArea)||.8,i={width:t.width,height:t.height};n&&(t.height*n>t.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*r),i.height=Math.max(i.minHeight,i.height*r),i.left=t.left+(t.width-i.width)/2,i.top=t.top+(t.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=Be({},i)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(e){var l=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,A=a?Math.min(r.width,i.width,i.width+i.left,r.width-i.left):r.width,u=a?Math.min(r.height,i.height,i.height+i.top,r.height-i.top):r.height;l=Math.min(l,r.width),c=Math.min(c,r.height),s&&(l&&c?c*s>l?c=l/s:l=c*s:l?c=l/s:c&&(l=c*s),u*s>A?u=A/s:A=u*s),o.minWidth=Math.min(l,A),o.minHeight=Math.min(c,u),o.maxWidth=A,o.maxHeight=u}t&&(a?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(r.width,i.left+i.width)-o.width,o.maxTop=Math.min(r.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=r.width-o.width,o.maxTop=r.height-o.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&De(this.face,O,n.width>=t.width&&n.height>=t.height?x:y),Fe(this.cropBox,Be({width:n.width,height:n.height},Ge({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Pe(this.element,q,this.getData())}},At={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");if(t&&(o.crossOrigin=t),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"===typeof n?a=e.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,Ce(a,(function(e){var n=document.createElement("img");De(e,z,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=i,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(n)}))}},resetPreview:function(){Ce(this.previews,(function(e){var t=Qe(e,z);Fe(e,{width:t.width,height:t.height}),e.innerHTML=t.html,He(e,z)}))},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,i=n.height,o=e.width,a=e.height,s=n.left-t.left-e.left,l=n.top-t.top-e.top;this.cropped&&!this.disabled&&(Fe(this.viewBoxImage,Be({width:o,height:a},Ge(Be({translateX:-s,translateY:-l},e)))),Ce(this.previews,(function(t){var n=Qe(t,z),c=n.width,A=n.height,u=c,d=A,h=1;r&&(h=c/r,d=i*h),i&&d>A&&(h=A/i,u=r*h,d=A),Fe(t,{width:u,height:d}),Fe(t.getElementsByTagName("img")[0],Be({width:o*h,height:a*h},Ge(Be({translateX:-s*h,translateY:-l*h},e))))})))}},ut={bind:function(){var e=this.element,t=this.options,n=this.cropper;we(t.cropstart)&&Re(e,j,t.cropstart),we(t.cropmove)&&Re(e,W,t.cropmove),we(t.cropend)&&Re(e,K,t.cropend),we(t.crop)&&Re(e,q,t.crop),we(t.zoom)&&Re(e,ie,t.zoom),Re(n,X,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&Re(n,re,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&Re(n,V,this.onDblclick=this.dblclick.bind(this)),Re(e.ownerDocument,J,this.onCropMove=this.cropMove.bind(this)),Re(e.ownerDocument,ee,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&Re(window,ne,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;we(t.cropstart)&&Ze(e,j,t.cropstart),we(t.cropmove)&&Ze(e,W,t.cropmove),we(t.cropend)&&Ze(e,K,t.cropend),we(t.crop)&&Ze(e,q,t.crop),we(t.zoom)&&Ze(e,ie,t.zoom),Ze(n,X,this.onCropStart),t.zoomable&&t.zoomOnWheel&&Ze(n,re,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&Ze(n,V,this.onDblclick),Ze(e.ownerDocument,J,this.onCropMove),Ze(e.ownerDocument,ee,this.onCropEnd),t.responsive&&Ze(window,ne,this.onResize)}},dt={resize:function(){if(!this.disabled){var e,t,n=this.options,r=this.container,i=this.containerData,o=r.offsetWidth/i.width,a=r.offsetHeight/i.height,s=Math.abs(o-1)>Math.abs(a-1)?o:a;if(1!==s)n.restore&&(e=this.getCanvasData(),t=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(Ce(e,(function(t,n){e[n]=t*s}))),this.setCropBoxData(Ce(t,(function(e,n){t[n]=e*s}))))}},dblclick:function(){this.disabled||this.options.dragMode===P||this.setDragMode(Te(this.dragBox,I)?R:Z)},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(fe(t)&&1!==t||fe(n)&&0!==n||e.ctrlKey))){var r,i=this.options,o=this.pointers;e.changedTouches?Ce(e.changedTouches,(function(e){o[e.identifier]=Ye(e)})):o[e.pointerId||0]=Ye(e),r=Object.keys(o).length>1&&i.zoomable&&i.zoomOnTouch?k:Qe(e.target,O),ae.test(r)&&!1!==Pe(this.element,j,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,r===w&&(this.cropping=!0,Me(this.dragBox,D)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var n=this.pointers;e.preventDefault(),!1!==Pe(this.element,W,{originalEvent:e,action:t})&&(e.changedTouches?Ce(e.changedTouches,(function(e){Be(n[e.identifier]||{},Ye(e,!0))})):Be(n[e.pointerId||0]||{},Ye(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?Ce(e.changedTouches,(function(e){delete n[e.identifier]})):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Ne(this.dragBox,D,this.cropped&&this.options.modal)),Pe(this.element,K,{originalEvent:e,action:t}))}}},ht={change:function(e){var t,n=this.options,r=this.canvasData,i=this.containerData,o=this.cropBoxData,a=this.pointers,s=this.action,l=n.aspectRatio,c=o.left,A=o.top,u=o.width,d=o.height,h=c+u,p=A+d,f=0,g=0,m=i.width,v=i.height,b=!0;!l&&e.shiftKey&&(l=u&&d?u/d:1),this.limited&&(f=o.minLeft,g=o.minTop,m=f+Math.min(i.width,r.width,r.left+r.width),v=g+Math.min(i.height,r.height,r.top+r.height));var I=a[Object.keys(a)[0]],N={x:I.endX-I.startX,y:I.endY-I.startY},L=function(e){switch(e){case C:h+N.x>m&&(N.x=m-h);break;case B:c+N.x<f&&(N.x=f-c);break;case E:A+N.y<g&&(N.y=g-A);break;case _:p+N.y>v&&(N.y=v-p);break}};switch(s){case y:c+=N.x,A+=N.y;break;case C:if(N.x>=0&&(h>=m||l&&(A<=g||p>=v))){b=!1;break}L(C),u+=N.x,u<0&&(s=B,u=-u,c-=u),l&&(d=u/l,A+=(o.height-d)/2);break;case E:if(N.y<=0&&(A<=g||l&&(c<=f||h>=m))){b=!1;break}L(E),d-=N.y,A+=N.y,d<0&&(s=_,d=-d,A-=d),l&&(u=d*l,c+=(o.width-u)/2);break;case B:if(N.x<=0&&(c<=f||l&&(A<=g||p>=v))){b=!1;break}L(B),u-=N.x,c+=N.x,u<0&&(s=C,u=-u,c-=u),l&&(d=u/l,A+=(o.height-d)/2);break;case _:if(N.y>=0&&(p>=v||l&&(c<=f||h>=m))){b=!1;break}L(_),d+=N.y,d<0&&(s=E,d=-d,A-=d),l&&(u=d*l,c+=(o.width-u)/2);break;case S:if(l){if(N.y<=0&&(A<=g||h>=m)){b=!1;break}L(E),d-=N.y,A+=N.y,u=d*l}else L(E),L(C),N.x>=0?h<m?u+=N.x:N.y<=0&&A<=g&&(b=!1):u+=N.x,N.y<=0?A>g&&(d-=N.y,A+=N.y):(d-=N.y,A+=N.y);u<0&&d<0?(s=M,d=-d,u=-u,A-=d,c-=u):u<0?(s=F,u=-u,c-=u):d<0&&(s=T,d=-d,A-=d);break;case F:if(l){if(N.y<=0&&(A<=g||c<=f)){b=!1;break}L(E),d-=N.y,A+=N.y,u=d*l,c+=o.width-u}else L(E),L(B),N.x<=0?c>f?(u-=N.x,c+=N.x):N.y<=0&&A<=g&&(b=!1):(u-=N.x,c+=N.x),N.y<=0?A>g&&(d-=N.y,A+=N.y):(d-=N.y,A+=N.y);u<0&&d<0?(s=T,d=-d,u=-u,A-=d,c-=u):u<0?(s=S,u=-u,c-=u):d<0&&(s=M,d=-d,A-=d);break;case M:if(l){if(N.x<=0&&(c<=f||p>=v)){b=!1;break}L(B),u-=N.x,c+=N.x,d=u/l}else L(_),L(B),N.x<=0?c>f?(u-=N.x,c+=N.x):N.y>=0&&p>=v&&(b=!1):(u-=N.x,c+=N.x),N.y>=0?p<v&&(d+=N.y):d+=N.y;u<0&&d<0?(s=S,d=-d,u=-u,A-=d,c-=u):u<0?(s=T,u=-u,c-=u):d<0&&(s=F,d=-d,A-=d);break;case T:if(l){if(N.x>=0&&(h>=m||p>=v)){b=!1;break}L(C),u+=N.x,d=u/l}else L(_),L(C),N.x>=0?h<m?u+=N.x:N.y>=0&&p>=v&&(b=!1):u+=N.x,N.y>=0?p<v&&(d+=N.y):d+=N.y;u<0&&d<0?(s=F,d=-d,u=-u,A-=d,c-=u):u<0?(s=M,u=-u,c-=u):d<0&&(s=S,d=-d,A-=d);break;case x:this.move(N.x,N.y),b=!1;break;case k:this.zoom($e(a),e),b=!1;break;case w:if(!N.x||!N.y){b=!1;break}t=qe(this.cropper),c=I.startX-t.left,A=I.startY-t.top,u=o.minWidth,d=o.minHeight,N.x>0?s=N.y>0?T:S:N.x<0&&(c-=u,s=N.y>0?M:F),N.y<0&&(A-=d),this.cropped||(Ie(this.cropBox,U),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}b&&(o.width=u,o.height=d,o.left=c,o.top=A,this.action=s,this.renderCropBox()),Ce(a,(function(e){e.startX=e.endX,e.startY=e.endY}))}},pt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Me(this.dragBox,D),Ie(this.cropBox,U),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Be({},this.initialImageData),this.canvasData=Be({},this.initialCanvasData),this.cropBoxData=Be({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Be(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Ie(this.dragBox,D),Me(this.cropBox,U)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Ce(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Ie(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Me(this.cropper,N)),this},destroy:function(){var e=this.element;return e[b]?(e[b]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,i=n.top;return this.moveTo(me(e)?e:r+Number(e),me(t)?t:i+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(fe(e)&&(n.left=e,r=!0),fe(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),e=e<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,i=this.canvasData,o=i.width,a=i.height,s=i.naturalWidth,l=i.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&r.zoomable){var c=s*e,A=l*e;if(!1===Pe(this.element,ie,{ratio:e,oldRatio:o/s,originalEvent:n}))return this;if(n){var u=this.pointers,d=qe(this.cropper),h=u&&Object.keys(u).length?Xe(u):{pageX:n.pageX,pageY:n.pageY};i.left-=(c-o)*((h.pageX-d.left-i.left)/o),i.top-=(A-a)*((h.pageY-d.top-i.top)/a)}else ye(t)&&fe(t.x)&&fe(t.y)?(i.left-=(c-o)*((t.x-i.left)/o),i.top-=(A-a)*((t.y-i.top)/a)):(i.left-=(c-o)/2,i.top-=(A-a)/2);i.width=c,i.height=A,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),fe(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,fe(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(fe(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(fe(e)&&(n.scaleX=e,r=!0),fe(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,r=this.imageData,i=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){e={x:o.left-i.left,y:o.top-i.top,width:o.width,height:o.height};var a=r.width/r.naturalWidth;if(Ce(e,(function(t,n){e[n]=t/a})),t){var s=Math.round(e.y+e.height),l=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=l-e.x,e.height=s-e.y}}else e={x:0,y:0,width:0,height:0};return n.rotatable&&(e.rotate=r.rotate||0),n.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,i={};if(this.ready&&!this.disabled&&ye(e)){var o=!1;t.rotatable&&fe(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,o=!0),t.scalable&&(fe(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,o=!0),fe(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;fe(e.x)&&(i.left=e.x*a+r.left),fe(e.y)&&(i.top=e.y*a+r.top),fe(e.width)&&(i.width=e.width*a),fe(e.height)&&(i.height=e.height*a),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?Be({},this.containerData):{}},getImageData:function(){return this.sized?Be({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&Ce(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){t[n]=e[n]})),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&ye(e)&&(fe(e.left)&&(t.left=e.left),fe(e.top)&&(t.top=e.top),fe(e.width)?(t.width=e.width,t.height=e.width/n):fe(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ye(e)&&(fe(e.left)&&(r.left=e.left),fe(e.top)&&(r.top=e.top),fe(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),fe(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=tt(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(e.rounded),i=r.x,o=r.y,a=r.width,l=r.height,c=n.width/Math.floor(t.naturalWidth);1!==c&&(i*=c,o*=c,a*=c,l*=c);var A=a/l,u=Je({aspectRatio:A,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),d=Je({aspectRatio:A,width:e.minWidth||0,height:e.minHeight||0},"cover"),h=Je({aspectRatio:A,width:e.width||(1!==c?n.width:a),height:e.height||(1!==c?n.height:l)}),p=h.width,f=h.height;p=Math.min(u.width,Math.max(d.width,p)),f=Math.min(u.height,Math.max(d.height,f));var g=document.createElement("canvas"),m=g.getContext("2d");g.width=Ee(p),g.height=Ee(f),m.fillStyle=e.fillColor||"transparent",m.fillRect(0,0,p,f);var v=e.imageSmoothingEnabled,b=void 0===v||v,y=e.imageSmoothingQuality;m.imageSmoothingEnabled=b,y&&(m.imageSmoothingQuality=y);var w,x,k,C,B,_,E=n.width,S=n.height,F=i,T=o;F<=-a||F>E?(F=0,w=0,k=0,B=0):F<=0?(k=-F,F=0,w=Math.min(E,a+F),B=w):F<=E&&(k=0,w=Math.min(a,E-F),B=w),w<=0||T<=-l||T>S?(T=0,x=0,C=0,_=0):T<=0?(C=-T,T=0,x=Math.min(S,l+T),_=x):T<=S&&(C=0,x=Math.min(l,S-T),_=x);var M=[F,T,w,x];if(B>0&&_>0){var I=p/a;M.push(k*I,C*I,B*I,_*I)}return m.drawImage.apply(m,[n].concat(s(M.map((function(e){return Math.floor(Ee(e))}))))),g},setAspectRatio:function(e){var t=this.options;return this.disabled||me(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var i=e===Z,o=t.movable&&e===R;e=i||o?e:P,t.dragMode=e,De(n,O,e),Ne(n,I,i),Ne(n,H,o),t.cropBoxMovable||(De(r,O,e),Ne(r,I,i),Ne(r,H,o))}return this}},ft=g.Cropper,gt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r(this,e),!t||!ce.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Be({},de,ye(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return o(e,[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[b]){if(t[b]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var n=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(se.test(e))le.test(e)?this.read(ot(e)):this.clone();else{var i=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=i,i.onabort=o,i.onerror=o,i.ontimeout=o,i.onprogress=function(){i.getResponseHeader("content-type")!==oe&&i.abort()},i.onload=function(){t.read(i.response)},i.onloadend=function(){t.reloading=!1,t.xhr=null},r.checkCrossOrigin&&je(e)&&n.crossOrigin&&(e=Ve(e)),i.open("GET",e,!0),i.responseType="arraybuffer",i.withCredentials="use-credentials"===n.crossOrigin,i.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=st(e),i=0,o=1,a=1;if(r>1){this.url=at(e,oe);var s=lt(r);i=s.rotate,o=s.scaleX,a=s.scaleY}t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t;this.options.checkCrossOrigin&&je(t)&&(n||(n="anonymous"),r=Ve(t)),this.crossOrigin=n,this.crossOriginUrl=r;var i=document.createElement("img");n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",this.image=i,i.onload=this.start.bind(this),i.onerror=this.stop.bind(this),Me(i,L),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var n=g.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(g.navigator.userAgent),r=function(t,n){Be(e.imageData,{naturalWidth:t,naturalHeight:n,aspectRatio:t/n}),e.initialImageData=Be({},e.imageData),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||n){var i=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=i,i.onload=function(){r(i.width,i.height),n||o.removeChild(i)},i.src=t.src,n||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(i))}else r(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,n=this.image,r=e.parentNode,i=document.createElement("div");i.innerHTML=he;var o=i.querySelector(".".concat(b,"-container")),a=o.querySelector(".".concat(b,"-canvas")),s=o.querySelector(".".concat(b,"-drag-box")),l=o.querySelector(".".concat(b,"-crop-box")),c=l.querySelector(".".concat(b,"-face"));this.container=r,this.cropper=o,this.canvas=a,this.dragBox=s,this.cropBox=l,this.viewBox=o.querySelector(".".concat(b,"-view-box")),this.face=c,a.appendChild(n),Me(e,U),r.insertBefore(o,e.nextSibling),Ie(n,L),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,Me(l,U),t.guides||Me(l.getElementsByClassName("".concat(b,"-dashed")),U),t.center||Me(l.getElementsByClassName("".concat(b,"-center")),U),t.background&&Me(o,"".concat(b,"-bg")),t.highlight||Me(c,Q),t.cropBoxMovable&&(Me(c,H),De(c,O,y)),t.cropBoxResizable||(Me(l.getElementsByClassName("".concat(b,"-line")),U),Me(l.getElementsByClassName("".concat(b,"-point")),U)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),we(t.ready)&&Re(e,te,t.ready,{once:!0}),Pe(e,te)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var e=this.cropper.parentNode;e&&e.removeChild(this.cropper),Ie(this.element,U)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=ft,e}},{key:"setDefaults",value:function(e){Be(de,ye(e)&&e)}}]),e}();return Be(gt.prototype,ct,At,ut,dt,ht,pt),gt}))},76540:function(e,t,n){n(57658);var r=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},i=-1,o=1,a=0;r.Diff=function(e,t){return[e,t]},r.prototype.diff_main=function(e,t,n,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[new r.Diff(a,e)]:[];"undefined"==typeof n&&(n=!0);var s=n,l=this.diff_commonPrefix(e,t),c=e.substring(0,l);e=e.substring(l),t=t.substring(l),l=this.diff_commonSuffix(e,t);var A=e.substring(e.length-l);e=e.substring(0,e.length-l),t=t.substring(0,t.length-l);var u=this.diff_compute_(e,t,s,o);return c&&u.unshift(new r.Diff(a,c)),A&&u.push(new r.Diff(a,A)),this.diff_cleanupMerge(u),u},r.prototype.diff_compute_=function(e,t,n,s){var l;if(!e)return[new r.Diff(o,t)];if(!t)return[new r.Diff(i,e)];var c=e.length>t.length?e:t,A=e.length>t.length?t:e,u=c.indexOf(A);if(-1!=u)return l=[new r.Diff(o,c.substring(0,u)),new r.Diff(a,A),new r.Diff(o,c.substring(u+A.length))],e.length>t.length&&(l[0][0]=l[2][0]=i),l;if(1==A.length)return[new r.Diff(i,e),new r.Diff(o,t)];var d=this.diff_halfMatch_(e,t);if(d){var h=d[0],p=d[1],f=d[2],g=d[3],m=d[4],v=this.diff_main(h,f,n,s),b=this.diff_main(p,g,n,s);return v.concat([new r.Diff(a,m)],b)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},r.prototype.diff_lineMode_=function(e,t,n){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var l=s.lineArray,c=this.diff_main(e,t,!1,n);this.diff_charsToLines_(c,l),this.diff_cleanupSemantic(c),c.push(new r.Diff(a,""));var A=0,u=0,d=0,h="",p="";while(A<c.length){switch(c[A][0]){case o:d++,p+=c[A][1];break;case i:u++,h+=c[A][1];break;case a:if(u>=1&&d>=1){c.splice(A-u-d,u+d),A=A-u-d;for(var f=this.diff_main(h,p,!1,n),g=f.length-1;g>=0;g--)c.splice(A,0,f[g]);A+=f.length}d=0,u=0,h="",p="";break}A++}return c.pop(),c},r.prototype.diff_bisect_=function(e,t,n){for(var a=e.length,s=t.length,l=Math.ceil((a+s)/2),c=l,A=2*l,u=new Array(A),d=new Array(A),h=0;h<A;h++)u[h]=-1,d[h]=-1;u[c+1]=0,d[c+1]=0;for(var p=a-s,f=p%2!=0,g=0,m=0,v=0,b=0,y=0;y<l;y++){if((new Date).getTime()>n)break;for(var w=-y+g;w<=y-m;w+=2){var x=c+w;S=w==-y||w!=y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1;var k=S-w;while(S<a&&k<s&&e.charAt(S)==t.charAt(k))S++,k++;if(u[x]=S,S>a)m+=2;else if(k>s)g+=2;else if(f){var C=c+p-w;if(C>=0&&C<A&&-1!=d[C]){var B=a-d[C];if(S>=B)return this.diff_bisectSplit_(e,t,S,k,n)}}}for(var _=-y+v;_<=y-b;_+=2){C=c+_;B=_==-y||_!=y&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1;var E=B-_;while(B<a&&E<s&&e.charAt(a-B-1)==t.charAt(s-E-1))B++,E++;if(d[C]=B,B>a)b+=2;else if(E>s)v+=2;else if(!f){x=c+p-_;if(x>=0&&x<A&&-1!=u[x]){var S=u[x];k=c+S-x;if(B=a-B,S>=B)return this.diff_bisectSplit_(e,t,S,k,n)}}}}return[new r.Diff(i,e),new r.Diff(o,t)]},r.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),c=this.diff_main(o,a,!1,i),A=this.diff_main(s,l,!1,i);return c.concat(A)},r.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){var t="",i=0,a=-1,s=n.length;while(a<e.length-1){a=e.indexOf("\n",i),-1==a&&(a=e.length-1);var l=e.substring(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s==o&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";var o=4e4,a=i(e);o=65535;var s=i(t);return{chars1:a,chars2:s,lineArray:n}},r.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},r.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;var n=0,r=Math.min(e.length,t.length),i=r,o=0;while(n<i)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;var n=0,r=Math.min(e.length,t.length),i=r,o=0;while(n<i)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;var o=0,a=1;while(1){var s=e.substring(i-a),l=t.indexOf(s);if(-1==l)return o;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(o=a,a++)}},r.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function o(e,t,n){var r,o,a,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,A="";while(-1!=(c=t.indexOf(l,c+1))){var u=i.diff_commonPrefix(e.substring(n),t.substring(c)),d=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));A.length<d+u&&(A=t.substring(c-d,c)+t.substring(c,c+u),r=e.substring(0,n-d),o=e.substring(n+u),a=t.substring(0,c-d),s=t.substring(c+u))}return 2*A.length>=e.length?[r,o,a,s,A]:null}var a,s,l,c,A,u=o(n,r,Math.ceil(n.length/4)),d=o(n,r,Math.ceil(n.length/2));if(!u&&!d)return null;a=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(s=a[0],l=a[1],c=a[2],A=a[3]):(c=a[0],A=a[1],s=a[2],l=a[3]);var h=a[4];return[s,l,c,A,h]},r.prototype.diff_cleanupSemantic=function(e){var t=!1,n=[],s=0,l=null,c=0,A=0,u=0,d=0,h=0;while(c<e.length)e[c][0]==a?(n[s++]=c,A=d,u=h,d=0,h=0,l=e[c][1]):(e[c][0]==o?d+=e[c][1].length:h+=e[c][1].length,l&&l.length<=Math.max(A,u)&&l.length<=Math.max(d,h)&&(e.splice(n[s-1],0,new r.Diff(i,l)),e[n[s-1]+1][0]=o,s--,s--,c=s>0?n[s-1]:-1,A=0,u=0,d=0,h=0,l=null,t=!0)),c++;t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),c=1;while(c<e.length){if(e[c-1][0]==i&&e[c][0]==o){var p=e[c-1][1],f=e[c][1],g=this.diff_commonOverlap_(p,f),m=this.diff_commonOverlap_(f,p);g>=m?(g>=p.length/2||g>=f.length/2)&&(e.splice(c,0,new r.Diff(a,f.substring(0,g))),e[c-1][1]=p.substring(0,p.length-g),e[c+1][1]=f.substring(g),c++):(m>=p.length/2||m>=f.length/2)&&(e.splice(c,0,new r.Diff(a,p.substring(0,m))),e[c-1][0]=o,e[c-1][1]=f.substring(0,f.length-m),e[c+1][0]=i,e[c+1][1]=p.substring(m),c++),c++}c++}},r.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),o=n.match(r.nonAlphaNumericRegex_),a=i.match(r.nonAlphaNumericRegex_),s=o&&n.match(r.whitespaceRegex_),l=a&&i.match(r.whitespaceRegex_),c=s&&n.match(r.linebreakRegex_),A=l&&i.match(r.linebreakRegex_),u=c&&e.match(r.blanklineEndRegex_),d=A&&t.match(r.blanklineStartRegex_);return u||d?5:c||A?4:o&&!s&&l?3:s||l?2:o||a?1:0}var n=1;while(n<e.length-1){if(e[n-1][0]==a&&e[n+1][0]==a){var i=e[n-1][1],o=e[n][1],s=e[n+1][1],l=this.diff_commonSuffix(i,o);if(l){var c=o.substring(o.length-l);i=i.substring(0,i.length-l),o=c+o.substring(0,o.length-l),s=c+s}var A=i,u=o,d=s,h=t(i,o)+t(o,s);while(o.charAt(0)===s.charAt(0)){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var p=t(i,o)+t(o,s);p>=h&&(h=p,A=i,u=o,d=s)}e[n-1][1]!=A&&(A?e[n-1][1]=A:(e.splice(n-1,1),n--),e[n][1]=u,d?e[n+1][1]=d:(e.splice(n+1,1),n--))}n++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(e){var t=!1,n=[],s=0,l=null,c=0,A=!1,u=!1,d=!1,h=!1;while(c<e.length)e[c][0]==a?(e[c][1].length<this.Diff_EditCost&&(d||h)?(n[s++]=c,A=d,u=h,l=e[c][1]):(s=0,l=null),d=h=!1):(e[c][0]==i?h=!0:d=!0,l&&(A&&u&&d&&h||l.length<this.Diff_EditCost/2&&A+u+d+h==3)&&(e.splice(n[s-1],0,new r.Diff(i,l)),e[n[s-1]+1][0]=o,s--,l=null,A&&u?(d=h=!0,s=0):(s--,c=s>0?n[s-1]:-1,d=h=!1),t=!0)),c++;t&&this.diff_cleanupMerge(e)},r.prototype.diff_cleanupMerge=function(e){e.push(new r.Diff(a,""));var t,n=0,s=0,l=0,c="",A="";while(n<e.length)switch(e[n][0]){case o:l++,A+=e[n][1],n++;break;case i:s++,c+=e[n][1],n++;break;case a:s+l>1?(0!==s&&0!==l&&(t=this.diff_commonPrefix(A,c),0!==t&&(n-s-l>0&&e[n-s-l-1][0]==a?e[n-s-l-1][1]+=A.substring(0,t):(e.splice(0,0,new r.Diff(a,A.substring(0,t))),n++),A=A.substring(t),c=c.substring(t)),t=this.diff_commonSuffix(A,c),0!==t&&(e[n][1]=A.substring(A.length-t)+e[n][1],A=A.substring(0,A.length-t),c=c.substring(0,c.length-t))),n-=s+l,e.splice(n,s+l),c.length&&(e.splice(n,0,new r.Diff(i,c)),n++),A.length&&(e.splice(n,0,new r.Diff(o,A)),n++),n++):0!==n&&e[n-1][0]==a?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,l=0,s=0,c="",A="";break}""===e[e.length-1][1]&&e.pop();var u=!1;n=1;while(n<e.length-1)e[n-1][0]==a&&e[n+1][0]==a&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),u=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),u=!0)),n++;u&&this.diff_cleanupMerge(e)},r.prototype.diff_xIndex=function(e,t){var n,r=0,a=0,s=0,l=0;for(n=0;n<e.length;n++){if(e[n][0]!==o&&(r+=e[n][1].length),e[n][0]!==i&&(a+=e[n][1].length),r>t)break;s=r,l=a}return e.length!=n&&e[n][0]===i?l:l+(t-s)},r.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,s=/>/g,l=/\n/g,c=0;c<e.length;c++){var A=e[c][0],u=e[c][1],d=u.replace(n,"&amp;").replace(r,"&lt;").replace(s,"&gt;").replace(l,"&para;<br>");switch(A){case o:t[c]='<ins style="background:#e6ffe6;">'+d+"</ins>";break;case i:t[c]='<del style="background:#ffe6e6;">'+d+"</del>";break;case a:t[c]="<span>"+d+"</span>";break}}return t.join("")},r.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==o&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,s=0;s<e.length;s++){var l=e[s][0],c=e[s][1];switch(l){case o:n+=c.length;break;case i:r+=c.length;break;case a:t+=Math.max(n,r),n=0,r=0;break}}return t+=Math.max(n,r),t},r.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case o:t[n]="+"+encodeURI(e[n][1]);break;case i:t[n]="-"+e[n][1].length;break;case a:t[n]="="+e[n][1].length;break}return t.join("\t").replace(/%20/g," ")},r.prototype.diff_fromDelta=function(e,t){for(var n=[],s=0,l=0,c=t.split(/\t/g),A=0;A<c.length;A++){var u=c[A].substring(1);switch(c[A].charAt(0)){case"+":try{n[s++]=new r.Diff(o,decodeURI(u))}catch(p){throw new Error("Illegal escape in diff_fromDelta: "+u)}break;case"-":case"=":var d=parseInt(u,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+u);var h=e.substring(l,l+=d);"="==c[A].charAt(0)?n[s++]=new r.Diff(a,h):n[s++]=new r.Diff(i,h);break;default:if(c[A])throw new Error("Invalid diff operation in diff_fromDelta: "+c[A])}}if(l!=e.length)throw new Error("Delta length ("+l+") does not equal source text length ("+e.length+").");return n},r.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},r.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),s=e.lastIndexOf(t,n+t.length),-1!=s&&(a=Math.min(o(0,s),a)));var l,c,A=1<<t.length-1;s=-1;for(var u,d=t.length+e.length,h=0;h<t.length;h++){l=0,c=d;while(l<c)o(h,n+c)<=a?l=c:d=c,c=Math.floor((d-l)/2+l);d=c;var p=Math.max(1,n-c+1),f=Math.min(n+c,e.length)+t.length,g=Array(f+2);g[f+1]=(1<<h)-1;for(var m=f;m>=p;m--){var v=r[e.charAt(m-1)];if(g[m]=0===h?(g[m+1]<<1|1)&v:(g[m+1]<<1|1)&v|(u[m+1]|u[m])<<1|1|u[m+1],g[m]&A){var b=o(h,m-1);if(b<=a){if(a=b,s=m-1,!(s>n))break;p=Math.max(1,2*n-s)}}}if(o(h+1,n)>a)break;u=g}return s},r.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},r.prototype.patch_addContext_=function(e,t){if(0!=t.length){if(null===e.start2)throw Error("patch not initialized");var n=t.substring(e.start2,e.start2+e.length1),i=0;while(t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin)i+=this.Patch_Margin,n=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new r.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new r.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},r.prototype.patch_make=function(e,t,n){var s,l;if("string"==typeof e&&"string"==typeof t&&"undefined"==typeof n)s=e,l=this.diff_main(s,t,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(e&&"object"==typeof e&&"undefined"==typeof t&&"undefined"==typeof n)l=e,s=this.diff_text1(l);else if("string"==typeof e&&t&&"object"==typeof t&&"undefined"==typeof n)s=e,l=t;else{if("string"!=typeof e||"string"!=typeof t||!n||"object"!=typeof n)throw new Error("Unknown call format to patch_make.");s=e,l=n}if(0===l.length)return[];for(var c=[],A=new r.patch_obj,u=0,d=0,h=0,p=s,f=s,g=0;g<l.length;g++){var m=l[g][0],v=l[g][1];switch(u||m===a||(A.start1=d,A.start2=h),m){case o:A.diffs[u++]=l[g],A.length2+=v.length,f=f.substring(0,h)+v+f.substring(h);break;case i:A.length1+=v.length,A.diffs[u++]=l[g],f=f.substring(0,h)+f.substring(h+v.length);break;case a:v.length<=2*this.Patch_Margin&&u&&l.length!=g+1?(A.diffs[u++]=l[g],A.length1+=v.length,A.length2+=v.length):v.length>=2*this.Patch_Margin&&u&&(this.patch_addContext_(A,p),c.push(A),A=new r.patch_obj,u=0,p=f,d=h);break}m!==o&&(d+=v.length),m!==i&&(h+=v.length)}return u&&(this.patch_addContext_(A,p),c.push(A)),c},r.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=new r.patch_obj;o.diffs=[];for(var a=0;a<i.diffs.length;a++)o.diffs[a]=new r.Diff(i.diffs[a][0],i.diffs[a][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,t[n]=o}return t},r.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,s=[],l=0;l<e.length;l++){var c,A,u=e[l].start2+r,d=this.diff_text1(e[l].diffs),h=-1;if(d.length>this.Match_MaxBits?(c=this.match_main(t,d.substring(0,this.Match_MaxBits),u),-1!=c&&(h=this.match_main(t,d.substring(d.length-this.Match_MaxBits),u+d.length-this.Match_MaxBits),(-1==h||c>=h)&&(c=-1))):c=this.match_main(t,d,u),-1==c)s[l]=!1,r-=e[l].length2-e[l].length1;else if(s[l]=!0,r=c-u,A=-1==h?t.substring(c,c+d.length):t.substring(c,h+this.Match_MaxBits),d==A)t=t.substring(0,c)+this.diff_text2(e[l].diffs)+t.substring(c+d.length);else{var p=this.diff_main(d,A,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(p)/d.length>this.Patch_DeleteThreshold)s[l]=!1;else{this.diff_cleanupSemanticLossless(p);for(var f,g=0,m=0;m<e[l].diffs.length;m++){var v=e[l].diffs[m];v[0]!==a&&(f=this.diff_xIndex(p,g)),v[0]===o?t=t.substring(0,c+f)+v[1]+t.substring(c+f):v[0]===i&&(t=t.substring(0,c+f)+t.substring(c+this.diff_xIndex(p,g+v[1].length))),v[0]!==i&&(g+=v[1].length)}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},r.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",i=1;i<=t;i++)n+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(0==s.length||s[0][0]!=a)s.unshift(new r.Diff(a,n)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var l=t-s[0][1].length;s[0][1]=n.substring(s[0][1].length)+s[0][1],o.start1-=l,o.start2-=l,o.length1+=l,o.length2+=l}if(o=e[e.length-1],s=o.diffs,0==s.length||s[s.length-1][0]!=a)s.push(new r.Diff(a,n)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){l=t-s[s.length-1][1].length;s[s.length-1][1]+=n.substring(0,l),o.length1+=l,o.length2+=l}return n},r.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var s=e[n];e.splice(n--,1);var l=s.start1,c=s.start2,A="";while(0!==s.diffs.length){var u=new r.patch_obj,d=!0;u.start1=l-A.length,u.start2=c-A.length,""!==A&&(u.length1=u.length2=A.length,u.diffs.push(new r.Diff(a,A)));while(0!==s.diffs.length&&u.length1<t-this.Patch_Margin){var h=s.diffs[0][0],p=s.diffs[0][1];h===o?(u.length2+=p.length,c+=p.length,u.diffs.push(s.diffs.shift()),d=!1):h===i&&1==u.diffs.length&&u.diffs[0][0]==a&&p.length>2*t?(u.length1+=p.length,l+=p.length,d=!1,u.diffs.push(new r.Diff(h,p)),s.diffs.shift()):(p=p.substring(0,t-u.length1-this.Patch_Margin),u.length1+=p.length,l+=p.length,h===a?(u.length2+=p.length,c+=p.length):d=!1,u.diffs.push(new r.Diff(h,p)),p==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(p.length))}A=this.diff_text2(u.diffs),A=A.substring(A.length-this.Patch_Margin);var f=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==f&&(u.length1+=f.length,u.length2+=f.length,0!==u.diffs.length&&u.diffs[u.diffs.length-1][0]===a?u.diffs[u.diffs.length-1][1]+=f:u.diffs.push(new r.Diff(a,f))),d||e.splice(++n,0,u)}}},r.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},r.prototype.patch_fromText=function(e){var t=[];if(!e)return t;var n=e.split("\n"),s=0,l=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;while(s<n.length){var c=n[s].match(l);if(!c)throw new Error("Invalid patch string: "+n[s]);var A=new r.patch_obj;t.push(A),A.start1=parseInt(c[1],10),""===c[2]?(A.start1--,A.length1=1):"0"==c[2]?A.length1=0:(A.start1--,A.length1=parseInt(c[2],10)),A.start2=parseInt(c[3],10),""===c[4]?(A.start2--,A.length2=1):"0"==c[4]?A.length2=0:(A.start2--,A.length2=parseInt(c[4],10)),s++;while(s<n.length){var u=n[s].charAt(0);try{var d=decodeURI(n[s].substring(1))}catch(h){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==u)A.diffs.push(new r.Diff(i,d));else if("+"==u)A.diffs.push(new r.Diff(o,d));else if(" "==u)A.diffs.push(new r.Diff(a,d));else{if("@"==u)break;if(""!==u)throw new Error('Invalid patch mode "'+u+'" in: '+d)}s++}}return t},r.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},r.patch_obj.prototype.toString=function(){var e,t;e=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1,t=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;for(var n,r=["@@ -"+e+" +"+t+" @@\n"],s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case o:n="+";break;case i:n="-";break;case a:n=" ";break}r[s+1]=n+encodeURI(this.diffs[s][1])+"\n"}return r.join("").replace(/%20/g," ")},e.exports=r,e.exports.diff_match_patch=r,e.exports.DIFF_DELETE=i,e.exports.DIFF_INSERT=o,e.exports.DIFF_EQUAL=a},82718:function(e,t,n){var r;n(84633),n(57658),function(i){var o=Object.hasOwnProperty,a=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=10,l="object"==typeof process&&"function"==typeof process.nextTick,c="function"===typeof Symbol,A="object"===typeof Reflect,u="function"===typeof setImmediate,d=u?setImmediate:setTimeout,h=c?A&&"function"===typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function p(){this._events={},this._conf&&f.call(this,this._conf)}function f(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==i&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function g(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),"undefined"!==typeof process&&process.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,process.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var m=function(e,t,n){var r=arguments.length;switch(r){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:var i=new Array(r);while(r--)i[r]=arguments[r];return i}};function v(e,t){for(var n,r={},o=e.length,a=t?t.length:0,s=0;s<o;s++)n=e[s],r[n]=s<a?t[s]:i;return r}function b(e,t,n){var r,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(r=n.on,i=n.off),t.addEventListener?(r=t.addEventListener,i=t.removeEventListener):t.addListener?(r=t.addListener,i=t.removeListener):t.on&&(r=t.on,i=t.off),!r&&!i)throw Error("target does not implement any known event API");if("function"!==typeof r)throw TypeError("on method must be a function");if("function"!==typeof i)throw TypeError("off method must be a function");this._on=r,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function y(e,t,n,r){var a=Object.assign({},t);if(!e)return a;if("object"!==typeof e)throw TypeError("options must be an object");var s,l,c,A=Object.keys(e),u=A.length;function d(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var h=0;h<u;h++){if(s=A[h],!r&&!o.call(t,s))throw Error('Unknown "'+s+'" option');l=e[s],l!==i&&(c=n[s],a[s]=c?c(l,d):l)}return a}function w(e,t){return"function"===typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function x(e){var t="value must be type of "+e.join("|"),n=e.length,r=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===r)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===r||o===i)return e;n(t)}:function(r,i){var o=typeof r,a=n;while(a-- >0)if(o===e[a])return r;i(t)}}Object.assign(b.prototype,{subscribe:function(e,t,n){var r=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var r=m.apply(null,arguments),a={data:r,name:t,original:e};if(n){var s=n.call(i,a);!1!==s&&o.emit.apply(o,[a.name].concat(r))}else o.emit.apply(o,[t].concat(r))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!r._onNewListener?(this._onNewListener=function(n){n===t&&null===a[e]&&(a[e]=s,r._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&a[e]&&(a[e]=null,r._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,r._on.call(i,e,s))},unsubscribe:function(e){var t,n,r,i=this,o=this._listeners,a=this._emitter,s=this._off,l=this._target;if(e&&"string"!==typeof e)throw TypeError("event must be a string");function c(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=_.call(a,i);a._observers.splice(e,1)}if(e){if(t=o[e],!t)return;s.call(l,e,t),delete o[e],--this._listenersCount||c()}else{n=h(o),r=n.length;while(r-- >0)e=n[r],s.call(l,e,o[e]);this._listeners={},this._listenersCount=0,c()}}});var k=x(["function"]),C=x(["object","function"]);function B(e,t,n){var r,i,o,a=0,s=new e((function(l,c,A){function u(){i&&(i=null),a&&(clearTimeout(a),a=0)}n=y(n,{timeout:0,overload:!1},{timeout:function(e,t){return e*=1,("number"!==typeof e||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),r=!n.overload&&"function"===typeof e.prototype.cancel&&"function"===typeof A;var d=function(e){u(),l(e)},h=function(e){u(),c(e)};r?t(d,h,A):(i=[function(e){h(e||Error("canceled"))}],t(d,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!==typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),n.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),c(e)}),n.timeout))}));return r||(s.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),s}function _(e){var t=this._observers;if(!t)return-1;for(var n=t.length,r=0;r<n;r++)if(t[r]._target===e)return r;return-1}function E(e,t,n,r,i){if(!n)return null;if(0===r){var o=typeof t;if("string"===o){var a,s,l=0,c=0,A=this.delimiter,u=A.length;if(-1!==(s=t.indexOf(A))){a=new Array(5);do{a[l++]=t.slice(c,s),c=s+u}while(-1!==(s=t.indexOf(A,c)));a[l++]=t.slice(c),t=a,i=l}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var d,p,f,g,m,v,b,y=null,w=t[r],x=t[r+1];if(r===i)n._listeners&&("function"===typeof n._listeners?(e&&e.push(n._listeners),y=[n]):(e&&e.push.apply(e,n._listeners),y=[n]));else{if("*"===w){v=h(n),s=v.length;while(s-- >0)d=v[s],"_listeners"!==d&&(b=E(e,t,n[d],r+1,i),b&&(y?y.push.apply(y,b):y=b));return y}if("**"===w){m=r+1===i||r+2===i&&"*"===x,m&&n._listeners&&(y=E(e,t,n,i,i)),v=h(n),s=v.length;while(s-- >0)d=v[s],"_listeners"!==d&&("*"===d||"**"===d?(n[d]._listeners&&!m&&(b=E(e,t,n[d],i,i),b&&(y?y.push.apply(y,b):y=b)),b=E(e,t,n[d],r,i)):b=E(e,t,n[d],d===x?r+2:r,i),b&&(y?y.push.apply(y,b):y=b));return y}n[w]&&(y=E(e,t,n[w],r+1,i))}if(p=n["*"],p&&E(e,t,p,r+1,i),f=n["**"],f)if(r<i){f._listeners&&E(e,t,f,i,i),v=h(f),s=v.length;while(s-- >0)d=v[s],"_listeners"!==d&&(d===x?E(e,t,f[d],r+2,i):d===w?E(e,t,f[d],r+1,i):(g={},g[d]=f[d],E(e,t,{"**":g},r+1,i)))}else f._listeners?E(e,t,f,i,i):f["*"]&&f["*"]._listeners&&E(e,t,f["*"],i,i);return y}function S(e,t,n){var r,i,o=0,a=0,s=this.delimiter,l=s.length;if("string"===typeof e)if(-1!==(r=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,r),a=r+l}while(-1!==(r=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(r=0;r+1<o;r++)if("**"===i[r]&&"**"===i[r+1])return;var c,A=this.listenerTree;for(r=0;r<o;r++)if(c=i[r],A=A[c]||(A[c]={}),r===o-1)return A._listeners?("function"===typeof A._listeners&&(A._listeners=[A._listeners]),n?A._listeners.unshift(t):A._listeners.push(t),!A._listeners.warned&&this._maxListeners>0&&A._listeners.length>this._maxListeners&&(A._listeners.warned=!0,g.call(this,A._listeners.length,c))):A._listeners=t,!0;return!0}function F(e,t,n,r){var i,o,a,s,l=h(e),c=l.length,A=e["_listeners"];while(c-- >0)o=l[c],i=e[o],a="_listeners"===o?n:n?n.concat(o):[o],s=r||"symbol"===typeof o,A&&t.push(s?a:a.join(this.delimiter)),"object"===typeof i&&F.call(this,i,t,a,s);return t}function T(e){var t,n,r,i=h(e),o=i.length;while(o-- >0)n=i[o],t=e[n],t&&(r=!0,"_listeners"===n||T(t)||delete e[n]);return r}function M(e,t,n){this.emitter=e,this.event=t,this.listener=n}function I(e,t,n){if(!0===n)o=!0;else if(!1===n)r=!0;else{if(!n||"object"!==typeof n)throw TypeError("options should be an object or true");var r=n.async,o=n.promisify,a=n.nextTick,s=n.objectify}if(r||a||o){var c=t,A=t._origin||t;if(a&&!l)throw Error("process.nextTick is not supported");o===i&&(o="AsyncFunction"===t.constructor.name),t=function(){var e=arguments,t=this,n=this.event;return o?a?Promise.resolve():new Promise((function(e){d(e)})).then((function(){return t.event=n,c.apply(t,e)})):(a?process.nextTick:d)((function(){t.event=n,c.apply(t,e)}))},t._async=!0,t._origin=A}return[t,s?new M(this,e,t):this]}function N(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,e)}function U(e,t,n){n=y(n,{Promise:Promise,timeout:0,overload:!1},{Promise:w});var r=n.Promise;return B(r,(function(n,r,i){var o;if("function"===typeof e.addEventListener)return o=function(){n(m.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),n(m.apply(null,arguments))};"error"!==t&&(a=function(n){e.removeListener(t,s),r(n)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:n.timeout,overload:n.overload})}M.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},N.EventEmitter2=N,N.prototype.listenTo=function(e,t,n){if("object"!==typeof e)throw TypeError("target musts be an object");var r=this;function o(t){if("object"!==typeof t)throw TypeError("events must be an object");var i,o=n.reducers,a=_.call(r,e);i=-1===a?new b(r,e,n):r._observers[a];for(var s,l=h(t),c=l.length,A="function"===typeof o,u=0;u<c;u++)s=l[u],i.subscribe(s,t[s]||s,A?o:o&&o[s])}return n=y(n,{on:i,off:i,reducers:i},{on:k,off:k,reducers:C}),a(t)?o(v(t)):o("string"===typeof t?v(t.split(/\s+/)):t),this},N.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var r,i=n.length,o=!1;if(e&&"object"!==typeof e)throw TypeError("target should be an object");while(i-- >0)r=n[i],e&&r._target!==e||(r.unsubscribe(t),o=!0);return o},N.prototype.delimiter=".",N.prototype.setMaxListeners=function(e){e!==i&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},N.prototype.getMaxListeners=function(){return this._maxListeners},N.prototype.event="",N.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},N.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},N.prototype._once=function(e,t,n,r){return this._many(e,1,t,n,r)},N.prototype.many=function(e,t,n,r){return this._many(e,t,n,!1,r)},N.prototype.prependMany=function(e,t,n,r){return this._many(e,t,n,!0,r)},N.prototype._many=function(e,t,n,r,i){var o=this;if("function"!==typeof n)throw new Error("many only accepts instances of Function");function a(){return 0===--t&&o.off(e,a),n.apply(this,arguments)}return a._origin=n,this._on(e,a,r,i)},N.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||p.call(this);var e,t,n,r,i,o,a=arguments[0],s=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return!1;if(s&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"===typeof a)){if(n=a.length,c)for(r=0;r<n;r++)if("symbol"===typeof a[r]){o=!0;break}o||(a=a.join(this.delimiter))}var l,A=arguments.length;if(this._all&&this._all.length)for(l=this._all.slice(),r=0,n=l.length;r<n;r++)switch(this.event=a,A){case 1:l[r].call(this,a);break;case 2:l[r].call(this,a,arguments[1]);break;case 3:l[r].call(this,a,arguments[1],arguments[2]);break;default:l[r].apply(this,arguments)}if(s)l=[],E.call(this,l,e,this.listenerTree,0,n);else{if(l=this._events[a],"function"===typeof l){switch(this.event=a,A){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(A-1),i=1;i<A;i++)t[i-1]=arguments[i];l.apply(this,t)}return!0}l&&(l=l.slice())}if(l&&l.length){if(A>3)for(t=new Array(A-1),i=1;i<A;i++)t[i-1]=arguments[i];for(r=0,n=l.length;r<n;r++)switch(this.event=a,A){case 1:l[r].call(this);break;case 2:l[r].call(this,arguments[1]);break;case 3:l[r].call(this,arguments[1],arguments[2]);break;default:l[r].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===a)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},N.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||p.call(this);var e,t,n,r,i,o,a=arguments[0],s=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(s&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"===typeof a)){if(r=a.length,c)for(i=0;i<r;i++)if("symbol"===typeof a[i]){t=!0;break}t||(a=a.join(this.delimiter))}var l,A=[],u=arguments.length;if(this._all)for(i=0,r=this._all.length;i<r;i++)switch(this.event=a,u){case 1:A.push(this._all[i].call(this,a));break;case 2:A.push(this._all[i].call(this,a,arguments[1]));break;case 3:A.push(this._all[i].call(this,a,arguments[1],arguments[2]));break;default:A.push(this._all[i].apply(this,arguments))}if(s?(l=[],E.call(this,l,e,this.listenerTree,0)):l=this._events[a],"function"===typeof l)switch(this.event=a,u){case 1:A.push(l.call(this));break;case 2:A.push(l.call(this,arguments[1]));break;case 3:A.push(l.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(u-1),o=1;o<u;o++)n[o-1]=arguments[o];A.push(l.apply(this,n))}else if(l&&l.length){if(l=l.slice(),u>3)for(n=new Array(u-1),o=1;o<u;o++)n[o-1]=arguments[o];for(i=0,r=l.length;i<r;i++)switch(this.event=a,u){case 1:A.push(l[i].call(this));break;case 2:A.push(l[i].call(this,arguments[1]));break;case 3:A.push(l[i].call(this,arguments[1],arguments[2]));break;default:A.push(l[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===a)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(A)},N.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},N.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},N.prototype.onAny=function(e){return this._onAny(e,!1)},N.prototype.prependAny=function(e){return this._onAny(e,!0)},N.prototype.addListener=N.prototype.on,N.prototype._onAny=function(e,t){if("function"!==typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},N.prototype._on=function(e,t,n,r){if("function"===typeof e)return this._onAny(e,t),this;if("function"!==typeof t)throw new Error("on only accepts instances of Function");this._events||p.call(this);var o,a=this;return r!==i&&(o=I.call(this,e,t,r),t=o[0],a=o[1]),this._newListener&&this.emit("newListener",e,t),this.wildcard?(S.call(this,e,t,n),a):(this._events[e]?("function"===typeof this._events[e]&&(this._events[e]=[this._events[e]]),n?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,g.call(this,this._events[e].length,e))):this._events[e]=t,a)},N.prototype.off=function(e,t){if("function"!==typeof t)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var i="string"===typeof e?e.split(this.delimiter):e.slice();if(r=E.call(this,null,i,this.listenerTree,0),!r)return this}else{if(!this._events[e])return this;n=this._events[e],r.push({_listeners:n})}for(var o=0;o<r.length;o++){var s=r[o];if(n=s._listeners,a(n)){for(var l=-1,c=0,A=n.length;c<A;c++)if(n[c]===t||n[c].listener&&n[c].listener===t||n[c]._origin&&n[c]._origin===t){l=c;break}if(l<0)continue;return this.wildcard?s._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&T(this.listenerTree),this},N.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(t=this._all,n=0,r=t.length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},N.prototype.removeListener=N.prototype.off,N.prototype.removeAllListeners=function(e){if(e===i)return!this._events||p.call(this),this;if(this.wildcard){var t,n,r=E.call(this,null,e,this.listenerTree,0);if(!r)return this;for(n=0;n<r.length;n++)t=r[n],t._listeners=null;this.listenerTree&&T(this.listenerTree)}else this._events&&(this._events[e]=null);return this},N.prototype.listeners=function(e){var t,n,r,o,a,s=this._events;if(e===i){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];t=h(s),o=t.length,r=[];while(o-- >0)n=s[t[o]],"function"===typeof n?r.push(n):r.push.apply(r,n);return r}if(this.wildcard){if(a=this.listenerTree,!a)return[];var l=[],c="string"===typeof e?e.split(this.delimiter):e.slice();return E.call(this,l,c,a,0),l}return s?(n=s[e],n?"function"===typeof n?[n]:n:[]):[]},N.prototype.eventNames=function(e){var t=this._events;return this.wildcard?F.call(this,this.listenerTree,[],null,e):t?h(t):[]},N.prototype.listenerCount=function(e){return this.listeners(e).length},N.prototype.hasListeners=function(e){if(this.wildcard){var t=[],n="string"===typeof e?e.split(this.delimiter):e.slice();return E.call(this,t,n,this.listenerTree,0),t.length>0}var r=this._events,o=this._all;return!!(o&&o.length||r&&(e===i?h(r).length:r[e]))},N.prototype.listenersAny=function(){return this._all?this._all:[]},N.prototype.waitFor=function(e,t){var n=this,r=typeof t;return"number"===r?t={timeout:t}:"function"===r&&(t={filter:t}),t=y(t,{timeout:0,filter:i,handleError:!1,Promise:Promise,overload:!1},{filter:k,Promise:w}),B(t.Promise,(function(r,i,o){function a(){var o=t.filter;if(!o||o.apply(n,arguments))if(n.off(e,a),t.handleError){var s=arguments[0];s?i(s):r(m.apply(null,arguments).slice(1))}else r(m.apply(null,arguments))}o((function(){n.off(e,a)})),n._on(e,a,!1)}),{timeout:t.timeout,overload:t.overload})};var L=N.prototype;Object.defineProperties(N,{defaultMaxListeners:{get:function(){return L._maxListeners},set:function(e){if("number"!==typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");L._maxListeners=e},enumerable:!0},once:{value:U,writable:!0,configurable:!0}}),Object.defineProperties(L,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),r=function(){return N}.call(t,n,t,e),r===i||(e.exports=r)}()},70263:function(e){
/*!
2020 Jason Mulligan <jason.mulligan@avoidwork.com>
@version 6.4.0
*/
!function(t,n){e.exports=n()}(0,(function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function i(i){var o,a,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E=[],S=0;if(isNaN(i))throw new TypeError("Invalid number");if(s=!0===_.bits,b=!0===_.unix,g=!0===_.pad,a=_.base||2,m=void 0!==_.round?_.round:b?1:2,u=void 0!==_.locale?_.locale:"",d=_.localeOptions||{},y=void 0!==_.separator?_.separator:"",w=void 0!==_.spacer?_.spacer:b?"":" ",k=_.symbols||{},x=2===a&&_.standard||"jedec",f=_.output||"string",c=!0===_.fullform,A=_.fullforms instanceof Array?_.fullforms:[],o=void 0!==_.exponent?_.exponent:-1,C=r[_.roundingMethod]||Math.round,h=(p=Number(i))<0,l=a>2?1e3:1024,B=!1===isNaN(_.precision)?parseInt(_.precision,10):0,h&&(p=-p),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(p)/Math.log(l)))<0&&(o=0),o>8&&(B>0&&(B+=8-o),o=8),"exponent"===f)return o;if(0===p)E[0]=0,v=E[1]=b?"":t[x][s?"bits":"bytes"][o];else{S=p/(2===a?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(S*=8)>=l&&o<8&&(S/=l,o++);var F=Math.pow(10,o>0?m:0);E[0]=C(S*F)/F,E[0]===l&&o<8&&void 0===_.exponent&&(E[0]=1,o++),v=E[1]=10===a&&1===o?s?"kb":"kB":t[x][s?"bits":"bytes"][o],b&&(E[1]="jedec"===x?E[1].charAt(0):o>0?E[1].replace(/B$/,""):E[1],e.test(E[1])&&(E[0]=Math.floor(E[0]),E[1]=""))}if(h&&(E[0]=-E[0]),B>0&&(E[0]=E[0].toPrecision(B)),E[1]=k[E[1]]||E[1],!0===u?E[0]=E[0].toLocaleString():u.length>0?E[0]=E[0].toLocaleString(u,d):y.length>0&&(E[0]=E[0].toString().replace(".",y)),g&&!1===Number.isInteger(E[0])&&m>0){var T=y||".",M=E[0].toString().split(T),I=M[1]||"",N=I.length,U=m-N;E[0]="".concat(M[0]).concat(T).concat(I.padEnd(N+U,"0"))}return c&&(E[1]=A[o]?A[o]:n[x][o]+(s?"bit":"byte")+(1===E[0]?"":"s")),"array"===f?E:"object"===f?{value:E[0],symbol:E[1],exponent:o,unit:v}:E.join(w)}return i.partial=function(e){return function(t){return i(t,e)}},i}))},92269:function(e,t,n){n(57658),n(1439),n(87585),n(55315),n(92087),
/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/
function(t,n){e.exports=n()}(0,(function(){"use strict";
/*! *****************************************************************************
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 e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(Kt){o(Kt)}}function s(e){try{l(r["throw"](e))}catch(Kt){o(Kt)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(Kt){o=[6,Kt],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)}for(var a=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return a.fromClientRect(e,t.getBoundingClientRect())},l=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new a(0,0,r,i)},c=function(e){var t=[],n=0,r=e.length;while(n<r){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320===(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t},A=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";var r=[],i=-1,o="";while(++i<n){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"===typeof Uint8Array?[]:new Uint8Array(256),h=0;h<u.length;h++)d[u.charCodeAt(h)]=h;for(var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"===typeof Uint8Array?[]:new Uint8Array(256),g=0;g<p.length;g++)f[p.charCodeAt(g)]=g;for(var m=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),A=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=f[e.charCodeAt(t)],r=f[e.charCodeAt(t+1)],i=f[e.charCodeAt(t+2)],o=f[e.charCodeAt(t+3)],A[l++]=n<<2|r>>4,A[l++]=(15&r)<<4|i>>2,A[l++]=(3&i)<<6|63&o;return c},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},b=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},y=5,w=11,x=2,k=w-y,C=65536>>y,B=1<<y,_=B-1,E=1024>>y,S=C+E,F=S,T=32,M=F+T,I=65536>>w,N=1<<k,U=N-1,L=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Q=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},D=function(e,t){var n=m(e),r=Array.isArray(n)?b(n):new Uint32Array(n),i=Array.isArray(n)?v(n):new Uint16Array(n),o=24,a=L(i,o/2,r[4]/2),s=2===r[5]?L(i,(o+r[4])/2):Q(r,Math.ceil((o+r[4])/4));return new H(r[0],r[1],r[2],r[3],a,s)},H=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>y],t=(t<<x)+(e&_),this.data[t];if(e<=65535)return t=this.index[C+(e-55296>>y)],t=(t<<x)+(e&_),this.data[t];if(e<this.highStart)return t=M-I+(e>>w),t=this.index[t],t+=e>>y&U,t=this.index[t],t=(t<<x)+(e&_),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Z=0;Z<O.length;Z++)z[O.charCodeAt(Z)]=Z;var R="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",P=50,q=1,K=2,W=3,j=4,V=5,G=7,$=8,Y=9,X=10,J=11,ee=12,te=13,ne=14,re=15,ie=16,oe=17,ae=18,se=19,le=20,ce=21,Ae=22,ue=23,de=24,he=25,pe=26,fe=27,ge=28,me=29,ve=30,be=31,ye=32,we=33,xe=34,ke=35,Ce=36,Be=37,_e=38,Ee=39,Se=40,Fe=41,Te=42,Me=43,Ie=[9001,65288],Ne="!",Ue="×",Le="÷",Qe=D(R),De=[ve,Ce],He=[q,K,W,V],Oe=[X,$],ze=[fe,pe],Ze=He.concat(Oe),Re=[_e,Ee,Se,xe,ke],Pe=[re,te],qe=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach((function(e,o){var a=Qe.get(e);if(a>P?(i.push(!0),a-=P):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(o),n.push(ie);if(a===j||a===J){if(0===o)return r.push(o),n.push(ve);var s=n[o-1];return-1===Ze.indexOf(s)?(r.push(r[o-1]),n.push(s)):(r.push(o),n.push(ve))}return r.push(o),a===be?n.push("strict"===t?ce:Be):a===Te||a===me?n.push(ve):a===Me?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(Be):n.push(ve):void n.push(a)})),[r,n,i]},Ke=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i){var o=n;while(o<=r.length){o++;var a=r[o];if(a===t)return!0;if(a!==X)break}}if(i===X){o=n;while(o>0){o--;var s=r[o];if(Array.isArray(e)?-1!==e.indexOf(s):e===s){var l=n;while(l<=r.length){l++;a=r[l];if(a===t)return!0;if(a!==X)break}}if(s!==X)break}}return!1},We=function(e,t){var n=e;while(n>=0){var r=t[n];if(r!==X)return r;n--}return 0},je=function(e,t,n,r,i){if(0===n[r])return Ue;var o=r-1;if(Array.isArray(i)&&!0===i[o])return Ue;var a=o-1,s=o+1,l=t[o],c=a>=0?t[a]:0,A=t[s];if(l===K&&A===W)return Ue;if(-1!==He.indexOf(l))return Ne;if(-1!==He.indexOf(A))return Ue;if(-1!==Oe.indexOf(A))return Ue;if(We(o,t)===$)return Le;if(Qe.get(e[o])===J)return Ue;if((l===ye||l===we)&&Qe.get(e[s])===J)return Ue;if(l===G||A===G)return Ue;if(l===Y)return Ue;if(-1===[X,te,re].indexOf(l)&&A===Y)return Ue;if(-1!==[oe,ae,se,de,ge].indexOf(A))return Ue;if(We(o,t)===Ae)return Ue;if(Ke(ue,Ae,o,t))return Ue;if(Ke([oe,ae],ce,o,t))return Ue;if(Ke(ee,ee,o,t))return Ue;if(l===X)return Le;if(l===ue||A===ue)return Ue;if(A===ie||l===ie)return Le;if(-1!==[te,re,ce].indexOf(A)||l===ne)return Ue;if(c===Ce&&-1!==Pe.indexOf(l))return Ue;if(l===ge&&A===Ce)return Ue;if(A===le)return Ue;if(-1!==De.indexOf(A)&&l===he||-1!==De.indexOf(l)&&A===he)return Ue;if(l===fe&&-1!==[Be,ye,we].indexOf(A)||-1!==[Be,ye,we].indexOf(l)&&A===pe)return Ue;if(-1!==De.indexOf(l)&&-1!==ze.indexOf(A)||-1!==ze.indexOf(l)&&-1!==De.indexOf(A))return Ue;if(-1!==[fe,pe].indexOf(l)&&(A===he||-1!==[Ae,re].indexOf(A)&&t[s+1]===he)||-1!==[Ae,re].indexOf(l)&&A===he||l===he&&-1!==[he,ge,de].indexOf(A))return Ue;if(-1!==[he,ge,de,oe,ae].indexOf(A)){var u=o;while(u>=0){var d=t[u];if(d===he)return Ue;if(-1===[ge,de].indexOf(d))break;u--}}if(-1!==[fe,pe].indexOf(A)){u=-1!==[oe,ae].indexOf(l)?a:o;while(u>=0){d=t[u];if(d===he)return Ue;if(-1===[ge,de].indexOf(d))break;u--}}if(_e===l&&-1!==[_e,Ee,xe,ke].indexOf(A)||-1!==[Ee,xe].indexOf(l)&&-1!==[Ee,Se].indexOf(A)||-1!==[Se,ke].indexOf(l)&&A===Se)return Ue;if(-1!==Re.indexOf(l)&&-1!==[le,pe].indexOf(A)||-1!==Re.indexOf(A)&&l===fe)return Ue;if(-1!==De.indexOf(l)&&-1!==De.indexOf(A))return Ue;if(l===de&&-1!==De.indexOf(A))return Ue;if(-1!==De.concat(he).indexOf(l)&&A===Ae&&-1===Ie.indexOf(e[s])||-1!==De.concat(he).indexOf(A)&&l===ae)return Ue;if(l===Fe&&A===Fe){var h=n[o],p=1;while(h>0){if(h--,t[h]!==Fe)break;p++}if(p%2!==0)return Ue}return l===ye&&A===we?Ue:Le},Ve=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=qe(e,t.lineBreak),r=n[0],i=n[1],o=n[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map((function(e){return-1!==[he,ve,Te].indexOf(e)?Be:e})));var a="keep-all"===t.wordBreak?o.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0;return[r,i,a]},Ge=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===Ne,this.start=n,this.end=r}return e.prototype.slice=function(){return A.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),$e=function(e,t){var n=c(e),r=Ve(n,t),i=r[0],o=r[1],a=r[2],s=n.length,l=0,A=0;return{next:function(){if(A>=s)return{done:!0,value:null};var e=Ue;while(A<s&&(e=je(n,o,i,++A,a))===Ue);if(e!==Ue||A===s){var t=new Ge(n,e,l,A);return l=A,{value:t,done:!1}}return{done:!0,value:null}}}},Ye=1,Xe=2,Je=4,et=8,tt=10,nt=47,rt=92,it=9,ot=32,at=34,st=61,lt=35,ct=36,At=37,ut=39,dt=40,ht=41,pt=95,ft=45,gt=33,mt=60,vt=62,bt=64,yt=91,wt=93,xt=61,kt=123,Ct=63,Bt=125,_t=124,Et=126,St=128,Ft=65533,Tt=42,Mt=43,It=44,Nt=58,Ut=59,Lt=46,Qt=0,Dt=8,Ht=11,Ot=14,zt=31,Zt=127,Rt=-1,Pt=48,qt=97,Kt=101,Wt=102,jt=117,Vt=122,Gt=65,$t=69,Yt=70,Xt=85,Jt=90,en=function(e){return e>=Pt&&e<=57},tn=function(e){return e>=55296&&e<=57343},nn=function(e){return en(e)||e>=Gt&&e<=Yt||e>=qt&&e<=Wt},rn=function(e){return e>=qt&&e<=Vt},on=function(e){return e>=Gt&&e<=Jt},an=function(e){return rn(e)||on(e)},sn=function(e){return e>=St},ln=function(e){return e===tt||e===it||e===ot},cn=function(e){return an(e)||sn(e)||e===pt},An=function(e){return cn(e)||en(e)||e===ft},un=function(e){return e>=Qt&&e<=Dt||e===Ht||e>=Ot&&e<=zt||e===Zt},dn=function(e,t){return e===rt&&t!==tt},hn=function(e,t,n){return e===ft?cn(t)||dn(t,n):!!cn(e)||!(e!==rt||!dn(e,t))},pn=function(e,t,n){return e===Mt||e===ft?!!en(t)||t===Lt&&en(n):en(e===Lt?t:e)},fn=function(e){var t=0,n=1;e[t]!==Mt&&e[t]!==ft||(e[t]===ft&&(n=-1),t++);var r=[];while(en(e[t]))r.push(e[t++]);var i=r.length?parseInt(A.apply(void 0,r),10):0;e[t]===Lt&&t++;var o=[];while(en(e[t]))o.push(e[t++]);var a=o.length,s=a?parseInt(A.apply(void 0,o),10):0;e[t]!==$t&&e[t]!==Kt||t++;var l=1;e[t]!==Mt&&e[t]!==ft||(e[t]===ft&&(l=-1),t++);var c=[];while(en(e[t]))c.push(e[t++]);var u=c.length?parseInt(A.apply(void 0,c),10):0;return n*(i+s*Math.pow(10,-a))*Math.pow(10,l*u)},gn={type:2},mn={type:3},vn={type:4},bn={type:13},yn={type:8},wn={type:21},xn={type:9},kn={type:10},Cn={type:11},Bn={type:12},_n={type:14},En={type:23},Sn={type:1},Fn={type:25},Tn={type:24},Mn={type:26},In={type:27},Nn={type:28},Un={type:29},Ln={type:31},Qn={type:32},Dn=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(c(e))},e.prototype.read=function(){var e=[],t=this.consumeToken();while(t!==Qn)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case at:return this.consumeStringToken(at);case lt:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(An(t)||dn(n,r)){var i=hn(t,n,r)?Xe:Ye,o=this.consumeName();return{type:5,value:o,flags:i}}break;case ct:if(this.peekCodePoint(0)===st)return this.consumeCodePoint(),bn;break;case ut:return this.consumeStringToken(ut);case dt:return gn;case ht:return mn;case Tt:if(this.peekCodePoint(0)===st)return this.consumeCodePoint(),_n;break;case Mt:if(pn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case It:return vn;case ft:var a=e,s=this.peekCodePoint(0),l=this.peekCodePoint(1);if(pn(a,s,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(hn(a,s,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(s===ft&&l===vt)return this.consumeCodePoint(),this.consumeCodePoint(),Tn;break;case Lt:if(pn(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case nt:if(this.peekCodePoint(0)===Tt){this.consumeCodePoint();while(1){var c=this.consumeCodePoint();if(c===Tt&&(c=this.consumeCodePoint(),c===nt))return this.consumeToken();if(c===Rt)return this.consumeToken()}}break;case Nt:return Mn;case Ut:return In;case mt:if(this.peekCodePoint(0)===gt&&this.peekCodePoint(1)===ft&&this.peekCodePoint(2)===ft)return this.consumeCodePoint(),this.consumeCodePoint(),Fn;break;case bt:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),h=this.peekCodePoint(2);if(hn(u,d,h)){o=this.consumeName();return{type:7,value:o}}break;case yt:return Nn;case rt:if(dn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case wt:return Un;case xt:if(this.peekCodePoint(0)===st)return this.consumeCodePoint(),yn;break;case kt:return Cn;case Bt:return Bn;case jt:case Xt:var p=this.peekCodePoint(0),f=this.peekCodePoint(1);return p!==Mt||!nn(f)&&f!==Ct||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case _t:if(this.peekCodePoint(0)===st)return this.consumeCodePoint(),xn;if(this.peekCodePoint(0)===_t)return this.consumeCodePoint(),wn;break;case Et:if(this.peekCodePoint(0)===st)return this.consumeCodePoint(),kn;break;case Rt:return Qn}return ln(e)?(this.consumeWhiteSpace(),Ln):en(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):cn(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:A(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return"undefined"===typeof e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){var e=[],t=this.consumeCodePoint();while(nn(t)&&e.length<6)e.push(t),t=this.consumeCodePoint();var n=!1;while(t===Ct&&e.length<6)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(A.apply(void 0,e.map((function(e){return e===Ct?Pt:e}))),16),i=parseInt(A.apply(void 0,e.map((function(e){return e===Ct?Yt:e}))),16);return{type:30,start:r,end:i}}var o=parseInt(A.apply(void 0,e),16);if(this.peekCodePoint(0)===ft&&nn(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();var a=[];while(nn(t)&&a.length<6)a.push(t),t=this.consumeCodePoint();i=parseInt(A.apply(void 0,a),16);return{type:30,start:o,end:i}}return{type:30,start:o,end:o}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&this.peekCodePoint(0)===dt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===dt?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===ut||t===at){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt||this.peekCodePoint(0)===ht)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),En)}while(1){var r=this.consumeCodePoint();if(r===Rt||r===ht)return{type:22,value:A.apply(void 0,e)};if(ln(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Rt||this.peekCodePoint(0)===ht?(this.consumeCodePoint(),{type:22,value:A.apply(void 0,e)}):(this.consumeBadUrlRemnants(),En);if(r===at||r===ut||r===dt||un(r))return this.consumeBadUrlRemnants(),En;if(r===rt){if(!dn(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),En;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){while(ln(this.peekCodePoint(0)))this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){while(1){var e=this.consumeCodePoint();if(e===ht||e===Rt)return;dn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){var t=5e4,n="";while(e>0){var r=Math.min(t,e);n+=A.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){var t="",n=0;do{var r=this._value[n];if(r===Rt||void 0===r||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===tt)return this._value.splice(0,n),Sn;if(r===rt){var i=this._value[n+1];i!==Rt&&void 0!==i&&(i===tt?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):dn(r,i)&&(t+=this.consumeStringSlice(n),t+=A(this.consumeEscapedCodePoint()),n=-1))}n++}while(1)},e.prototype.consumeNumber=function(){var e=[],t=Je,n=this.peekCodePoint(0);n!==Mt&&n!==ft||e.push(this.consumeCodePoint());while(en(this.peekCodePoint(0)))e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===Lt&&en(r)){e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=et;while(en(this.peekCodePoint(0)))e.push(this.consumeCodePoint())}n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===$t||n===Kt)&&((r===Mt||r===ft)&&en(i)||en(r))){e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=et;while(en(this.peekCodePoint(0)))e.push(this.consumeCodePoint())}return[fn(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);if(hn(r,i,o)){var a=this.consumeName();return{type:15,number:t,flags:n,unit:a}}return r===At?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(nn(e)){var t=A(e);while(nn(this.peekCodePoint(0))&&t.length<6)t+=A(this.consumeCodePoint());ln(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||tn(n)||n>1114111?Ft:n}return e===Rt?Ft:e},e.prototype.consumeName=function(){var e="";while(1){var t=this.consumeCodePoint();if(An(t))e+=A(t);else{if(!dn(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=A(this.consumeEscapedCodePoint())}}},e}(),Hn=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Dn;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){var e=this.consumeToken();while(31===e.type)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){var e=[];while(1){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){var t={type:e,values:[]},n=this.consumeToken();while(1){if(32===n.type||jn(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){var t={name:e.value,values:[],type:18};while(1){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return"undefined"===typeof e?Qn:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),On=function(e){return 15===e.type},zn=function(e){return 17===e.type},Zn=function(e){return 20===e.type},Rn=function(e){return 0===e.type},Pn=function(e,t){return Zn(e)&&e.value===t},qn=function(e){return 31!==e.type},Kn=function(e){return 31!==e.type&&4!==e.type},Wn=function(e){var t=[],n=[];return e.forEach((function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)})),n.length&&t.push(n),t},jn=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},Vn=function(e){return 17===e.type||15===e.type},Gn=function(e){return 16===e.type||Vn(e)},$n=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Yn={type:17,number:0,flags:Je},Xn={type:16,number:50,flags:Je},Jn={type:16,number:100,flags:Je},er=function(e,t,n){var r=e[0],i=e[1];return[tr(r,t),tr("undefined"!==typeof i?i:r,n)]},tr=function(e,t){if(16===e.type)return e.number/100*t;if(On(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},nr="deg",rr="grad",ir="rad",or="turn",ar={name:"angle",parse:function(e,t){if(15===t.type)switch(t.unit){case nr:return Math.PI*t.number/180;case rr:return Math.PI/200*t.number;case ir:return t.number;case or:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},sr=function(e){return 15===e.type&&(e.unit===nr||e.unit===rr||e.unit===ir||e.unit===or)},lr=function(e){var t=e.filter(Zn).map((function(e){return e.value})).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Yn,Yn];case"to top":case"bottom":return cr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Yn,Jn];case"to right":case"left":return cr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Jn,Jn];case"to bottom":case"top":return cr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Jn,Yn];case"to left":case"right":return cr(270)}return 0},cr=function(e){return Math.PI*e/180},Ar={name:"color",parse:function(e,t){if(18===t.type){var n=vr[t.name];if("undefined"===typeof n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);return hr(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),1)}if(4===t.value.length){r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);var a=t.value.substring(3,4);return hr(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),parseInt(a+a,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6);return hr(parseInt(r,16),parseInt(i,16),parseInt(o,16),1)}if(8===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6),a=t.value.substring(6,8);return hr(parseInt(r,16),parseInt(i,16),parseInt(o,16),parseInt(a,16)/255)}}if(20===t.type){var s=yr[t.value.toUpperCase()];if("undefined"!==typeof s)return s}return yr.TRANSPARENT}},ur=function(e){return 0===(255&e)},dr=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},hr=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r)<<0)>>>0},pr=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},fr=function(e,t){var n=t.filter(Kn);if(3===n.length){var r=n.map(pr),i=r[0],o=r[1],a=r[2];return hr(i,o,a,1)}if(4===n.length){var s=n.map(pr),l=(i=s[0],o=s[1],a=s[2],s[3]);return hr(i,o,a,l)}return 0};function gr(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var mr=function(e,t){var n=t.filter(Kn),r=n[0],i=n[1],o=n[2],a=n[3],s=(17===r.type?cr(r.number):ar.parse(e,r))/(2*Math.PI),l=Gn(i)?i.number/100:0,c=Gn(o)?o.number/100:0,A="undefined"!==typeof a&&Gn(a)?tr(a,1):1;if(0===l)return hr(255*c,255*c,255*c,1);var u=c<=.5?c*(l+1):c+l-c*l,d=2*c-u,h=gr(d,u,s+1/3),p=gr(d,u,s),f=gr(d,u,s-1/3);return hr(255*h,255*p,255*f,A)},vr={hsl:mr,hsla:mr,rgb:fr,rgba:fr},br=function(e,t){return Ar.parse(e,Hn.create(t).parseComponentValue())},yr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},wr={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Zn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},xr={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},kr=function(e,t){var n=Ar.parse(e,t[0]),r=t[1];return r&&Gn(r)?{color:n,stop:r}:{color:n,stop:null}},Cr=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=Yn),null===r.stop&&(r.stop=Jn);for(var i=[],o=0,a=0;a<e.length;a++){var s=e[a].stop;if(null!==s){var l=tr(s,t);l>o?i.push(l):i.push(o),o=l}else i.push(null)}var c=null;for(a=0;a<i.length;a++){var A=i[a];if(null===A)null===c&&(c=a);else if(null!==c){for(var u=a-c,d=i[c-1],h=(A-d)/(u+1),p=1;p<=u;p++)i[c+p-1]=h*p;c=null}}return e.map((function(e,n){var r=e.color;return{color:r,stop:Math.max(Math.min(1,i[n]/t),0)}}))},Br=function(e,t,n){var r=t/2,i=n/2,o=tr(e[0],t)-r,a=i-tr(e[1],n);return(Math.atan2(a,o)+2*Math.PI)%(2*Math.PI)},_r=function(e,t,n){var r="number"===typeof e?e:Br(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),o=t/2,a=n/2,s=i/2,l=Math.sin(r-Math.PI/2)*s,c=Math.cos(r-Math.PI/2)*s;return[i,o-c,o+c,a-l,a+l]},Er=function(e,t){return Math.sqrt(e*e+t*t)},Sr=function(e,t,n,r,i){var o=[[0,0],[0,t],[e,0],[e,t]];return o.reduce((function(e,t){var o=t[0],a=t[1],s=Er(n-o,r-a);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Fr=function(e,t,n,r,i){var o=0,a=0;switch(e.size){case 0:0===e.shape?o=a=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-r)),a=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===e.shape)o=a=Math.min(Er(t,n),Er(t,n-i),Er(t-r,n),Er(t-r,n-i));else if(1===e.shape){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),l=Sr(r,i,t,n,!0),c=l[0],A=l[1];o=Er(c-t,(A-n)/s),a=s*o}break;case 1:0===e.shape?o=a=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-r)),a=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===e.shape)o=a=Math.max(Er(t,n),Er(t,n-i),Er(t-r,n),Er(t-r,n-i));else if(1===e.shape){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var u=Sr(r,i,t,n,!1);c=u[0],A=u[1];o=Er(c-t,(A-n)/s),a=s*o}break}return Array.isArray(e.size)&&(o=tr(e.size[0],r),a=2===e.size.length?tr(e.size[1],i):o),[o,a]},Tr=function(e,t){var n=cr(180),r=[];return Wn(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&"to"===o.value)return void(n=lr(t));if(sr(o))return void(n=ar.parse(e,o))}var a=kr(e,t);r.push(a)})),{angle:n,stops:r,type:1}},Mr=function(e,t){var n=cr(180),r=[];return Wn(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(n=lr(t));if(sr(o))return void(n=(ar.parse(e,o)+cr(270))%cr(360))}var a=kr(e,t);r.push(a)})),{angle:n,stops:r,type:1}},Ir=function(e,t){var n=cr(180),r=[],i=1,o=0,a=3,s=[];return Wn(t).forEach((function(t,n){var o=t[0];if(0===n){if(Zn(o)&&"linear"===o.value)return void(i=1);if(Zn(o)&&"radial"===o.value)return void(i=2)}if(18===o.type)if("from"===o.name){var a=Ar.parse(e,o.values[0]);r.push({stop:Yn,color:a})}else if("to"===o.name){a=Ar.parse(e,o.values[0]);r.push({stop:Jn,color:a})}else if("color-stop"===o.name){var s=o.values.filter(Kn);if(2===s.length){a=Ar.parse(e,s[1]);var l=s[0];zn(l)&&r.push({stop:{type:16,number:100*l.number,flags:l.flags},color:a})}}})),1===i?{angle:(n+cr(180))%cr(360),stops:r,type:i}:{size:a,shape:o,stops:r,position:s,type:i}},Nr="closest-side",Ur="farthest-side",Lr="closest-corner",Qr="farthest-corner",Dr="circle",Hr="ellipse",Or="cover",zr="contain",Zr=function(e,t){var n=0,r=3,i=[],o=[];return Wn(t).forEach((function(t,a){var s=!0;if(0===a){var l=!1;s=t.reduce((function(e,t){if(l)if(Zn(t))switch(t.value){case"center":return o.push(Xn),e;case"top":case"left":return o.push(Yn),e;case"right":case"bottom":return o.push(Jn),e}else(Gn(t)||Vn(t))&&o.push(t);else if(Zn(t))switch(t.value){case Dr:return n=0,!1;case Hr:return n=1,!1;case"at":return l=!0,!1;case Nr:return r=0,!1;case Or:case Ur:return r=1,!1;case zr:case Lr:return r=2,!1;case Qr:return r=3,!1}else if(Vn(t)||Gn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)}if(s){var c=kr(e,t);i.push(c)}})),{size:r,shape:n,stops:i,position:o,type:2}},Rr=function(e,t){var n=0,r=3,i=[],o=[];return Wn(t).forEach((function(t,a){var s=!0;if(0===a?s=t.reduce((function(e,t){if(Zn(t))switch(t.value){case"center":return o.push(Xn),!1;case"top":case"left":return o.push(Yn),!1;case"right":case"bottom":return o.push(Jn),!1}else if(Gn(t)||Vn(t))return o.push(t),!1;return e}),s):1===a&&(s=t.reduce((function(e,t){if(Zn(t))switch(t.value){case Dr:return n=0,!1;case Hr:return n=1,!1;case zr:case Nr:return r=0,!1;case Ur:return r=1,!1;case Lr:return r=2,!1;case Or:case Qr:return r=3,!1}else if(Vn(t)||Gn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)),s){var l=kr(e,t);i.push(l)}})),{size:r,shape:n,stops:i,position:o,type:2}},Pr=function(e){return 1===e.type},qr=function(e){return 2===e.type},Kr={name:"image",parse:function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=Vr[t.name];if("undefined"===typeof r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function Wr(e){return!(20===e.type&&"none"===e.value)&&(18!==e.type||!!Vr[e.name])}var jr,Vr={"linear-gradient":Tr,"-moz-linear-gradient":Mr,"-ms-linear-gradient":Mr,"-o-linear-gradient":Mr,"-webkit-linear-gradient":Mr,"radial-gradient":Zr,"-moz-radial-gradient":Rr,"-ms-radial-gradient":Rr,"-o-radial-gradient":Rr,"-webkit-radial-gradient":Rr,"-webkit-gradient":Ir},Gr={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter((function(e){return Kn(e)&&Wr(e)})).map((function(t){return Kr.parse(e,t)}))}},$r={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Zn(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Yr={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Wn(t).map((function(e){return e.filter(Gn)})).map($n)}},Xr={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Wn(t).map((function(e){return e.filter(Zn).map((function(e){return e.value})).join(" ")})).map(Jr)}},Jr=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}};(function(e){e["AUTO"]="auto",e["CONTAIN"]="contain",e["COVER"]="cover"})(jr||(jr={}));var ei,ti={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Wn(t).map((function(e){return e.filter(ni)}))}},ni=function(e){return Zn(e)||Gn(e)},ri=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ii=ri("top"),oi=ri("right"),ai=ri("bottom"),si=ri("left"),li=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return $n(t.filter(Gn))}}},ci=li("top-left"),Ai=li("top-right"),ui=li("bottom-right"),di=li("bottom-left"),hi=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},pi=hi("top"),fi=hi("right"),gi=hi("bottom"),mi=hi("left"),vi=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return On(t)?t.number:0}}},bi=vi("top"),yi=vi("right"),wi=vi("bottom"),xi=vi("left"),ki={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ci={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},Bi={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Zn).reduce((function(e,t){return e|_i(t.value)}),0)}},_i=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Ei={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Si={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};(function(e){e["NORMAL"]="normal",e["STRICT"]="strict"})(ei||(ei={}));var Fi,Ti={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return ei.STRICT;case"normal":default:return ei.NORMAL}}},Mi={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ii=function(e,t){return Zn(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Gn(e)?tr(e,t):t},Ni={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Kr.parse(e,t)}},Ui={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},Li={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Qi=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Di=Qi("top"),Hi=Qi("right"),Oi=Qi("bottom"),zi=Qi("left"),Zi={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Zn).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}}))}},Ri={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},Pi=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},qi=Pi("top"),Ki=Pi("right"),Wi=Pi("bottom"),ji=Pi("left"),Vi={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Gi={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},$i={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Pn(t[0],"none")?[]:Wn(t).map((function(t){for(var n={color:yr.TRANSPARENT,offsetX:Yn,offsetY:Yn,blur:Yn},r=0,i=0;i<t.length;i++){var o=t[i];Vn(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:n.blur=o,r++):n.color=Ar.parse(e,o)}return n}))}},Yi={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Xi={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var n=to[t.name];if("undefined"===typeof n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},Ji=function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},eo=function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),n=t[0],r=t[1];t[2],t[3];var i=t[4],o=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var a=t[12],s=t[13];return t[14],t[15],16===t.length?[n,r,i,o,a,s]:null},to={matrix:Ji,matrix3d:eo},no={type:16,number:50,flags:Je},ro=[no,no],io={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(Gn);return 2!==n.length?ro:[n[0],n[1]]}},oo={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}};(function(e){e["NORMAL"]="normal",e["BREAK_ALL"]="break-all",e["KEEP_ALL"]="keep-all"})(Fi||(Fi={}));for(var ao={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Fi.BREAK_ALL;case"keep-all":return Fi.KEEP_ALL;case"normal":default:return Fi.NORMAL}}},so={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(zn(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},lo={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},co={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return zn(t)?t.number:1}},Ao={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},uo={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Zn).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},ho={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0;break}})),n.length&&r.push(n.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},po={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},fo={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(zn(t))return t.number;if(Zn(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},go={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Zn).map((function(e){return e.value}))}},mo={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},vo=function(e,t){return 0!==(e&t)},bo={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t}},yo={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;for(var r=[],i=t.filter(qn),o=0;o<i.length;o++){var a=i[o],s=i[o+1];if(20===a.type){var l=s&&zn(s)?s.number:1;r.push({counter:a.value,increment:l})}}return r}},wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var n=[],r=t.filter(qn),i=0;i<r.length;i++){var o=r[i],a=r[i+1];if(Zn(o)&&"none"!==o.value){var s=a&&zn(a)?a.number:0;n.push({counter:o.value,reset:s})}}return n}},xo={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(On).map((function(t){return lo.parse(e,t)}))}},ko={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;var r=[],i=t.filter(Rn);if(i.length%2!==0)return null;for(var o=0;o<i.length;o+=2){var a=i[o].value,s=i[o+1].value;r.push({open:a,close:s})}return r}},Co=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},Bo={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Pn(t[0],"none")?[]:Wn(t).map((function(t){for(var n={color:255,offsetX:Yn,offsetY:Yn,blur:Yn,spread:Yn,inset:!1},r=0,i=0;i<t.length;i++){var o=t[i];Pn(o,"inset")?n.inset=!0:Vn(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:2===r?n.blur=o:n.spread=o,r++):n.color=Ar.parse(e,o)}return n}))}},_o={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[0,1,2],r=[];return t.filter(Zn).forEach((function(e){switch(e.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}})),n.forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),r}},Eo={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},So={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return On(t)?t.number:0}},Fo=function(){function e(e,t){var n,r;this.animationDuration=Io(e,xo,t.animationDuration),this.backgroundClip=Io(e,wr,t.backgroundClip),this.backgroundColor=Io(e,xr,t.backgroundColor),this.backgroundImage=Io(e,Gr,t.backgroundImage),this.backgroundOrigin=Io(e,$r,t.backgroundOrigin),this.backgroundPosition=Io(e,Yr,t.backgroundPosition),this.backgroundRepeat=Io(e,Xr,t.backgroundRepeat),this.backgroundSize=Io(e,ti,t.backgroundSize),this.borderTopColor=Io(e,ii,t.borderTopColor),this.borderRightColor=Io(e,oi,t.borderRightColor),this.borderBottomColor=Io(e,ai,t.borderBottomColor),this.borderLeftColor=Io(e,si,t.borderLeftColor),this.borderTopLeftRadius=Io(e,ci,t.borderTopLeftRadius),this.borderTopRightRadius=Io(e,Ai,t.borderTopRightRadius),this.borderBottomRightRadius=Io(e,ui,t.borderBottomRightRadius),this.borderBottomLeftRadius=Io(e,di,t.borderBottomLeftRadius),this.borderTopStyle=Io(e,pi,t.borderTopStyle),this.borderRightStyle=Io(e,fi,t.borderRightStyle),this.borderBottomStyle=Io(e,gi,t.borderBottomStyle),this.borderLeftStyle=Io(e,mi,t.borderLeftStyle),this.borderTopWidth=Io(e,bi,t.borderTopWidth),this.borderRightWidth=Io(e,yi,t.borderRightWidth),this.borderBottomWidth=Io(e,wi,t.borderBottomWidth),this.borderLeftWidth=Io(e,xi,t.borderLeftWidth),this.boxShadow=Io(e,Bo,t.boxShadow),this.color=Io(e,ki,t.color),this.direction=Io(e,Ci,t.direction),this.display=Io(e,Bi,t.display),this.float=Io(e,Ei,t.cssFloat),this.fontFamily=Io(e,ho,t.fontFamily),this.fontSize=Io(e,po,t.fontSize),this.fontStyle=Io(e,mo,t.fontStyle),this.fontVariant=Io(e,go,t.fontVariant),this.fontWeight=Io(e,fo,t.fontWeight),this.letterSpacing=Io(e,Si,t.letterSpacing),this.lineBreak=Io(e,Ti,t.lineBreak),this.lineHeight=Io(e,Mi,t.lineHeight),this.listStyleImage=Io(e,Ni,t.listStyleImage),this.listStylePosition=Io(e,Ui,t.listStylePosition),this.listStyleType=Io(e,Li,t.listStyleType),this.marginTop=Io(e,Di,t.marginTop),this.marginRight=Io(e,Hi,t.marginRight),this.marginBottom=Io(e,Oi,t.marginBottom),this.marginLeft=Io(e,zi,t.marginLeft),this.opacity=Io(e,co,t.opacity);var i=Io(e,Zi,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=Io(e,Ri,t.overflowWrap),this.paddingTop=Io(e,qi,t.paddingTop),this.paddingRight=Io(e,Ki,t.paddingRight),this.paddingBottom=Io(e,Wi,t.paddingBottom),this.paddingLeft=Io(e,ji,t.paddingLeft),this.paintOrder=Io(e,_o,t.paintOrder),this.position=Io(e,Gi,t.position),this.textAlign=Io(e,Vi,t.textAlign),this.textDecorationColor=Io(e,Ao,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=Io(e,uo,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=Io(e,$i,t.textShadow),this.textTransform=Io(e,Yi,t.textTransform),this.transform=Io(e,Xi,t.transform),this.transformOrigin=Io(e,io,t.transformOrigin),this.visibility=Io(e,oo,t.visibility),this.webkitTextStrokeColor=Io(e,Eo,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Io(e,So,t.webkitTextStrokeWidth),this.wordBreak=Io(e,ao,t.wordBreak),this.zIndex=Io(e,so,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return ur(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return vo(this.display,4)||vo(this.display,33554432)||vo(this.display,268435456)||vo(this.display,536870912)||vo(this.display,67108864)||vo(this.display,134217728)},e}(),To=function(){function e(e,t){this.content=Io(e,bo,t.content),this.quotes=Io(e,ko,t.quotes)}return e}(),Mo=function(){function e(e,t){this.counterIncrement=Io(e,yo,t.counterIncrement),this.counterReset=Io(e,wo,t.counterReset)}return e}(),Io=function(e,t,n){var r=new Dn,i=null!==n&&"undefined"!==typeof n?n.toString():t.initialValue;r.write(i);var o=new Hn(r.read());switch(t.type){case 2:var a=o.parseComponentValue();return t.parse(e,Zn(a)?a.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return ar.parse(e,o.parseComponentValue());case"color":return Ar.parse(e,o.parseComponentValue());case"image":return Kr.parse(e,o.parseComponentValue());case"length":var s=o.parseComponentValue();return Vn(s)?s:Yn;case"length-percentage":var l=o.parseComponentValue();return Gn(l)?l:Yn;case"time":return lo.parse(e,o.parseComponentValue())}break}},No="data-html2canvas-debug",Uo=function(e){var t=e.getAttribute(No);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Lo=function(e,t){var n=Uo(e);return 1===n||t===n},Qo=function(){function e(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Lo(t,3),this.styles=new Fo(e,window.getComputedStyle(t,null)),Ts(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=s(this.context,t),Lo(t,4)&&(this.flags|=16)}return e}(),Do="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Oo="undefined"===typeof Uint8Array?[]:new Uint8Array(256),zo=0;zo<Ho.length;zo++)Oo[Ho.charCodeAt(zo)]=zo;for(var Zo=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),A=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=Oo[e.charCodeAt(t)],r=Oo[e.charCodeAt(t+1)],i=Oo[e.charCodeAt(t+2)],o=Oo[e.charCodeAt(t+3)],A[l++]=n<<2|r>>4,A[l++]=(15&r)<<4|i>>2,A[l++]=(3&i)<<6|63&o;return c},Ro=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},Po=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},qo=5,Ko=11,Wo=2,jo=Ko-qo,Vo=65536>>qo,Go=1<<qo,$o=Go-1,Yo=1024>>qo,Xo=Vo+Yo,Jo=Xo,ea=32,ta=Jo+ea,na=65536>>Ko,ra=1<<jo,ia=ra-1,oa=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},aa=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},sa=function(e,t){var n=Zo(e),r=Array.isArray(n)?Po(n):new Uint32Array(n),i=Array.isArray(n)?Ro(n):new Uint16Array(n),o=24,a=oa(i,o/2,r[4]/2),s=2===r[5]?oa(i,(o+r[4])/2):aa(r,Math.ceil((o+r[4])/4));return new la(r[0],r[1],r[2],r[3],a,s)},la=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>qo],t=(t<<Wo)+(e&$o),this.data[t];if(e<=65535)return t=this.index[Vo+(e-55296>>qo)],t=(t<<Wo)+(e&$o),this.data[t];if(e<this.highStart)return t=ta-na+(e>>Ko),t=this.index[t],t+=e>>qo&ia,t=this.index[t],t=(t<<Wo)+(e&$o),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ca="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Aa="undefined"===typeof Uint8Array?[]:new Uint8Array(256),ua=0;ua<ca.length;ua++)Aa[ca.charCodeAt(ua)]=ua;var da,ha=1,pa=2,fa=3,ga=4,ma=5,va=7,ba=8,ya=9,wa=10,xa=11,ka=12,Ca=13,Ba=14,_a=15,Ea=function(e){var t=[],n=0,r=e.length;while(n<r){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320===(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t},Sa=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";var r=[],i=-1,o="";while(++i<n){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},Fa=sa(Do),Ta="×",Ma="÷",Ia=function(e){return Fa.get(e)},Na=function(e,t,n){var r=n-2,i=t[r],o=t[n-1],a=t[n];if(o===pa&&a===fa)return Ta;if(o===pa||o===fa||o===ga)return Ma;if(a===pa||a===fa||a===ga)return Ma;if(o===ba&&-1!==[ba,ya,xa,ka].indexOf(a))return Ta;if((o===xa||o===ya)&&(a===ya||a===wa))return Ta;if((o===ka||o===wa)&&a===wa)return Ta;if(a===Ca||a===ma)return Ta;if(a===va)return Ta;if(o===ha)return Ta;if(o===Ca&&a===Ba){while(i===ma)i=t[--r];if(i===Ba)return Ta}if(o===_a&&a===_a){var s=0;while(i===_a)s++,i=t[--r];if(s%2===0)return Ta}return Ma},Ua=function(e){var t=Ea(e),n=t.length,r=0,i=0,o=t.map(Ia);return{next:function(){if(r>=n)return{done:!0,value:null};var e=Ta;while(r<n&&(e=Na(t,o,++r))===Ta);if(e!==Ta||r===n){var a=Sa.apply(null,t.slice(i,r));return i=r,{value:a,done:!1}}return{done:!0,value:null}}}},La=function(e){var t,n=Ua(e),r=[];while(!(t=n.next()).done)t.value&&r.push(t.value.slice());return r},Qa=function(e){var t=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height=t+"px",r.style.display="block",e.body.appendChild(r),n.selectNode(r);var i=n.getBoundingClientRect(),o=Math.round(i.height);if(e.body.removeChild(r),o===t)return!0}}return!1},Da=function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML="function"===typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,i=c(r.data).map((function(e){return A(e)})),o=0,a={},s=i.every((function(e,t){n.setStart(r,o),n.setEnd(r,o+e.length);var i=n.getBoundingClientRect();o+=e.length;var s=i.x>a.x||i.y>a.y;return a=i,0===t||s}));return e.body.removeChild(t),s},Ha=function(){return"undefined"!==typeof(new Image).crossOrigin},Oa=function(){return"string"===typeof(new XMLHttpRequest).responseType},za=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(Kt){return!1}return!0},Za=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Ra=function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,o=t.toDataURL();i.src=o;var a=Pa(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),qa(a).then((function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var a=e.createElement("div");return a.style.backgroundImage="url("+o+")",a.style.height=n+"px",Za(i)?qa(Pa(n,n,0,0,a)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),Za(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))},Pa=function(e,t,n,r,i){var o="http://www.w3.org/2000/svg",a=document.createElementNS(o,"svg"),s=document.createElementNS(o,"foreignObject");return a.setAttributeNS(null,"width",e.toString()),a.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(s),s.appendChild(i),a},qa=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Ka={get SUPPORT_RANGE_BOUNDS(){var e=Qa(document);return Object.defineProperty(Ka,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Ka.SUPPORT_RANGE_BOUNDS&&Da(document);return Object.defineProperty(Ka,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=za(document);return Object.defineProperty(Ka,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"===typeof Array.from&&"function"===typeof window.fetch?Ra(document):Promise.resolve(!1);return Object.defineProperty(Ka,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Ha();return Object.defineProperty(Ka,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Oa();return Object.defineProperty(Ka,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ka,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"===typeof Intl||!Intl.Segmenter);return Object.defineProperty(Ka,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Wa=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),ja=function(e,t,n,r){var i=Xa(t,n),o=[],s=0;return i.forEach((function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Ka.SUPPORT_RANGE_BOUNDS){var i=Ga(r,s,t.length).getClientRects();if(i.length>1){var l=$a(t),c=0;l.forEach((function(t){o.push(new Wa(t,a.fromDOMRectList(e,Ga(r,c+s,t.length).getClientRects()))),c+=t.length}))}else o.push(new Wa(t,a.fromDOMRectList(e,i)))}else{var A=r.splitText(t.length);o.push(new Wa(t,Va(e,r))),r=A}else Ka.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length})),o},Va=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var o=s(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),o}}return a.EMPTY},Ga=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},$a=function(e){if(Ka.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return La(e)},Ya=function(e,t){if(Ka.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map((function(e){return e.segment}))}return es(e,t)},Xa=function(e,t){return 0!==t.letterSpacing?$a(e):Ya(e,t)},Ja=[32,160,4961,65792,65793,4153,4241],es=function(e,t){var n,r=$e(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],o=function(){if(n.value){var e=n.value.slice(),t=c(e),r="";t.forEach((function(e){-1===Ja.indexOf(e)?r+=A(e):(r.length&&i.push(r),i.push(A(e)),r="")})),r.length&&i.push(r)}};while(!(n=r.next()).done)o();return i},ts=function(){function e(e,t,n){this.text=ns(t.data,n.textTransform),this.textBounds=ja(e,this.text,n,t)}return e}(),ns=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(rs,is);case 2:return e.toUpperCase();default:return e}},rs=/(^|\s|:|-|\(|\))([a-z])/g,is=function(e,t,n){return e.length>0?t+n.toUpperCase():e},os=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t(n,e),n}(Qo),as=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t(n,e),n}(Qo),ss=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,o=s(t,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t(n,e),n}(Qo),ls=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(Qo),cs=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"===typeof n.reversed&&!0===n.reversed,r}return t(n,e),n}(Qo),As=[{type:15,flags:0,unit:"px",number:3}],us=[{type:16,flags:0,number:50}],ds=function(e){return e.width>e.height?new a(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new a(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},hs=function(e){var t=e.type===gs?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t},ps="checkbox",fs="radio",gs="password",ms=707406591,vs=function(e){function n(t,n){var r=e.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=hs(n),r.type!==ps&&r.type!==fs||(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=ds(r.bounds)),r.type){case ps:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=As;break;case fs:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=us;break}return r}return t(n,e),n}(Qo),bs=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||"",r}return t(n,e),n}(Qo),ys=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(Qo),ws=function(e){function n(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=Bs(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?br(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):yr.TRANSPARENT,o=n.contentWindow.document.body?br(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):yr.TRANSPARENT;r.backgroundColor=ur(i)?ur(o)?r.styles.backgroundColor:o:i}}catch(Kt){}return r}return t(n,e),n}(Qo),xs=["OL","UL","MENU"],ks=function(e,t,n,r){for(var i=t.firstChild,o=void 0;i;i=o)if(o=i.nextSibling,Ss(i)&&i.data.trim().length>0)n.textNodes.push(new ts(e,i,n.styles));else if(Fs(i))if(Ws(i)&&i.assignedNodes)i.assignedNodes().forEach((function(t){return ks(e,t,n,r)}));else{var a=Cs(e,i);a.styles.isVisible()&&(_s(i,a,r)?a.flags|=4:Es(a.styles)&&(a.flags|=2),-1!==xs.indexOf(i.tagName)&&(a.flags|=8),n.elements.push(a),i.slot,i.shadowRoot?ks(e,i.shadowRoot,a,r):qs(i)||Qs(i)||Ks(i)||ks(e,i,a,r))}},Cs=function(e,t){return zs(t)?new os(e,t):Hs(t)?new as(e,t):Qs(t)?new ss(e,t):Is(t)?new ls(e,t):Ns(t)?new cs(e,t):Us(t)?new vs(e,t):Ks(t)?new bs(e,t):qs(t)?new ys(e,t):Zs(t)?new ws(e,t):new Qo(e,t)},Bs=function(e,t){var n=Cs(e,t);return n.flags|=4,ks(e,t,n,n),n},_s=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Ds(e)&&n.styles.isTransparent()},Es=function(e){return e.isPositioned()||e.isFloating()},Ss=function(e){return e.nodeType===Node.TEXT_NODE},Fs=function(e){return e.nodeType===Node.ELEMENT_NODE},Ts=function(e){return Fs(e)&&"undefined"!==typeof e.style&&!Ms(e)},Ms=function(e){return"object"===typeof e.className},Is=function(e){return"LI"===e.tagName},Ns=function(e){return"OL"===e.tagName},Us=function(e){return"INPUT"===e.tagName},Ls=function(e){return"HTML"===e.tagName},Qs=function(e){return"svg"===e.tagName},Ds=function(e){return"BODY"===e.tagName},Hs=function(e){return"CANVAS"===e.tagName},Os=function(e){return"VIDEO"===e.tagName},zs=function(e){return"IMG"===e.tagName},Zs=function(e){return"IFRAME"===e.tagName},Rs=function(e){return"STYLE"===e.tagName},Ps=function(e){return"SCRIPT"===e.tagName},qs=function(e){return"TEXTAREA"===e.tagName},Ks=function(e){return"SELECT"===e.tagName},Ws=function(e){return"SLOT"===e.tagName},js=function(e){return e.tagName.indexOf("-")>0},Vs=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)}));var o=[];return i&&r.forEach((function(e){var n=t.counters[e.counter];o.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),o},e}(),Gs={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},$s={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ys={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Xs={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Js=function(e,t,n,r,i,o){return e<t||e>n?dl(e,i,o.length>0):r.integers.reduce((function(t,n,i){while(e>=n)e-=n,t+=r.values[i];return t}),"")+o},el=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},tl=function(e,t,n,r,i){var o=n-t+1;return(e<0?"-":"")+(el(Math.abs(e),o,r,(function(e){return A(Math.floor(e%o)+t)}))+i)},nl=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return el(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},rl=1,il=2,ol=4,al=8,sl=function(e,t,n,r,i,o){if(e<-9999||e>9999)return dl(e,4,i.length>0);var a=Math.abs(e),s=i;if(0===a)return t[0]+s;for(var l=0;a>0&&l<=4;l++){var c=a%10;0===c&&vo(o,rl)&&""!==s?s=t[c]+s:c>1||1===c&&0===l||1===c&&1===l&&vo(o,il)||1===c&&1===l&&vo(o,ol)&&e>100||1===c&&l>1&&vo(o,al)?s=t[c]+(l>0?n[l-1]:"")+s:1===c&&l>0&&(s=n[l-1]+s),a=Math.floor(a/10)}return(e<0?r:"")+s},ll="十百千萬",cl="拾佰仟萬",Al="マイナス",ul="마이너스",dl=function(e,t,n){var r=n?". ":"",i=n?"、":"",o=n?", ":"",a=n?" ":"";switch(t){case 0:return"•"+a;case 1:return"◦"+a;case 2:return"◾"+a;case 5:var s=tl(e,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return nl(e,"〇一二三四五六七八九",i);case 6:return Js(e,1,3999,Gs,3,r).toLowerCase();case 7:return Js(e,1,3999,Gs,3,r);case 8:return tl(e,945,969,!1,r);case 9:return tl(e,97,122,!1,r);case 10:return tl(e,65,90,!1,r);case 11:return tl(e,1632,1641,!0,r);case 12:case 49:return Js(e,1,9999,$s,3,r);case 35:return Js(e,1,9999,$s,3,r).toLowerCase();case 13:return tl(e,2534,2543,!0,r);case 14:case 30:return tl(e,6112,6121,!0,r);case 15:return nl(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return nl(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return sl(e,"零一二三四五六七八九",ll,"負",i,il|ol|al);case 47:return sl(e,"零壹貳參肆伍陸柒捌玖",cl,"負",i,rl|il|ol|al);case 42:return sl(e,"零一二三四五六七八九",ll,"负",i,il|ol|al);case 41:return sl(e,"零壹贰叁肆伍陆柒捌玖",cl,"负",i,rl|il|ol|al);case 26:return sl(e,"〇一二三四五六七八九","十百千万",Al,i,0);case 25:return sl(e,"零壱弐参四伍六七八九","拾百千万",Al,i,rl|il|ol);case 31:return sl(e,"영일이삼사오육칠팔구","십백천만",ul,o,rl|il|ol);case 33:return sl(e,"零一二三四五六七八九","十百千萬",ul,o,0);case 32:return sl(e,"零壹貳參四五六七八九","拾百千",ul,o,rl|il|ol);case 18:return tl(e,2406,2415,!0,r);case 20:return Js(e,1,19999,Xs,3,r);case 21:return tl(e,2790,2799,!0,r);case 22:return tl(e,2662,2671,!0,r);case 22:return Js(e,1,10999,Ys,3,r);case 23:return nl(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return nl(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return tl(e,3302,3311,!0,r);case 28:return nl(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return nl(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return tl(e,3792,3801,!0,r);case 37:return tl(e,6160,6169,!0,r);case 38:return tl(e,4160,4169,!0,r);case 39:return tl(e,2918,2927,!0,r);case 40:return tl(e,1776,1785,!0,r);case 43:return tl(e,3046,3055,!0,r);case 44:return tl(e,3174,3183,!0,r);case 45:return tl(e,3664,3673,!0,r);case 46:return tl(e,3872,3881,!0,r);case 3:default:return tl(e,48,57,!0,r)}},hl="data-html2canvas-ignore",pl=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Vs,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,o=gl(e,t);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var a=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,l=o.contentWindow,c=l.document,A=bl(o).then((function(){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(Cl),l&&(l.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||l.scrollY===t.top&&l.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(l.scrollX-t.left,l.scrollY-t.top,0,0))),e=this.options.onclone,n=this.clonedReferenceElement,"undefined"===typeof n?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,vl(c)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"===typeof e?[2,Promise.resolve().then((function(){return e(c,n)})).then((function(){return o}))]:[2,o]}}))}))}));return c.open(),c.write(xl(document.doctype)+"<html></html>"),kl(this.referenceElement.ownerDocument,a,s),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),A},e.prototype.createElementClone=function(e){if(Lo(e,2),Hs(e))return this.createCanvasClone(e);if(Os(e))return this.createVideoClone(e);if(Rs(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return zs(t)&&(zs(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),js(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return wl(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"===typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(Kt){if(this.context.logger.error("Unable to access cssRules property",Kt),"SecurityError"!==Kt.name)throw Kt}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(Kt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext("2d"),o=r.getContext("2d");if(o)if(!this.options.allowTaint&&i)o.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var a=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(a){var s=a.getContextAttributes();!1===(null===s||void 0===s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return r}catch(Kt){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch(Kt){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){Fs(t)&&(Ps(t)||t.hasAttribute(hl)||"function"===typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Fs(t)&&Rs(t)||e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Fs(i)&&Ws(i)&&"function"===typeof i.assignedNodes){var o=i.assignedNodes();o.length&&o.forEach((function(e){return r.appendChildNode(t,e,n)}))}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(Ss(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&Fs(e)&&(Ts(e)||Ms(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),a=n.getComputedStyle(e,":after");this.referenceElement===e&&Ts(r)&&(this.clonedReferenceElement=r),Ds(r)&&Tl(r);var s=this.counters.parse(new Mo(this.context,i)),l=this.resolvePseudoContent(e,r,o,da.BEFORE);js(e)&&(t=!0),Os(e)||this.cloneChildNodes(e,r,t),l&&r.insertBefore(l,r.firstChild);var c=this.resolvePseudoContent(e,r,a,da.AFTER);return c&&r.appendChild(c),this.counters.pop(s),(i&&(this.options.copyStyles||Ms(e))&&!Zs(e)||t)&&wl(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(qs(e)||Ks(e))&&(qs(r)||Ks(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var o=n.content,a=t.ownerDocument;if(a&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==n.display){this.counters.parse(new Mo(this.context,n));var s=new To(this.context,n),l=a.createElement("html2canvaspseudoelement");wl(n,l),s.content.forEach((function(t){if(0===t.type)l.appendChild(a.createTextNode(t.value));else if(22===t.type){var n=a.createElement("img");n.src=t.value,n.style.opacity="1",l.appendChild(n)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(Zn);r.length&&l.appendChild(a.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(Kn),c=o[0],A=o[1];if(c&&Zn(c)){var u=i.counters.getCounterValue(c.value),d=A&&Zn(A)?Li.parse(i.context,A.value):3;l.appendChild(a.createTextNode(dl(u,d,!1)))}}else if("counters"===t.name){var h=t.values.filter(Kn),p=(c=h[0],h[1]);A=h[2];if(c&&Zn(c)){var f=i.counters.getCounterValues(c.value),g=A&&Zn(A)?Li.parse(i.context,A.value):3,m=p&&0===p.type?p.value:"",v=f.map((function(e){return dl(e,g,!1)})).join(m);l.appendChild(a.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(a.createTextNode(Co(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(Co(s.quotes,--i.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(t.value))}})),l.className=El+" "+Sl;var c=r===da.BEFORE?" "+El:" "+Sl;return Ms(t)?t.className.baseValue+=c:t.className+=c,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();(function(e){e[e["BEFORE"]=0]="BEFORE",e[e["AFTER"]=1]="AFTER"})(da||(da={}));var fl,gl=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(hl,"true"),e.body.appendChild(n),n},ml=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},vl=function(e){return Promise.all([].slice.call(e.images,0).map(ml))},bl=function(e){return new Promise((function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))}),50)}}))},yl=["all","d","content"],wl=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);-1===yl.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},xl=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},kl=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},Cl=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},Bl=":before",_l=":after",El="___html2canvas___pseudoelement_before",Sl="___html2canvas___pseudoelement_after",Fl='{\n content: "" !important;\n display: none !important;\n}',Tl=function(e){Ml(e,"."+El+Bl+Fl+"\n ."+Sl+_l+Fl)},Ml=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},Il=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Nl=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:zl(e)||Dl(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:return t=Il.isSameOrigin(e),n=!Hl(e)&&!0===this._options.useCORS&&Ka.SUPPORT_CORS_IMAGES&&!t,r=!Hl(e)&&!t&&!zl(e)&&"string"===typeof this._options.proxy&&Ka.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||Hl(e)||zl(e)||r||n?(o=e,r?[4,this.proxy(o)]:[3,2]):[2];case 1:o=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Ol(o)||n)&&(r.crossOrigin="anonymous"),r.src=o,!0===r.complete&&setTimeout((function(){return e(r)}),500),a._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")}),a._options.imageTimeout)}))];case 3:return[2,i.sent()]}}))}))},e.prototype.has=function(e){return"undefined"!==typeof this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(i,o){var a=Ka.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===a)i(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return i(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(s.response)}else o("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=o;var l=n.indexOf("?")>-1?"&":"?";if(s.open("GET",""+n+l+"url="+encodeURIComponent(e)+"&responseType="+a),"text"!==a&&s instanceof XMLHttpRequest&&(s.responseType=a),t._options.imageTimeout){var c=t._options.imageTimeout;s.timeout=c,s.ontimeout=function(){return o("Timed out ("+c+"ms) proxying "+r)}}s.send()}))},e}(),Ul=/^data:image\/svg\+xml/i,Ll=/^data:image\/.*;base64,/i,Ql=/^data:image\/.*/i,Dl=function(e){return Ka.SUPPORT_SVG_DRAWING||!Zl(e)},Hl=function(e){return Ql.test(e)},Ol=function(e){return Ll.test(e)},zl=function(e){return"blob"===e.substr(0,4)},Zl=function(e){return"svg"===e.substr(-3).toLowerCase()||Ul.test(e)},Rl=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Pl=function(e,t,n){return new Rl(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},ql=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Pl(this.start,this.startControl,t),i=Pl(this.startControl,this.endControl,t),o=Pl(this.endControl,this.end,t),a=Pl(r,i,t),s=Pl(i,o,t),l=Pl(a,s,t);return n?new e(this.start,r,a,l):new e(l,s,o,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Kl=function(e){return 1===e.type},Wl=function(){function e(e){var t=e.styles,n=e.bounds,r=er(t.borderTopLeftRadius,n.width,n.height),i=r[0],o=r[1],a=er(t.borderTopRightRadius,n.width,n.height),s=a[0],l=a[1],c=er(t.borderBottomRightRadius,n.width,n.height),A=c[0],u=c[1],d=er(t.borderBottomLeftRadius,n.width,n.height),h=d[0],p=d[1],f=[];f.push((i+s)/n.width),f.push((h+A)/n.width),f.push((o+p)/n.height),f.push((l+u)/n.height);var g=Math.max.apply(Math,f);g>1&&(i/=g,o/=g,s/=g,l/=g,A/=g,u/=g,h/=g,p/=g);var m=n.width-s,v=n.height-u,b=n.width-A,y=n.height-p,w=t.borderTopWidth,x=t.borderRightWidth,k=t.borderBottomWidth,C=t.borderLeftWidth,B=tr(t.paddingTop,e.bounds.width),_=tr(t.paddingRight,e.bounds.width),E=tr(t.paddingBottom,e.bounds.width),S=tr(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?jl(n.left+C/3,n.top+w/3,i-C/3,o-w/3,fl.TOP_LEFT):new Rl(n.left+C/3,n.top+w/3),this.topRightBorderDoubleOuterBox=i>0||o>0?jl(n.left+m,n.top+w/3,s-x/3,l-w/3,fl.TOP_RIGHT):new Rl(n.left+n.width-x/3,n.top+w/3),this.bottomRightBorderDoubleOuterBox=A>0||u>0?jl(n.left+b,n.top+v,A-x/3,u-k/3,fl.BOTTOM_RIGHT):new Rl(n.left+n.width-x/3,n.top+n.height-k/3),this.bottomLeftBorderDoubleOuterBox=h>0||p>0?jl(n.left+C/3,n.top+y,h-C/3,p-k/3,fl.BOTTOM_LEFT):new Rl(n.left+C/3,n.top+n.height-k/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?jl(n.left+2*C/3,n.top+2*w/3,i-2*C/3,o-2*w/3,fl.TOP_LEFT):new Rl(n.left+2*C/3,n.top+2*w/3),this.topRightBorderDoubleInnerBox=i>0||o>0?jl(n.left+m,n.top+2*w/3,s-2*x/3,l-2*w/3,fl.TOP_RIGHT):new Rl(n.left+n.width-2*x/3,n.top+2*w/3),this.bottomRightBorderDoubleInnerBox=A>0||u>0?jl(n.left+b,n.top+v,A-2*x/3,u-2*k/3,fl.BOTTOM_RIGHT):new Rl(n.left+n.width-2*x/3,n.top+n.height-2*k/3),this.bottomLeftBorderDoubleInnerBox=h>0||p>0?jl(n.left+2*C/3,n.top+y,h-2*C/3,p-2*k/3,fl.BOTTOM_LEFT):new Rl(n.left+2*C/3,n.top+n.height-2*k/3),this.topLeftBorderStroke=i>0||o>0?jl(n.left+C/2,n.top+w/2,i-C/2,o-w/2,fl.TOP_LEFT):new Rl(n.left+C/2,n.top+w/2),this.topRightBorderStroke=i>0||o>0?jl(n.left+m,n.top+w/2,s-x/2,l-w/2,fl.TOP_RIGHT):new Rl(n.left+n.width-x/2,n.top+w/2),this.bottomRightBorderStroke=A>0||u>0?jl(n.left+b,n.top+v,A-x/2,u-k/2,fl.BOTTOM_RIGHT):new Rl(n.left+n.width-x/2,n.top+n.height-k/2),this.bottomLeftBorderStroke=h>0||p>0?jl(n.left+C/2,n.top+y,h-C/2,p-k/2,fl.BOTTOM_LEFT):new Rl(n.left+C/2,n.top+n.height-k/2),this.topLeftBorderBox=i>0||o>0?jl(n.left,n.top,i,o,fl.TOP_LEFT):new Rl(n.left,n.top),this.topRightBorderBox=s>0||l>0?jl(n.left+m,n.top,s,l,fl.TOP_RIGHT):new Rl(n.left+n.width,n.top),this.bottomRightBorderBox=A>0||u>0?jl(n.left+b,n.top+v,A,u,fl.BOTTOM_RIGHT):new Rl(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=h>0||p>0?jl(n.left,n.top+y,h,p,fl.BOTTOM_LEFT):new Rl(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||o>0?jl(n.left+C,n.top+w,Math.max(0,i-C),Math.max(0,o-w),fl.TOP_LEFT):new Rl(n.left+C,n.top+w),this.topRightPaddingBox=s>0||l>0?jl(n.left+Math.min(m,n.width-x),n.top+w,m>n.width+x?0:Math.max(0,s-x),Math.max(0,l-w),fl.TOP_RIGHT):new Rl(n.left+n.width-x,n.top+w),this.bottomRightPaddingBox=A>0||u>0?jl(n.left+Math.min(b,n.width-C),n.top+Math.min(v,n.height-k),Math.max(0,A-x),Math.max(0,u-k),fl.BOTTOM_RIGHT):new Rl(n.left+n.width-x,n.top+n.height-k),this.bottomLeftPaddingBox=h>0||p>0?jl(n.left+C,n.top+Math.min(y,n.height-k),Math.max(0,h-C),Math.max(0,p-k),fl.BOTTOM_LEFT):new Rl(n.left+C,n.top+n.height-k),this.topLeftContentBox=i>0||o>0?jl(n.left+C+S,n.top+w+B,Math.max(0,i-(C+S)),Math.max(0,o-(w+B)),fl.TOP_LEFT):new Rl(n.left+C+S,n.top+w+B),this.topRightContentBox=s>0||l>0?jl(n.left+Math.min(m,n.width+C+S),n.top+w+B,m>n.width+C+S?0:s-C+S,l-(w+B),fl.TOP_RIGHT):new Rl(n.left+n.width-(x+_),n.top+w+B),this.bottomRightContentBox=A>0||u>0?jl(n.left+Math.min(b,n.width-(C+S)),n.top+Math.min(v,n.height+w+B),Math.max(0,A-(x+_)),u-(k+E),fl.BOTTOM_RIGHT):new Rl(n.left+n.width-(x+_),n.top+n.height-(k+E)),this.bottomLeftContentBox=h>0||p>0?jl(n.left+C+S,n.top+y,Math.max(0,h-(C+S)),p-(k+E),fl.BOTTOM_LEFT):new Rl(n.left+C+S,n.top+n.height-(k+E))}return e}();(function(e){e[e["TOP_LEFT"]=0]="TOP_LEFT",e[e["TOP_RIGHT"]=1]="TOP_RIGHT",e[e["BOTTOM_RIGHT"]=2]="BOTTOM_RIGHT",e[e["BOTTOM_LEFT"]=3]="BOTTOM_LEFT"})(fl||(fl={}));var jl=function(e,t,n,r,i){var o=(Math.sqrt(2)-1)/3*4,a=n*o,s=r*o,l=e+n,c=t+r;switch(i){case fl.TOP_LEFT:return new ql(new Rl(e,c),new Rl(e,c-s),new Rl(l-a,t),new Rl(l,t));case fl.TOP_RIGHT:return new ql(new Rl(e,t),new Rl(e+a,t),new Rl(l,c-s),new Rl(l,c));case fl.BOTTOM_RIGHT:return new ql(new Rl(l,t),new Rl(l,t+s),new Rl(e+a,c),new Rl(e,c));case fl.BOTTOM_LEFT:default:return new ql(new Rl(l,c),new Rl(l-a,c),new Rl(e,t+s),new Rl(e,t))}},Vl=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Gl=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},$l=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Yl=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),Xl=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Jl=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),ec=function(e){return 0===e.type},tc=function(e){return 1===e.type},nc=function(e){return 2===e.type},rc=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},ic=function(e,t,n,r,i){return e.map((function(e,o){switch(o){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e}))},oc=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),ac=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Wl(this.container),this.container.styles.opacity<1&&this.effects.push(new Jl(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Yl(n,r,i))}if(0!==this.container.styles.overflowX){var o=Vl(this.curves),a=$l(this.curves);rc(o,a)?this.effects.push(new Xl(o,6)):(this.effects.push(new Xl(o,2)),this.effects.push(new Xl(a,4)))}}return e.prototype.getEffects=function(e){var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);while(n){var i=n.effects.filter((function(e){return!tc(e)}));if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var o=Vl(n.curves),a=$l(n.curves);rc(o,a)||r.unshift(new Xl(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter((function(t){return vo(t.target,e)}))},e}(),sc=function(e,t,n,r){e.container.elements.forEach((function(i){var o=vo(i.flags,4),a=vo(i.flags,2),s=new ac(i,e);vo(i.styles.display,2048)&&r.push(s);var l=vo(i.flags,8)?[]:r;if(o||a){var c=o||i.styles.isPositioned()?n:t,A=new oc(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;c.negativeZIndex.some((function(e,t){return u>e.element.container.styles.zIndex.order?(d=t,!1):d>0})),c.negativeZIndex.splice(d,0,A)}else if(u>0){var h=0;c.positiveZIndex.some((function(e,t){return u>=e.element.container.styles.zIndex.order?(h=t+1,!1):h>0})),c.positiveZIndex.splice(h,0,A)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(A)}else i.styles.isFloating()?c.nonPositionedFloats.push(A):c.nonPositionedInlineLevel.push(A);sc(s,A,o?A:n,l)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),sc(s,t,n,l);vo(i.flags,8)&&lc(i,l)}))},lc=function(e,t){for(var n=e instanceof cs?e.start:1,r=e instanceof cs&&e.reversed,i=0;i<t.length;i++){var o=t[i];o.container instanceof ls&&"number"===typeof o.container.value&&0!==o.container.value&&(n=o.container.value),o.listValue=dl(n,o.container.styles.listStyleType,!0),n+=r?-1:1}},cc=function(e){var t=new ac(e,null),n=new oc(t),r=[];return sc(t,n,n,r),lc(t.container,r),n},Ac=function(e,t){switch(t){case 0:return fc(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return fc(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return fc(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return fc(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},uc=function(e,t){switch(t){case 0:return fc(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return fc(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return fc(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return fc(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},dc=function(e,t){switch(t){case 0:return fc(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return fc(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return fc(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return fc(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},hc=function(e,t){switch(t){case 0:return pc(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return pc(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return pc(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return pc(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},pc=function(e,t){var n=[];return Kl(e)?n.push(e.subdivide(.5,!1)):n.push(e),Kl(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},fc=function(e,t,n,r){var i=[];return Kl(e)?i.push(e.subdivide(.5,!1)):i.push(e),Kl(n)?i.push(n.subdivide(.5,!0)):i.push(n),Kl(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Kl(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},gc=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},mc=function(e){var t=e.styles,n=e.bounds,r=tr(t.paddingLeft,n.width),i=tr(t.paddingRight,n.width),o=tr(t.paddingTop,n.width),a=tr(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,o+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+o+a))},vc=function(e,t){return 0===e?t.bounds:2===e?mc(t):gc(t)},bc=function(e,t){return 0===e?t.bounds:2===e?mc(t):gc(t)},yc=function(e,t,n){var r=vc(Cc(e.styles.backgroundOrigin,t),e),i=bc(Cc(e.styles.backgroundClip,t),e),o=kc(Cc(e.styles.backgroundSize,t),n,r),a=o[0],s=o[1],l=er(Cc(e.styles.backgroundPosition,t),r.width-a,r.height-s),c=Bc(Cc(e.styles.backgroundRepeat,t),l,o,r,i),A=Math.round(r.left+l[0]),u=Math.round(r.top+l[1]);return[c,A,u,a,s]},wc=function(e){return Zn(e)&&e.value===jr.AUTO},xc=function(e){return"number"===typeof e},kc=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1];if(!a)return[0,0];if(Gn(a)&&s&&Gn(s))return[tr(a,n.width),tr(s,n.height)];var l=xc(o);if(Zn(a)&&(a.value===jr.CONTAIN||a.value===jr.COVER)){if(xc(o)){var c=n.width/n.height;return c<o!==(a.value===jr.COVER)?[n.width,n.width/o]:[n.height*o,n.height]}return[n.width,n.height]}var A=xc(r),u=xc(i),d=A||u;if(wc(a)&&(!s||wc(s))){if(A&&u)return[r,i];if(!l&&!d)return[n.width,n.height];if(d&&l){var h=A?r:i*o,p=u?i:r/o;return[h,p]}var f=A?r:n.width,g=u?i:n.height;return[f,g]}if(l){var m=0,v=0;return Gn(a)?m=tr(a,n.width):Gn(s)&&(v=tr(s,n.height)),wc(a)?m=v*o:s&&!wc(s)||(v=m/o),[m,v]}var b=null,y=null;if(Gn(a)?b=tr(a,n.width):s&&Gn(s)&&(y=tr(s,n.height)),null===b||s&&!wc(s)||(y=A&&u?b/r*i:n.height),null!==y&&wc(a)&&(b=A&&u?y/i*r:n.width),null!==b&&null!==y)return[b,y];throw new Error("Unable to calculate background-size for element")},Cc=function(e,t){var n=e[t];return"undefined"===typeof n?e[0]:n},Bc=function(e,t,n,r,i){var o=t[0],a=t[1],s=n[0],l=n[1];switch(e){case 2:return[new Rl(Math.round(r.left),Math.round(r.top+a)),new Rl(Math.round(r.left+r.width),Math.round(r.top+a)),new Rl(Math.round(r.left+r.width),Math.round(l+r.top+a)),new Rl(Math.round(r.left),Math.round(l+r.top+a))];case 3:return[new Rl(Math.round(r.left+o),Math.round(r.top)),new Rl(Math.round(r.left+o+s),Math.round(r.top)),new Rl(Math.round(r.left+o+s),Math.round(r.height+r.top)),new Rl(Math.round(r.left+o),Math.round(r.height+r.top))];case 1:return[new Rl(Math.round(r.left+o),Math.round(r.top+a)),new Rl(Math.round(r.left+o+s),Math.round(r.top+a)),new Rl(Math.round(r.left+o+s),Math.round(r.top+a+l)),new Rl(Math.round(r.left+o),Math.round(r.top+a+l))];default:return[new Rl(Math.round(i.left),Math.round(i.top)),new Rl(Math.round(i.left+i.width),Math.round(i.top)),new Rl(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Rl(Math.round(i.left),Math.round(i.height+i.top))]}},_c="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ec="Hidden Text",Sc=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),r.src=_c,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Ec)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(Ec)),n.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:a,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return"undefined"===typeof this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),Fc=function(){function e(e,t){this.context=e,this.options=t}return e}(),Tc=1e4,Mc=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new Sc(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return t(n,e),n.prototype.applyEffects=function(e){var t=this;while(this._activeEffects.length)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},n.prototype.applyEffect=function(e){this.ctx.save(),nc(e)&&(this.ctx.globalAlpha=e.opacity),ec(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),tc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},n.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},n.prototype.renderStack=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},n.prototype.renderNode=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return vo(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},n.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;if(0===t)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=$a(e.text);i.reduce((function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width}),e.bounds.left)}},n.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=Qc(e.fontFamily).join(", "),r=On(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},n.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,l,c,A,u=this;return i(this,(function(i){return n=this.createFontStyle(t),r=n[0],o=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,a),l=s.baseline,c=s.middle,A=t.paintOrder,e.textBounds.forEach((function(e){A.forEach((function(n){switch(n){case 0:u.ctx.fillStyle=dr(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,l);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(n){u.ctx.shadowColor=dr(n.color),u.ctx.shadowOffsetX=n.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=n.offsetY.number*u.options.scale,u.ctx.shadowBlur=n.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,l)})),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=dr(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+l),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+c),e.bounds.width,1);break}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=dr(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+l)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}}))})),[2]}))}))},n.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=mc(e),i=$l(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,(function(){var t,r,o,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,o=t.styles,s=0,l=t.textNodes,i.label=1;case 1:return s<l.length?(c=l[s],[4,this.renderTextNode(c,o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof os))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return b=i.sent(),this.renderReplacedElement(t,r,b),[3,8];case 7:return i.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof as&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof ss))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return b=i.sent(),this.renderReplacedElement(t,r,b),[3,12];case 11:return i.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof ws&&t.tree?(A=new n(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,A.render(t.tree)]):[3,14];case 13:u=i.sent(),t.width&&t.height&&this.ctx.drawImage(u,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof vs&&(d=Math.min(t.bounds.width,t.bounds.height),t.type===ps?t.checked&&(this.ctx.save(),this.path([new Rl(t.bounds.left+.39363*d,t.bounds.top+.79*d),new Rl(t.bounds.left+.16*d,t.bounds.top+.5549*d),new Rl(t.bounds.left+.27347*d,t.bounds.top+.44071*d),new Rl(t.bounds.left+.39694*d,t.bounds.top+.5649*d),new Rl(t.bounds.left+.72983*d,t.bounds.top+.23*d),new Rl(t.bounds.left+.84*d,t.bounds.top+.34085*d),new Rl(t.bounds.left+.39363*d,t.bounds.top+.79*d)]),this.ctx.fillStyle=dr(ms),this.ctx.fill(),this.ctx.restore()):t.type===fs&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+d/2,t.bounds.top+d/2,d/4,0,2*Math.PI,!0),this.ctx.fillStyle=dr(ms),this.ctx.fill(),this.ctx.restore())),Ic(t)&&t.value.length){switch(h=this.createFontStyle(o),w=h[0],p=h[1],f=this.fontMetrics.getMetrics(w,p).baseline,this.ctx.font=w,this.ctx.fillStyle=dr(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Uc(t.styles.textAlign),x=mc(t),g=0,t.styles.textAlign){case 1:g+=x.width/2;break;case 2:g+=x.width;break}m=x.add(g,0,0,-x.height/2+1),this.ctx.save(),this.path([new Rl(x.left,x.top),new Rl(x.left+x.width,x.top),new Rl(x.left+x.width,x.top+x.height),new Rl(x.left,x.top+x.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Wa(t.value,m),o.letterSpacing,f),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vo(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(v=t.styles.listStyleImage,0!==v.type)return[3,18];b=void 0,y=v.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return b=i.sent(),this.ctx.drawImage(b,t.bounds.left-(b.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(w=this.createFontStyle(o)[0],this.ctx.font=w,this.ctx.fillStyle=dr(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",x=new a(t.bounds.left,t.bounds.top+tr(t.styles.paddingTop,t.bounds.width),t.bounds.width,Ii(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Wa(e.listValue,x),o.letterSpacing,Ii(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}}))}))},n.prototype.renderStackContent=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,l,c,A,u,d,h,p,f,g;return i(this,(function(i){switch(i.label){case 0:return vo(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(g=n[t],[4,this.renderStack(g)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),r=0,o=e.nonInlineLevel,i.label=7;case 7:return r<o.length?(g=o[r],[4,this.renderNode(g)]):[3,10];case 8:i.sent(),i.label=9;case 9:return r++,[3,7];case 10:a=0,s=e.nonPositionedFloats,i.label=11;case 11:return a<s.length?(g=s[a],[4,this.renderStack(g)]):[3,14];case 12:i.sent(),i.label=13;case 13:return a++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,i.label=15;case 15:return l<c.length?(g=c[l],[4,this.renderStack(g)]):[3,18];case 16:i.sent(),i.label=17;case 17:return l++,[3,15];case 18:A=0,u=e.inlineLevel,i.label=19;case 19:return A<u.length?(g=u[A],[4,this.renderNode(g)]):[3,22];case 20:i.sent(),i.label=21;case 21:return A++,[3,19];case 22:d=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return d<h.length?(g=h[d],[4,this.renderStack(g)]):[3,26];case 24:i.sent(),i.label=25;case 25:return d++,[3,23];case 26:p=0,f=e.positiveZIndex,i.label=27;case 27:return p<f.length?(g=f[p],[4,this.renderStack(g)]):[3,30];case 28:i.sent(),i.label=29;case 29:return p++,[3,27];case 30:return[2]}}))}))},n.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},n.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},n.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=Kl(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),Kl(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},n.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},n.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document,o=i.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,n),o},n.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s;return i(this,(function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var o,a,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_,E,S,F,T,M,I,N,U,L;return i(this,(function(i){switch(i.label){case 0:if(0!==n.type)return[3,5];o=void 0,a=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return o=i.sent(),[3,4];case 3:return i.sent(),r.context.logger.error("Error loading background-image "+a),[3,4];case 4:return o&&(s=yc(e,t,[o.width,o.height,o.width/o.height]),y=s[0],_=s[1],E=s[2],k=s[3],C=s[4],v=r.ctx.createPattern(r.resizeImage(o,k,C),"repeat"),r.renderRepeat(y,v,_,E)),[3,6];case 5:Pr(n)?(l=yc(e,t,[null,null,null]),y=l[0],_=l[1],E=l[2],k=l[3],C=l[4],c=_r(n.angle,k,C),A=c[0],u=c[1],d=c[2],h=c[3],p=c[4],f=document.createElement("canvas"),f.width=k,f.height=C,g=f.getContext("2d"),m=g.createLinearGradient(u,h,d,p),Cr(n.stops,A).forEach((function(e){return m.addColorStop(e.stop,dr(e.color))})),g.fillStyle=m,g.fillRect(0,0,k,C),k>0&&C>0&&(v=r.ctx.createPattern(f,"repeat"),r.renderRepeat(y,v,_,E))):qr(n)&&(b=yc(e,t,[null,null,null]),y=b[0],w=b[1],x=b[2],k=b[3],C=b[4],B=0===n.position.length?[Xn]:n.position,_=tr(B[0],k),E=tr(B[B.length-1],C),S=Fr(n,_,E,k,C),F=S[0],T=S[1],F>0&&T>0&&(M=r.ctx.createRadialGradient(w+_,x+E,0,w+_,x+E,F),Cr(n.stops,2*F).forEach((function(e){return M.addColorStop(e.stop,dr(e.color))})),r.path(y),r.ctx.fillStyle=M,F!==T?(I=e.bounds.left+.5*e.bounds.width,N=e.bounds.top+.5*e.bounds.height,U=T/F,L=1/U,r.ctx.save(),r.ctx.translate(I,N),r.ctx.transform(1,0,0,U,0,0),r.ctx.translate(-I,-N),r.ctx.fillRect(w,L*(x-N)+N,k,C*L),r.ctx.restore()):r.ctx.fill())),i.label=6;case 6:return t--,[2]}}))},r=this,o=0,a=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return o<a.length?(s=a[o],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))},n.prototype.renderSolidBorder=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){return this.path(Ac(n,t)),this.ctx.fillStyle=dr(e),this.ctx.fill(),[2]}))}))},n.prototype.renderDoubleBorder=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,o)]:[3,2];case 1:return i.sent(),[2];case 2:return r=uc(o,n),this.path(r),this.ctx.fillStyle=dr(e),this.ctx.fill(),a=dc(o,n),this.path(a),this.ctx.fill(),[2]}}))}))},n.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,l,c,A=this;return i(this,(function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!ur(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],o=Nc(Cc(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),ur(t.backgroundColor)||(this.ctx.fillStyle=dr(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){A.ctx.save();var n=Vl(e.curves),r=t.inset?0:Tc,i=ic(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(A.path(n),A.ctx.clip(),A.mask(i)):(A.mask(n),A.ctx.clip(),A.path(i)),A.ctx.shadowOffsetX=t.offsetX.number+r,A.ctx.shadowOffsetY=t.offsetY.number,A.ctx.shadowColor=dr(t.color),A.ctx.shadowBlur=t.blur.number,A.ctx.fillStyle=t.inset?dr(t.color):"rgba(0,0,0,1)",A.ctx.fill(),A.ctx.restore()})),i.label=2;case 2:a=0,s=0,l=r,i.label=3;case 3:return s<l.length?(c=l[s],0!==c.style&&!ur(c.color)&&c.width>0?2!==c.style?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==c.style?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==c.style?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:i.sent(),i.label=11;case 11:a++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w;return i(this,(function(i){return this.ctx.save(),r=hc(o,n),s=Ac(o,n),2===a&&(this.path(s),this.ctx.clip()),Kl(s[0])?(l=s[0].start.x,c=s[0].start.y):(l=s[0].x,c=s[0].y),Kl(s[1])?(A=s[1].end.x,u=s[1].end.y):(A=s[1].x,u=s[1].y),d=0===n||2===n?Math.abs(l-A):Math.abs(c-u),this.ctx.beginPath(),3===a?this.formatPath(r):this.formatPath(s.slice(0,2)),h=t<3?3*t:2*t,p=t<3?2*t:t,3===a&&(h=t,p=t),f=!0,d<=2*h?f=!1:d<=2*h+p?(g=d/(2*h+p),h*=g,p*=g):(m=Math.floor((d+p)/(h+p)),v=(d-m*h)/(m-1),b=(d-(m+1)*h)/m,p=b<=0||Math.abs(p-v)<Math.abs(p-b)?v:b),f&&(3===a?this.ctx.setLineDash([0,h+p]):this.ctx.setLineDash([h,p])),3===a?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=dr(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===a&&(Kl(s[0])&&(y=s[3],w=s[0],this.ctx.beginPath(),this.formatPath([new Rl(y.end.x,y.end.y),new Rl(w.start.x,w.start.y)]),this.ctx.stroke()),Kl(s[1])&&(y=s[1],w=s[2],this.ctx.beginPath(),this.formatPath([new Rl(y.end.x,y.end.y),new Rl(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=dr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=cc(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}}))}))},n}(Fc),Ic=function(e){return e instanceof ys||(e instanceof bs||e instanceof vs&&e.type!==fs&&e.type!==ps)},Nc=function(e,t){switch(e){case 0:return Vl(t);case 2:return Gl(t);case 1:default:return $l(t)}},Uc=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Lc=["-apple-system","system-ui"],Qc=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===Lc.indexOf(e)})):e},Dc=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return t(n,e),n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=Pa(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Hc(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=dr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},n}(Fc),Hc=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Oc=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.debug?console.debug.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!==typeof window&&window.console&&"function"===typeof console.info&&console.info.apply(console,o([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.warn?console.warn.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!==typeof window&&window.console&&"function"===typeof console.error?console.error.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),zc=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new Oc({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new Nl(this,t)}return e.instanceCount=1,e}(),Zc=function(e,t){return void 0===t&&(t={}),Rc(e,t)};"undefined"!==typeof window&&Il.setContext(window);var Rc=function(e,t){return r(void 0,void 0,void 0,(function(){var r,o,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_,E,S,F,T,M,I,N,U,L,Q,D,H,O,z,Z,R,P,q,K;return i(this,(function(i){switch(i.label){case 0:if(!e||"object"!==typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(r=e.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(o=r.defaultView,!o)throw new Error("Document is not attached to a Window");return c={allowTaint:null!==(F=t.allowTaint)&&void 0!==F&&F,imageTimeout:null!==(T=t.imageTimeout)&&void 0!==T?T:15e3,proxy:t.proxy,useCORS:null!==(M=t.useCORS)&&void 0!==M&&M},A=n({logging:null===(I=t.logging)||void 0===I||I,cache:t.cache},c),u={windowWidth:null!==(N=t.windowWidth)&&void 0!==N?N:o.innerWidth,windowHeight:null!==(U=t.windowHeight)&&void 0!==U?U:o.innerHeight,scrollX:null!==(L=t.scrollX)&&void 0!==L?L:o.pageXOffset,scrollY:null!==(Q=t.scrollY)&&void 0!==Q?Q:o.pageYOffset},d=new a(u.scrollX,u.scrollY,u.windowWidth,u.windowHeight),h=new zc(A,d),p=null!==(D=t.foreignObjectRendering)&&void 0!==D&&D,f={allowTaint:null!==(H=t.allowTaint)&&void 0!==H&&H,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:p,copyStyles:p},h.logger.debug("Starting document clone with size "+d.width+"x"+d.height+" scrolled to "+-d.left+","+-d.top),g=new pl(h,e,f),m=g.clonedReferenceElement,m?[4,g.toIFrame(r,d)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return v=i.sent(),b=Ds(m)||Ls(m)?l(m.ownerDocument):s(h,m),y=b.width,w=b.height,x=b.left,k=b.top,C=Pc(h,m,t.backgroundColor),B={canvas:t.canvas,backgroundColor:C,scale:null!==(z=null!==(O=t.scale)&&void 0!==O?O:o.devicePixelRatio)&&void 0!==z?z:1,x:(null!==(Z=t.x)&&void 0!==Z?Z:0)+x,y:(null!==(R=t.y)&&void 0!==R?R:0)+k,width:null!==(P=t.width)&&void 0!==P?P:Math.ceil(y),height:null!==(q=t.height)&&void 0!==q?q:Math.ceil(w)},p?(h.logger.debug("Document cloned, using foreign object rendering"),S=new Dc(h,B),[4,S.render(m)]):[3,3];case 2:return _=i.sent(),[3,5];case 3:return h.logger.debug("Document cloned, element located at "+x+","+k+" with size "+y+"x"+w+" using computed rendering"),h.logger.debug("Starting DOM parsing"),E=Bs(h,m),C===E.styles.backgroundColor&&(E.styles.backgroundColor=yr.TRANSPARENT),h.logger.debug("Starting renderer for element at "+B.x+","+B.y+" with size "+B.width+"x"+B.height),S=new Mc(h,B),[4,S.render(E)];case 4:_=i.sent(),i.label=5;case 5:return(null===(K=t.removeContainer)||void 0===K||K)&&(pl.destroy(v)||h.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),h.logger.debug("Finished rendering"),[2,_]}}))}))},Pc=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?br(e,getComputedStyle(r.documentElement).backgroundColor):yr.TRANSPARENT,o=r.body?br(e,getComputedStyle(r.body).backgroundColor):yr.TRANSPARENT,a="string"===typeof n?br(e,n):null===n?yr.TRANSPARENT:4294967295;return t===r.documentElement?ur(i)?ur(o)?a:o:i:a};return Zc}))},87538:function(e,t){"use strict";for(var n="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),r={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},i={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:n?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},o={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},a=1;a<20;a++)o["f"+a]=111+a;function s(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return A(e,t)})),i=function(e){return r.some((function(t){return u(t,e)}))},o=null==n?i:i(n);return o}function l(e,t){return s(e,t)}function c(e,t){return s(e,{byKey:!0},t)}function A(e,t){var n=t&&t.byKey,a={};e=e.replace("++","+add");var s=e.split("+"),l=s.length;for(var c in r)a[r[c]]=!1;var A=!0,u=!1,p=void 0;try{for(var f,g=s[Symbol.iterator]();!(A=(f=g.next()).done);A=!0){var m=f.value,v=m.endsWith("?")&&m.length>1;v&&(m=m.slice(0,-1));var b=h(m),y=r[b];if(m.length>1&&!y&&!i[m]&&!o[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==l&&y||(n?a.key=b:a.which=d(m)),y&&(a[y]=!v||null)}}catch(w){u=!0,p=w}finally{try{!A&&g.return&&g.return()}finally{if(u)throw p}}return a}function u(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&(i="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n],(null!=i||!1!==r)&&i!==r))return!1}return!0}function d(e){e=h(e);var t=o[e]||e.toUpperCase().charCodeAt(0);return t}function h(e){return e=e.toLowerCase(),e=i[e]||e,e}t.ZP=s,t.P6=s},29662:function(e,t,n){n(57658),function(t){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o="all",a={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},s={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(e){return s[e]||e.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)s["f"+n]=111+n;function A(e,t){var n=e.length;while(n--)if(e[n]===t)return n;return-1}function u(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var d={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function h(e){for(n in i)i[n]=e[d[n]]}function p(e){var t,n,o,s,l,u;if(t=e.keyCode,-1==A(c,t)&&c.push(t),93!=t&&224!=t||(t=91),t in i)for(o in i[t]=!0,a)a[o]==t&&(m[o]=!0);else if(h(e),m.filter.call(this,e)&&t in r)for(u=k(),s=0;s<r[t].length;s++)if(n=r[t][s],n.scope==u||"all"==n.scope){for(o in l=n.mods.length>0,i)(!i[o]&&A(n.mods,+o)>-1||i[o]&&-1==A(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(e,n)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function f(e){var t,n=e.keyCode,r=A(c,n);if(r>=0&&c.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(t in i[n]=!1,a)a[t]==n&&(m[t]=!1)}function g(){for(n in i)i[n]=!1;for(n in a)m[n]=!1}function m(e,t,n){var i,o;i=B(e),void 0===n&&(n=t,t="all");for(var a=0;a<i.length;a++)o=[],e=i[a].split("+"),e.length>1&&(o=_(e),e=[e[e.length-1]]),e=e[0],e=l(e),e in r||(r[e]=[]),r[e].push({shortcut:i[a],scope:t,method:n,key:i[a],mods:o})}function v(e,t){var n,i,o,a,s,c=[];for(n=B(e),a=0;a<n.length;a++){if(i=n[a].split("+"),i.length>1&&(c=_(i),e=i[i.length-1]),e=l(e),void 0===t&&(t=k()),!r[e])return;for(o=0;o<r[e].length;o++)s=r[e][o],s.scope===t&&u(s.mods,c)&&(r[e][o]={})}}function b(e){return"string"==typeof e&&(e=l(e)),-1!=A(c,e)}function y(){return c.slice(0)}function w(e){var t=(e.target||e.srcElement).tagName;return!("INPUT"==t||"SELECT"==t||"TEXTAREA"==t)}for(n in a)m[n]=!1;function x(e){o=e||"all"}function k(){return o||"all"}function C(e){var t,n,i;for(t in r)for(n=r[t],i=0;i<n.length;)n[i].scope===e?n.splice(i,1):i++}function B(e){var t;return e=e.replace(/\s/g,""),t=e.split(","),""==t[t.length-1]&&(t[t.length-2]+=","),t}function _(e){for(var t=e.slice(0,e.length-1),n=0;n<t.length;n++)t[n]=a[t[n]];return t}function E(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,(function(){n(window.event)}))}E(document,"keydown",(function(e){p(e)})),E(document,"keyup",f),E(window,"focus",g);var S=t.key;function F(){var e=t.key;return t.key=S,e}t.key=m,t.key.setScope=x,t.key.getScope=k,t.key.deleteScope=C,t.key.filter=w,t.key.isPressed=b,t.key.getPressedKeyCodes=y,t.key.noConflict=F,t.key.unbind=v,e.exports=m}(this)},58919:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===i(e)}function a(e){return"[object Object]"===i(e)}function s(e){return"[object RegExp]"===i(e)}function l(e){return"[object Function]"===i(e)}function c(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}n(57658);var A={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function u(e){return Object.keys(e||{}).reduce((function(e,t){return e||A.hasOwnProperty(t)}),!1)}var d={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",p="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function f(e){e.__index__=-1,e.__text_cache__=""}function g(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function m(){return function(e,t){t.normalize(e)}}function v(e){var t=e.re=n(78215)(e.__opts__),r=e.__tlds__.slice();function i(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(h),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");var A=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,a(n))return s(n.validate)?r.validate=g(n.validate):l(n.validate)?r.validate=n.validate:u(t,n),void(l(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=m());o(n)?A.push(t):u(t,n)}})),A.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:m()};var d=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(c).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><]|"+t.src_ZPCc+"))("+d+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><]|"+t.src_ZPCc+"))("+d+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),f(e)}function b(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function y(e,t){var n=new b(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function w(e,t){if(!(this instanceof w))return new w(e,t);t||u(e)&&(t=e,e={}),this.__opts__=r({},A,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},d,e),this.__compiled__={},this.__tlds__=p,this.__tlds_replaced__=!1,this.re={},v(this)}w.prototype.add=function(e,t){return this.__schemas__[e]=t,v(this),this},w.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},w.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,l,c;if(this.re.schema_test.test(e)){s=this.re.schema_search,s.lastIndex=0;while(null!==(t=s.exec(e)))if(i=this.testSchemaAt(e,t[2],s.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},w.prototype.pretest=function(e){return this.re.pretest.test(e)},w.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},w.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(y(this,t)),t=this.__last_index__);var r=t?e.slice(t):e;while(this.test(r))n.push(y(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},w.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,y(this,0)):null},w.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),v(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,v(this),this)},w.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},w.prototype.onCompile=function(){},e.exports=w},78215:function(e,t,n){"use strict";e.exports=function(e){var t={};e=e||{},t.src_Any=n(25580).source,t.src_Cc=n(22321).source,t.src_Z=n(56259).source,t.src_P=n(33031).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+t.src_ZPCc+"))((?![$+<=>^`|])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+t.src_ZPCc+"))((?![$+<=>^`|])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},72573:function(e,t,n){var r=n(16213),i=n(69159),o=r(i,"DataView");e.exports=o},45623:function(e,t,n){var r=n(53301),i=n(3992),o=n(92762),a=n(3584),s=n(15745);function l(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype["delete"]=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},25094:function(e,t,n){var r=n(14209),i=n(96326),o=n(64697),a=n(50556),s=n(12405);function l(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype["delete"]=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},19014:function(e,t,n){var r=n(16213),i=n(69159),o=r(i,"Map");e.exports=o},58082:function(e,t,n){var r=n(41052),i=n(99240),o=n(68843),a=n(80027),s=n(19154);function l(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype["delete"]=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},90809:function(e,t,n){var r=n(16213),i=n(69159),o=r(i,"Promise");e.exports=o},41611:function(e,t,n){var r=n(16213),i=n(69159),o=r(i,"Set");e.exports=o},26355:function(e,t,n){n(57658);var r=n(58082),i=n(70868),o=n(98451);function a(e){var t=-1,n=null==e?0:e.length;this.__data__=new r;while(++t<n)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},4614:function(e,t,n){var r=n(25094),i=n(846),o=n(91353),a=n(42334),s=n(70252),l=n(81538);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype["delete"]=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},99016:function(e,t,n){var r=n(69159),i=r.Symbol;e.exports=i},86522:function(e,t,n){var r=n(69159),i=r.Uint8Array;e.exports=i},43147:function(e,t,n){var r=n(16213),i=n(69159),o=r(i,"WeakMap");e.exports=o},29707:function(e){function t(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=t},32383:function(e){function t(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(!1===t(e[n],n,e))break;return e}e.exports=t},74802:function(e){function t(e,t){var n=-1,r=null==e?0:e.length,i=0,o=[];while(++n<r){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}e.exports=t},7498:function(e,t,n){n(57658);var r=n(52802),i=n(68804),o=n(26602),a=n(21976),s=n(38286),l=n(56965),c=Object.prototype,A=c.hasOwnProperty;function u(e,t){var n=o(e),c=!n&&i(e),u=!n&&!c&&a(e),d=!n&&!c&&!u&&l(e),h=n||c||u||d,p=h?r(e.length,String):[],f=p.length;for(var g in e)!t&&!A.call(e,g)||h&&("length"==g||u&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,f))||p.push(g);return p}e.exports=u},58664:function(e){function t(e,t){var n=-1,r=null==e?0:e.length,i=Array(r);while(++n<r)i[n]=t(e[n],n,e);return i}e.exports=t},78196:function(e){function t(e,t){var n=-1,r=t.length,i=e.length;while(++n<r)e[i+n]=t[n];return e}e.exports=t},55043:function(e){function t(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(t(e[n],n,e))return!0;return!1}e.exports=t},55234:function(e,t,n){var r=n(53883),i=n(64240);function o(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}e.exports=o},61767:function(e,t,n){var r=n(53883),i=n(64240),o=Object.prototype,a=o.hasOwnProperty;function s(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}e.exports=s},46637:function(e,t,n){var r=n(64240);function i(e,t){var n=e.length;while(n--)if(r(e[n][0],t))return n;return-1}e.exports=i},5640:function(e,t,n){var r=n(66877),i=n(24337);function o(e,t){return e&&r(t,i(t),e)}e.exports=o},60494:function(e,t,n){var r=n(66877),i=n(74494);function o(e,t){return e&&r(t,i(t),e)}e.exports=o},53883:function(e,t,n){var r=n(26105);function i(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}e.exports=i},77912:function(e){function t(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}e.exports=t},39746:function(e,t,n){var r=n(4614),i=n(32383),o=n(61767),a=n(5640),s=n(60494),l=n(9097),c=n(61548),A=n(33446),u=n(69376),d=n(64823),h=n(50592),p=n(30453),f=n(3035),g=n(60243),m=n(68895),v=n(26602),b=n(21976),y=n(35458),w=n(70150),x=n(2792),k=n(24337),C=n(74494),B=1,_=2,E=4,S="[object Arguments]",F="[object Array]",T="[object Boolean]",M="[object Date]",I="[object Error]",N="[object Function]",U="[object GeneratorFunction]",L="[object Map]",Q="[object Number]",D="[object Object]",H="[object RegExp]",O="[object Set]",z="[object String]",Z="[object Symbol]",R="[object WeakMap]",P="[object ArrayBuffer]",q="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",j="[object Int8Array]",V="[object Int16Array]",G="[object Int32Array]",$="[object Uint8Array]",Y="[object Uint8ClampedArray]",X="[object Uint16Array]",J="[object Uint32Array]",ee={};function te(e,t,n,F,T,M){var I,L=t&B,Q=t&_,H=t&E;if(n&&(I=T?n(e,F,T,M):n(e)),void 0!==I)return I;if(!w(e))return e;var O=v(e);if(O){if(I=f(e),!L)return c(e,I)}else{var z=p(e),Z=z==N||z==U;if(b(e))return l(e,L);if(z==D||z==S||Z&&!T){if(I=Q||Z?{}:m(e),!L)return Q?u(e,s(I,e)):A(e,a(I,e))}else{if(!ee[z])return T?e:{};I=g(e,z,L)}}M||(M=new r);var R=M.get(e);if(R)return R;M.set(e,I),x(e)?e.forEach((function(r){I.add(te(r,t,n,r,e,M))})):y(e)&&e.forEach((function(r,i){I.set(i,te(r,t,n,i,e,M))}));var P=H?Q?h:d:Q?C:k,q=O?void 0:P(e);return i(q||e,(function(r,i){q&&(i=r,r=e[i]),o(I,i,te(r,t,n,i,e,M))})),I}ee[S]=ee[F]=ee[P]=ee[q]=ee[T]=ee[M]=ee[K]=ee[W]=ee[j]=ee[V]=ee[G]=ee[L]=ee[Q]=ee[D]=ee[H]=ee[O]=ee[z]=ee[Z]=ee[$]=ee[Y]=ee[X]=ee[J]=!0,ee[I]=ee[N]=ee[R]=!1,e.exports=te},21262:function(e,t,n){var r=n(70150),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},22659:function(e){function t(e,t,n,r){var i=e.length,o=n+(r?1:-1);while(r?o--:++o<i)if(t(e[o],o,e))return o;return-1}e.exports=t},24251:function(e,t,n){var r=n(78196),i=n(25150);function o(e,t,n,a,s){var l=-1,c=e.length;n||(n=i),s||(s=[]);while(++l<c){var A=e[l];t>0&&n(A)?t>1?o(A,t-1,n,a,s):r(s,A):a||(s[s.length]=A)}return s}e.exports=o},94427:function(e,t,n){var r=n(1686),i=r();e.exports=i},77727:function(e,t,n){var r=n(5299),i=n(88952);function o(e,t){t=r(t,e);var n=0,o=t.length;while(null!=e&&n<o)e=e[i(t[n++])];return n&&n==o?e:void 0}e.exports=o},16699:function(e,t,n){var r=n(78196),i=n(26602);function o(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}e.exports=o},96423:function(e,t,n){var r=n(99016),i=n(52366),o=n(52886),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;function c(e){return null==e?void 0===e?s:a:l&&l in Object(e)?i(e):o(e)}e.exports=c},95281:function(e){function t(e,t){return null!=e&&t in Object(e)}e.exports=t},29986:function(e,t,n){var r=n(96423),i=n(74430),o="[object Arguments]";function a(e){return i(e)&&r(e)==o}e.exports=a},43409:function(e,t,n){var r=n(20941),i=n(74430);function o(e,t,n,a,s){return e===t||(null==e||null==t||!i(e)&&!i(t)?e!==e&&t!==t:r(e,t,n,a,o,s))}e.exports=o},20941:function(e,t,n){var r=n(4614),i=n(30475),o=n(34673),a=n(86472),s=n(30453),l=n(26602),c=n(21976),A=n(56965),u=1,d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype,g=f.hasOwnProperty;function m(e,t,n,f,m,v){var b=l(e),y=l(t),w=b?h:s(e),x=y?h:s(t);w=w==d?p:w,x=x==d?p:x;var k=w==p,C=x==p,B=w==x;if(B&&c(e)){if(!c(t))return!1;b=!0,k=!1}if(B&&!k)return v||(v=new r),b||A(e)?i(e,t,n,f,m,v):o(e,t,w,n,f,m,v);if(!(n&u)){var _=k&&g.call(e,"__wrapped__"),E=C&&g.call(t,"__wrapped__");if(_||E){var S=_?e.value():e,F=E?t.value():t;return v||(v=new r),m(S,F,n,f,v)}}return!!B&&(v||(v=new r),a(e,t,n,f,m,v))}e.exports=m},96889:function(e,t,n){var r=n(30453),i=n(74430),o="[object Map]";function a(e){return i(e)&&r(e)==o}e.exports=a},31955:function(e,t,n){var r=n(4614),i=n(43409),o=1,a=2;function s(e,t,n,s){var l=n.length,c=l,A=!s;if(null==e)return!c;e=Object(e);while(l--){var u=n[l];if(A&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}while(++l<c){u=n[l];var d=u[0],h=e[d],p=u[1];if(A&&u[2]){if(void 0===h&&!(d in e))return!1}else{var f=new r;if(s)var g=s(h,p,d,e,t,f);if(!(void 0===g?i(p,h,o|a,s,f):g))return!1}}return!0}e.exports=s},36853:function(e,t,n){var r=n(59314),i=n(22604),o=n(70150),a=n(30627),s=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,A=Object.prototype,u=c.toString,d=A.hasOwnProperty,h=RegExp("^"+u.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(e){if(!o(e)||i(e))return!1;var t=r(e)?h:l;return t.test(a(e))}e.exports=p},51665:function(e,t,n){var r=n(30453),i=n(74430),o="[object Set]";function a(e){return i(e)&&r(e)==o}e.exports=a},86930:function(e,t,n){var r=n(96423),i=n(84629),o=n(74430),a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",A="[object Error]",u="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object RegExp]",g="[object Set]",m="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",C="[object Int16Array]",B="[object Int32Array]",_="[object Uint8Array]",E="[object Uint8ClampedArray]",S="[object Uint16Array]",F="[object Uint32Array]",T={};function M(e){return o(e)&&i(e.length)&&!!T[r(e)]}T[w]=T[x]=T[k]=T[C]=T[B]=T[_]=T[E]=T[S]=T[F]=!0,T[a]=T[s]=T[b]=T[l]=T[y]=T[c]=T[A]=T[u]=T[d]=T[h]=T[p]=T[f]=T[g]=T[m]=T[v]=!1,e.exports=M},23615:function(e,t,n){var r=n(40851),i=n(73611),o=n(59761),a=n(26602),s=n(52322);function l(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}e.exports=l},841:function(e,t,n){n(57658);var r=n(9192),i=n(47348),o=Object.prototype,a=o.hasOwnProperty;function s(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}e.exports=s},86101:function(e,t,n){n(57658);var r=n(70150),i=n(9192),o=n(15083),a=Object.prototype,s=a.hasOwnProperty;function l(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}e.exports=l},40851:function(e,t,n){var r=n(31955),i=n(14167),o=n(78497);function a(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}e.exports=a},73611:function(e,t,n){var r=n(43409),i=n(15309),o=n(28208),a=n(9020),s=n(9769),l=n(78497),c=n(88952),A=1,u=2;function d(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,A|u)}}e.exports=d},41720:function(e,t,n){var r=n(4614),i=n(55234),o=n(94427),a=n(39661),s=n(70150),l=n(74494),c=n(76334);function A(e,t,n,u,d){e!==t&&o(t,(function(o,l){if(d||(d=new r),s(o))a(e,t,l,n,A,u,d);else{var h=u?u(c(e,l),o,l+"",e,t,d):void 0;void 0===h&&(h=o),i(e,l,h)}}),l)}e.exports=A},39661:function(e,t,n){var r=n(55234),i=n(9097),o=n(12385),a=n(61548),s=n(68895),l=n(68804),c=n(26602),A=n(88306),u=n(21976),d=n(59314),h=n(70150),p=n(71012),f=n(56965),g=n(76334),m=n(55791);function v(e,t,n,v,b,y,w){var x=g(e,n),k=g(t,n),C=w.get(k);if(C)r(e,n,C);else{var B=y?y(x,k,n+"",e,t,w):void 0,_=void 0===B;if(_){var E=c(k),S=!E&&u(k),F=!E&&!S&&f(k);B=k,E||S||F?c(x)?B=x:A(x)?B=a(x):S?(_=!1,B=i(k,!0)):F?(_=!1,B=o(k,!0)):B=[]:p(k)||l(k)?(B=x,l(x)?B=m(x):h(x)&&!d(x)||(B=s(k))):_=!1}_&&(w.set(k,B),b(B,k,v,y,w),w["delete"](k)),r(e,n,B)}}e.exports=v},28638:function(e){function t(e){return function(t){return null==t?void 0:t[e]}}e.exports=t},4568:function(e,t,n){var r=n(77727);function i(e){return function(t){return r(t,e)}}e.exports=i},87628:function(e,t,n){var r=n(59761),i=n(2187),o=n(24396);function a(e,t){return o(i(e,t,r),e+"")}e.exports=a},48795:function(e,t,n){var r=n(59483),i=n(26105),o=n(59761),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},90433:function(e){function t(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;var o=Array(i);while(++r<i)o[r]=e[r+t];return o}e.exports=t},52802:function(e){function t(e,t){var n=-1,r=Array(e);while(++n<e)r[n]=t(n);return r}e.exports=t},13973:function(e,t,n){var r=n(99016),i=n(58664),o=n(26602),a=n(17691),s=1/0,l=r?r.prototype:void 0,c=l?l.toString:void 0;function A(e){if("string"==typeof e)return e;if(o(e))return i(e,A)+"";if(a(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}e.exports=A},66009:function(e,t,n){var r=n(71626),i=/^\s+/;function o(e){return e?e.slice(0,r(e)+1).replace(i,""):e}e.exports=o},87362:function(e){function t(e){return function(t){return e(t)}}e.exports=t},36890:function(e,t,n){var r=n(5299),i=n(491),o=n(71819),a=n(88952);function s(e,t){return t=r(t,e),e=o(e,t),null==e||delete e[a(i(t))]}e.exports=s},64274:function(e){function t(e,t){return e.has(t)}e.exports=t},5299:function(e,t,n){var r=n(26602),i=n(9020),o=n(45946),a=n(59459);function s(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}e.exports=s},52635:function(e,t,n){var r=n(86522);function i(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}e.exports=i},9097:function(e,t,n){e=n.nmd(e);var r=n(69159),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(e,t){if(t)return e.slice();var n=e.length,r=l?l(n):new e.constructor(n);return e.copy(r),r}e.exports=c},79459:function(e,t,n){var r=n(52635);function i(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}e.exports=i},33284:function(e){var t=/\w*$/;function n(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}e.exports=n},51142:function(e,t,n){var r=n(99016),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;function a(e){return o?Object(o.call(e)):{}}e.exports=a},12385:function(e,t,n){var r=n(52635);function i(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}e.exports=i},61548:function(e){function t(e,t){var n=-1,r=e.length;t||(t=Array(r));while(++n<r)t[n]=e[n];return t}e.exports=t},66877:function(e,t,n){var r=n(61767),i=n(53883);function o(e,t,n,o){var a=!n;n||(n={});var s=-1,l=t.length;while(++s<l){var c=t[s],A=o?o(n[c],e[c],c,n,e):void 0;void 0===A&&(A=e[c]),a?i(n,c,A):r(n,c,A)}return n}e.exports=o},33446:function(e,t,n){var r=n(66877),i=n(81165);function o(e,t){return r(e,i(e),t)}e.exports=o},69376:function(e,t,n){var r=n(66877),i=n(65170);function o(e,t){return r(e,i(e),t)}e.exports=o},69749:function(e,t,n){var r=n(69159),i=r["__core-js_shared__"];e.exports=i},65882:function(e,t,n){var r=n(87628),i=n(15875);function o(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);while(++r<o){var l=n[r];l&&e(t,l,r,a)}return t}))}e.exports=o},1686:function(e){function t(e){return function(t,n,r){var i=-1,o=Object(t),a=r(t),s=a.length;while(s--){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}e.exports=t},27962:function(e,t,n){var r=n(71012);function i(e){return r(e)?void 0:e}e.exports=i},26105:function(e,t,n){var r=n(16213),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},30475:function(e,t,n){n(57658);var r=n(26355),i=n(55043),o=n(64274),a=1,s=2;function l(e,t,n,l,c,A){var u=n&a,d=e.length,h=t.length;if(d!=h&&!(u&&h>d))return!1;var p=A.get(e),f=A.get(t);if(p&&f)return p==t&&f==e;var g=-1,m=!0,v=n&s?new r:void 0;A.set(e,t),A.set(t,e);while(++g<d){var b=e[g],y=t[g];if(l)var w=u?l(y,b,g,t,e,A):l(b,y,g,e,t,A);if(void 0!==w){if(w)continue;m=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(b===e||c(b,e,n,l,A)))return v.push(t)}))){m=!1;break}}else if(b!==y&&!c(b,y,n,l,A)){m=!1;break}}return A["delete"](e),A["delete"](t),m}e.exports=l},34673:function(e,t,n){var r=n(99016),i=n(86522),o=n(64240),a=n(30475),s=n(27317),l=n(46804),c=1,A=2,u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Map]",f="[object Number]",g="[object RegExp]",m="[object Set]",v="[object String]",b="[object Symbol]",y="[object ArrayBuffer]",w="[object DataView]",x=r?r.prototype:void 0,k=x?x.valueOf:void 0;function C(e,t,n,r,x,C,B){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!C(new i(e),new i(t)));case u:case d:case f:return o(+e,+t);case h:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+"";case p:var _=s;case m:var E=r&c;if(_||(_=l),e.size!=t.size&&!E)return!1;var S=B.get(e);if(S)return S==t;r|=A,B.set(e,t);var F=a(_(e),_(t),r,x,C,B);return B["delete"](e),F;case b:if(k)return k.call(e)==k.call(t)}return!1}e.exports=C},86472:function(e,t,n){var r=n(64823),i=1,o=Object.prototype,a=o.hasOwnProperty;function s(e,t,n,o,s,l){var c=n&i,A=r(e),u=A.length,d=r(t),h=d.length;if(u!=h&&!c)return!1;var p=u;while(p--){var f=A[p];if(!(c?f in t:a.call(t,f)))return!1}var g=l.get(e),m=l.get(t);if(g&&m)return g==t&&m==e;var v=!0;l.set(e,t),l.set(t,e);var b=c;while(++p<u){f=A[p];var y=e[f],w=t[f];if(o)var x=c?o(w,y,f,t,e,l):o(y,w,f,e,t,l);if(!(void 0===x?y===w||s(y,w,n,o,l):x)){v=!1;break}b||(b="constructor"==f)}if(v&&!b){var k=e.constructor,C=t.constructor;k==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof C&&C instanceof C||(v=!1)}return l["delete"](e),l["delete"](t),v}e.exports=s},1443:function(e,t,n){var r=n(92453),i=n(2187),o=n(24396);function a(e){return o(i(e,void 0,r),e+"")}e.exports=a},791:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},64823:function(e,t,n){var r=n(16699),i=n(81165),o=n(24337);function a(e){return r(e,o,i)}e.exports=a},50592:function(e,t,n){var r=n(16699),i=n(65170),o=n(74494);function a(e){return r(e,o,i)}e.exports=a},93582:function(e,t,n){var r=n(75462);function i(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}e.exports=i},14167:function(e,t,n){var r=n(9769),i=n(24337);function o(e){var t=i(e),n=t.length;while(n--){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}e.exports=o},16213:function(e,t,n){var r=n(36853),i=n(38474);function o(e,t){var n=i(e,t);return r(n)?n:void 0}e.exports=o},94677:function(e,t,n){var r=n(31867),i=r(Object.getPrototypeOf,Object);e.exports=i},52366:function(e,t,n){var r=n(99016),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;function l(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}e.exports=l},81165:function(e,t,n){var r=n(74802),i=n(13538),o=Object.prototype,a=o.propertyIsEnumerable,s=Object.getOwnPropertySymbols,l=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return a.call(e,t)})))}:i;e.exports=l},65170:function(e,t,n){var r=n(78196),i=n(94677),o=n(81165),a=n(13538),s=Object.getOwnPropertySymbols,l=s?function(e){var t=[];while(e)r(t,o(e)),e=i(e);return t}:a;e.exports=l},30453:function(e,t,n){var r=n(72573),i=n(19014),o=n(90809),a=n(41611),s=n(43147),l=n(96423),c=n(30627),A="[object Map]",u="[object Object]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=c(r),m=c(i),v=c(o),b=c(a),y=c(s),w=l;(r&&w(new r(new ArrayBuffer(1)))!=f||i&&w(new i)!=A||o&&w(o.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=p)&&(w=function(e){var t=l(e),n=t==u?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return f;case m:return A;case v:return d;case b:return h;case y:return p}return t}),e.exports=w},38474:function(e){function t(e,t){return null==e?void 0:e[t]}e.exports=t},32240:function(e,t,n){var r=n(5299),i=n(68804),o=n(26602),a=n(38286),s=n(84629),l=n(88952);function c(e,t,n){t=r(t,e);var c=-1,A=t.length,u=!1;while(++c<A){var d=l(t[c]);if(!(u=null!=e&&n(e,d)))break;e=e[d]}return u||++c!=A?u:(A=null==e?0:e.length,!!A&&s(A)&&a(d,A)&&(o(e)||i(e)))}e.exports=c},53301:function(e,t,n){var r=n(90988);function i(){this.__data__=r?r(null):{},this.size=0}e.exports=i},3992:function(e){function t(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=t},92762:function(e,t,n){var r=n(90988),i="__lodash_hash_undefined__",o=Object.prototype,a=o.hasOwnProperty;function s(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return a.call(t,e)?t[e]:void 0}e.exports=s},3584:function(e,t,n){var r=n(90988),i=Object.prototype,o=i.hasOwnProperty;function a(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}e.exports=a},15745:function(e,t,n){var r=n(90988),i="__lodash_hash_undefined__";function o(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}e.exports=o},3035:function(e){var t=Object.prototype,n=t.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}e.exports=r},60243:function(e,t,n){var r=n(52635),i=n(79459),o=n(33284),a=n(51142),s=n(12385),l="[object Boolean]",c="[object Date]",A="[object Map]",u="[object Number]",d="[object RegExp]",h="[object Set]",p="[object String]",f="[object Symbol]",g="[object ArrayBuffer]",m="[object DataView]",v="[object Float32Array]",b="[object Float64Array]",y="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",k="[object Uint8Array]",C="[object Uint8ClampedArray]",B="[object Uint16Array]",_="[object Uint32Array]";function E(e,t,n){var E=e.constructor;switch(t){case g:return r(e);case l:case c:return new E(+e);case m:return i(e,n);case v:case b:case y:case w:case x:case k:case C:case B:case _:return s(e,n);case A:return new E;case u:case p:return new E(e);case d:return o(e);case h:return new E;case f:return a(e)}}e.exports=E},68895:function(e,t,n){var r=n(21262),i=n(94677),o=n(9192);function a(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}e.exports=a},25150:function(e,t,n){var r=n(99016),i=n(68804),o=n(26602),a=r?r.isConcatSpreadable:void 0;function s(e){return o(e)||i(e)||!!(a&&e&&e[a])}e.exports=s},38286:function(e){var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function r(e,r){var i=typeof e;return r=null==r?t:r,!!r&&("number"==i||"symbol"!=i&&n.test(e))&&e>-1&&e%1==0&&e<r}e.exports=r},15875:function(e,t,n){var r=n(64240),i=n(45372),o=n(38286),a=n(70150);function s(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}e.exports=s},9020:function(e,t,n){var r=n(26602),i=n(17691),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function s(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}e.exports=s},75462:function(e){function t(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=t},22604:function(e,t,n){var r=n(69749),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function o(e){return!!i&&i in e}e.exports=o},9192:function(e){var t=Object.prototype;function n(e){var n=e&&e.constructor,r="function"==typeof n&&n.prototype||t;return e===r}e.exports=n},9769:function(e,t,n){var r=n(70150);function i(e){return e===e&&!r(e)}e.exports=i},14209:function(e){function t(){this.__data__=[],this.size=0}e.exports=t},96326:function(e,t,n){var r=n(46637),i=Array.prototype,o=i.splice;function a(e){var t=this.__data__,n=r(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():o.call(t,n,1),--this.size,!0}e.exports=a},64697:function(e,t,n){var r=n(46637);function i(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}e.exports=i},50556:function(e,t,n){var r=n(46637);function i(e){return r(this.__data__,e)>-1}e.exports=i},12405:function(e,t,n){n(57658);var r=n(46637);function i(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}e.exports=i},41052:function(e,t,n){var r=n(45623),i=n(25094),o=n(19014);function a(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}e.exports=a},99240:function(e,t,n){var r=n(93582);function i(e){var t=r(this,e)["delete"](e);return this.size-=t?1:0,t}e.exports=i},68843:function(e,t,n){var r=n(93582);function i(e){return r(this,e).get(e)}e.exports=i},80027:function(e,t,n){var r=n(93582);function i(e){return r(this,e).has(e)}e.exports=i},19154:function(e,t,n){var r=n(93582);function i(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}e.exports=i},27317:function(e){function t(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}e.exports=t},78497:function(e){function t(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=t},94541:function(e,t,n){var r=n(36564),i=500;function o(e){var t=r(e,(function(e){return n.size===i&&n.clear(),e})),n=t.cache;return t}e.exports=o},90988:function(e,t,n){var r=n(16213),i=r(Object,"create");e.exports=i},47348:function(e,t,n){var r=n(31867),i=r(Object.keys,Object);e.exports=i},15083:function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}n(57658),e.exports=r},71330:function(e,t,n){e=n.nmd(e);var r=n(791),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a&&r.process,l=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=l},52886:function(e){var t=Object.prototype,n=t.toString;function r(e){return n.call(e)}e.exports=r},31867:function(e){function t(e,t){return function(n){return e(t(n))}}e.exports=t},2187:function(e,t,n){var r=n(29707),i=Math.max;function o(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);while(++a<s)l[a]=o[t+a];a=-1;var c=Array(t+1);while(++a<t)c[a]=o[a];return c[t]=n(l),r(e,this,c)}}e.exports=o},71819:function(e,t,n){var r=n(77727),i=n(90433);function o(e,t){return t.length<2?e:r(e,i(t,0,-1))}e.exports=o},69159:function(e,t,n){var r=n(791),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},76334:function(e){function t(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}e.exports=t},70868:function(e){var t="__lodash_hash_undefined__";function n(e){return this.__data__.set(e,t),this}e.exports=n},98451:function(e){function t(e){return this.__data__.has(e)}e.exports=t},46804:function(e){function t(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}e.exports=t},24396:function(e,t,n){var r=n(48795),i=n(2499),o=i(r);e.exports=o},2499:function(e){var t=800,n=16,r=Date.now;function i(e){var i=0,o=0;return function(){var a=r(),s=n-(a-o);if(o=a,s>0){if(++i>=t)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}e.exports=i},846:function(e,t,n){var r=n(25094);function i(){this.__data__=new r,this.size=0}e.exports=i},91353:function(e){function t(e){var t=this.__data__,n=t["delete"](e);return this.size=t.size,n}e.exports=t},42334:function(e){function t(e){return this.__data__.get(e)}e.exports=t},70252:function(e){function t(e){return this.__data__.has(e)}e.exports=t},81538:function(e,t,n){n(57658);var r=n(25094),i=n(19014),o=n(58082),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<a-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}e.exports=s},45946:function(e,t,n){n(57658);var r=n(94541),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},88952:function(e,t,n){var r=n(17691),i=1/0;function o(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}e.exports=o},30627:function(e){var t=Function.prototype,n=t.toString;function r(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}e.exports=r},71626:function(e){var t=/\s/;function n(e){var n=e.length;while(n--&&t.test(e.charAt(n)));return n}e.exports=n},66281:function(e,t,n){var r=n(39746),i=1,o=4;function a(e){return r(e,i|o)}e.exports=a},59483:function(e){function t(e){return function(){return e}}e.exports=t},73738:function(e,t,n){var r=n(70150),i=n(14705),o=n(62012),a="Expected a function",s=Math.max,l=Math.min;function c(e,t,n){var c,A,u,d,h,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError(a);function b(t){var n=c,r=A;return c=A=void 0,f=t,d=e.apply(r,n),d}function y(e){return f=e,h=setTimeout(k,t),g?b(e):d}function w(e){var n=e-p,r=e-f,i=t-n;return m?l(i,u-r):i}function x(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||m&&r>=u}function k(){var e=i();if(x(e))return C(e);h=setTimeout(k,w(e))}function C(e){return h=void 0,v&&c?b(e):(c=A=void 0,d)}function B(){void 0!==h&&clearTimeout(h),f=0,c=p=A=h=void 0}function _(){return void 0===h?d:C(i())}function E(){var e=i(),n=x(e);if(c=arguments,A=this,p=e,n){if(void 0===h)return y(p);if(m)return clearTimeout(h),h=setTimeout(k,t),b(p)}return void 0===h&&(h=setTimeout(k,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,m="maxWait"in n,u=m?s(o(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),E.cancel=B,E.flush=_,E}e.exports=c},64240:function(e){function t(e,t){return e===t||e!==e&&t!==t}e.exports=t},62568:function(e,t,n){var r=n(22659),i=n(23615),o=n(85949),a=Math.max,s=Math.min;function l(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var c=l-1;return void 0!==n&&(c=o(n),c=n<0?a(l+c,0):s(c,l-1)),r(e,i(t,3),c,!0)}e.exports=l},92453:function(e,t,n){var r=n(24251);function i(e){var t=null==e?0:e.length;return t?r(e,1):[]}e.exports=i},15309:function(e,t,n){var r=n(77727);function i(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}e.exports=i},28208:function(e,t,n){var r=n(95281),i=n(32240);function o(e,t){return null!=e&&i(e,t,r)}e.exports=o},59761:function(e){function t(e){return e}e.exports=t},68804:function(e,t,n){var r=n(29986),i=n(74430),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},26602:function(e){var t=Array.isArray;e.exports=t},45372:function(e,t,n){var r=n(59314),i=n(84629);function o(e){return null!=e&&i(e.length)&&!r(e)}e.exports=o},88306:function(e,t,n){var r=n(45372),i=n(74430);function o(e){return i(e)&&r(e)}e.exports=o},21976:function(e,t,n){e=n.nmd(e);var r=n(69159),i=n(22225),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,A=c||i;e.exports=A},91148:function(e,t,n){var r=n(43409);function i(e,t){return r(e,t)}e.exports=i},59314:function(e,t,n){var r=n(96423),i=n(70150),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Proxy]";function c(e){if(!i(e))return!1;var t=r(e);return t==a||t==s||t==o||t==l}e.exports=c},77898:function(e,t,n){var r=n(85949);function i(e){return"number"==typeof e&&e==r(e)}e.exports=i},84629:function(e){var t=9007199254740991;function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}e.exports=n},35458:function(e,t,n){var r=n(96889),i=n(87362),o=n(71330),a=o&&o.isMap,s=a?i(a):r;e.exports=s},70150:function(e){function t(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=t},74430:function(e){function t(e){return null!=e&&"object"==typeof e}e.exports=t},71012:function(e,t,n){var r=n(96423),i=n(94677),o=n(74430),a="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,A=l.hasOwnProperty,u=c.call(Object);function d(e){if(!o(e)||r(e)!=a)return!1;var t=i(e);if(null===t)return!0;var n=A.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}e.exports=d},2792:function(e,t,n){var r=n(51665),i=n(87362),o=n(71330),a=o&&o.isSet,s=a?i(a):r;e.exports=s},17691:function(e,t,n){var r=n(96423),i=n(74430),o="[object Symbol]";function a(e){return"symbol"==typeof e||i(e)&&r(e)==o}e.exports=a},56965:function(e,t,n){var r=n(86930),i=n(87362),o=n(71330),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},24337:function(e,t,n){var r=n(7498),i=n(841),o=n(45372);function a(e){return o(e)?r(e):i(e)}e.exports=a},74494:function(e,t,n){var r=n(7498),i=n(86101),o=n(45372);function a(e){return o(e)?r(e,!0):i(e)}e.exports=a},491:function(e){function t(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=t},74806:function(e,t,n){var r;e=n.nmd(e),n(57658),function(){var i,o="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",A="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,p=2,f=4,g=1,m=2,v=1,b=2,y=4,w=8,x=16,k=32,C=64,B=128,_=256,E=512,S=30,F="...",T=800,M=16,I=1,N=2,U=3,L=1/0,Q=9007199254740991,D=17976931348623157e292,H=NaN,O=4294967295,z=O-1,Z=O>>>1,R=[["ary",B],["bind",v],["bindKey",b],["curry",w],["curryRight",x],["flip",E],["partial",k],["partialRight",C],["rearg",_]],P="[object Arguments]",q="[object Array]",K="[object AsyncFunction]",W="[object Boolean]",j="[object Date]",V="[object DOMException]",G="[object Error]",$="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",J="[object Number]",ee="[object Null]",te="[object Object]",ne="[object Promise]",re="[object Proxy]",ie="[object RegExp]",oe="[object Set]",ae="[object String]",se="[object Symbol]",le="[object Undefined]",ce="[object WeakMap]",Ae="[object WeakSet]",ue="[object ArrayBuffer]",de="[object DataView]",he="[object Float32Array]",pe="[object Float64Array]",fe="[object Int8Array]",ge="[object Int16Array]",me="[object Int32Array]",ve="[object Uint8Array]",be="[object Uint8ClampedArray]",ye="[object Uint16Array]",we="[object Uint32Array]",xe=/\b__p \+= '';/g,ke=/\b(__p \+=) '' \+/g,Ce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Be=/&(?:amp|lt|gt|quot|#39);/g,_e=/[&<>"']/g,Ee=RegExp(Be.source),Se=RegExp(_e.source),Fe=/<%-([\s\S]+?)%>/g,Te=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g,Ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ne=/^\w*$/,Ue=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/[\\^$.*+?()[\]{}|]/g,Qe=RegExp(Le.source),De=/^\s+/,He=/\s/,Oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Ze=/,? & /,Re=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pe=/[()=,{}\[\]\/\s]/,qe=/\\(\\)?/g,Ke=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,We=/\w*$/,je=/^[-+]0x[0-9a-f]+$/i,Ve=/^0b[01]+$/i,Ge=/^\[object .+?Constructor\]$/,$e=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=/($^)/,et=/['\n\r\u2028\u2029\\]/g,tt="\\ud800-\\udfff",nt="\\u0300-\\u036f",rt="\\ufe20-\\ufe2f",it="\\u20d0-\\u20ff",ot=nt+rt+it,at="\\u2700-\\u27bf",st="a-z\\xdf-\\xf6\\xf8-\\xff",lt="\\xac\\xb1\\xd7\\xf7",ct="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",At="\\u2000-\\u206f",ut=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="A-Z\\xc0-\\xd6\\xd8-\\xde",ht="\\ufe0e\\ufe0f",pt=lt+ct+At+ut,ft="[']",gt="["+tt+"]",mt="["+pt+"]",vt="["+ot+"]",bt="\\d+",yt="["+at+"]",wt="["+st+"]",xt="[^"+tt+pt+bt+at+st+dt+"]",kt="\\ud83c[\\udffb-\\udfff]",Ct="(?:"+vt+"|"+kt+")",Bt="[^"+tt+"]",_t="(?:\\ud83c[\\udde6-\\uddff]){2}",Et="[\\ud800-\\udbff][\\udc00-\\udfff]",St="["+dt+"]",Ft="\\u200d",Tt="(?:"+wt+"|"+xt+")",Mt="(?:"+St+"|"+xt+")",It="(?:"+ft+"(?:d|ll|m|re|s|t|ve))?",Nt="(?:"+ft+"(?:D|LL|M|RE|S|T|VE))?",Ut=Ct+"?",Lt="["+ht+"]?",Qt="(?:"+Ft+"(?:"+[Bt,_t,Et].join("|")+")"+Lt+Ut+")*",Dt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ht="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ot=Lt+Ut+Qt,zt="(?:"+[yt,_t,Et].join("|")+")"+Ot,Zt="(?:"+[Bt+vt+"?",vt,_t,Et,gt].join("|")+")",Rt=RegExp(ft,"g"),Pt=RegExp(vt,"g"),qt=RegExp(kt+"(?="+kt+")|"+Zt+Ot,"g"),Kt=RegExp([St+"?"+wt+"+"+It+"(?="+[mt,St,"$"].join("|")+")",Mt+"+"+Nt+"(?="+[mt,St+Tt,"$"].join("|")+")",St+"?"+Tt+"+"+It,St+"+"+Nt,Ht,Dt,bt,zt].join("|"),"g"),Wt=RegExp("["+Ft+tt+ot+ht+"]"),jt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Gt=-1,$t={};$t[he]=$t[pe]=$t[fe]=$t[ge]=$t[me]=$t[ve]=$t[be]=$t[ye]=$t[we]=!0,$t[P]=$t[q]=$t[ue]=$t[W]=$t[de]=$t[j]=$t[G]=$t[$]=$t[X]=$t[J]=$t[te]=$t[ie]=$t[oe]=$t[ae]=$t[ce]=!1;var Yt={};Yt[P]=Yt[q]=Yt[ue]=Yt[de]=Yt[W]=Yt[j]=Yt[he]=Yt[pe]=Yt[fe]=Yt[ge]=Yt[me]=Yt[X]=Yt[J]=Yt[te]=Yt[ie]=Yt[oe]=Yt[ae]=Yt[se]=Yt[ve]=Yt[be]=Yt[ye]=Yt[we]=!0,Yt[G]=Yt[$]=Yt[ce]=!1;var Xt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},en={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,an="object"==typeof self&&self&&self.Object===Object&&self,sn=on||an||Function("return this")(),ln=t&&!t.nodeType&&t,cn=ln&&e&&!e.nodeType&&e,An=cn&&cn.exports===ln,un=An&&on.process,dn=function(){try{var e=cn&&cn.require&&cn.require("util").types;return e||un&&un.binding&&un.binding("util")}catch(t){}}(),hn=dn&&dn.isArrayBuffer,pn=dn&&dn.isDate,fn=dn&&dn.isMap,gn=dn&&dn.isRegExp,mn=dn&&dn.isSet,vn=dn&&dn.isTypedArray;function bn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yn(e,t,n,r){var i=-1,o=null==e?0:e.length;while(++i<o){var a=e[i];t(r,a,n(a),e)}return r}function wn(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(!1===t(e[n],n,e))break;return e}function xn(e,t){var n=null==e?0:e.length;while(n--)if(!1===t(e[n],n,e))break;return e}function kn(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(!t(e[n],n,e))return!1;return!0}function Cn(e,t){var n=-1,r=null==e?0:e.length,i=0,o=[];while(++n<r){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Bn(e,t){var n=null==e?0:e.length;return!!n&&Dn(e,t,0)>-1}function _n(e,t,n){var r=-1,i=null==e?0:e.length;while(++r<i)if(n(t,e[r]))return!0;return!1}function En(e,t){var n=-1,r=null==e?0:e.length,i=Array(r);while(++n<r)i[n]=t(e[n],n,e);return i}function Sn(e,t){var n=-1,r=t.length,i=e.length;while(++n<r)e[i+n]=t[n];return e}function Fn(e,t,n,r){var i=-1,o=null==e?0:e.length;r&&o&&(n=e[++i]);while(++i<o)n=t(n,e[i],i,e);return n}function Tn(e,t,n,r){var i=null==e?0:e.length;r&&i&&(n=e[--i]);while(i--)n=t(n,e[i],i,e);return n}function Mn(e,t){var n=-1,r=null==e?0:e.length;while(++n<r)if(t(e[n],n,e))return!0;return!1}var In=Zn("length");function Nn(e){return e.split("")}function Un(e){return e.match(Re)||[]}function Ln(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Qn(e,t,n,r){var i=e.length,o=n+(r?1:-1);while(r?o--:++o<i)if(t(e[o],o,e))return o;return-1}function Dn(e,t,n){return t===t?hr(e,t,n):Qn(e,On,n)}function Hn(e,t,n,r){var i=n-1,o=e.length;while(++i<o)if(r(e[i],t))return i;return-1}function On(e){return e!==e}function zn(e,t){var n=null==e?0:e.length;return n?Kn(e,t)/n:H}function Zn(e){return function(t){return null==t?i:t[e]}}function Rn(e){return function(t){return null==e?i:e[t]}}function Pn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function qn(e,t){var n=e.length;e.sort(t);while(n--)e[n]=e[n].value;return e}function Kn(e,t){var n,r=-1,o=e.length;while(++r<o){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Wn(e,t){var n=-1,r=Array(e);while(++n<e)r[n]=t(n);return r}function jn(e,t){return En(t,(function(t){return[t,e[t]]}))}function Vn(e){return e?e.slice(0,mr(e)+1).replace(De,""):e}function Gn(e){return function(t){return e(t)}}function $n(e,t){return En(t,(function(t){return e[t]}))}function Yn(e,t){return e.has(t)}function Xn(e,t){var n=-1,r=e.length;while(++n<r&&Dn(t,e[n],0)>-1);return n}function Jn(e,t){var n=e.length;while(n--&&Dn(t,e[n],0)>-1);return n}function er(e,t){var n=e.length,r=0;while(n--)e[n]===t&&++r;return r}var tr=Rn(Xt),nr=Rn(Jt);function rr(e){return"\\"+tn[e]}function ir(e,t){return null==e?i:e[t]}function or(e){return Wt.test(e)}function ar(e){return jt.test(e)}function sr(e){var t,n=[];while(!(t=e.next()).done)n.push(t.value);return n}function lr(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cr(e,t){return function(n){return e(t(n))}}function Ar(e,t){var n=-1,r=e.length,i=0,o=[];while(++n<r){var a=e[n];a!==t&&a!==d||(e[n]=d,o[i++]=n)}return o}function ur(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function dr(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hr(e,t,n){var r=n-1,i=e.length;while(++r<i)if(e[r]===t)return r;return-1}function pr(e,t,n){var r=n+1;while(r--)if(e[r]===t)return r;return r}function fr(e){return or(e)?br(e):In(e)}function gr(e){return or(e)?yr(e):Nn(e)}function mr(e){var t=e.length;while(t--&&He.test(e.charAt(t)));return t}var vr=Rn(en);function br(e){var t=qt.lastIndex=0;while(qt.test(e))++t;return t}function yr(e){return e.match(qt)||[]}function wr(e){return e.match(Kt)||[]}var xr=function e(t){t=null==t?sn:kr.defaults(sn.Object(),t,kr.pick(sn,Vt));var n=t.Array,r=t.Date,He=t.Error,Re=t.Function,tt=t.Math,nt=t.Object,rt=t.RegExp,it=t.String,ot=t.TypeError,at=n.prototype,st=Re.prototype,lt=nt.prototype,ct=t["__core-js_shared__"],At=st.toString,ut=lt.hasOwnProperty,dt=0,ht=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=lt.toString,ft=At.call(nt),gt=sn._,mt=rt("^"+At.call(ut).replace(Le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=An?t.Buffer:i,bt=t.Symbol,yt=t.Uint8Array,wt=vt?vt.allocUnsafe:i,xt=cr(nt.getPrototypeOf,nt),kt=nt.create,Ct=lt.propertyIsEnumerable,Bt=at.splice,_t=bt?bt.isConcatSpreadable:i,Et=bt?bt.iterator:i,St=bt?bt.toStringTag:i,Ft=function(){try{var e=ja(nt,"defineProperty");return e({},"",{}),e}catch(t){}}(),Tt=t.clearTimeout!==sn.clearTimeout&&t.clearTimeout,Mt=r&&r.now!==sn.Date.now&&r.now,It=t.setTimeout!==sn.setTimeout&&t.setTimeout,Nt=tt.ceil,Ut=tt.floor,Lt=nt.getOwnPropertySymbols,Qt=vt?vt.isBuffer:i,Dt=t.isFinite,Ht=at.join,Ot=cr(nt.keys,nt),zt=tt.max,Zt=tt.min,qt=r.now,Kt=t.parseInt,Wt=tt.random,jt=at.reverse,Xt=ja(t,"DataView"),Jt=ja(t,"Map"),en=ja(t,"Promise"),tn=ja(t,"Set"),on=ja(t,"WeakMap"),an=ja(nt,"create"),ln=on&&new on,cn={},un=Is(Xt),dn=Is(Jt),In=Is(en),Nn=Is(tn),Rn=Is(on),hr=bt?bt.prototype:i,br=hr?hr.valueOf:i,yr=hr?hr.toString:i;function xr(e){if(BA(e)&&!lA(e)&&!(e instanceof Er)){if(e instanceof _r)return e;if(ut.call(e,"__wrapped__"))return Us(e)}return new _r(e)}var Cr=function(){function e(){}return function(t){if(!CA(t))return{};if(kt)return kt(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Br(){}function _r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Er(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=O,this.__views__=[]}function Sr(){var e=new Er(this.__wrapped__);return e.__actions__=ia(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ia(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ia(this.__views__),e}function Fr(){if(this.__filtered__){var e=new Er(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Tr(){var e=this.__wrapped__.value(),t=this.__dir__,n=lA(e),r=t<0,i=n?e.length:0,o=Xa(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,A=this.__iteratees__,u=A.length,d=0,h=Zt(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return Oo(e,this.__actions__);var p=[];e:while(l--&&d<h){c+=t;var f=-1,g=e[c];while(++f<u){var m=A[f],v=m.iteratee,b=m.type,y=v(g);if(b==N)g=y;else if(!y){if(b==I)continue e;break e}}p[d++]=g}return p}function Mr(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}function Ir(){this.__data__=an?an(null):{},this.size=0}function Nr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ur(e){var t=this.__data__;if(an){var n=t[e];return n===A?i:n}return ut.call(t,e)?t[e]:i}function Lr(e){var t=this.__data__;return an?t[e]!==i:ut.call(t,e)}function Qr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=an&&t===i?A:t,this}function Dr(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}function Hr(){this.__data__=[],this.size=0}function Or(e){var t=this.__data__,n=Ai(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Bt.call(t,n,1),--this.size,!0}function zr(e){var t=this.__data__,n=Ai(t,e);return n<0?i:t[n][1]}function Zr(e){return Ai(this.__data__,e)>-1}function Rr(e,t){var n=this.__data__,r=Ai(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Pr(e){var t=-1,n=null==e?0:e.length;this.clear();while(++t<n){var r=e[t];this.set(r[0],r[1])}}function qr(){this.size=0,this.__data__={hash:new Mr,map:new(Jt||Dr),string:new Mr}}function Kr(e){var t=Ka(this,e)["delete"](e);return this.size-=t?1:0,t}function Wr(e){return Ka(this,e).get(e)}function jr(e){return Ka(this,e).has(e)}function Vr(e,t){var n=Ka(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Gr(e){var t=-1,n=null==e?0:e.length;this.__data__=new Pr;while(++t<n)this.add(e[t])}function $r(e){return this.__data__.set(e,A),this}function Yr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Dr(e);this.size=t.size}function Jr(){this.__data__=new Dr,this.size=0}function ei(e){var t=this.__data__,n=t["delete"](e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Dr){var r=n.__data__;if(!Jt||r.length<a-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pr(r)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=lA(e),r=!n&&sA(e),i=!n&&!r&&hA(e),o=!n&&!r&&!i&&zA(e),a=n||r||i||o,s=a?Wn(e.length,it):[],l=s.length;for(var c in e)!t&&!ut.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||as(c,l))||s.push(c);return s}function oi(e){var t=e.length;return t?e[vo(0,t-1)]:i}function ai(e,t){return Fs(ia(e),gi(t,0,e.length))}function si(e){return Fs(ia(e))}function li(e,t,n){(n!==i&&!iA(e[t],n)||n===i&&!(t in e))&&pi(e,t,n)}function ci(e,t,n){var r=e[t];ut.call(e,t)&&iA(r,n)&&(n!==i||t in e)||pi(e,t,n)}function Ai(e,t){var n=e.length;while(n--)if(iA(e[n][0],t))return n;return-1}function ui(e,t,n,r){return xi(e,(function(e,i,o){t(r,e,n(e),o)})),r}function di(e,t){return e&&oa(t,xu(t),e)}function hi(e,t){return e&&oa(t,ku(t),e)}function pi(e,t,n){"__proto__"==t&&Ft?Ft(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function fi(e,t){var r=-1,o=t.length,a=n(o),s=null==e;while(++r<o)a[r]=s?i:gu(e,t[r]);return a}function gi(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function mi(e,t,n,r,o,a){var s,l=t&h,c=t&p,A=t&f;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!CA(e))return e;var u=lA(e);if(u){if(s=ts(e),!l)return ia(e,s)}else{var d=Ya(e),g=d==$||d==Y;if(hA(e))return Vo(e,l);if(d==te||d==P||g&&!o){if(s=c||g?{}:ns(e),!l)return c?sa(e,hi(s,e)):aa(e,di(s,e))}else{if(!Yt[d])return o?e:{};s=rs(e,d,l)}}a||(a=new Xr);var m=a.get(e);if(m)return m;a.set(e,s),DA(e)?e.forEach((function(r){s.add(mi(r,t,n,r,e,a))})):_A(e)&&e.forEach((function(r,i){s.set(i,mi(r,t,n,i,e,a))}));var v=A?c?za:Oa:c?ku:xu,b=u?i:v(e);return wn(b||e,(function(r,i){b&&(i=r,r=e[i]),ci(s,i,mi(r,t,n,i,e,a))})),s}function vi(e){var t=xu(e);return function(n){return bi(n,e,t)}}function bi(e,t,n){var r=n.length;if(null==e)return!r;e=nt(e);while(r--){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function yi(e,t,n){if("function"!=typeof e)throw new ot(l);return Bs((function(){e.apply(i,n)}),t)}function wi(e,t,n,r){var i=-1,o=Bn,s=!0,l=e.length,c=[],A=t.length;if(!l)return c;n&&(t=En(t,Gn(n))),r?(o=_n,s=!1):t.length>=a&&(o=Yn,s=!1,t=new Gr(t));e:while(++i<l){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,s&&d===d){var h=A;while(h--)if(t[h]===d)continue e;c.push(u)}else o(t,d,r)||c.push(u)}return c}xr.templateSettings={escape:Fe,evaluate:Te,interpolate:Me,variable:"",imports:{_:xr}},xr.prototype=Br.prototype,xr.prototype.constructor=xr,_r.prototype=Cr(Br.prototype),_r.prototype.constructor=_r,Er.prototype=Cr(Br.prototype),Er.prototype.constructor=Er,Mr.prototype.clear=Ir,Mr.prototype["delete"]=Nr,Mr.prototype.get=Ur,Mr.prototype.has=Lr,Mr.prototype.set=Qr,Dr.prototype.clear=Hr,Dr.prototype["delete"]=Or,Dr.prototype.get=zr,Dr.prototype.has=Zr,Dr.prototype.set=Rr,Pr.prototype.clear=qr,Pr.prototype["delete"]=Kr,Pr.prototype.get=Wr,Pr.prototype.has=jr,Pr.prototype.set=Vr,Gr.prototype.add=Gr.prototype.push=$r,Gr.prototype.has=Yr,Xr.prototype.clear=Jr,Xr.prototype["delete"]=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var xi=Aa(Mi),ki=Aa(Ii,!0);function Ci(e,t){var n=!0;return xi(e,(function(e,r,i){return n=!!t(e,r,i),n})),n}function Bi(e,t,n){var r=-1,o=e.length;while(++r<o){var a=e[r],s=t(a);if(null!=s&&(l===i?s===s&&!OA(s):n(s,l)))var l=s,c=a}return c}function _i(e,t,n,r){var o=e.length;n=VA(n),n<0&&(n=-n>o?0:o+n),r=r===i||r>o?o:VA(r),r<0&&(r+=o),r=n>r?0:GA(r);while(n<r)e[n++]=t;return e}function Ei(e,t){var n=[];return xi(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Si(e,t,n,r,i){var o=-1,a=e.length;n||(n=os),i||(i=[]);while(++o<a){var s=e[o];t>0&&n(s)?t>1?Si(s,t-1,n,r,i):Sn(i,s):r||(i[i.length]=s)}return i}var Fi=ua(),Ti=ua(!0);function Mi(e,t){return e&&Fi(e,t,xu)}function Ii(e,t){return e&&Ti(e,t,xu)}function Ni(e,t){return Cn(t,(function(t){return wA(e[t])}))}function Ui(e,t){t=qo(t,e);var n=0,r=t.length;while(null!=e&&n<r)e=e[Ms(t[n++])];return n&&n==r?e:i}function Li(e,t,n){var r=t(e);return lA(e)?r:Sn(r,n(e))}function Qi(e){return null==e?e===i?le:ee:St&&St in nt(e)?Va(e):bs(e)}function Di(e,t){return e>t}function Hi(e,t){return null!=e&&ut.call(e,t)}function Oi(e,t){return null!=e&&t in nt(e)}function zi(e,t,n){return e>=Zt(t,n)&&e<zt(t,n)}function Zi(e,t,r){var o=r?_n:Bn,a=e[0].length,s=e.length,l=s,c=n(s),A=1/0,u=[];while(l--){var d=e[l];l&&t&&(d=En(d,Gn(t))),A=Zt(d.length,A),c[l]=!r&&(t||a>=120&&d.length>=120)?new Gr(l&&d):i}d=e[0];var h=-1,p=c[0];e:while(++h<a&&u.length<A){var f=d[h],g=t?t(f):f;if(f=r||0!==f?f:0,!(p?Yn(p,g):o(u,g,r))){l=s;while(--l){var m=c[l];if(!(m?Yn(m,g):o(e[l],g,r)))continue e}p&&p.push(g),u.push(f)}}return u}function Ri(e,t,n,r){return Mi(e,(function(e,i,o){t(r,n(e),i,o)})),r}function Pi(e,t,n){t=qo(t,e),e=ws(e,t);var r=null==e?e:e[Ms(ol(t))];return null==r?i:bn(r,e,n)}function qi(e){return BA(e)&&Qi(e)==P}function Ki(e){return BA(e)&&Qi(e)==ue}function Wi(e){return BA(e)&&Qi(e)==j}function ji(e,t,n,r,i){return e===t||(null==e||null==t||!BA(e)&&!BA(t)?e!==e&&t!==t:Vi(e,t,n,r,ji,i))}function Vi(e,t,n,r,i,o){var a=lA(e),s=lA(t),l=a?q:Ya(e),c=s?q:Ya(t);l=l==P?te:l,c=c==P?te:c;var A=l==te,u=c==te,d=l==c;if(d&&hA(e)){if(!hA(t))return!1;a=!0,A=!1}if(d&&!A)return o||(o=new Xr),a||zA(e)?La(e,t,n,r,i,o):Qa(e,t,l,n,r,i,o);if(!(n&g)){var h=A&&ut.call(e,"__wrapped__"),p=u&&ut.call(t,"__wrapped__");if(h||p){var f=h?e.value():e,m=p?t.value():t;return o||(o=new Xr),i(f,m,n,r,o)}}return!!d&&(o||(o=new Xr),Da(e,t,n,r,i,o))}function Gi(e){return BA(e)&&Ya(e)==X}function $i(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;e=nt(e);while(o--){var l=n[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}while(++o<a){l=n[o];var c=l[0],A=e[c],u=l[1];if(s&&l[2]){if(A===i&&!(c in e))return!1}else{var d=new Xr;if(r)var h=r(A,u,c,e,t,d);if(!(h===i?ji(u,A,g|m,r,d):h))return!1}}return!0}function Yi(e){if(!CA(e)||us(e))return!1;var t=wA(e)?mt:Ge;return t.test(Is(e))}function Xi(e){return BA(e)&&Qi(e)==ie}function Ji(e){return BA(e)&&Ya(e)==oe}function eo(e){return BA(e)&&kA(e.length)&&!!$t[Qi(e)]}function to(e){return"function"==typeof e?e:null==e?Td:"object"==typeof e?lA(e)?so(e[0],e[1]):ao(e):Pd(e)}function no(e){if(!hs(e))return Ot(e);var t=[];for(var n in nt(e))ut.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!CA(e))return vs(e);var t=hs(e),n=[];for(var r in e)("constructor"!=r||!t&&ut.call(e,r))&&n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var r=-1,i=AA(e)?n(e.length):[];return xi(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function ao(e){var t=Wa(e);return 1==t.length&&t[0][2]?fs(t[0][0],t[0][1]):function(n){return n===e||$i(n,e,t)}}function so(e,t){return ls(e)&&ps(t)?fs(Ms(e),t):function(n){var r=gu(n,e);return r===i&&r===t?vu(n,e):ji(t,r,g|m)}}function lo(e,t,n,r,o){e!==t&&Fi(t,(function(a,s){if(o||(o=new Xr),CA(a))co(e,t,s,n,lo,r,o);else{var l=r?r(ks(e,s),a,s+"",e,t,o):i;l===i&&(l=a),li(e,s,l)}}),ku)}function co(e,t,n,r,o,a,s){var l=ks(e,n),c=ks(t,n),A=s.get(c);if(A)li(e,n,A);else{var u=a?a(l,c,n+"",e,t,s):i,d=u===i;if(d){var h=lA(c),p=!h&&hA(c),f=!h&&!p&&zA(c);u=c,h||p||f?lA(l)?u=l:uA(l)?u=ia(l):p?(d=!1,u=Vo(c,!0)):f?(d=!1,u=Jo(c,!0)):u=[]:UA(c)||sA(c)?(u=l,sA(l)?u=YA(l):CA(l)&&!wA(l)||(u=ns(c))):d=!1}d&&(s.set(c,u),o(u,c,r,a,s),s["delete"](c)),li(e,n,u)}}function Ao(e,t){var n=e.length;if(n)return t+=t<0?n:0,as(t,n)?e[t]:i}function uo(e,t,n){t=t.length?En(t,(function(e){return lA(e)?function(t){return Ui(t,1===e.length?e[0]:e)}:e})):[Td];var r=-1;t=En(t,Gn(qa()));var i=oo(e,(function(e,n,i){var o=En(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return qn(i,(function(e,t){return ta(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return vu(e,n)}))}function po(e,t,n){var r=-1,i=t.length,o={};while(++r<i){var a=t[r],s=Ui(e,a);n(s,a)&&Co(o,qo(a,e),s)}return o}function fo(e){return function(t){return Ui(t,e)}}function go(e,t,n,r){var i=r?Hn:Dn,o=-1,a=t.length,s=e;e===t&&(t=ia(t)),n&&(s=En(e,Gn(n)));while(++o<a){var l=0,c=t[o],A=n?n(c):c;while((l=i(s,A,l,r))>-1)s!==e&&Bt.call(s,l,1),Bt.call(e,l,1)}return e}function mo(e,t){var n=e?t.length:0,r=n-1;while(n--){var i=t[n];if(n==r||i!==o){var o=i;as(i)?Bt.call(e,i,1):Qo(e,i)}}return e}function vo(e,t){return e+Ut(Wt()*(t-e+1))}function bo(e,t,r,i){var o=-1,a=zt(Nt((t-e)/(r||1)),0),s=n(a);while(a--)s[i?a:++o]=e,e+=r;return s}function yo(e,t){var n="";if(!e||t<1||t>Q)return n;do{t%2&&(n+=e),t=Ut(t/2),t&&(e+=e)}while(t);return n}function wo(e,t){return _s(ys(e,t,Td),e+"")}function xo(e){return oi(Zu(e))}function ko(e,t){var n=Zu(e);return Fs(n,gi(t,0,n.length))}function Co(e,t,n,r){if(!CA(e))return e;t=qo(t,e);var o=-1,a=t.length,s=a-1,l=e;while(null!=l&&++o<a){var c=Ms(t[o]),A=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var u=l[c];A=r?r(u,c,l):i,A===i&&(A=CA(u)?u:as(t[o+1])?[]:{})}ci(l,c,A),l=l[c]}return e}var Bo=ln?function(e,t){return ln.set(e,t),e}:Td,_o=Ft?function(e,t){return Ft(e,"toString",{configurable:!0,enumerable:!1,value:_d(t),writable:!0})}:Td;function Eo(e){return Fs(Zu(e))}function So(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;var a=n(o);while(++i<o)a[i]=e[i+t];return a}function Fo(e,t){var n;return xi(e,(function(e,r,i){return n=t(e,r,i),!n})),!!n}function To(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=Z){while(r<i){var o=r+i>>>1,a=e[o];null!==a&&!OA(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Mo(e,t,Td,n)}function Mo(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;t=n(t);var s=t!==t,l=null===t,c=OA(t),A=t===i;while(o<a){var u=Ut((o+a)/2),d=n(e[u]),h=d!==i,p=null===d,f=d===d,g=OA(d);if(s)var m=r||f;else m=A?f&&(r||h):l?f&&h&&(r||!p):c?f&&h&&!p&&(r||!g):!p&&!g&&(r?d<=t:d<t);m?o=u+1:a=u}return Zt(a,z)}function Io(e,t){var n=-1,r=e.length,i=0,o=[];while(++n<r){var a=e[n],s=t?t(a):a;if(!n||!iA(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function No(e){return"number"==typeof e?e:OA(e)?H:+e}function Uo(e){if("string"==typeof e)return e;if(lA(e))return En(e,Uo)+"";if(OA(e))return yr?yr.call(e):"";var t=e+"";return"0"==t&&1/e==-L?"-0":t}function Lo(e,t,n){var r=-1,i=Bn,o=e.length,s=!0,l=[],c=l;if(n)s=!1,i=_n;else if(o>=a){var A=t?null:Fa(e);if(A)return ur(A);s=!1,i=Yn,c=new Gr}else c=t?[]:l;e:while(++r<o){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,s&&d===d){var h=c.length;while(h--)if(c[h]===d)continue e;t&&c.push(d),l.push(u)}else i(c,d,n)||(c!==l&&c.push(d),l.push(u))}return l}function Qo(e,t){return t=qo(t,e),e=ws(e,t),null==e||delete e[Ms(ol(t))]}function Do(e,t,n,r){return Co(e,t,n(Ui(e,t)),r)}function Ho(e,t,n,r){var i=e.length,o=r?i:-1;while((r?o--:++o<i)&&t(e[o],o,e));return n?So(e,r?0:o,r?o+1:i):So(e,r?o+1:0,r?i:o)}function Oo(e,t){var n=e;return n instanceof Er&&(n=n.value()),Fn(t,(function(e,t){return t.func.apply(t.thisArg,Sn([e],t.args))}),n)}function zo(e,t,r){var i=e.length;if(i<2)return i?Lo(e[0]):[];var o=-1,a=n(i);while(++o<i){var s=e[o],l=-1;while(++l<i)l!=o&&(a[o]=wi(a[o]||s,e[l],t,r))}return Lo(Si(a,1),t,r)}function Zo(e,t,n){var r=-1,o=e.length,a=t.length,s={};while(++r<o){var l=r<a?t[r]:i;n(s,e[r],l)}return s}function Ro(e){return uA(e)?e:[]}function Po(e){return"function"==typeof e?e:Td}function qo(e,t){return lA(e)?e:ls(e,t)?[e]:Ts(JA(e))}var Ko=wo;function Wo(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:So(e,t,n)}var jo=Tt||function(e){return sn.clearTimeout(e)};function Vo(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Go(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}function $o(e,t){var n=t?Go(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Yo(e){var t=new e.constructor(e.source,We.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return br?nt(br.call(e)):{}}function Jo(e,t){var n=t?Go(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ea(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=OA(e),s=t!==i,l=null===t,c=t===t,A=OA(t);if(!l&&!A&&!a&&e>t||a&&s&&c&&!l&&!A||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!A&&e<t||A&&n&&o&&!r&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}function ta(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;while(++r<a){var l=ea(i[r],o[r]);if(l){if(r>=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return e.index-t.index}function na(e,t,r,i){var o=-1,a=e.length,s=r.length,l=-1,c=t.length,A=zt(a-s,0),u=n(c+A),d=!i;while(++l<c)u[l]=t[l];while(++o<s)(d||o<a)&&(u[r[o]]=e[o]);while(A--)u[l++]=e[o++];return u}function ra(e,t,r,i){var o=-1,a=e.length,s=-1,l=r.length,c=-1,A=t.length,u=zt(a-l,0),d=n(u+A),h=!i;while(++o<u)d[o]=e[o];var p=o;while(++c<A)d[p+c]=t[c];while(++s<l)(h||o<a)&&(d[p+r[s]]=e[o++]);return d}function ia(e,t){var r=-1,i=e.length;t||(t=n(i));while(++r<i)t[r]=e[r];return t}function oa(e,t,n,r){var o=!n;n||(n={});var a=-1,s=t.length;while(++a<s){var l=t[a],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),o?pi(n,l,c):ci(n,l,c)}return n}function aa(e,t){return oa(e,Ga(e),t)}function sa(e,t){return oa(e,$a(e),t)}function la(e,t){return function(n,r){var i=lA(n)?yn:ui,o=t?t():{};return i(n,e,qa(r,2),o)}}function ca(e){return wo((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;a=e.length>3&&"function"==typeof a?(o--,a):i,s&&ss(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=nt(t);while(++r<o){var l=n[r];l&&e(t,l,r,a)}return t}))}function Aa(e,t){return function(n,r){if(null==n)return n;if(!AA(n))return e(n,r);var i=n.length,o=t?i:-1,a=nt(n);while(t?o--:++o<i)if(!1===r(a[o],o,a))break;return n}}function ua(e){return function(t,n,r){var i=-1,o=nt(t),a=r(t),s=a.length;while(s--){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function da(e,t,n){var r=t&v,i=fa(e);function o(){var t=this&&this!==sn&&this instanceof o?i:e;return t.apply(r?n:this,arguments)}return o}function ha(e){return function(t){t=JA(t);var n=or(t)?gr(t):i,r=n?n[0]:t.charAt(0),o=n?Wo(n,1).join(""):t.slice(1);return r[e]()+o}}function pa(e){return function(t){return Fn(wd(Vu(t).replace(Rt,"")),e,"")}}function fa(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Cr(e.prototype),r=e.apply(n,t);return CA(r)?r:n}}function ga(e,t,r){var o=fa(e);function a(){var s=arguments.length,l=n(s),c=s,A=Pa(a);while(c--)l[c]=arguments[c];var u=s<3&&l[0]!==A&&l[s-1]!==A?[]:Ar(l,A);if(s-=u.length,s<r)return Ea(e,t,ba,a.placeholder,i,l,u,i,i,r-s);var d=this&&this!==sn&&this instanceof a?o:e;return bn(d,this,l)}return a}function ma(e){return function(t,n,r){var o=nt(t);if(!AA(t)){var a=qa(n,3);t=xu(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function va(e){return Ha((function(t){var n=t.length,r=n,o=_r.prototype.thru;e&&t.reverse();while(r--){var a=t[r];if("function"!=typeof a)throw new ot(l);if(o&&!s&&"wrapper"==Ra(a))var s=new _r([],!0)}r=s?r:n;while(++r<n){a=t[r];var c=Ra(a),A="wrapper"==c?Za(a):i;s=A&&As(A[0])&&A[1]==(B|w|k|_)&&!A[4].length&&1==A[9]?s[Ra(A[0])].apply(s,A[3]):1==a.length&&As(a)?s[c]():s.thru(a)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&lA(r))return s.plant(r).value();var i=0,o=n?t[i].apply(this,e):r;while(++i<n)o=t[i].call(this,o);return o}}))}function ba(e,t,r,o,a,s,l,c,A,u){var d=t&B,h=t&v,p=t&b,f=t&(w|x),g=t&E,m=p?i:fa(e);function y(){var i=arguments.length,v=n(i),b=i;while(b--)v[b]=arguments[b];if(f)var w=Pa(y),x=er(v,w);if(o&&(v=na(v,o,a,f)),s&&(v=ra(v,s,l,f)),i-=x,f&&i<u){var k=Ar(v,w);return Ea(e,t,ba,y.placeholder,r,v,k,c,A,u-i)}var C=h?r:this,B=p?C[e]:e;return i=v.length,c?v=xs(v,c):g&&i>1&&v.reverse(),d&&A<i&&(v.length=A),this&&this!==sn&&this instanceof y&&(B=m||fa(B)),B.apply(C,v)}return y}function ya(e,t){return function(n,r){return Ri(n,e,t(r),{})}}function wa(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=Uo(n),r=Uo(r)):(n=No(n),r=No(r)),o=e(n,r)}return o}}function xa(e){return Ha((function(t){return t=En(t,Gn(qa())),wo((function(n){var r=this;return e(t,(function(e){return bn(e,r,n)}))}))}))}function ka(e,t){t=t===i?" ":Uo(t);var n=t.length;if(n<2)return n?yo(t,e):t;var r=yo(t,Nt(e/fr(t)));return or(t)?Wo(gr(r),0,e).join(""):r.slice(0,e)}function Ca(e,t,r,i){var o=t&v,a=fa(e);function s(){var t=-1,l=arguments.length,c=-1,A=i.length,u=n(A+l),d=this&&this!==sn&&this instanceof s?a:e;while(++c<A)u[c]=i[c];while(l--)u[c++]=arguments[++t];return bn(d,o?r:this,u)}return s}function Ba(e){return function(t,n,r){return r&&"number"!=typeof r&&ss(t,n,r)&&(n=r=i),t=jA(t),n===i?(n=t,t=0):n=jA(n),r=r===i?t<n?1:-1:jA(r),bo(t,n,r,e)}}function _a(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=$A(t),n=$A(n)),e(t,n)}}function Ea(e,t,n,r,o,a,s,l,c,A){var u=t&w,d=u?s:i,h=u?i:s,p=u?a:i,f=u?i:a;t|=u?k:C,t&=~(u?C:k),t&y||(t&=~(v|b));var g=[e,t,o,p,d,f,h,l,c,A],m=n.apply(i,g);return As(e)&&Cs(m,g),m.placeholder=r,Es(m,e,t)}function Sa(e){var t=tt[e];return function(e,n){if(e=$A(e),n=null==n?0:Zt(VA(n),292),n&&Dt(e)){var r=(JA(e)+"e").split("e"),i=t(r[0]+"e"+(+r[1]+n));return r=(JA(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}var Fa=tn&&1/ur(new tn([,-0]))[1]==L?function(e){return new tn(e)}:Hd;function Ta(e){return function(t){var n=Ya(t);return n==X?lr(t):n==oe?dr(t):jn(t,e(t))}}function Ma(e,t,n,r,o,a,s,c){var A=t&b;if(!A&&"function"!=typeof e)throw new ot(l);var u=r?r.length:0;if(u||(t&=~(k|C),r=o=i),s=s===i?s:zt(VA(s),0),c=c===i?c:VA(c),u-=o?o.length:0,t&C){var d=r,h=o;r=o=i}var p=A?i:Za(e),f=[e,t,n,r,o,d,h,a,s,c];if(p&&ms(f,p),e=f[0],t=f[1],n=f[2],r=f[3],o=f[4],c=f[9]=f[9]===i?A?0:e.length:zt(f[9]-u,0),!c&&t&(w|x)&&(t&=~(w|x)),t&&t!=v)g=t==w||t==x?ga(e,t,c):t!=k&&t!=(v|k)||o.length?ba.apply(i,f):Ca(e,t,n,r);else var g=da(e,t,n);var m=p?Bo:Cs;return Es(m(g,f),e,t)}function Ia(e,t,n,r){return e===i||iA(e,lt[n])&&!ut.call(r,n)?t:e}function Na(e,t,n,r,o,a){return CA(e)&&CA(t)&&(a.set(t,e),lo(e,t,i,Na,a),a["delete"](t)),e}function Ua(e){return UA(e)?i:e}function La(e,t,n,r,o,a){var s=n&g,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var A=a.get(e),u=a.get(t);if(A&&u)return A==t&&u==e;var d=-1,h=!0,p=n&m?new Gr:i;a.set(e,t),a.set(t,e);while(++d<l){var f=e[d],v=t[d];if(r)var b=s?r(v,f,d,t,e,a):r(f,v,d,e,t,a);if(b!==i){if(b)continue;h=!1;break}if(p){if(!Mn(t,(function(e,t){if(!Yn(p,t)&&(f===e||o(f,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(f!==v&&!o(f,v,n,r,a)){h=!1;break}}return a["delete"](e),a["delete"](t),h}function Qa(e,t,n,r,i,o,a){switch(n){case de:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new yt(e),new yt(t)));case W:case j:case J:return iA(+e,+t);case G:return e.name==t.name&&e.message==t.message;case ie:case ae:return e==t+"";case X:var s=lr;case oe:var l=r&g;if(s||(s=ur),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=m,a.set(e,t);var A=La(s(e),s(t),r,i,o,a);return a["delete"](e),A;case se:if(br)return br.call(e)==br.call(t)}return!1}function Da(e,t,n,r,o,a){var s=n&g,l=Oa(e),c=l.length,A=Oa(t),u=A.length;if(c!=u&&!s)return!1;var d=c;while(d--){var h=l[d];if(!(s?h in t:ut.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);var v=s;while(++d<c){h=l[d];var b=e[h],y=t[h];if(r)var w=s?r(y,b,h,t,e,a):r(b,y,h,e,t,a);if(!(w===i?b===y||o(b,y,n,r,a):w)){m=!1;break}v||(v="constructor"==h)}if(m&&!v){var x=e.constructor,k=t.constructor;x==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof k&&k instanceof k||(m=!1)}return a["delete"](e),a["delete"](t),m}function Ha(e){return _s(ys(e,i,Vs),e+"")}function Oa(e){return Li(e,xu,Ga)}function za(e){return Li(e,ku,$a)}var Za=ln?function(e){return ln.get(e)}:Hd;function Ra(e){var t=e.name+"",n=cn[t],r=ut.call(cn,t)?n.length:0;while(r--){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Pa(e){var t=ut.call(xr,"placeholder")?xr:e;return t.placeholder}function qa(){var e=xr.iteratee||Md;return e=e===Md?to:e,arguments.length?e(arguments[0],arguments[1]):e}function Ka(e,t){var n=e.__data__;return cs(t)?n["string"==typeof t?"string":"hash"]:n.map}function Wa(e){var t=xu(e),n=t.length;while(n--){var r=t[n],i=e[r];t[n]=[r,i,ps(i)]}return t}function ja(e,t){var n=ir(e,t);return Yi(n)?n:i}function Va(e){var t=ut.call(e,St),n=e[St];try{e[St]=i;var r=!0}catch(a){}var o=pt.call(e);return r&&(t?e[St]=n:delete e[St]),o}var Ga=Lt?function(e){return null==e?[]:(e=nt(e),Cn(Lt(e),(function(t){return Ct.call(e,t)})))}:jd,$a=Lt?function(e){var t=[];while(e)Sn(t,Ga(e)),e=xt(e);return t}:jd,Ya=Qi;function Xa(e,t,n){var r=-1,i=n.length;while(++r<i){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Zt(t,e+a);break;case"takeRight":e=zt(e,t-a);break}}return{start:e,end:t}}function Ja(e){var t=e.match(ze);return t?t[1].split(Ze):[]}function es(e,t,n){t=qo(t,e);var r=-1,i=t.length,o=!1;while(++r<i){var a=Ms(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=null==e?0:e.length,!!i&&kA(i)&&as(a,i)&&(lA(e)||sA(e)))}function ts(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ut.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ns(e){return"function"!=typeof e.constructor||hs(e)?{}:Cr(xt(e))}function rs(e,t,n){var r=e.constructor;switch(t){case ue:return Go(e);case W:case j:return new r(+e);case de:return $o(e,n);case he:case pe:case fe:case ge:case me:case ve:case be:case ye:case we:return Jo(e,n);case X:return new r;case J:case ae:return new r(e);case ie:return Yo(e);case oe:return new r;case se:return Xo(e)}}function is(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Oe,"{\n/* [wrapped with "+t+"] */\n")}function os(e){return lA(e)||sA(e)||!!(_t&&e&&e[_t])}function as(e,t){var n=typeof e;return t=null==t?Q:t,!!t&&("number"==n||"symbol"!=n&&Ye.test(e))&&e>-1&&e%1==0&&e<t}function ss(e,t,n){if(!CA(n))return!1;var r=typeof t;return!!("number"==r?AA(n)&&as(t,n.length):"string"==r&&t in n)&&iA(n[t],e)}function ls(e,t){if(lA(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!OA(e))||(Ne.test(e)||!Ie.test(e)||null!=t&&e in nt(t))}function cs(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function As(e){var t=Ra(e),n=xr[t];if("function"!=typeof n||!(t in Er.prototype))return!1;if(e===n)return!0;var r=Za(n);return!!r&&e===r[0]}function us(e){return!!ht&&ht in e}(Xt&&Ya(new Xt(new ArrayBuffer(1)))!=de||Jt&&Ya(new Jt)!=X||en&&Ya(en.resolve())!=ne||tn&&Ya(new tn)!=oe||on&&Ya(new on)!=ce)&&(Ya=function(e){var t=Qi(e),n=t==te?e.constructor:i,r=n?Is(n):"";if(r)switch(r){case un:return de;case dn:return X;case In:return ne;case Nn:return oe;case Rn:return ce}return t});var ds=ct?wA:Vd;function hs(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||lt;return e===n}function ps(e){return e===e&&!CA(e)}function fs(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in nt(n)))}}function gs(e){var t=zc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function ms(e,t){var n=e[1],r=t[1],i=n|r,o=i<(v|b|B),a=r==B&&n==w||r==B&&n==_&&e[7].length<=t[8]||r==(B|_)&&t[7].length<=t[8]&&n==w;if(!o&&!a)return e;r&v&&(e[2]=t[2],i|=n&v?0:y);var s=t[3];if(s){var l=e[3];e[3]=l?na(l,s,t[4]):s,e[4]=l?Ar(e[3],d):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?ra(l,s,t[6]):s,e[6]=l?Ar(e[5],d):t[6]),s=t[7],s&&(e[7]=s),r&B&&(e[8]=null==e[8]?t[8]:Zt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function vs(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function bs(e){return pt.call(e)}function ys(e,t,r){return t=zt(t===i?e.length-1:t,0),function(){var i=arguments,o=-1,a=zt(i.length-t,0),s=n(a);while(++o<a)s[o]=i[t+o];o=-1;var l=n(t+1);while(++o<t)l[o]=i[o];return l[t]=r(s),bn(e,this,l)}}function ws(e,t){return t.length<2?e:Ui(e,So(t,0,-1))}function xs(e,t){var n=e.length,r=Zt(t.length,n),o=ia(e);while(r--){var a=t[r];e[r]=as(a,n)?o[a]:i}return e}function ks(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Cs=Ss(Bo),Bs=It||function(e,t){return sn.setTimeout(e,t)},_s=Ss(_o);function Es(e,t,n){var r=t+"";return _s(e,is(r,Ns(Ja(r),n)))}function Ss(e){var t=0,n=0;return function(){var r=qt(),o=M-(r-n);if(n=r,o>0){if(++t>=T)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Fs(e,t){var n=-1,r=e.length,o=r-1;t=t===i?r:t;while(++n<t){var a=vo(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Ts=gs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ue,(function(e,n,r,i){t.push(r?i.replace(qe,"$1"):n||e)})),t}));function Ms(e){if("string"==typeof e||OA(e))return e;var t=e+"";return"0"==t&&1/e==-L?"-0":t}function Is(e){if(null!=e){try{return At.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ns(e,t){return wn(R,(function(n){var r="_."+n[0];t&n[1]&&!Bn(e,r)&&e.push(r)})),e.sort()}function Us(e){if(e instanceof Er)return e.clone();var t=new _r(e.__wrapped__,e.__chain__);return t.__actions__=ia(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ls(e,t,r){t=(r?ss(e,t,r):t===i)?1:zt(VA(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];var a=0,s=0,l=n(Nt(o/t));while(a<o)l[s++]=So(e,a,a+=t);return l}function Qs(e){var t=-1,n=null==e?0:e.length,r=0,i=[];while(++t<n){var o=e[t];o&&(i[r++]=o)}return i}function Ds(){var e=arguments.length;if(!e)return[];var t=n(e-1),r=arguments[0],i=e;while(i--)t[i-1]=arguments[i];return Sn(lA(r)?ia(r):[r],Si(t,1))}var Hs=wo((function(e,t){return uA(e)?wi(e,Si(t,1,uA,!0)):[]})),Os=wo((function(e,t){var n=ol(t);return uA(n)&&(n=i),uA(e)?wi(e,Si(t,1,uA,!0),qa(n,2)):[]})),zs=wo((function(e,t){var n=ol(t);return uA(n)&&(n=i),uA(e)?wi(e,Si(t,1,uA,!0),i,n):[]}));function Zs(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===i?1:VA(t),So(e,t<0?0:t,r)):[]}function Rs(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===i?1:VA(t),t=r-t,So(e,0,t<0?0:t)):[]}function Ps(e,t){return e&&e.length?Ho(e,qa(t,3),!0,!0):[]}function qs(e,t){return e&&e.length?Ho(e,qa(t,3),!0):[]}function Ks(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ss(e,t,n)&&(n=0,r=i),_i(e,t,n,r)):[]}function Ws(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:VA(n);return i<0&&(i=zt(r+i,0)),Qn(e,qa(t,3),i)}function js(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=VA(n),o=n<0?zt(r+o,0):Zt(o,r-1)),Qn(e,qa(t,3),o,!0)}function Vs(e){var t=null==e?0:e.length;return t?Si(e,1):[]}function Gs(e){var t=null==e?0:e.length;return t?Si(e,L):[]}function $s(e,t){var n=null==e?0:e.length;return n?(t=t===i?1:VA(t),Si(e,t)):[]}function Ys(e){var t=-1,n=null==e?0:e.length,r={};while(++t<n){var i=e[t];r[i[0]]=i[1]}return r}function Xs(e){return e&&e.length?e[0]:i}function Js(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:VA(n);return i<0&&(i=zt(r+i,0)),Dn(e,t,i)}function el(e){var t=null==e?0:e.length;return t?So(e,0,-1):[]}var tl=wo((function(e){var t=En(e,Ro);return t.length&&t[0]===e[0]?Zi(t):[]})),nl=wo((function(e){var t=ol(e),n=En(e,Ro);return t===ol(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Zi(n,qa(t,2)):[]})),rl=wo((function(e){var t=ol(e),n=En(e,Ro);return t="function"==typeof t?t:i,t&&n.pop(),n.length&&n[0]===e[0]?Zi(n,i,t):[]}));function il(e,t){return null==e?"":Ht.call(e,t)}function ol(e){var t=null==e?0:e.length;return t?e[t-1]:i}function al(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=VA(n),o=o<0?zt(r+o,0):Zt(o,r-1)),t===t?pr(e,t,o):Qn(e,On,o,!0)}function sl(e,t){return e&&e.length?Ao(e,VA(t)):i}var ll=wo(cl);function cl(e,t){return e&&e.length&&t&&t.length?go(e,t):e}function Al(e,t,n){return e&&e.length&&t&&t.length?go(e,t,qa(n,2)):e}function ul(e,t,n){return e&&e.length&&t&&t.length?go(e,t,i,n):e}var dl=Ha((function(e,t){var n=null==e?0:e.length,r=fi(e,t);return mo(e,En(t,(function(e){return as(e,n)?+e:e})).sort(ea)),r}));function hl(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;t=qa(t,3);while(++r<o){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return mo(e,i),n}function pl(e){return null==e?e:jt.call(e)}function fl(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ss(e,t,n)?(t=0,n=r):(t=null==t?0:VA(t),n=n===i?r:VA(n)),So(e,t,n)):[]}function gl(e,t){return To(e,t)}function ml(e,t,n){return Mo(e,t,qa(n,2))}function vl(e,t){var n=null==e?0:e.length;if(n){var r=To(e,t);if(r<n&&iA(e[r],t))return r}return-1}function bl(e,t){return To(e,t,!0)}function yl(e,t,n){return Mo(e,t,qa(n,2),!0)}function wl(e,t){var n=null==e?0:e.length;if(n){var r=To(e,t,!0)-1;if(iA(e[r],t))return r}return-1}function xl(e){return e&&e.length?Io(e):[]}function kl(e,t){return e&&e.length?Io(e,qa(t,2)):[]}function Cl(e){var t=null==e?0:e.length;return t?So(e,1,t):[]}function Bl(e,t,n){return e&&e.length?(t=n||t===i?1:VA(t),So(e,0,t<0?0:t)):[]}function _l(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===i?1:VA(t),t=r-t,So(e,t<0?0:t,r)):[]}function El(e,t){return e&&e.length?Ho(e,qa(t,3),!1,!0):[]}function Sl(e,t){return e&&e.length?Ho(e,qa(t,3)):[]}var Fl=wo((function(e){return Lo(Si(e,1,uA,!0))})),Tl=wo((function(e){var t=ol(e);return uA(t)&&(t=i),Lo(Si(e,1,uA,!0),qa(t,2))})),Ml=wo((function(e){var t=ol(e);return t="function"==typeof t?t:i,Lo(Si(e,1,uA,!0),i,t)}));function Il(e){return e&&e.length?Lo(e):[]}function Nl(e,t){return e&&e.length?Lo(e,qa(t,2)):[]}function Ul(e,t){return t="function"==typeof t?t:i,e&&e.length?Lo(e,i,t):[]}function Ll(e){if(!e||!e.length)return[];var t=0;return e=Cn(e,(function(e){if(uA(e))return t=zt(e.length,t),!0})),Wn(t,(function(t){return En(e,Zn(t))}))}function Ql(e,t){if(!e||!e.length)return[];var n=Ll(e);return null==t?n:En(n,(function(e){return bn(t,i,e)}))}var Dl=wo((function(e,t){return uA(e)?wi(e,t):[]})),Hl=wo((function(e){return zo(Cn(e,uA))})),Ol=wo((function(e){var t=ol(e);return uA(t)&&(t=i),zo(Cn(e,uA),qa(t,2))})),zl=wo((function(e){var t=ol(e);return t="function"==typeof t?t:i,zo(Cn(e,uA),i,t)})),Zl=wo(Ll);function Rl(e,t){return Zo(e||[],t||[],ci)}function Pl(e,t){return Zo(e||[],t||[],Co)}var ql=wo((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,Ql(e,n)}));function Kl(e){var t=xr(e);return t.__chain__=!0,t}function Wl(e,t){return t(e),e}function jl(e,t){return t(e)}var Vl=Ha((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return fi(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Er&&as(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:jl,args:[o],thisArg:i}),new _r(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));function Gl(){return Kl(this)}function $l(){return new _r(this.value(),this.__chain__)}function Yl(){this.__values__===i&&(this.__values__=WA(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function Xl(){return this}function Jl(e){var t,n=this;while(n instanceof Br){var r=Us(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t}function ec(){var e=this.__wrapped__;if(e instanceof Er){var t=e;return this.__actions__.length&&(t=new Er(this)),t=t.reverse(),t.__actions__.push({func:jl,args:[pl],thisArg:i}),new _r(t,this.__chain__)}return this.thru(pl)}function tc(){return Oo(this.__wrapped__,this.__actions__)}var nc=la((function(e,t,n){ut.call(e,n)?++e[n]:pi(e,n,1)}));function rc(e,t,n){var r=lA(e)?kn:Ci;return n&&ss(e,t,n)&&(t=i),r(e,qa(t,3))}function ic(e,t){var n=lA(e)?Cn:Ei;return n(e,qa(t,3))}var oc=ma(Ws),ac=ma(js);function sc(e,t){return Si(gc(e,t),1)}function lc(e,t){return Si(gc(e,t),L)}function cc(e,t,n){return n=n===i?1:VA(n),Si(gc(e,t),n)}function Ac(e,t){var n=lA(e)?wn:xi;return n(e,qa(t,3))}function uc(e,t){var n=lA(e)?xn:ki;return n(e,qa(t,3))}var dc=la((function(e,t,n){ut.call(e,n)?e[n].push(t):pi(e,n,[t])}));function hc(e,t,n,r){e=AA(e)?e:Zu(e),n=n&&!r?VA(n):0;var i=e.length;return n<0&&(n=zt(i+n,0)),HA(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dn(e,t,n)>-1}var pc=wo((function(e,t,r){var i=-1,o="function"==typeof t,a=AA(e)?n(e.length):[];return xi(e,(function(e){a[++i]=o?bn(t,e,r):Pi(e,t,r)})),a})),fc=la((function(e,t,n){pi(e,n,t)}));function gc(e,t){var n=lA(e)?En:oo;return n(e,qa(t,3))}function mc(e,t,n,r){return null==e?[]:(lA(t)||(t=null==t?[]:[t]),n=r?i:n,lA(n)||(n=null==n?[]:[n]),uo(e,t,n))}var vc=la((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function bc(e,t,n){var r=lA(e)?Fn:Pn,i=arguments.length<3;return r(e,qa(t,4),n,i,xi)}function yc(e,t,n){var r=lA(e)?Tn:Pn,i=arguments.length<3;return r(e,qa(t,4),n,i,ki)}function wc(e,t){var n=lA(e)?Cn:Ei;return n(e,Zc(qa(t,3)))}function xc(e){var t=lA(e)?oi:xo;return t(e)}function kc(e,t,n){t=(n?ss(e,t,n):t===i)?1:VA(t);var r=lA(e)?ai:ko;return r(e,t)}function Cc(e){var t=lA(e)?si:Eo;return t(e)}function Bc(e){if(null==e)return 0;if(AA(e))return HA(e)?fr(e):e.length;var t=Ya(e);return t==X||t==oe?e.size:no(e).length}function _c(e,t,n){var r=lA(e)?Mn:Fo;return n&&ss(e,t,n)&&(t=i),r(e,qa(t,3))}var Ec=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ss(e,t[0],t[1])?t=[]:n>2&&ss(t[0],t[1],t[2])&&(t=[t[0]]),uo(e,Si(t,1),[])})),Sc=Mt||function(){return sn.Date.now()};function Fc(e,t){if("function"!=typeof t)throw new ot(l);return e=VA(e),function(){if(--e<1)return t.apply(this,arguments)}}function Tc(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ma(e,B,i,i,i,i,t)}function Mc(e,t){var n;if("function"!=typeof t)throw new ot(l);return e=VA(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ic=wo((function(e,t,n){var r=v;if(n.length){var i=Ar(n,Pa(Ic));r|=k}return Ma(e,r,t,n,i)})),Nc=wo((function(e,t,n){var r=v|b;if(n.length){var i=Ar(n,Pa(Nc));r|=k}return Ma(t,r,e,n,i)}));function Uc(e,t,n){t=n?i:t;var r=Ma(e,w,i,i,i,i,i,t);return r.placeholder=Uc.placeholder,r}function Lc(e,t,n){t=n?i:t;var r=Ma(e,x,i,i,i,i,i,t);return r.placeholder=Lc.placeholder,r}function Qc(e,t,n){var r,o,a,s,c,A,u=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new ot(l);function f(t){var n=r,a=o;return r=o=i,u=t,s=e.apply(a,n),s}function g(e){return u=e,c=Bs(b,t),d?f(e):s}function m(e){var n=e-A,r=e-u,i=t-n;return h?Zt(i,a-r):i}function v(e){var n=e-A,r=e-u;return A===i||n>=t||n<0||h&&r>=a}function b(){var e=Sc();if(v(e))return y(e);c=Bs(b,m(e))}function y(e){return c=i,p&&r?f(e):(r=o=i,s)}function w(){c!==i&&jo(c),u=0,r=A=o=c=i}function x(){return c===i?s:y(Sc())}function k(){var e=Sc(),n=v(e);if(r=arguments,o=this,A=e,n){if(c===i)return g(A);if(h)return jo(c),c=Bs(b,t),f(A)}return c===i&&(c=Bs(b,t)),s}return t=$A(t)||0,CA(n)&&(d=!!n.leading,h="maxWait"in n,a=h?zt($A(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),k.cancel=w,k.flush=x,k}var Dc=wo((function(e,t){return yi(e,1,t)})),Hc=wo((function(e,t,n){return yi(e,$A(t)||0,n)}));function Oc(e){return Ma(e,E)}function zc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(l);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zc.Cache||Pr),n}function Zc(e){if("function"!=typeof e)throw new ot(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Rc(e){return Mc(2,e)}zc.Cache=Pr;var Pc=Ko((function(e,t){t=1==t.length&&lA(t[0])?En(t[0],Gn(qa())):En(Si(t,1),Gn(qa()));var n=t.length;return wo((function(r){var i=-1,o=Zt(r.length,n);while(++i<o)r[i]=t[i].call(this,r[i]);return bn(e,this,r)}))})),qc=wo((function(e,t){var n=Ar(t,Pa(qc));return Ma(e,k,i,t,n)})),Kc=wo((function(e,t){var n=Ar(t,Pa(Kc));return Ma(e,C,i,t,n)})),Wc=Ha((function(e,t){return Ma(e,_,i,i,i,t)}));function jc(e,t){if("function"!=typeof e)throw new ot(l);return t=t===i?t:VA(t),wo(e,t)}function Vc(e,t){if("function"!=typeof e)throw new ot(l);return t=null==t?0:zt(VA(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&Sn(i,r),bn(e,this,i)}))}function Gc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(l);return CA(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Qc(e,t,{leading:r,maxWait:t,trailing:i})}function $c(e){return Tc(e,1)}function Yc(e,t){return qc(Po(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return lA(e)?e:[e]}function Jc(e){return mi(e,f)}function eA(e,t){return t="function"==typeof t?t:i,mi(e,f,t)}function tA(e){return mi(e,h|f)}function nA(e,t){return t="function"==typeof t?t:i,mi(e,h|f,t)}function rA(e,t){return null==t||bi(e,t,xu(t))}function iA(e,t){return e===t||e!==e&&t!==t}var oA=_a(Di),aA=_a((function(e,t){return e>=t})),sA=qi(function(){return arguments}())?qi:function(e){return BA(e)&&ut.call(e,"callee")&&!Ct.call(e,"callee")},lA=n.isArray,cA=hn?Gn(hn):Ki;function AA(e){return null!=e&&kA(e.length)&&!wA(e)}function uA(e){return BA(e)&&AA(e)}function dA(e){return!0===e||!1===e||BA(e)&&Qi(e)==W}var hA=Qt||Vd,pA=pn?Gn(pn):Wi;function fA(e){return BA(e)&&1===e.nodeType&&!UA(e)}function gA(e){if(null==e)return!0;if(AA(e)&&(lA(e)||"string"==typeof e||"function"==typeof e.splice||hA(e)||zA(e)||sA(e)))return!e.length;var t=Ya(e);if(t==X||t==oe)return!e.size;if(hs(e))return!no(e).length;for(var n in e)if(ut.call(e,n))return!1;return!0}function mA(e,t){return ji(e,t)}function vA(e,t,n){n="function"==typeof n?n:i;var r=n?n(e,t):i;return r===i?ji(e,t,i,n):!!r}function bA(e){if(!BA(e))return!1;var t=Qi(e);return t==G||t==V||"string"==typeof e.message&&"string"==typeof e.name&&!UA(e)}function yA(e){return"number"==typeof e&&Dt(e)}function wA(e){if(!CA(e))return!1;var t=Qi(e);return t==$||t==Y||t==K||t==re}function xA(e){return"number"==typeof e&&e==VA(e)}function kA(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Q}function CA(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function BA(e){return null!=e&&"object"==typeof e}var _A=fn?Gn(fn):Gi;function EA(e,t){return e===t||$i(e,t,Wa(t))}function SA(e,t,n){return n="function"==typeof n?n:i,$i(e,t,Wa(t),n)}function FA(e){return NA(e)&&e!=+e}function TA(e){if(ds(e))throw new He(s);return Yi(e)}function MA(e){return null===e}function IA(e){return null==e}function NA(e){return"number"==typeof e||BA(e)&&Qi(e)==J}function UA(e){if(!BA(e)||Qi(e)!=te)return!1;var t=xt(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&At.call(n)==ft}var LA=gn?Gn(gn):Xi;function QA(e){return xA(e)&&e>=-Q&&e<=Q}var DA=mn?Gn(mn):Ji;function HA(e){return"string"==typeof e||!lA(e)&&BA(e)&&Qi(e)==ae}function OA(e){return"symbol"==typeof e||BA(e)&&Qi(e)==se}var zA=vn?Gn(vn):eo;function ZA(e){return e===i}function RA(e){return BA(e)&&Ya(e)==ce}function PA(e){return BA(e)&&Qi(e)==Ae}var qA=_a(io),KA=_a((function(e,t){return e<=t}));function WA(e){if(!e)return[];if(AA(e))return HA(e)?gr(e):ia(e);if(Et&&e[Et])return sr(e[Et]());var t=Ya(e),n=t==X?lr:t==oe?ur:Zu;return n(e)}function jA(e){if(!e)return 0===e?e:0;if(e=$A(e),e===L||e===-L){var t=e<0?-1:1;return t*D}return e===e?e:0}function VA(e){var t=jA(e),n=t%1;return t===t?n?t-n:t:0}function GA(e){return e?gi(VA(e),0,O):0}function $A(e){if("number"==typeof e)return e;if(OA(e))return H;if(CA(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=CA(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vn(e);var n=Ve.test(e);return n||$e.test(e)?rn(e.slice(2),n?2:8):je.test(e)?H:+e}function YA(e){return oa(e,ku(e))}function XA(e){return e?gi(VA(e),-Q,Q):0===e?e:0}function JA(e){return null==e?"":Uo(e)}var eu=ca((function(e,t){if(hs(t)||AA(t))oa(t,xu(t),e);else for(var n in t)ut.call(t,n)&&ci(e,n,t[n])})),tu=ca((function(e,t){oa(t,ku(t),e)})),nu=ca((function(e,t,n,r){oa(t,ku(t),e,r)})),ru=ca((function(e,t,n,r){oa(t,xu(t),e,r)})),iu=Ha(fi);function ou(e,t){var n=Cr(e);return null==t?n:di(n,t)}var au=wo((function(e,t){e=nt(e);var n=-1,r=t.length,o=r>2?t[2]:i;o&&ss(t[0],t[1],o)&&(r=1);while(++n<r){var a=t[n],s=ku(a),l=-1,c=s.length;while(++l<c){var A=s[l],u=e[A];(u===i||iA(u,lt[A])&&!ut.call(e,A))&&(e[A]=a[A])}}return e})),su=wo((function(e){return e.push(i,Na),bn(Eu,i,e)}));function lu(e,t){return Ln(e,qa(t,3),Mi)}function cu(e,t){return Ln(e,qa(t,3),Ii)}function Au(e,t){return null==e?e:Fi(e,qa(t,3),ku)}function uu(e,t){return null==e?e:Ti(e,qa(t,3),ku)}function du(e,t){return e&&Mi(e,qa(t,3))}function hu(e,t){return e&&Ii(e,qa(t,3))}function pu(e){return null==e?[]:Ni(e,xu(e))}function fu(e){return null==e?[]:Ni(e,ku(e))}function gu(e,t,n){var r=null==e?i:Ui(e,t);return r===i?n:r}function mu(e,t){return null!=e&&es(e,t,Hi)}function vu(e,t){return null!=e&&es(e,t,Oi)}var bu=ya((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),_d(Td)),yu=ya((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ut.call(e,t)?e[t].push(n):e[t]=[n]}),qa),wu=wo(Pi);function xu(e){return AA(e)?ii(e):no(e)}function ku(e){return AA(e)?ii(e,!0):ro(e)}function Cu(e,t){var n={};return t=qa(t,3),Mi(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function Bu(e,t){var n={};return t=qa(t,3),Mi(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var _u=ca((function(e,t,n){lo(e,t,n)})),Eu=ca((function(e,t,n,r){lo(e,t,n,r)})),Su=Ha((function(e,t){var n={};if(null==e)return n;var r=!1;t=En(t,(function(t){return t=qo(t,e),r||(r=t.length>1),t})),oa(e,za(e),n),r&&(n=mi(n,h|p|f,Ua));var i=t.length;while(i--)Qo(n,t[i]);return n}));function Fu(e,t){return Mu(e,Zc(qa(t)))}var Tu=Ha((function(e,t){return null==e?{}:ho(e,t)}));function Mu(e,t){if(null==e)return{};var n=En(za(e),(function(e){return[e]}));return t=qa(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Iu(e,t,n){t=qo(t,e);var r=-1,o=t.length;o||(o=1,e=i);while(++r<o){var a=null==e?i:e[Ms(t[r])];a===i&&(r=o,a=n),e=wA(a)?a.call(e):a}return e}function Nu(e,t,n){return null==e?e:Co(e,t,n)}function Uu(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Co(e,t,n,r)}var Lu=Ta(xu),Qu=Ta(ku);function Du(e,t,n){var r=lA(e),i=r||hA(e)||zA(e);if(t=qa(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:CA(e)&&wA(o)?Cr(xt(e)):{}}return(i?wn:Mi)(e,(function(e,r,i){return t(n,e,r,i)})),n}function Hu(e,t){return null==e||Qo(e,t)}function Ou(e,t,n){return null==e?e:Do(e,t,Po(n))}function zu(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Do(e,t,Po(n),r)}function Zu(e){return null==e?[]:$n(e,xu(e))}function Ru(e){return null==e?[]:$n(e,ku(e))}function Pu(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=$A(n),n=n===n?n:0),t!==i&&(t=$A(t),t=t===t?t:0),gi($A(e),t,n)}function qu(e,t,n){return t=jA(t),n===i?(n=t,t=0):n=jA(n),e=$A(e),zi(e,t,n)}function Ku(e,t,n){if(n&&"boolean"!=typeof n&&ss(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=jA(e),t===i?(t=e,e=0):t=jA(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Wt();return Zt(e+o*(t-e+nn("1e-"+((o+"").length-1))),t)}return vo(e,t)}var Wu=pa((function(e,t,n){return t=t.toLowerCase(),e+(n?ju(t):t)}));function ju(e){return yd(JA(e).toLowerCase())}function Vu(e){return e=JA(e),e&&e.replace(Xe,tr).replace(Pt,"")}function Gu(e,t,n){e=JA(e),t=Uo(t);var r=e.length;n=n===i?r:gi(VA(n),0,r);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function $u(e){return e=JA(e),e&&Se.test(e)?e.replace(_e,nr):e}function Yu(e){return e=JA(e),e&&Qe.test(e)?e.replace(Le,"\\$&"):e}var Xu=pa((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ju=pa((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ed=ha("toLowerCase");function td(e,t,n){e=JA(e),t=VA(t);var r=t?fr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ka(Ut(i),n)+e+ka(Nt(i),n)}function nd(e,t,n){e=JA(e),t=VA(t);var r=t?fr(e):0;return t&&r<t?e+ka(t-r,n):e}function rd(e,t,n){e=JA(e),t=VA(t);var r=t?fr(e):0;return t&&r<t?ka(t-r,n)+e:e}function id(e,t,n){return n||null==t?t=0:t&&(t=+t),Kt(JA(e).replace(De,""),t||0)}function od(e,t,n){return t=(n?ss(e,t,n):t===i)?1:VA(t),yo(JA(e),t)}function ad(){var e=arguments,t=JA(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var sd=pa((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ld(e,t,n){return n&&"number"!=typeof n&&ss(e,t,n)&&(t=n=i),n=n===i?O:n>>>0,n?(e=JA(e),e&&("string"==typeof t||null!=t&&!LA(t))&&(t=Uo(t),!t&&or(e))?Wo(gr(e),0,n):e.split(t,n)):[]}var cd=pa((function(e,t,n){return e+(n?" ":"")+yd(t)}));function Ad(e,t,n){return e=JA(e),n=null==n?0:gi(VA(n),0,e.length),t=Uo(t),e.slice(n,n+t.length)==t}function ud(e,t,n){var r=xr.templateSettings;n&&ss(e,t,n)&&(t=i),e=JA(e),t=nu({},t,r,Ia);var o,a,s=nu({},t.imports,r.imports,Ia),l=xu(s),A=$n(s,l),u=0,d=t.interpolate||Je,h="__p += '",p=rt((t.escape||Je).source+"|"+d.source+"|"+(d===Me?Ke:Je).source+"|"+(t.evaluate||Je).source+"|$","g"),f="//# sourceURL="+(ut.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gt+"]")+"\n";e.replace(p,(function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(u,l).replace(et,rr),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),h+="';\n";var g=ut.call(t,"variable")&&t.variable;if(g){if(Pe.test(g))throw new He(c)}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(xe,""):h).replace(ke,"$1").replace(Ce,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xd((function(){return Re(l,f+"return "+h).apply(i,A)}));if(m.source=h,bA(m))throw m;return m}function dd(e){return JA(e).toLowerCase()}function hd(e){return JA(e).toUpperCase()}function pd(e,t,n){if(e=JA(e),e&&(n||t===i))return Vn(e);if(!e||!(t=Uo(t)))return e;var r=gr(e),o=gr(t),a=Xn(r,o),s=Jn(r,o)+1;return Wo(r,a,s).join("")}function fd(e,t,n){if(e=JA(e),e&&(n||t===i))return e.slice(0,mr(e)+1);if(!e||!(t=Uo(t)))return e;var r=gr(e),o=Jn(r,gr(t))+1;return Wo(r,0,o).join("")}function gd(e,t,n){if(e=JA(e),e&&(n||t===i))return e.replace(De,"");if(!e||!(t=Uo(t)))return e;var r=gr(e),o=Xn(r,gr(t));return Wo(r,o).join("")}function md(e,t){var n=S,r=F;if(CA(t)){var o="separator"in t?t.separator:o;n="length"in t?VA(t.length):n,r="omission"in t?Uo(t.omission):r}e=JA(e);var a=e.length;if(or(e)){var s=gr(e);a=s.length}if(n>=a)return e;var l=n-fr(r);if(l<1)return r;var c=s?Wo(s,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),LA(o)){if(e.slice(l).search(o)){var A,u=c;o.global||(o=rt(o.source,JA(We.exec(o))+"g")),o.lastIndex=0;while(A=o.exec(u))var d=A.index;c=c.slice(0,d===i?l:d)}}else if(e.indexOf(Uo(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r}function vd(e){return e=JA(e),e&&Ee.test(e)?e.replace(Be,vr):e}var bd=pa((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),yd=ha("toUpperCase");function wd(e,t,n){return e=JA(e),t=n?i:t,t===i?ar(e)?wr(e):Un(e):e.match(t)||[]}var xd=wo((function(e,t){try{return bn(e,i,t)}catch(n){return bA(n)?n:new He(n)}})),kd=Ha((function(e,t){return wn(t,(function(t){t=Ms(t),pi(e,t,Ic(e[t],e))})),e}));function Cd(e){var t=null==e?0:e.length,n=qa();return e=t?En(e,(function(e){if("function"!=typeof e[1])throw new ot(l);return[n(e[0]),e[1]]})):[],wo((function(n){var r=-1;while(++r<t){var i=e[r];if(bn(i[0],this,n))return bn(i[1],this,n)}}))}function Bd(e){return vi(mi(e,h))}function _d(e){return function(){return e}}function Ed(e,t){return null==e||e!==e?t:e}var Sd=va(),Fd=va(!0);function Td(e){return e}function Md(e){return to("function"==typeof e?e:mi(e,h))}function Id(e){return ao(mi(e,h))}function Nd(e,t){return so(e,mi(t,h))}var Ud=wo((function(e,t){return function(n){return Pi(n,e,t)}})),Ld=wo((function(e,t){return function(n){return Pi(e,n,t)}}));function Qd(e,t,n){var r=xu(t),i=Ni(t,r);null!=n||CA(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ni(t,xu(t)));var o=!(CA(n)&&"chain"in n)||!!n.chain,a=wA(e);return wn(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=ia(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Sn([this.value()],arguments))})})),e}function Dd(){return sn._===this&&(sn._=gt),this}function Hd(){}function Od(e){return e=VA(e),wo((function(t){return Ao(t,e)}))}var zd=xa(En),Zd=xa(kn),Rd=xa(Mn);function Pd(e){return ls(e)?Zn(Ms(e)):fo(e)}function qd(e){return function(t){return null==e?i:Ui(e,t)}}var Kd=Ba(),Wd=Ba(!0);function jd(){return[]}function Vd(){return!1}function Gd(){return{}}function $d(){return""}function Yd(){return!0}function Xd(e,t){if(e=VA(e),e<1||e>Q)return[];var n=O,r=Zt(e,O);t=qa(t),e-=O;var i=Wn(r,t);while(++n<e)t(n);return i}function Jd(e){return lA(e)?En(e,Ms):OA(e)?[e]:ia(Ts(JA(e)))}function eh(e){var t=++dt;return JA(e)+t}var th=wa((function(e,t){return e+t}),0),nh=Sa("ceil"),rh=wa((function(e,t){return e/t}),1),ih=Sa("floor");function oh(e){return e&&e.length?Bi(e,Td,Di):i}function ah(e,t){return e&&e.length?Bi(e,qa(t,2),Di):i}function sh(e){return zn(e,Td)}function lh(e,t){return zn(e,qa(t,2))}function ch(e){return e&&e.length?Bi(e,Td,io):i}function Ah(e,t){return e&&e.length?Bi(e,qa(t,2),io):i}var uh=wa((function(e,t){return e*t}),1),dh=Sa("round"),hh=wa((function(e,t){return e-t}),0);function ph(e){return e&&e.length?Kn(e,Td):0}function fh(e,t){return e&&e.length?Kn(e,qa(t,2)):0}return xr.after=Fc,xr.ary=Tc,xr.assign=eu,xr.assignIn=tu,xr.assignInWith=nu,xr.assignWith=ru,xr.at=iu,xr.before=Mc,xr.bind=Ic,xr.bindAll=kd,xr.bindKey=Nc,xr.castArray=Xc,xr.chain=Kl,xr.chunk=Ls,xr.compact=Qs,xr.concat=Ds,xr.cond=Cd,xr.conforms=Bd,xr.constant=_d,xr.countBy=nc,xr.create=ou,xr.curry=Uc,xr.curryRight=Lc,xr.debounce=Qc,xr.defaults=au,xr.defaultsDeep=su,xr.defer=Dc,xr.delay=Hc,xr.difference=Hs,xr.differenceBy=Os,xr.differenceWith=zs,xr.drop=Zs,xr.dropRight=Rs,xr.dropRightWhile=Ps,xr.dropWhile=qs,xr.fill=Ks,xr.filter=ic,xr.flatMap=sc,xr.flatMapDeep=lc,xr.flatMapDepth=cc,xr.flatten=Vs,xr.flattenDeep=Gs,xr.flattenDepth=$s,xr.flip=Oc,xr.flow=Sd,xr.flowRight=Fd,xr.fromPairs=Ys,xr.functions=pu,xr.functionsIn=fu,xr.groupBy=dc,xr.initial=el,xr.intersection=tl,xr.intersectionBy=nl,xr.intersectionWith=rl,xr.invert=bu,xr.invertBy=yu,xr.invokeMap=pc,xr.iteratee=Md,xr.keyBy=fc,xr.keys=xu,xr.keysIn=ku,xr.map=gc,xr.mapKeys=Cu,xr.mapValues=Bu,xr.matches=Id,xr.matchesProperty=Nd,xr.memoize=zc,xr.merge=_u,xr.mergeWith=Eu,xr.method=Ud,xr.methodOf=Ld,xr.mixin=Qd,xr.negate=Zc,xr.nthArg=Od,xr.omit=Su,xr.omitBy=Fu,xr.once=Rc,xr.orderBy=mc,xr.over=zd,xr.overArgs=Pc,xr.overEvery=Zd,xr.overSome=Rd,xr.partial=qc,xr.partialRight=Kc,xr.partition=vc,xr.pick=Tu,xr.pickBy=Mu,xr.property=Pd,xr.propertyOf=qd,xr.pull=ll,xr.pullAll=cl,xr.pullAllBy=Al,xr.pullAllWith=ul,xr.pullAt=dl,xr.range=Kd,xr.rangeRight=Wd,xr.rearg=Wc,xr.reject=wc,xr.remove=hl,xr.rest=jc,xr.reverse=pl,xr.sampleSize=kc,xr.set=Nu,xr.setWith=Uu,xr.shuffle=Cc,xr.slice=fl,xr.sortBy=Ec,xr.sortedUniq=xl,xr.sortedUniqBy=kl,xr.split=ld,xr.spread=Vc,xr.tail=Cl,xr.take=Bl,xr.takeRight=_l,xr.takeRightWhile=El,xr.takeWhile=Sl,xr.tap=Wl,xr.throttle=Gc,xr.thru=jl,xr.toArray=WA,xr.toPairs=Lu,xr.toPairsIn=Qu,xr.toPath=Jd,xr.toPlainObject=YA,xr.transform=Du,xr.unary=$c,xr.union=Fl,xr.unionBy=Tl,xr.unionWith=Ml,xr.uniq=Il,xr.uniqBy=Nl,xr.uniqWith=Ul,xr.unset=Hu,xr.unzip=Ll,xr.unzipWith=Ql,xr.update=Ou,xr.updateWith=zu,xr.values=Zu,xr.valuesIn=Ru,xr.without=Dl,xr.words=wd,xr.wrap=Yc,xr.xor=Hl,xr.xorBy=Ol,xr.xorWith=zl,xr.zip=Zl,xr.zipObject=Rl,xr.zipObjectDeep=Pl,xr.zipWith=ql,xr.entries=Lu,xr.entriesIn=Qu,xr.extend=tu,xr.extendWith=nu,Qd(xr,xr),xr.add=th,xr.attempt=xd,xr.camelCase=Wu,xr.capitalize=ju,xr.ceil=nh,xr.clamp=Pu,xr.clone=Jc,xr.cloneDeep=tA,xr.cloneDeepWith=nA,xr.cloneWith=eA,xr.conformsTo=rA,xr.deburr=Vu,xr.defaultTo=Ed,xr.divide=rh,xr.endsWith=Gu,xr.eq=iA,xr.escape=$u,xr.escapeRegExp=Yu,xr.every=rc,xr.find=oc,xr.findIndex=Ws,xr.findKey=lu,xr.findLast=ac,xr.findLastIndex=js,xr.findLastKey=cu,xr.floor=ih,xr.forEach=Ac,xr.forEachRight=uc,xr.forIn=Au,xr.forInRight=uu,xr.forOwn=du,xr.forOwnRight=hu,xr.get=gu,xr.gt=oA,xr.gte=aA,xr.has=mu,xr.hasIn=vu,xr.head=Xs,xr.identity=Td,xr.includes=hc,xr.indexOf=Js,xr.inRange=qu,xr.invoke=wu,xr.isArguments=sA,xr.isArray=lA,xr.isArrayBuffer=cA,xr.isArrayLike=AA,xr.isArrayLikeObject=uA,xr.isBoolean=dA,xr.isBuffer=hA,xr.isDate=pA,xr.isElement=fA,xr.isEmpty=gA,xr.isEqual=mA,xr.isEqualWith=vA,xr.isError=bA,xr.isFinite=yA,xr.isFunction=wA,xr.isInteger=xA,xr.isLength=kA,xr.isMap=_A,xr.isMatch=EA,xr.isMatchWith=SA,xr.isNaN=FA,xr.isNative=TA,xr.isNil=IA,xr.isNull=MA,xr.isNumber=NA,xr.isObject=CA,xr.isObjectLike=BA,xr.isPlainObject=UA,xr.isRegExp=LA,xr.isSafeInteger=QA,xr.isSet=DA,xr.isString=HA,xr.isSymbol=OA,xr.isTypedArray=zA,xr.isUndefined=ZA,xr.isWeakMap=RA,xr.isWeakSet=PA,xr.join=il,xr.kebabCase=Xu,xr.last=ol,xr.lastIndexOf=al,xr.lowerCase=Ju,xr.lowerFirst=ed,xr.lt=qA,xr.lte=KA,xr.max=oh,xr.maxBy=ah,xr.mean=sh,xr.meanBy=lh,xr.min=ch,xr.minBy=Ah,xr.stubArray=jd,xr.stubFalse=Vd,xr.stubObject=Gd,xr.stubString=$d,xr.stubTrue=Yd,xr.multiply=uh,xr.nth=sl,xr.noConflict=Dd,xr.noop=Hd,xr.now=Sc,xr.pad=td,xr.padEnd=nd,xr.padStart=rd,xr.parseInt=id,xr.random=Ku,xr.reduce=bc,xr.reduceRight=yc,xr.repeat=od,xr.replace=ad,xr.result=Iu,xr.round=dh,xr.runInContext=e,xr.sample=xc,xr.size=Bc,xr.snakeCase=sd,xr.some=_c,xr.sortedIndex=gl,xr.sortedIndexBy=ml,xr.sortedIndexOf=vl,xr.sortedLastIndex=bl,xr.sortedLastIndexBy=yl,xr.sortedLastIndexOf=wl,xr.startCase=cd,xr.startsWith=Ad,xr.subtract=hh,xr.sum=ph,xr.sumBy=fh,xr.template=ud,xr.times=Xd,xr.toFinite=jA,xr.toInteger=VA,xr.toLength=GA,xr.toLower=dd,xr.toNumber=$A,xr.toSafeInteger=XA,xr.toString=JA,xr.toUpper=hd,xr.trim=pd,xr.trimEnd=fd,xr.trimStart=gd,xr.truncate=md,xr.unescape=vd,xr.uniqueId=eh,xr.upperCase=bd,xr.upperFirst=yd,xr.each=Ac,xr.eachRight=uc,xr.first=Xs,Qd(xr,function(){var e={};return Mi(xr,(function(t,n){ut.call(xr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),xr.VERSION=o,wn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xr[e].placeholder=xr})),wn(["drop","take"],(function(e,t){Er.prototype[e]=function(n){n=n===i?1:zt(VA(n),0);var r=this.__filtered__&&!t?new Er(this):this.clone();return r.__filtered__?r.__takeCount__=Zt(n,r.__takeCount__):r.__views__.push({size:Zt(n,O),type:e+(r.__dir__<0?"Right":"")}),r},Er.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==I||n==U;Er.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:qa(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Er.prototype[e]=function(){return this[n](1).value()[0]}})),wn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Er.prototype[e]=function(){return this.__filtered__?new Er(this):this[n](1)}})),Er.prototype.compact=function(){return this.filter(Td)},Er.prototype.find=function(e){return this.filter(e).head()},Er.prototype.findLast=function(e){return this.reverse().find(e)},Er.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Er(this):this.map((function(n){return Pi(n,e,t)}))})),Er.prototype.reject=function(e){return this.filter(Zc(qa(e)))},Er.prototype.slice=function(e,t){e=VA(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Er(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=VA(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},Er.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Er.prototype.toArray=function(){return this.take(O)},Mi(Er.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=xr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(xr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Er,c=s[0],A=l||lA(t),u=function(e){var t=o.apply(xr,Sn([e],s));return r&&d?t[0]:t};A&&n&&"function"==typeof c&&1!=c.length&&(l=A=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,f=l&&!h;if(!a&&A){t=f?t:new Er(this);var g=e.apply(t,s);return g.__actions__.push({func:jl,args:[u],thisArg:i}),new _r(g,d)}return p&&f?e.apply(this,s):(g=this.thru(u),p?r?g.value()[0]:g.value():g)})})),wn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);xr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(lA(i)?i:[],e)}return this[n]((function(n){return t.apply(lA(n)?n:[],e)}))}})),Mi(Er.prototype,(function(e,t){var n=xr[t];if(n){var r=n.name+"";ut.call(cn,r)||(cn[r]=[]),cn[r].push({name:t,func:n})}})),cn[ba(i,b).name]=[{name:"wrapper",func:i}],Er.prototype.clone=Sr,Er.prototype.reverse=Fr,Er.prototype.value=Tr,xr.prototype.at=Vl,xr.prototype.chain=Gl,xr.prototype.commit=$l,xr.prototype.next=Yl,xr.prototype.plant=Jl,xr.prototype.reverse=ec,xr.prototype.toJSON=xr.prototype.valueOf=xr.prototype.value=tc,xr.prototype.first=xr.prototype.head,Et&&(xr.prototype[Et]=Xl),xr},kr=xr();sn._=kr,r=function(){return kr}.call(t,n,t,e),r===i||(e.exports=r)}.call(this)},36564:function(e,t,n){var r=n(58082),i="Expected a function";function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},31823:function(e,t,n){var r=n(41720),i=n(65882),o=i((function(e,t,n){r(e,t,n)}));e.exports=o},14705:function(e,t,n){var r=n(69159),i=function(){return r.Date.now()};e.exports=i},69208:function(e,t,n){var r=n(58664),i=n(39746),o=n(36890),a=n(5299),s=n(66877),l=n(27962),c=n(1443),A=n(50592),u=1,d=2,h=4,p=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=a(t,e),c||(c=t.length>1),t})),s(e,A(e),n),c&&(n=i(n,u|d|h,l));var p=t.length;while(p--)o(n,t[p]);return n}));e.exports=p},52322:function(e,t,n){var r=n(28638),i=n(4568),o=n(9020),a=n(88952);function s(e){return o(e)?r(a(e)):i(e)}e.exports=s},20826:function(e,t,n){var r=n(77912),i=n(13973),o=n(85949),a=n(59459);function s(e,t,n){return e=a(e),n=null==n?0:r(o(n),0,e.length),t=i(t),e.slice(n,n+t.length)==t}e.exports=s},13538:function(e){function t(){return[]}e.exports=t},22225:function(e){function t(){return!1}e.exports=t},79289:function(e,t,n){var r=n(73738),i=n(70150),o="Expected a function";function a(e,t,n){var a=!0,s=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(a="leading"in n?!!n.leading:a,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:a,maxWait:t,trailing:s})}e.exports=a},776:function(e,t,n){var r=n(62012),i=1/0,o=17976931348623157e292;function a(e){if(!e)return 0===e?e:0;if(e=r(e),e===i||e===-i){var t=e<0?-1:1;return t*o}return e===e?e:0}e.exports=a},85949:function(e,t,n){var r=n(776);function i(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}e.exports=i},62012:function(e,t,n){var r=n(66009),i=n(70150),o=n(17691),a=NaN,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,A=parseInt;function u(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||c.test(e)?A(e.slice(2),n?2:8):s.test(e)?a:+e}e.exports=u},55791:function(e,t,n){var r=n(66877),i=n(74494);function o(e){return r(e,i(e))}e.exports=o},59459:function(e,t,n){var r=n(13973);function i(e){return null==e?"":r(e)}e.exports=i},60041:function(e,t,n){"use strict";n(57658),e.exports=function(e,t,n){function r(e){return e.trim().split(" ",2)[0]===t}function i(e,n,r,i,o){return 1===e[n].nesting&&e[n].attrJoin("class",t),o.renderToken(e,n,r,i,o)}n=n||{};var o=3,a=n.marker||":",s=a.charCodeAt(0),l=a.length,c=n.validate||r,A=n.render||i;function u(e,n,r,i){var A,u,d,h,p,f,g,m,v=!1,b=e.bMarks[n]+e.tShift[n],y=e.eMarks[n];if(s!==e.src.charCodeAt(b))return!1;for(A=b+1;A<=y;A++)if(a[(A-b)%l]!==e.src[A])break;if(d=Math.floor((A-b)/l),d<o)return!1;if(A-=(A-b)%l,h=e.src.slice(b,A),p=e.src.slice(A,y),!c(p,h))return!1;if(i)return!0;for(u=n;;){if(u++,u>=r)break;if(b=e.bMarks[u]+e.tShift[u],y=e.eMarks[u],b<y&&e.sCount[u]<e.blkIndent)break;if(s===e.src.charCodeAt(b)&&!(e.sCount[u]-e.blkIndent>=4)){for(A=b+1;A<=y;A++)if(a[(A-b)%l]!==e.src[A])break;if(!(Math.floor((A-b)/l)<d)&&(A-=(A-b)%l,A=e.skipSpaces(A),!(A<y))){v=!0;break}}}return g=e.parentType,m=e.lineMax,e.parentType="container",e.lineMax=u,f=e.push("container_"+t+"_open","div",1),f.markup=h,f.block=!0,f.info=p,f.map=[n,u],e.md.block.tokenize(e,n+1,u),f=e.push("container_"+t+"_close","div",-1),f.markup=e.src.slice(b,A),f.block=!0,e.parentType=g,e.lineMax=m,e.line=u+(v?1:0),!0}e.block.ruler.before("fence","container_"+t,u,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=A,e.renderer.rules["container_"+t+"_close"]=A}},84462:function(e,t,n){"use strict";n(57658),e.exports=function(e){function t(e,t){var n,r,i,o,a,s=e.pos,l=e.src.charCodeAt(s);if(t)return!1;if(61!==l)return!1;if(r=e.scanDelims(e.pos,!0),o=r.length,a=String.fromCharCode(l),o<2)return!1;for(o%2&&(i=e.push("text","",0),i.content=a,o--),n=0;n<o;n+=2)i=e.push("text","",0),i.content=a+a,(r.can_open||r.can_close)&&e.delimiters.push({marker:l,length:0,jump:n/2,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function n(e,t){var n,r,i,o,a,s=[],l=t.length;for(n=0;n<l;n++)i=t[n],61===i.marker&&-1!==i.end&&(o=t[i.end],a=e.tokens[i.token],a.type="mark_open",a.tag="mark",a.nesting=1,a.markup="==",a.content="",a=e.tokens[o.token],a.type="mark_close",a.tag="mark",a.nesting=-1,a.markup="==",a.content="","text"===e.tokens[o.token-1].type&&"="===e.tokens[o.token-1].content&&s.push(o.token-1));while(s.length){n=s.pop(),r=n+1;while(r<e.tokens.length&&"mark_close"===e.tokens[r].type)r++;r--,n!==r&&(a=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=a)}}e.inline.ruler.before("emphasis","mark",t),e.inline.ruler2.before("emphasis","mark",(function(e){var t,r=e.tokens_meta,i=(e.tokens_meta||[]).length;for(n(e,e.delimiters),t=0;t<i;t++)r[t]&&r[t].delimiters&&n(e,r[t].delimiters)}))}},10082:function(e,t,n){"use strict";n(57658);var r=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function i(e,t){var n,i,o,a=e.posMax,s=e.pos;if(126!==e.src.charCodeAt(s))return!1;if(t)return!1;if(s+2>=a)return!1;e.pos=s+1;while(e.pos<a){if(126===e.src.charCodeAt(e.pos)){n=!0;break}e.md.inline.skipToken(e)}return n&&s+1!==e.pos?(i=e.src.slice(s+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/)?(e.pos=s,!1):(e.posMax=e.pos,e.pos=s+1,o=e.push("sub_open","sub",1),o.markup="~",o=e.push("text","",0),o.content=i.replace(r,"$1"),o=e.push("sub_close","sub",-1),o.markup="~",e.pos=e.posMax+1,e.posMax=a,!0)):(e.pos=s,!1)}e.exports=function(e){e.inline.ruler.after("emphasis","sub",i)}},27632:function(e,t,n){"use strict";n(57658);var r=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function i(e,t){var n,i,o,a=e.posMax,s=e.pos;if(94!==e.src.charCodeAt(s))return!1;if(t)return!1;if(s+2>=a)return!1;e.pos=s+1;while(e.pos<a){if(94===e.src.charCodeAt(e.pos)){n=!0;break}e.md.inline.skipToken(e)}return n&&s+1!==e.pos?(i=e.src.slice(s+1,e.pos),i.match(/(^|[^\\])(\\\\)*\s/)?(e.pos=s,!1):(e.posMax=e.pos,e.pos=s+1,o=e.push("sup_open","sup",1),o.markup="^",o=e.push("text","",0),o.content=i.replace(r,"$1"),o=e.push("sup_close","sup",-1),o.markup="^",e.pos=e.posMax+1,e.posMax=a,!0)):(e.pos=s,!1)}e.exports=function(e){e.inline.ruler.after("emphasis","sup",i)}},83812:function(e,t,n){"use strict";e.exports=n(44676)},78761:function(e,t,n){"use strict";e.exports=n(95485)},64997:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},97550:function(e){"use strict";var t="[a-zA-Z_:][a-zA-Z0-9:._-]*",n="[^\"'=<>`\\x00-\\x20]+",r="'[^']*'",i='"[^"]*"',o="(?:"+n+"|"+r+"|"+i+")",a="(?:\\s+"+t+"(?:\\s*=\\s*"+o+")?)",s="<[A-Za-z][A-Za-z0-9\\-]*"+a+"*\\s*\\/?>",l="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",c="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e",A="<[?][\\s\\S]*?[?]>",u="<![A-Z]+\\s+[^>]*>",d="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",h=new RegExp("^(?:"+s+"|"+l+"|"+c+"|"+A+"|"+u+"|"+d+")"),p=new RegExp("^(?:"+s+"|"+l+")");e.exports.n=h,e.exports.q=p},58341:function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===r(e)}var o=Object.prototype.hasOwnProperty;function a(e,t){return o.call(e,t)}function s(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e}function l(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function c(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function A(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,h=new RegExp(u.source+"|"+d.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,f=n(78761);function g(e,t){var n=0;return a(f,t)?f[t]:35===t.charCodeAt(0)&&p.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),c(n))?A(n):e}function m(e){return e.indexOf("\\")<0?e:e.replace(u,"$1")}function v(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(h,(function(e,t,n){return t||g(e,n)}))}var b=/[&<>"]/,y=/[&<>"]/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function x(e){return w[e]}function k(e){return b.test(e)?e.replace(y,x):e}var C=/[.?*+^$[\]\\(){}|-]/g;function B(e){return e.replace(C,"\\$&")}function _(e){switch(e){case 9:case 32:return!0}return!1}function E(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var S=n(33031);function F(e){return S.test(e)}function T(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function M(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}t.lib={},t.lib.mdurl=n(44389),t.lib.ucmicro=n(58229),t.assign=s,t.isString=i,t.has=a,t.unescapeMd=m,t.unescapeAll=v,t.isValidEntityCode=c,t.fromCodePoint=A,t.escapeHtml=k,t.arrayReplaceAt=l,t.isSpace=_,t.isWhiteSpace=E,t.isMdAsciiPunct=T,t.isPunctChar=F,t.escapeRE=B,t.normalizeReference=M},921:function(e,t,n){"use strict";t.parseLinkLabel=n(93811),t.parseLinkDestination=n(21058),t.parseLinkTitle=n(14970)},21058:function(e,t,n){"use strict";var r=n(58341).unescapeAll;e.exports=function(e,t,n){var i,o,a=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){t++;while(t<n){if(i=e.charCodeAt(t),10===i)return l;if(60===i)return l;if(62===i)return l.pos=t+1,l.str=r(e.slice(s+1,t)),l.ok=!0,l;92===i&&t+1<n?t+=2:t++}return l}o=0;while(t<n){if(i=e.charCodeAt(t),32===i)break;if(i<32||127===i)break;if(92===i&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===i&&(o++,o>32))return l;if(41===i){if(0===o)break;o--}t++}}return s===t||0!==o||(l.str=r(e.slice(s,t)),l.lines=a,l.pos=t,l.ok=!0),l}},93811:function(e){"use strict";e.exports=function(e,t,n){var r,i,o,a,s=-1,l=e.posMax,c=e.pos;e.pos=t+1,r=1;while(e.pos<l){if(o=e.src.charCodeAt(e.pos),93===o&&(r--,0===r)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===o)if(a===e.pos-1)r++;else if(n)return e.pos=c,-1}return i&&(s=e.pos),e.pos=c,s}},14970:function(e,t,n){"use strict";var r=n(58341).unescapeAll;e.exports=function(e,t,n){var i,o,a=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(o=e.charCodeAt(t),34!==o&&39!==o&&40!==o)return l;t++,40===o&&(o=41);while(t<n){if(i=e.charCodeAt(t),i===o)return l.pos=t+1,l.lines=a,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===i&&41===o)return l;10===i?a++:92===i&&t+1<n&&(t++,10===e.charCodeAt(t)&&a++),t++}return l}},44676:function(e,t,n){"use strict";var r=n(58341),i=n(921),o=n(68626),a=n(38224),s=n(97574),l=n(58812),c=n(58919),A=n(44389),u=n(1128),d={default:n(81436),zero:n(85843),commonmark:n(35317)},h=/^(vbscript|javascript|file|data):/,p=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!h.test(t)||!!p.test(t)}var g=["http:","https:","mailto:"];function m(e){var t=A.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=u.toASCII(t.hostname)}catch(n){}return A.encode(A.format(t))}function v(e){var t=A.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=u.toUnicode(t.hostname)}catch(n){}return A.decode(A.format(t),A.decode.defaultChars+"%")}function b(e,t){if(!(this instanceof b))return new b(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=m,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return r.assign(this.options,e),this},b.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&(t=e,e=d[t],!e))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!==typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},97574:function(e,t,n){"use strict";n(57658);var r=n(67963),i=[["table",n(51462),["paragraph","reference"]],["code",n(93292)],["fence",n(57333),["paragraph","reference","blockquote","list"]],["blockquote",n(89348),["paragraph","reference","blockquote","list"]],["hr",n(18882),["paragraph","reference","blockquote","list"]],["list",n(75733),["paragraph","reference","blockquote"]],["reference",n(62035)],["html_block",n(84558),["paragraph","reference","blockquote"]],["heading",n(75860),["paragraph","reference","blockquote"]],["lheading",n(86002)],["paragraph",n(56577)]];function o(){this.ruler=new r;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){var r,i,o=this.ruler.getRules(""),a=o.length,s=t,l=!1,c=e.md.options.maxNesting;while(s<n){if(e.line=s=e.skipEmptyLines(s),s>=n)break;if(e.sCount[s]<e.blkIndent)break;if(e.level>=c){e.line=n;break}for(i=0;i<a;i++)if(r=o[i](e,s,n,!1),r)break;e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,s<n&&e.isEmpty(s)&&(l=!0,s++,e.line=s)}},o.prototype.parse=function(e,t,n,r){var i;e&&(i=new this.State(e,t,n,r),this.tokenize(i,i.line,i.lineMax))},o.prototype.State=n(85930),e.exports=o},38224:function(e,t,n){"use strict";n(57658);var r=n(67963),i=[["normalize",n(99943)],["block",n(64388)],["inline",n(87911)],["linkify",n(47804)],["replacements",n(47649)],["smartquotes",n(85839)],["text_join",n(11098)]];function o(){this.ruler=new r;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}o.prototype.process=function(e){var t,n,r;for(r=this.ruler.getRules(""),t=0,n=r.length;t<n;t++)r[t](e)},o.prototype.State=n(90883),e.exports=o},58812:function(e,t,n){"use strict";n(57658);var r=n(67963),i=[["text",n(42330)],["linkify",n(5927)],["newline",n(29479)],["escape",n(3097)],["backticks",n(18314)],["strikethrough",n(14098).w],["emphasis",n(319).w],["link",n(18973)],["image",n(51029)],["autolink",n(3912)],["html_inline",n(32367)],["entity",n(24897)]],o=[["balance_pairs",n(5798)],["strikethrough",n(14098).g],["emphasis",n(319).g],["fragments_join",n(88785)]];function a(){var e;for(this.ruler=new r,e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}a.prototype.skipToken=function(e){var t,n,r=e.pos,i=this.ruler.getRules(""),o=i.length,a=e.md.options.maxNesting,s=e.cache;if("undefined"===typeof s[r]){if(e.level<a){for(n=0;n<o;n++)if(e.level++,t=i[n](e,!0),e.level--,t)break}else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},a.prototype.tokenize=function(e){var t,n,r=this.ruler.getRules(""),i=r.length,o=e.posMax,a=e.md.options.maxNesting;while(e.pos<o){if(e.level<a)for(n=0;n<i;n++)if(t=r[n](e,!1),t)break;if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),o=this.ruler2.getRules(""),a=o.length,i=0;i<a;i++)o[i](s)},a.prototype.State=n(87278),e.exports=a},35317:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},81436:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},85843:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},68626:function(e,t,n){"use strict";n(57658);var r=n(58341).assign,i=n(58341).unescapeAll,o=n(58341).escapeHtml,a={};function s(){this.rules=r({},a)}a.code_inline=function(e,t,n,r,i){var a=e[t];return"<code"+i.renderAttrs(a)+">"+o(e[t].content)+"</code>"},a.code_block=function(e,t,n,r,i){var a=e[t];return"<pre"+i.renderAttrs(a)+"><code>"+o(e[t].content)+"</code></pre>\n"},a.fence=function(e,t,n,r,a){var s,l,c,A,u,d=e[t],h=d.info?i(d.info).trim():"",p="",f="";return h&&(c=h.split(/(\s+)/g),p=c[0],f=c.slice(2).join("")),s=n.highlight&&n.highlight(d.content,p,f)||o(d.content),0===s.indexOf("<pre")?s+"\n":h?(l=d.attrIndex("class"),A=d.attrs?d.attrs.slice():[],l<0?A.push(["class",n.langPrefix+p]):(A[l]=A[l].slice(),A[l][1]+=" "+n.langPrefix+p),u={attrs:A},"<pre><code"+a.renderAttrs(u)+">"+s+"</code></pre>\n"):"<pre><code"+a.renderAttrs(d)+">"+s+"</code></pre>\n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,i="",o=!1,a=e[t];return a.hidden?"":(a.block&&-1!==a.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===a.nesting?"</":"<")+a.tag,i+=this.renderAttrs(a),0===a.nesting&&n.xhtmlOut&&(i+=" /"),a.block&&(o=!0,1===a.nesting&&t+1<e.length&&(r=e[t+1],("inline"===r.type||r.hidden||-1===r.nesting&&r.tag===a.tag)&&(o=!1))),i+=o?">\n":">",i)},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a<s;a++)r=e[a].type,"undefined"!==typeof o[r]?i+=o[r](e,a,t,n,this):i+=this.renderToken(e,a,t);return i},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",i=0,o=e.length;i<o;i++)"text"===e[i].type?r+=e[i].content:"image"===e[i].type?r+=this.renderInlineAsText(e[i].children,t,n):"softbreak"===e[i].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,i,o,a="",s=this.rules;for(r=0,i=e.length;r<i;r++)o=e[r].type,"inline"===o?a+=this.renderInline(e[r].children,t,n):"undefined"!==typeof s[o]?a+=s[e[r].type](e,r,t,n,this):a+=this.renderToken(e,r,t,n);return a},e.exports=s},67963:function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}n(57658),r.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},r.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},r.prototype.at=function(e,t,n){var r=this.__find__(e),i=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){var i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){var i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},r.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},r.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=r},89348:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;e.exports=function(e,t,n,i){var o,a,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B=e.lineMax,_=e.bMarks[t]+e.tShift[t],E=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(_++))return!1;if(i)return!0;l=h=e.sCount[t]+1,32===e.src.charCodeAt(_)?(_++,l++,h++,o=!1,y=!0):9===e.src.charCodeAt(_)?(y=!0,(e.bsCount[t]+h)%4===3?(_++,l++,h++,o=!1):o=!0):y=!1,p=[e.bMarks[t]],e.bMarks[t]=_;while(_<E){if(a=e.src.charCodeAt(_),!r(a))break;9===a?h+=4-(h+e.bsCount[t]+(o?1:0))%4:h++,_++}for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),A=_>=E,v=[e.sCount[t]],e.sCount[t]=h-l,b=[e.tShift[t]],e.tShift[t]=_-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),m=e.parentType,e.parentType="blockquote",d=t+1;d<n;d++){if(C=e.sCount[d]<e.blkIndent,_=e.bMarks[d]+e.tShift[d],E=e.eMarks[d],_>=E)break;if(62!==e.src.charCodeAt(_++)||C){if(A)break;for(w=!1,s=0,c=x.length;s<c;s++)if(x[s](e,d,n,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(p.push(e.bMarks[d]),f.push(e.bsCount[d]),b.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}p.push(e.bMarks[d]),f.push(e.bsCount[d]),b.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{l=h=e.sCount[d]+1,32===e.src.charCodeAt(_)?(_++,l++,h++,o=!1,y=!0):9===e.src.charCodeAt(_)?(y=!0,(e.bsCount[d]+h)%4===3?(_++,l++,h++,o=!1):o=!0):y=!1,p.push(e.bMarks[d]),e.bMarks[d]=_;while(_<E){if(a=e.src.charCodeAt(_),!r(a))break;9===a?h+=4-(h+e.bsCount[d]+(o?1:0))%4:h++,_++}A=_>=E,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=h-l,b.push(e.tShift[d]),e.tShift[d]=_-e.bMarks[d]}}for(g=e.blkIndent,e.blkIndent=0,k=e.push("blockquote_open","blockquote",1),k.markup=">",k.map=u=[t,0],e.md.block.tokenize(e,t,d),k=e.push("blockquote_close","blockquote",-1),k.markup=">",e.lineMax=B,e.parentType=m,u[1]=e.line,s=0;s<b.length;s++)e.bMarks[s+t]=p[s],e.tShift[s+t]=b[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},93292:function(e,t,n){"use strict";n(57658),e.exports=function(e,t,n){var r,i,o;if(e.sCount[t]-e.blkIndent<4)return!1;i=r=t+1;while(r<n)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;r++,i=r}return e.line=i,o=e.push("code_block","code",0),o.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},57333:function(e,t,n){"use strict";n(57658),e.exports=function(e,t,n,r){var i,o,a,s,l,c,A,u=!1,d=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>h)return!1;if(i=e.src.charCodeAt(d),126!==i&&96!==i)return!1;if(l=d,d=e.skipChars(d,i),o=d-l,o<3)return!1;if(A=e.src.slice(l,d),a=e.src.slice(d,h),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;;){if(s++,s>=n)break;if(d=l=e.bMarks[s]+e.tShift[s],h=e.eMarks[s],d<h&&e.sCount[s]<e.blkIndent)break;if(e.src.charCodeAt(d)===i&&(!(e.sCount[s]-e.blkIndent>=4)&&(d=e.skipChars(d,i),!(d-l<o)&&(d=e.skipSpaces(d),!(d<h))))){u=!0;break}}return o=e.sCount[t],e.line=s+(u?1:0),c=e.push("fence","code",0),c.info=a,c.content=e.getLines(t+1,s,o,!0),c.markup=A,c.map=[t,e.line],!0}},75860:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;e.exports=function(e,t,n,i){var o,a,s,l,c=e.bMarks[t]+e.tShift[t],A=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(o=e.src.charCodeAt(c),35!==o||c>=A)return!1;a=1,o=e.src.charCodeAt(++c);while(35===o&&c<A&&a<=6)a++,o=e.src.charCodeAt(++c);return!(a>6||c<A&&!r(o))&&(i||(A=e.skipSpacesBack(A,c),s=e.skipCharsBack(A,35,c),s>c&&r(e.src.charCodeAt(s-1))&&(A=s),e.line=t+1,l=e.push("heading_open","h"+String(a),1),l.markup="########".slice(0,a),l.map=[t,e.line],l=e.push("inline","",0),l.content=e.src.slice(c,A).trim(),l.map=[t,e.line],l.children=[],l=e.push("heading_close","h"+String(a),-1),l.markup="########".slice(0,a)),!0)}},18882:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;e.exports=function(e,t,n,i){var o,a,s,l,c=e.bMarks[t]+e.tShift[t],A=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(o=e.src.charCodeAt(c++),42!==o&&45!==o&&95!==o)return!1;a=1;while(c<A){if(s=e.src.charCodeAt(c++),s!==o&&!r(s))return!1;s===o&&a++}return!(a<3)&&(i||(e.line=t+1,l=e.push("hr","hr",0),l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o))),!0)}},84558:function(e,t,n){"use strict";n(57658);var r=n(64997),i=n(97550).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,l,c=e.bMarks[t]+e.tShift[t],A=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,A),i=0;i<o.length;i++)if(o[i][0].test(l))break;if(i===o.length)return!1;if(r)return o[i][2];if(a=t+1,!o[i][1].test(l))for(;a<n;a++){if(e.sCount[a]<e.blkIndent)break;if(c=e.bMarks[a]+e.tShift[a],A=e.eMarks[a],l=e.src.slice(c,A),o[i][1].test(l)){0!==l.length&&a++;break}}return e.line=a,s=e.push("html_block","",0),s.map=[t,a],s.content=e.getLines(t,a,e.blkIndent,!0),!0}},86002:function(e,t,n){"use strict";n(57658),e.exports=function(e,t,n){var r,i,o,a,s,l,c,A,u,d,h=t+1,p=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";h<n&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(l=e.bMarks[h]+e.tShift[h],c=e.eMarks[h],l<c&&(u=e.src.charCodeAt(l),(45===u||61===u)&&(l=e.skipChars(l,u),l=e.skipSpaces(l),l>=c)))){A=61===u?1:2;break}if(!(e.sCount[h]<0)){for(i=!1,o=0,a=p.length;o<a;o++)if(p[o](e,h,n,!0)){i=!0;break}if(i)break}}return!!A&&(r=e.getLines(t,h,e.blkIndent,!1).trim(),e.line=h+1,s=e.push("heading_open","h"+String(A),1),s.markup=String.fromCharCode(u),s.map=[t,e.line],s=e.push("inline","",0),s.content=r,s.map=[t,e.line-1],s.children=[],s=e.push("heading_close","h"+String(A),-1),s.markup=String.fromCharCode(u),e.parentType=d,!0)}},75733:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;function i(e,t){var n,i,o,a;return i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],n=e.src.charCodeAt(i++),42!==n&&45!==n&&43!==n||i<o&&(a=e.src.charCodeAt(i),!r(a))?-1:i}function o(e,t){var n,i=e.bMarks[t]+e.tShift[t],o=i,a=e.eMarks[t];if(o+1>=a)return-1;if(n=e.src.charCodeAt(o++),n<48||n>57)return-1;for(;;){if(o>=a)return-1;if(n=e.src.charCodeAt(o++),!(n>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o<a&&(n=e.src.charCodeAt(o),!r(n))?-1:o}function a(e,t){var n,r,i=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===i&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}e.exports=function(e,t,n,r){var s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_,E,S,F,T,M,I,N,U,L=!1,Q=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(L=!0),(F=o(e,t))>=0){if(h=!0,M=e.bMarks[t]+e.tShift[t],b=Number(e.src.slice(M,F-1)),L&&1!==b)return!1}else{if(!((F=i(e,t))>=0))return!1;h=!1}if(L&&e.skipSpaces(F)>=e.eMarks[t])return!1;if(v=e.src.charCodeAt(F-1),r)return!0;m=e.tokens.length,h?(U=e.push("ordered_list_open","ol",1),1!==b&&(U.attrs=[["start",b]])):U=e.push("bullet_list_open","ul",1),U.map=g=[t,0],U.markup=String.fromCharCode(v),w=t,T=!1,N=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";while(w<n){S=F,y=e.eMarks[w],d=x=e.sCount[w]+F-(e.bMarks[t]+e.tShift[t]);while(S<y){if(s=e.src.charCodeAt(S),9===s)x+=4-(x+e.bsCount[w])%4;else{if(32!==s)break;x++}S++}if(l=S,u=l>=y?1:x-d,u>4&&(u=1),A=d+u,U=e.push("list_item_open","li",1),U.markup=String.fromCharCode(v),U.map=p=[t,0],h&&(U.info=e.src.slice(M,F-1)),E=e.tight,_=e.tShift[t],B=e.sCount[t],k=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=A,e.tight=!0,e.tShift[t]=l-e.bMarks[t],e.sCount[t]=x,l>=y&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(Q=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[t]=_,e.sCount[t]=B,e.tight=E,U=e.push("list_item_close","li",-1),U.markup=String.fromCharCode(v),w=t=e.line,p[1]=w,l=e.bMarks[t],w>=n)break;if(e.sCount[w]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(I=!1,c=0,f=N.length;c<f;c++)if(N[c](e,w,n,!0)){I=!0;break}if(I)break;if(h){if(F=o(e,w),F<0)break;M=e.bMarks[w]+e.tShift[w]}else if(F=i(e,w),F<0)break;if(v!==e.src.charCodeAt(F-1))break}return U=h?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),U.markup=String.fromCharCode(v),g[1]=w,e.line=w,e.parentType=C,Q&&a(e,m),!0}},56577:function(e,t,n){"use strict";n(57658),e.exports=function(e,t){var n,r,i,o,a,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),A=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<A&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3)&&!(e.sCount[l]<0)){for(r=!1,i=0,o=c.length;i<o;i++)if(c[i](e,l,A,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,a=e.push("paragraph_open","p",1),a.map=[t,e.line],a=e.push("inline","",0),a.content=n,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),e.parentType=s,!0}},62035:function(e,t,n){"use strict";var r=n(58341).normalizeReference,i=n(58341).isSpace;e.exports=function(e,t,n,o){var a,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x=0,k=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],B=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(k))return!1;while(++k<C)if(93===e.src.charCodeAt(k)&&92!==e.src.charCodeAt(k-1)){if(k+1===C)return!1;if(58!==e.src.charCodeAt(k+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";B<c&&!e.isEmpty(B);B++)if(!(e.sCount[B]-e.blkIndent>3)&&!(e.sCount[B]<0)){for(b=!1,u=0,d=y.length;u<d;u++)if(y[u](e,B,c,!0)){b=!0;break}if(b)break}for(v=e.getLines(t,B,e.blkIndent,!1).trim(),C=v.length,k=1;k<C;k++){if(a=v.charCodeAt(k),91===a)return!1;if(93===a){p=k;break}10===a?x++:92===a&&(k++,k<C&&10===v.charCodeAt(k)&&x++)}if(p<0||58!==v.charCodeAt(p+1))return!1;for(k=p+2;k<C;k++)if(a=v.charCodeAt(k),10===a)x++;else if(!i(a))break;if(g=e.md.helpers.parseLinkDestination(v,k,C),!g.ok)return!1;if(A=e.md.normalizeLink(g.str),!e.md.validateLink(A))return!1;for(k=g.pos,x+=g.lines,s=k,l=x,m=k;k<C;k++)if(a=v.charCodeAt(k),10===a)x++;else if(!i(a))break;g=e.md.helpers.parseLinkTitle(v,k,C),k<C&&m!==k&&g.ok?(w=g.str,k=g.pos,x+=g.lines):(w="",k=s,x=l);while(k<C){if(a=v.charCodeAt(k),!i(a))break;k++}if(k<C&&10!==v.charCodeAt(k)&&w){w="",k=s,x=l;while(k<C){if(a=v.charCodeAt(k),!i(a))break;k++}}return!(k<C&&10!==v.charCodeAt(k))&&(h=r(v.slice(1,p)),!!h&&(o||("undefined"===typeof e.env.references&&(e.env.references={}),"undefined"===typeof e.env.references[h]&&(e.env.references[h]={title:w,href:A}),e.parentType=f,e.line=t+x+1),!0))}},85930:function(e,t,n){"use strict";n(57658);var r=n(13944),i=n(58341).isSpace;function o(e,t,n,r){var o,a,s,l,c,A,u,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",a=this.src,d=!1,s=l=A=u=0,c=a.length;l<c;l++){if(o=a.charCodeAt(l),!d){if(i(o)){A++,9===o?u+=4-u%4:u++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(A),this.sCount.push(u),this.bsCount.push(0),d=!1,A=0,u=0,s=l+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var i=new r(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t;e++)if(this.bMarks[e]+this.tShift[e]<this.eMarks[e])break;return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n;e++)if(t=this.src.charCodeAt(e),!i(t))break;return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;while(e>t)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n;e++)if(this.src.charCodeAt(e)!==t)break;return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;while(e>n)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,l,c,A,u,d=e;if(e>=t)return"";for(A=new Array(t-e),o=0;d<t;d++,o++){a=0,u=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];while(l<c&&a<n){if(s=this.src.charCodeAt(l),i(s))9===s?a+=4-(a+this.bsCount[d])%4:a++;else{if(!(l-u<this.tShift[d]))break;a++}l++}A[o]=a>n?new Array(a-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return A.join("")},o.prototype.Token=r,e.exports=o},51462:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;function i(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function o(e){var t,n=[],r=0,i=e.length,o=!1,a=0,s="";t=e.charCodeAt(r);while(r<i)124===t&&(o?(s+=e.substring(a,r-1),a=r):(n.push(s+e.substring(a,r)),s="",a=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(a)),n}e.exports=function(e,t,n,a){var s,l,c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if(c=e.bMarks[d]+e.tShift[d],c>=e.eMarks[d])return!1;if(k=e.src.charCodeAt(c++),124!==k&&45!==k&&58!==k)return!1;if(c>=e.eMarks[d])return!1;if(C=e.src.charCodeAt(c++),124!==C&&45!==C&&58!==C&&!r(C))return!1;if(45===k&&r(C))return!1;while(c<e.eMarks[d]){if(s=e.src.charCodeAt(c),124!==s&&45!==s&&58!==s&&!r(s))return!1;c++}for(l=i(e,t+1),h=l.split("|"),g=[],A=0;A<h.length;A++){if(m=h[A].trim(),!m){if(0===A||A===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(m))return!1;58===m.charCodeAt(m.length-1)?g.push(58===m.charCodeAt(0)?"center":"right"):58===m.charCodeAt(0)?g.push("left"):g.push("")}if(l=i(e,t).trim(),-1===l.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(h=o(l),h.length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),p=h.length,0===p||p!==g.length)return!1;if(a)return!0;for(y=e.parentType,e.parentType="table",x=e.md.block.ruler.getRules("blockquote"),f=e.push("table_open","table",1),f.map=v=[t,0],f=e.push("thead_open","thead",1),f.map=[t,t+1],f=e.push("tr_open","tr",1),f.map=[t,t+1],A=0;A<h.length;A++)f=e.push("th_open","th",1),g[A]&&(f.attrs=[["style","text-align:"+g[A]]]),f=e.push("inline","",0),f.content=h[A].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n;d++){if(e.sCount[d]<e.blkIndent)break;for(w=!1,A=0,u=x.length;A<u;A++)if(x[A](e,d,n,!0)){w=!0;break}if(w)break;if(l=i(e,d).trim(),!l)break;if(e.sCount[d]-e.blkIndent>=4)break;for(h=o(l),h.length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),d===t+2&&(f=e.push("tbody_open","tbody",1),f.map=b=[t+2,0]),f=e.push("tr_open","tr",1),f.map=[d,d+1],A=0;A<p;A++)f=e.push("td_open","td",1),g[A]&&(f.attrs=[["style","text-align:"+g[A]]]),f=e.push("inline","",0),f.content=h[A]?h[A].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return b&&(f=e.push("tbody_close","tbody",-1),b[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},64388:function(e,t,n){"use strict";n(57658),e.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},87911:function(e){"use strict";e.exports=function(e){var t,n,r,i=e.tokens;for(n=0,r=i.length;n<r;n++)t=i[n],"inline"===t.type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},47804:function(e,t,n){"use strict";n(57658);var r=n(58341).arrayReplaceAt;function i(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,a,s,l,c,A,u,d,h,p,f,g,m,v,b,y,w=e.tokens;if(e.md.options.linkify)for(n=0,a=w.length;n<a;n++)if("inline"===w[n].type&&e.md.linkify.pretest(w[n].content))for(s=w[n].children,g=0,t=s.length-1;t>=0;t--)if(c=s[t],"link_close"!==c.type){if("html_inline"===c.type&&(i(c.content)&&g>0&&g--,o(c.content)&&g++),!(g>0)&&"text"===c.type&&e.md.linkify.test(c.content)){for(d=c.content,y=e.md.linkify.match(d),A=[],f=c.level,p=0,y.length>0&&0===y[0].index&&t>0&&"text_special"===s[t-1].type&&(y=y.slice(1)),u=0;u<y.length;u++)m=y[u].url,v=e.md.normalizeLink(m),e.md.validateLink(v)&&(b=y[u].text,b=y[u].schema?"mailto:"!==y[u].schema||/^mailto:/i.test(b)?e.md.normalizeLinkText(b):e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,""),h=y[u].index,h>p&&(l=new e.Token("text","",0),l.content=d.slice(p,h),l.level=f,A.push(l)),l=new e.Token("link_open","a",1),l.attrs=[["href",v]],l.level=f++,l.markup="linkify",l.info="auto",A.push(l),l=new e.Token("text","",0),l.content=b,l.level=f,A.push(l),l=new e.Token("link_close","a",-1),l.level=--f,l.markup="linkify",l.info="auto",A.push(l),p=y[u].lastIndex);p<d.length&&(l=new e.Token("text","",0),l.content=d.slice(p),l.level=f,A.push(l)),w[n].children=s=r(s,t,A)}}else{t--;while(s[t].level!==c.level&&"link_open"!==s[t].type)t--}}},99943:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=e.src.replace(t,"\n"),r=r.replace(n,"<22>"),e.src=r}},47649:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r)\)/i,r=/\((c|tm|r)\)/gi,i={c:"©",r:"®",tm:"™"};function o(e,t){return i[t.toLowerCase()]}function a(e){var t,n,i=0;for(t=e.length-1;t>=0;t--)n=e[t],"text"!==n.type||i||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}function s(e){var n,r,i=0;for(n=e.length-1;n>=0;n--)r=e[n],"text"!==r.type||i||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1")),"link_open"===r.type&&"auto"===r.info&&i--,"link_close"===r.type&&"auto"===r.info&&i++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&a(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},85839:function(e,t,n){"use strict";n(57658);var r=n(58341).isWhiteSpace,i=n(58341).isPunctChar,o=n(58341).isMdAsciiPunct,a=/['"]/,s=/['"]/g,l="";function c(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function A(e,t){var n,a,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_,E,S;for(_=[],n=0;n<e.length;n++){for(a=e[n],p=e[n].level,C=_.length-1;C>=0;C--)if(_[C].level<=p)break;if(_.length=C+1,"text"===a.type){A=a.content,d=0,h=A.length;e:while(d<h){if(s.lastIndex=d,u=s.exec(A),!u)break;if(x=k=!0,d=u.index+1,B="'"===u[0],g=32,u.index-1>=0)g=A.charCodeAt(u.index-1);else for(C=n-1;C>=0;C--){if("softbreak"===e[C].type||"hardbreak"===e[C].type)break;if(e[C].content){g=e[C].content.charCodeAt(e[C].content.length-1);break}}if(m=32,d<h)m=A.charCodeAt(d);else for(C=n+1;C<e.length;C++){if("softbreak"===e[C].type||"hardbreak"===e[C].type)break;if(e[C].content){m=e[C].content.charCodeAt(0);break}}if(v=o(g)||i(String.fromCharCode(g)),b=o(m)||i(String.fromCharCode(m)),y=r(g),w=r(m),w?x=!1:b&&(y||v||(x=!1)),y?k=!1:v&&(w||b||(k=!1)),34===m&&'"'===u[0]&&g>=48&&g<=57&&(k=x=!1),x&&k&&(x=v,k=b),x||k){if(k)for(C=_.length-1;C>=0;C--){if(f=_[C],_[C].level<p)break;if(f.single===B&&_[C].level===p){f=_[C],B?(E=t.md.options.quotes[2],S=t.md.options.quotes[3]):(E=t.md.options.quotes[0],S=t.md.options.quotes[1]),a.content=c(a.content,u.index,S),e[f.token].content=c(e[f.token].content,f.pos,E),d+=S.length-1,f.token===n&&(d+=E.length-1),A=a.content,h=A.length,_.length=C;continue e}}x?_.push({token:n,pos:u.index,single:B,level:p}):k&&B&&(a.content=c(a.content,u.index,l))}else B&&(a.content=c(a.content,u.index,l))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&A(e.tokens[t].children,e)}},90883:function(e,t,n){"use strict";var r=n(13944);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},11098:function(e){"use strict";e.exports=function(e){var t,n,r,i,o,a,s=e.tokens;for(t=0,n=s.length;t<n;t++)if("inline"===s[t].type){for(r=s[t].children,o=r.length,i=0;i<o;i++)"text_special"===r[i].type&&(r[i].type="text");for(i=a=0;i<o;i++)"text"===r[i].type&&i+1<o&&"text"===r[i+1].type?r[i+1].content=r[i].content+r[i+1].content:(i!==a&&(r[a]=r[i]),a++);i!==a&&(r.length=a)}}},3912:function(e,t,n){"use strict";n(57658);var r=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,i=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,t){var n,o,a,s,l,c,A=e.pos;if(60!==e.src.charCodeAt(A))return!1;for(l=e.pos,c=e.posMax;;){if(++A>=c)return!1;if(s=e.src.charCodeAt(A),60===s)return!1;if(62===s)break}return n=e.src.slice(l+1,A),i.test(n)?(o=e.md.normalizeLink(n),!!e.md.validateLink(o)&&(t||(a=e.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=e.push("text","",0),a.content=e.md.normalizeLinkText(n),a=e.push("link_close","a",-1),a.markup="autolink",a.info="auto"),e.pos+=n.length+2,!0)):!!r.test(n)&&(o=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(o)&&(t||(a=e.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=e.push("text","",0),a.content=e.md.normalizeLinkText(n),a=e.push("link_close","a",-1),a.markup="autolink",a.info="auto"),e.pos+=n.length+2,!0))}},18314:function(e,t,n){"use strict";n(57658),e.exports=function(e,t){var n,r,i,o,a,s,l,c,A=e.pos,u=e.src.charCodeAt(A);if(96!==u)return!1;n=A,A++,r=e.posMax;while(A<r&&96===e.src.charCodeAt(A))A++;if(i=e.src.slice(n,A),l=i.length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=i),e.pos+=l,!0;a=s=A;while(-1!==(a=e.src.indexOf("`",s))){s=a+1;while(s<r&&96===e.src.charCodeAt(s))s++;if(c=s-a,c===l)return t||(o=e.push("code_inline","code",0),o.markup=i,o.content=e.src.slice(A,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=a}return e.backticksScanned=!0,t||(e.pending+=i),e.pos+=l,!0}},5798:function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s,l,c,A={},u=t.length;if(u){var d=0,h=-2,p=[];for(n=0;n<u;n++)if(i=t[n],p.push(0),t[d].marker===i.marker&&h===i.token-1||(d=n),h=i.token,i.length=i.length||0,i.close){for(A.hasOwnProperty(i.marker)||(A[i.marker]=[-1,-1,-1,-1,-1,-1]),a=A[i.marker][(i.open?3:0)+i.length%3],r=d-p[d]-1,s=r;r>a;r-=p[r]+1)if(o=t[r],o.marker===i.marker&&o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3===0&&(o.length%3===0&&i.length%3===0||(l=!0)),!l)){c=r>0&&!t[r-1].open?p[r-1]+1:0,p[n]=n-r+c,p[r]=c,i.open=!1,o.end=n,o.close=!1,s=-1,h=-2;break}-1!==s&&(A[i.marker][(i.open?3:0)+(i.length||0)%3]=s)}}}n(57658),e.exports=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<i;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},319:function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s,l=t.length;for(n=l-1;n>=0;n--)r=t[n],95!==r.marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,a=String.fromCharCode(r.marker),o=e.tokens[r.token],o.type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",o=e.tokens[i.token],o.type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}n(57658),e.exports.w=function(e,t){var n,r,i,o=e.pos,a=e.src.charCodeAt(o);if(t)return!1;if(95!==a&&42!==a)return!1;for(r=e.scanDelims(e.pos,42===a),n=0;n<r.length;n++)i=e.push("text","",0),i.content=String.fromCharCode(a),e.delimiters.push({marker:a,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<i;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},24897:function(e,t,n){"use strict";n(57658);var r=n(78761),i=n(58341).has,o=n(58341).isValidEntityCode,a=n(58341).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,A,u,d=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(d))return!1;if(d+1>=h)return!1;if(n=e.src.charCodeAt(d+1),35===n){if(A=e.src.slice(d).match(s),A)return t||(c="x"===A[1][0].toLowerCase()?parseInt(A[1].slice(1),16):parseInt(A[1],10),u=e.push("text_special","",0),u.content=o(c)?a(c):a(65533),u.markup=A[0],u.info="entity"),e.pos+=A[0].length,!0}else if(A=e.src.slice(d).match(l),A&&i(r,A[1]))return t||(u=e.push("text_special","",0),u.content=r[A[1]],u.markup=A[0],u.info="entity"),e.pos+=A[0].length,!0;return!1}},3097:function(e,t,n){"use strict";n(57658);for(var r=n(58341).isSpace,i=[],o=0;o<256;o++)i.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o,a,s,l,c=e.pos,A=e.posMax;if(92!==e.src.charCodeAt(c))return!1;if(c++,c>=A)return!1;if(n=e.src.charCodeAt(c),10===n){t||e.push("hardbreak","br",0),c++;while(c<A){if(n=e.src.charCodeAt(c),!r(n))break;c++}return e.pos=c,!0}return s=e.src[c],n>=55296&&n<=56319&&c+1<A&&(o=e.src.charCodeAt(c+1),o>=56320&&o<=57343&&(s+=e.src[c+1],c++)),a="\\"+s,t||(l=e.push("text_special","",0),n<256&&0!==i[n]?l.content=s:l.content=a,l.markup=a,l.info="escape"),e.pos=c+1,!0}},88785:function(e){"use strict";e.exports=function(e){var t,n,r=0,i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}},32367:function(e,t,n){"use strict";n(57658);var r=n(97550).n;function i(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}function a(e){var t=32|e;return t>=97&&t<=122}e.exports=function(e,t){var n,s,l,c,A=e.pos;return!!e.md.options.html&&(l=e.posMax,!(60!==e.src.charCodeAt(A)||A+2>=l)&&(n=e.src.charCodeAt(A+1),!(33!==n&&63!==n&&47!==n&&!a(n))&&(s=e.src.slice(A).match(r),!!s&&(t||(c=e.push("html_inline","",0),c.content=e.src.slice(A,A+s[0].length),i(c.content)&&e.linkLevel++,o(c.content)&&e.linkLevel--),e.pos+=s[0].length,!0))))}},51029:function(e,t,n){"use strict";n(57658);var r=n(58341).normalizeReference,i=n(58341).isSpace;e.exports=function(e,t){var n,o,a,s,l,c,A,u,d,h,p,f,g,m="",v=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),l<0)return!1;if(A=l+1,A<b&&40===e.src.charCodeAt(A)){for(A++;A<b;A++)if(o=e.src.charCodeAt(A),!i(o)&&10!==o)break;if(A>=b)return!1;for(g=A,d=e.md.helpers.parseLinkDestination(e.src,A,e.posMax),d.ok&&(m=e.md.normalizeLink(d.str),e.md.validateLink(m)?A=d.pos:m=""),g=A;A<b;A++)if(o=e.src.charCodeAt(A),!i(o)&&10!==o)break;if(d=e.md.helpers.parseLinkTitle(e.src,A,e.posMax),A<b&&g!==A&&d.ok){for(h=d.str,A=d.pos;A<b;A++)if(o=e.src.charCodeAt(A),!i(o)&&10!==o)break}else h="";if(A>=b||41!==e.src.charCodeAt(A))return e.pos=v,!1;A++}else{if("undefined"===typeof e.env.references)return!1;if(A<b&&91===e.src.charCodeAt(A)?(g=A+1,A=e.md.helpers.parseLinkLabel(e,A),A>=0?s=e.src.slice(g,A++):A=l+1):A=l+1,s||(s=e.src.slice(c,l)),u=e.env.references[r(s)],!u)return e.pos=v,!1;m=u.href,h=u.title}return t||(a=e.src.slice(c,l),e.md.inline.parse(a,e.md,e.env,f=[]),p=e.push("image","img",0),p.attrs=n=[["src",m],["alt",""]],p.children=f,p.content=a,h&&n.push(["title",h])),e.pos=A,e.posMax=b,!0}},18973:function(e,t,n){"use strict";n(57658);var r=n(58341).normalizeReference,i=n(58341).isSpace;e.exports=function(e,t){var n,o,a,s,l,c,A,u,d,h="",p="",f=e.pos,g=e.posMax,m=e.pos,v=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,s=e.md.helpers.parseLinkLabel(e,e.pos,!0),s<0)return!1;if(c=s+1,c<g&&40===e.src.charCodeAt(c)){for(v=!1,c++;c<g;c++)if(o=e.src.charCodeAt(c),!i(o)&&10!==o)break;if(c>=g)return!1;if(m=c,A=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),A.ok){for(h=e.md.normalizeLink(A.str),e.md.validateLink(h)?c=A.pos:h="",m=c;c<g;c++)if(o=e.src.charCodeAt(c),!i(o)&&10!==o)break;if(A=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<g&&m!==c&&A.ok)for(p=A.str,c=A.pos;c<g;c++)if(o=e.src.charCodeAt(c),!i(o)&&10!==o)break}(c>=g||41!==e.src.charCodeAt(c))&&(v=!0),c++}if(v){if("undefined"===typeof e.env.references)return!1;if(c<g&&91===e.src.charCodeAt(c)?(m=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?a=e.src.slice(m,c++):c=s+1):c=s+1,a||(a=e.src.slice(l,s)),u=e.env.references[r(a)],!u)return e.pos=f,!1;h=u.href,p=u.title}return t||(e.pos=l,e.posMax=s,d=e.push("link_open","a",1),d.attrs=n=[["href",h]],p&&n.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,d=e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0}},5927:function(e,t,n){"use strict";n(57658);var r=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;e.exports=function(e,t){var n,i,o,a,s,l,c,A;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(n=e.pos,i=e.posMax,!(n+3>i)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(o=e.pending.match(r),!!o&&(a=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-a.length)),!!s&&(l=s.url,l=l.replace(/\*+$/,""),c=e.md.normalizeLink(l),!!e.md.validateLink(c)&&(t||(e.pending=e.pending.slice(0,-a.length),A=e.push("link_open","a",1),A.attrs=[["href",c]],A.markup="linkify",A.info="auto",A=e.push("text","",0),A.content=e.md.normalizeLinkText(l),A=e.push("link_close","a",-1),A.markup="linkify",A.info="auto"),e.pos+=l.length-a.length,!0)))))))))}},29479:function(e,t,n){"use strict";n(57658);var r=n(58341).isSpace;e.exports=function(e,t){var n,i,o,a=e.pos;if(10!==e.src.charCodeAt(a))return!1;if(n=e.pending.length-1,i=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){o=n-1;while(o>=1&&32===e.pending.charCodeAt(o-1))o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);a++;while(a<i&&r(e.src.charCodeAt(a)))a++;return e.pos=a,!0}},87278:function(e,t,n){"use strict";n(57658);var r=n(13944),i=n(58341).isWhiteSpace,o=n(58341).isPunctChar,a=n(58341).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var i=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,A,u,d,h,p=e,f=!0,g=!0,m=this.posMax,v=this.src.charCodeAt(e);n=e>0?this.src.charCodeAt(e-1):32;while(p<m&&this.src.charCodeAt(p)===v)p++;return s=p-e,r=p<m?this.src.charCodeAt(p):32,u=a(n)||o(String.fromCharCode(n)),h=a(r)||o(String.fromCharCode(r)),A=i(n),d=i(r),d?f=!1:h&&(A||u||(f=!1)),A?g=!1:u&&(d||h||(g=!1)),t?(l=f,c=g):(l=f&&(!g||u),c=g&&(!f||h)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},14098:function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s=[],l=t.length;for(n=0;n<l;n++)i=t[n],126===i.marker&&-1!==i.end&&(o=t[i.end],a=e.tokens[i.token],a.type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",a=e.tokens[o.token],a.type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));while(s.length){n=s.pop(),r=n+1;while(r<e.tokens.length&&"s_close"===e.tokens[r].type)r++;r--,n!==r&&(a=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=a)}}n(57658),e.exports.w=function(e,t){var n,r,i,o,a,s=e.pos,l=e.src.charCodeAt(s);if(t)return!1;if(126!==l)return!1;if(r=e.scanDelims(e.pos,!0),o=r.length,a=String.fromCharCode(l),o<2)return!1;for(o%2&&(i=e.push("text","",0),i.content=a,o--),n=0;n<o;n+=2)i=e.push("text","",0),i.content=a+a,e.delimiters.push({marker:l,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<i;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},42330:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){var r=e.pos;while(r<e.posMax&&!t(e.src.charCodeAt(r)))r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},13944:function(e,t,n){"use strict";function r(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n(57658),r.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(t=this.attrs,n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},r.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},r.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},18496:function(e,t,n){"use strict";n(57658);var r={};function i(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),i.push(n);for(t=0;t<e.length;t++)n=e.charCodeAt(t),i[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return i}function o(e,t){var n;return"string"!==typeof t&&(t=o.defaultChars),n=i(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,i,o,a,s,l,c="";for(t=0,r=e.length;t<r;t+=3)i=parseInt(e.slice(t+1,t+3),16),i<128?c+=n[i]:192===(224&i)&&t+3<r&&(o=parseInt(e.slice(t+4,t+6),16),128===(192&o))?(l=i<<6&1984|63&o,c+=l<128?"<22><>":String.fromCharCode(l),t+=3):224===(240&i)&&t+6<r&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128===(192&o)&&128===(192&a))?(l=i<<12&61440|o<<6&4032|63&a,c+=l<2048||l>=55296&&l<=57343?"<22><><EFBFBD>":String.fromCharCode(l),t+=6):240===(248&i)&&t+9<r&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128===(192&o)&&128===(192&a)&&128===(192&s))?(l=i<<18&1835008|o<<12&258048|a<<6&4032|63&s,l<65536||l>1114111?c+="<22><><EFBFBD><EFBFBD>":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="<22>";return c}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},76640:function(e,t,n){"use strict";n(57658);var r={};function i(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)i[e.charCodeAt(t)]=e[t];return i}function o(e,t,n){var r,a,s,l,c,A="";for("string"!==typeof t&&(n=t,t=o.defaultChars),"undefined"===typeof n&&(n=!0),c=i(t),r=0,a=e.length;r<a;r++)if(s=e.charCodeAt(r),n&&37===s&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))A+=e.slice(r,r+3),r+=2;else if(s<128)A+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&r+1<a&&(l=e.charCodeAt(r+1),l>=56320&&l<=57343)){A+=encodeURIComponent(e[r]+e[r+1]),r++;continue}A+="%EF%BF%BD"}else A+=encodeURIComponent(e[r]);return A}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},92734:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}},44389:function(e,t,n){"use strict";e.exports.encode=n(76640),e.exports.decode=n(18496),e.exports.format=n(92734),e.exports.parse=n(48685)},48685:function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}n(57658);var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(s),c=["'"].concat(l),A=["%","/","?",";","#"].concat(c),u=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function m(e,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}r.prototype.parse=function(e,t){var n,r,o,s,l,c=e;if(c=c.trim(),!t&&1===e.split("#").length){var m=a.exec(c);if(m)return this.pathname=m[1],m[2]&&(this.search=m[2]),this}var v=i.exec(c);if(v&&(v=v[0],o=v.toLowerCase(),this.protocol=v,c=c.substr(v.length)),(t||v||c.match(/^\/\/[^@\/]+@[^@\/]+/))&&(l="//"===c.substr(0,2),!l||v&&f[v]||(c=c.substr(2),this.slashes=!0)),!f[v]&&(l||v&&!g[v])){var b,y,w=-1;for(n=0;n<u.length;n++)s=c.indexOf(u[n]),-1!==s&&(-1===w||s<w)&&(w=s);for(y=-1===w?c.lastIndexOf("@"):c.lastIndexOf("@",w),-1!==y&&(b=c.slice(0,y),c=c.slice(y+1),this.auth=b),w=-1,n=0;n<A.length;n++)s=c.indexOf(A[n]),-1!==s&&(-1===w||s<w)&&(w=s);-1===w&&(w=c.length),":"===c[w-1]&&w--;var x=c.slice(0,w);c=c.slice(w),this.parseHost(x),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k){var C=this.hostname.split(/\./);for(n=0,r=C.length;n<r;n++){var B=C[n];if(B&&!B.match(h)){for(var _="",E=0,S=B.length;E<S;E++)B.charCodeAt(E)>127?_+="x":_+=B[E];if(!_.match(h)){var F=C.slice(0,n),T=C.slice(n+1),M=B.match(p);M&&(F.push(M[1]),T.unshift(M[2])),T.length&&(c=T.join(".")+c),this.hostname=F.join(".");break}}}}this.hostname.length>d&&(this.hostname=""),k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var I=c.indexOf("#");-1!==I&&(this.hash=c.substr(I),c=c.slice(0,I));var N=c.indexOf("?");return-1!==N&&(this.search=c.substr(N),c=c.slice(0,N)),c&&(this.pathname=c),g[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=o.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=m},77209:function(e,t,n){var r,i;
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */(function(o,a){r=a,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i)})(0,(function(){"use strict";var e=function(e,t){var n,r,i,o,a,s,l,c,A,u,d,h,p,f,g,m,v,b,y=this,w=!1,x=!0,k=!0,C={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},B=function(e){if(m)return!0;e=e||window.event,g.timeToIdle&&g.mouseUsed&&!A&&L();for(var n,r,i=e.target||e.srcElement,o=i.getAttribute("class")||"",a=0;a<P.length;a++)n=P[a],n.onTap&&o.indexOf("pswp__"+n.name)>-1&&(n.onTap(),r=!0);if(r){e.stopPropagation&&e.stopPropagation(),m=!0;var s=t.features.isOldAndroid?600:30;setTimeout((function(){m=!1}),s)}},_=function(){return!e.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},E=function(e,n,r){t[(r?"add":"remove")+"Class"](e,"pswp__"+n)},S=function(){var e=1===g.getNumItemsFn();e!==f&&(E(r,"ui--one-slide",e),f=e)},F=function(){E(l,"share-modal--hidden",k)},T=function(){return k=!k,k?(t.removeClass(l,"pswp__share-modal--fade-in"),setTimeout((function(){k&&F()}),300)):(F(),setTimeout((function(){k||t.addClass(l,"pswp__share-modal--fade-in")}),30)),k||I(),!1},M=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),!!n.href&&(!!n.hasAttribute("download")||(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),k||T(),!1))},I=function(){for(var e,t,n,r,i,o="",a=0;a<g.shareButtons.length;a++)e=g.shareButtons[a],n=g.getImageURLForShare(e),r=g.getPageURLForShare(e),i=g.getTextForShare(e),t=e.url.replace("{{url}}",encodeURIComponent(r)).replace("{{image_url}}",encodeURIComponent(n)).replace("{{raw_image_url}}",n).replace("{{text}}",encodeURIComponent(i)),o+='<a href="'+t+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",g.parseShareButtonOut&&(o=g.parseShareButtonOut(e,o));l.children[0].innerHTML=o,l.children[0].onclick=M},N=function(e){for(var n=0;n<g.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+g.closeElClasses[n]))return!0},U=0,L=function(){clearTimeout(b),U=0,A&&y.setIdle(!1)},Q=function(e){e=e||window.event;var t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(b),b=setTimeout((function(){y.setIdle(!0)}),g.timeToIdleOutside))},D=function(){g.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=y.getFullscreenAPI()),n?(t.bind(document,n.eventK,y.updateFullscreen),y.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs"))},H=function(){g.preloaderEl&&(O(!0),u("beforeChange",(function(){clearTimeout(p),p=setTimeout((function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&O(!1):O(!0)}),g.loadingIndicatorDelay)})),u("imageLoadComplete",(function(t,n){e.currItem===n&&O(!0)})))},O=function(e){h!==e&&(E(d,"preloader--active",!e),h=e)},z=function(e){var n=e.vGap;if(_()){var a=g.barsSize;if(g.captionEl&&"auto"===a.bottom)if(o||(o=t.createEl("pswp__caption pswp__caption--fake"),o.appendChild(t.createEl("pswp__caption__center")),r.insertBefore(o,i),t.addClass(r,"pswp__ui--fit")),g.addCaptionHTMLFn(e,o,!0)){var s=o.clientHeight;n.bottom=parseInt(s,10)||44}else n.bottom=a.top;else n.bottom="auto"===a.bottom?0:a.bottom;n.top=a.top}else n.top=n.bottom=0},Z=function(){g.timeToIdle&&u("mouseUsed",(function(){t.bind(document,"mousemove",L),t.bind(document,"mouseout",Q),v=setInterval((function(){U++,2===U&&y.setIdle(!0)}),g.timeToIdle/2)}))},R=function(){var e;u("onVerticalDrag",(function(e){x&&e<.95?y.hideControls():!x&&e>=.95&&y.showControls()})),u("onPinchClose",(function(t){x&&t<.9?(y.hideControls(),e=!0):e&&!x&&t>.9&&y.showControls()})),u("zoomGestureEnded",(function(){e=!1,e&&!x&&y.showControls()}))},P=[{name:"caption",option:"captionEl",onInit:function(e){i=e}},{name:"share-modal",option:"shareEl",onInit:function(e){l=e},onTap:function(){T()}},{name:"button--share",option:"shareEl",onInit:function(e){s=e},onTap:function(){T()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){a=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){d=e}}],q=function(){var e,n,i,o=function(r){if(r)for(var o=r.length,a=0;a<o;a++){e=r[a],n=e.className;for(var s=0;s<P.length;s++)i=P[s],n.indexOf("pswp__"+i.name)>-1&&(g[i.option]?(t.removeClass(e,"pswp__element--disabled"),i.onInit&&i.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};o(r.children);var a=t.getChildByClass(r,"pswp__top-bar");a&&o(a.children)};y.init=function(){t.extend(e.options,C,!0),g=e.options,r=t.getChildByClass(e.scrollWrap,"pswp__ui"),u=e.listen,R(),u("beforeChange",y.update),u("doubleTap",(function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(g.getDoubleTapZoom(!1,e.currItem),t,333)})),u("preventDragEvent",(function(e,t,n){var r=e.target||e.srcElement;r&&r.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(r.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(r.tagName))&&(n.prevent=!1)})),u("bindEvents",(function(){t.bind(r,"pswpTap click",B),t.bind(e.scrollWrap,"pswpTap",y.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",y.onMouseOver)})),u("unbindEvents",(function(){k||T(),v&&clearInterval(v),t.unbind(document,"mouseout",Q),t.unbind(document,"mousemove",L),t.unbind(r,"pswpTap click",B),t.unbind(e.scrollWrap,"pswpTap",y.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",y.onMouseOver),n&&(t.unbind(document,n.eventK,y.updateFullscreen),n.isFullscreen()&&(g.hideAnimationDuration=0,n.exit()),n=null)})),u("destroy",(function(){g.captionEl&&(o&&r.removeChild(o),t.removeClass(i,"pswp__caption--empty")),l&&(l.children[0].onclick=null),t.removeClass(r,"pswp__ui--over-close"),t.addClass(r,"pswp__ui--hidden"),y.setIdle(!1)})),g.showAnimationDuration||t.removeClass(r,"pswp__ui--hidden"),u("initialZoomIn",(function(){g.showAnimationDuration&&t.removeClass(r,"pswp__ui--hidden")})),u("initialZoomOut",(function(){t.addClass(r,"pswp__ui--hidden")})),u("parseVerticalMargin",z),q(),g.shareEl&&s&&l&&(k=!0),S(),Z(),D(),H()},y.setIdle=function(e){A=e,E(r,"ui--idle",e)},y.update=function(){x&&e.currItem?(y.updateIndexIndicator(),g.captionEl&&(g.addCaptionHTMLFn(e.currItem,i),E(i,"caption--empty",!e.currItem.title)),w=!0):w=!1,k||T(),S()},y.updateFullscreen=function(r){r&&setTimeout((function(){e.setScrollOffset(0,t.getScrollY())}),50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},y.updateIndexIndicator=function(){g.counterEl&&(a.innerHTML=e.getCurrentIndex()+1+g.indexIndicatorSep+g.getNumItemsFn())},y.onGlobalTap=function(n){n=n||window.event;var r=n.target||n.srcElement;if(!m)if(n.detail&&"mouse"===n.detail.pointerType){if(N(r))return void e.close();t.hasClass(r,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?g.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(g.tapToToggleControls&&(x?y.hideControls():y.showControls()),g.tapToClose&&(t.hasClass(r,"pswp__img")||N(r)))return void e.close()},y.onMouseOver=function(e){e=e||window.event;var t=e.target||e.srcElement;E(r,"ui--over-close",N(t))},y.hideControls=function(){t.addClass(r,"pswp__ui--hidden"),x=!1},y.showControls=function(){x=!0,w||y.update(),t.removeClass(r,"pswp__ui--hidden")},y.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},y.getFullscreenAPI=function(){var t,n=document.documentElement,r="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:r}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+r}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+r}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){if(c=g.closeOnScroll,g.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK)return e.template[this.enterK]();e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return g.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}};return e}))},76711:function(e,t,n){var r,i;n(57658),
/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
function(o,a){r=a,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i)}(0,(function(){"use strict";var e=function(e,t,n,r){var i={features:null,bind:function(e,t,n,r){var i=(r?"remove":"add")+"EventListener";t=t.split(" ");for(var o=0;o<t.length;o++)t[o]&&e[i](t[o],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){i.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){i.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){var n=e.firstChild;while(n){if(i.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){var r=e.length;while(r--)if(e[r][n]===t)return r;return-1},extend:function(e,t,n){for(var r in t)if(t.hasOwnProperty(r)){if(n&&e.hasOwnProperty(r))continue;e[r]=t[r]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(i.features)return i.features;var e=i.createEl(),t=e.style,n="",r={};if(r.oldIE=document.all&&!document.addEventListener,r.touch="ontouchstart"in window,window.requestAnimationFrame&&(r.raf=window.requestAnimationFrame,r.caf=window.cancelAnimationFrame),r.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!r.pointerEvent){var o=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);a&&a.length>0&&(a=parseInt(a[1],10),a>=1&&a<8&&(r.isOldIOSPhone=!0))}var s=o.match(/Android\s([0-9\.]*)/),l=s?s[1]:0;l=parseFloat(l),l>=1&&(l<4.4&&(r.isOldAndroid=!0),r.androidVersion=l),r.isMobileOpera=/opera mini|opera mobi/i.test(o)}for(var c,A,u=["transform","perspective","animationName"],d=["","webkit","Moz","ms","O"],h=0;h<4;h++){n=d[h];for(var p=0;p<3;p++)c=u[p],A=n+(n?c.charAt(0).toUpperCase()+c.slice(1):c),!r[c]&&A in t&&(r[c]=A);n&&!r.raf&&(n=n.toLowerCase(),r.raf=window[n+"RequestAnimationFrame"],r.raf&&(r.caf=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]))}if(!r.raf){var f=0;r.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),r=window.setTimeout((function(){e(t+n)}),n);return f=t+n,r},r.caf=function(e){clearTimeout(e)}}return r.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,i.features=r,r}};i.detectFeatures(),i.features.oldIE&&(i.bind=function(e,t,n,r){t=t.split(" ");for(var i,o=(r?"detach":"attach")+"Event",a=function(){n.handleEvent.call(n)},s=0;s<t.length;s++)if(i=t[s],i)if("object"===typeof n&&n.handleEvent){if(r){if(!n["oldIE"+i])return!1}else n["oldIE"+i]=a;e[o]("on"+i,n["oldIE"+i])}else e[o]("on"+i,n)});var o=this,a=25,s=3,l={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};i.extend(l,r);var c,A,u,d,h,p,f,g,m,v,b,y,w,x,k,C,B,_,E,S,F,T,M,I,N,U,L,Q,D,H,O,z,Z,R,P,q,K,W,j,V,G,$,Y,X,J,ee,te,ne,re,ie,oe,ae,se,le,ce,Ae,ue=function(){return{x:0,y:0}},de=ue(),he=ue(),pe=ue(),fe={},ge=0,me={},ve=ue(),be=0,ye=!0,we=[],xe={},ke=!1,Ce=function(e,t){i.extend(o,t.publicMethods),we.push(e)},Be=function(e){var t=Jt();return e>t-1?e-t:e<0?t+e:e},_e={},Ee=function(e,t){return _e[e]||(_e[e]=[]),_e[e].push(t)},Se=function(e){var t=_e[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var r=0;r<t.length;r++)t[r].apply(o,n)}},Fe=function(){return(new Date).getTime()},Te=function(e){le=e,o.bg.style.opacity=e*l.bgOpacity},Me=function(e,t,n,r,i){(!ke||i&&i!==o.currItem)&&(r/=i?i.fitRatio:o.currItem.fitRatio),e[T]=y+t+"px, "+n+"px"+w+" scale("+r+")"},Ie=function(e){re&&(e&&(v>o.currItem.fitRatio?ke||(un(o.currItem,!1,!0),ke=!0):ke&&(un(o.currItem),ke=!1)),Me(re,pe.x,pe.y,v))},Ne=function(e){e.container&&Me(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Ue=function(e,t){t[T]=y+e+"px, 0px"+w},Le=function(e,t){if(!l.loop&&t){var n=d+(ve.x*ge-e)/ve.x,r=Math.round(e-vt.x);(n<0&&r>0||n>=Jt()-1&&r<0)&&(e=vt.x+r*l.mainScrollEndFriction)}vt.x=e,Ue(e,h)},Qe=function(e,t){var n=bt[e]-me[e];return he[e]+de[e]+n-n*(t/b)},De=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},He=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Oe=null,ze=function(){Oe&&(i.unbind(document,"mousemove",ze),i.addClass(e,"pswp--has_mouse"),l.mouseUsed=!0,Se("mouseUsed")),Oe=setTimeout((function(){Oe=null}),100)},Ze=function(){i.bind(document,"keydown",o),O.transform&&i.bind(o.scrollWrap,"click",o),l.mouseUsed||i.bind(document,"mousemove",ze),i.bind(window,"resize scroll orientationchange",o),Se("bindEvents")},Re=function(){i.unbind(window,"resize scroll orientationchange",o),i.unbind(window,"scroll",m.scroll),i.unbind(document,"keydown",o),i.unbind(document,"mousemove",ze),O.transform&&i.unbind(o.scrollWrap,"click",o),j&&i.unbind(window,f,o),clearTimeout(z),Se("unbindEvents")},Pe=function(e,t){var n=sn(o.currItem,fe,e);return t&&(ne=n),n},qe=function(e){return e||(e=o.currItem),e.initialZoomLevel},Ke=function(e){return e||(e=o.currItem),e.w>0?l.maxSpreadZoom:1},We=function(e,t,n,r){return r===o.currItem.initialZoomLevel?(n[e]=o.currItem.initialPosition[e],!0):(n[e]=Qe(e,r),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},je=function(){if(T){var t=O.perspective&&!I;return y="translate"+(t?"3d(":"("),void(w=O.perspective?", 0px)":")")}T="left",i.addClass(e,"pswp--ie"),Ue=function(e,t){t.left=e+"px"},Ne=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,r=t*e.w,i=t*e.h;n.width=r+"px",n.height=i+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Ie=function(){if(re){var e=re,t=o.currItem,n=t.fitRatio>1?1:t.fitRatio,r=n*t.w,i=n*t.h;e.width=r+"px",e.height=i+"px",e.left=pe.x+"px",e.top=pe.y+"px"}}},Ve=function(e){var t="";l.escKey&&27===e.keyCode?t="close":l.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,o[t]()))},Ge=function(e){e&&($||G||ie||K)&&(e.preventDefault(),e.stopPropagation())},$e=function(){o.setScrollOffset(0,i.getScrollY())},Ye={},Xe=0,Je=function(e){Ye[e]&&(Ye[e].raf&&U(Ye[e].raf),Xe--,delete Ye[e])},et=function(e){Ye[e]&&Je(e),Ye[e]||(Xe++,Ye[e]={})},tt=function(){for(var e in Ye)Ye.hasOwnProperty(e)&&Je(e)},nt=function(e,t,n,r,i,o,a){var s,l=Fe();et(e);var c=function(){if(Ye[e]){if(s=Fe()-l,s>=r)return Je(e),o(n),void(a&&a());o((n-t)*i(s/r)+t),Ye[e].raf=N(c)}};c()},rt={shout:Se,listen:Ee,viewportSize:fe,options:l,isMainScrollAnimating:function(){return ie},getZoomLevel:function(){return v},getCurrentIndex:function(){return d},isDragging:function(){return j},isZooming:function(){return ee},setScrollOffset:function(e,t){me.x=e,H=me.y=t,Se("updateScrollOffset",me)},applyZoomPan:function(e,t,n,r){pe.x=t,pe.y=n,v=e,Ie(r)},init:function(){if(!c&&!A){var n;o.framework=i,o.template=e,o.bg=i.getChildByClass(e,"pswp__bg"),L=e.className,c=!0,O=i.detectFeatures(),N=O.raf,U=O.caf,T=O.transform,D=O.oldIE,o.scrollWrap=i.getChildByClass(e,"pswp__scroll-wrap"),o.container=i.getChildByClass(o.scrollWrap,"pswp__container"),h=o.container.style,o.itemHolders=C=[{el:o.container.children[0],wrap:0,index:-1},{el:o.container.children[1],wrap:0,index:-1},{el:o.container.children[2],wrap:0,index:-1}],C[0].el.style.display=C[2].el.style.display="none",je(),m={resize:o.updateSize,orientationchange:function(){clearTimeout(z),z=setTimeout((function(){fe.x!==o.scrollWrap.clientWidth&&o.updateSize()}),500)},scroll:$e,keydown:Ve,click:Ge};var r=O.isOldIOSPhone||O.isOldAndroid||O.isMobileOpera;for(O.animationName&&O.transform&&!r||(l.showAnimationDuration=l.hideAnimationDuration=0),n=0;n<we.length;n++)o["init"+we[n]]();if(t){var a=o.ui=new t(o,i);a.init()}Se("firstUpdate"),d=d||l.index||0,(isNaN(d)||d<0||d>=Jt())&&(d=0),o.currItem=Xt(d),(O.isOldIOSPhone||O.isOldAndroid)&&(ye=!1),e.setAttribute("aria-hidden","false"),l.modal&&(ye?e.style.position="fixed":(e.style.position="absolute",e.style.top=i.getScrollY()+"px")),void 0===H&&(Se("initialLayout"),H=Q=i.getScrollY());var u="pswp--open ";for(l.mainClass&&(u+=l.mainClass+" "),l.showHideOpacity&&(u+="pswp--animate_opacity "),u+=I?"pswp--touch":"pswp--notouch",u+=O.animationName?" pswp--css_animation":"",u+=O.svg?" pswp--svg":"",i.addClass(e,u),o.updateSize(),p=-1,be=null,n=0;n<s;n++)Ue((n+p)*ve.x,C[n].el.style);D||i.bind(o.scrollWrap,g,o),Ee("initialZoomInEnd",(function(){o.setContent(C[0],d-1),o.setContent(C[2],d+1),C[0].el.style.display=C[2].el.style.display="block",l.focus&&e.focus(),Ze()})),o.setContent(C[1],d),o.updateCurrItem(),Se("afterInit"),ye||(x=setInterval((function(){Xe||j||ee||v!==o.currItem.initialZoomLevel||o.updateSize()}),1e3)),i.addClass(e,"pswp--visible")}},close:function(){c&&(c=!1,A=!0,Se("close"),Re(),en(o.currItem,null,!0,o.destroy))},destroy:function(){Se("destroy"),Vt&&clearTimeout(Vt),e.setAttribute("aria-hidden","true"),e.className=L,x&&clearInterval(x),i.unbind(o.scrollWrap,g,o),i.unbind(window,"scroll",o),Ct(),tt(),_e=null},panTo:function(e,t,n){n||(e>ne.min.x?e=ne.min.x:e<ne.max.x&&(e=ne.max.x),t>ne.min.y?t=ne.min.y:t<ne.max.y&&(t=ne.max.y)),pe.x=e,pe.y=t,Ie()},handleEvent:function(e){e=e||window.event,m[e.type]&&m[e.type](e)},goTo:function(e){e=Be(e);var t=e-d;be=t,d=e,o.currItem=Xt(d),ge-=t,Le(ve.x*ge),tt(),ie=!1,o.updateCurrItem()},next:function(){o.goTo(d+1)},prev:function(){o.goTo(d-1)},updateCurrZoomItem:function(e){if(e&&Se("beforeChange",0),C[1].el.children.length){var t=C[1].el.children[0];re=i.hasClass(t,"pswp__zoom-wrap")?t.style:null}else re=null;ne=o.currItem.bounds,b=v=o.currItem.initialZoomLevel,pe.x=ne.center.x,pe.y=ne.center.y,e&&Se("afterChange")},invalidateCurrItems:function(){k=!0;for(var e=0;e<s;e++)C[e].item&&(C[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==be){var t,n=Math.abs(be);if(!(e&&n<2)){o.currItem=Xt(d),ke=!1,Se("beforeChange",be),n>=s&&(p+=be+(be>0?-s:s),n=s);for(var r=0;r<n;r++)be>0?(t=C.shift(),C[s-1]=t,p++,Ue((p+2)*ve.x,t.el.style),o.setContent(t,d-n+r+1+1)):(t=C.pop(),C.unshift(t),p--,Ue(p*ve.x,t.el.style),o.setContent(t,d+n-r-1-1));if(re&&1===Math.abs(be)){var i=Xt(B);i.initialZoomLevel!==v&&(sn(i,fe),un(i),Ne(i))}be=0,o.updateCurrZoomItem(),B=d,Se("afterChange")}}},updateSize:function(t){if(!ye&&l.modal){var n=i.getScrollY();if(H!==n&&(e.style.top=n+"px",H=n),!t&&xe.x===window.innerWidth&&xe.y===window.innerHeight)return;xe.x=window.innerWidth,xe.y=window.innerHeight,e.style.height=xe.y+"px"}if(fe.x=o.scrollWrap.clientWidth,fe.y=o.scrollWrap.clientHeight,$e(),ve.x=fe.x+Math.round(fe.x*l.spacing),ve.y=fe.y,Le(ve.x*ge),Se("beforeResize"),void 0!==p){for(var r,a,c,A=0;A<s;A++)r=C[A],Ue((A+p)*ve.x,r.el.style),c=d+A-1,l.loop&&Jt()>2&&(c=Be(c)),a=Xt(c),a&&(k||a.needsUpdate||!a.bounds)?(o.cleanSlide(a),o.setContent(r,c),1===A&&(o.currItem=a,o.updateCurrZoomItem(!0)),a.needsUpdate=!1):-1===r.index&&c>=0&&o.setContent(r,c),a&&a.container&&(sn(a,fe),un(a),Ne(a));k=!1}b=v=o.currItem.initialZoomLevel,ne=o.currItem.bounds,ne&&(pe.x=ne.center.x,pe.y=ne.center.y,Ie(!0)),Se("resize")},zoomTo:function(e,t,n,r,o){t&&(b=v,bt.x=Math.abs(t.x)-pe.x,bt.y=Math.abs(t.y)-pe.y,De(he,pe));var a=Pe(e,!1),s={};We("x",a,s,e),We("y",a,s,e);var l=v,c={x:pe.x,y:pe.y};He(s);var A=function(t){1===t?(v=e,pe.x=s.x,pe.y=s.y):(v=(e-l)*t+l,pe.x=(s.x-c.x)*t+c.x,pe.y=(s.y-c.y)*t+c.y),o&&o(t),Ie(1===t)};n?nt("customZoomTo",0,1,n,r||i.easing.sine.inOut,A):A(1)}},it=30,ot=10,at={},st={},lt={},ct={},At={},ut=[],dt={},ht=[],pt={},ft=0,gt=ue(),mt=0,vt=ue(),bt=ue(),yt=ue(),wt=function(e,t){return e.x===t.x&&e.y===t.y},xt=function(e,t){return Math.abs(e.x-t.x)<a&&Math.abs(e.y-t.y)<a},kt=function(e,t){return pt.x=Math.abs(e.x-t.x),pt.y=Math.abs(e.y-t.y),Math.sqrt(pt.x*pt.x+pt.y*pt.y)},Ct=function(){Y&&(U(Y),Y=null)},Bt=function(){j&&(Y=N(Bt),Zt())},_t=function(){return!("fit"===l.scaleMode&&v===o.currItem.initialZoomLevel)},Et=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:Et(e.parentNode,t)))},St={},Ft=function(e,t){return St.prevent=!Et(e.target,l.isClickableElement),Se("preventDragEvent",e,t,St),St.prevent},Tt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Mt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},It=function(e,t,n){if(e-R>50){var r=ht.length>2?ht.shift():{};r.x=t,r.y=n,ht.push(r),R=e}},Nt=function(){var e=pe.y-o.currItem.initialPosition.y;return 1-Math.abs(e/(fe.y/2))},Ut={},Lt={},Qt=[],Dt=function(e){while(Qt.length>0)Qt.pop();return M?(Ae=0,ut.forEach((function(e){0===Ae?Qt[0]=e:1===Ae&&(Qt[1]=e),Ae++}))):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Qt[0]=Tt(e.touches[0],Ut),e.touches.length>1&&(Qt[1]=Tt(e.touches[1],Lt))):(Ut.x=e.pageX,Ut.y=e.pageY,Ut.id="",Qt[0]=Ut),Qt},Ht=function(e,t){var n,r,i,a,s=pe[e]+t[e],c=t[e]>0,A=vt.x+t.x,u=vt.x-dt.x;if(n=s>ne.min[e]||s<ne.max[e]?l.panEndFriction:1,s=pe[e]+t[e]*n,(l.allowPanToNext||v===o.currItem.initialZoomLevel)&&(re?"h"!==oe||"x"!==e||G||(c?(s>ne.min[e]&&(n=l.panEndFriction,ne.min[e]-s,r=ne.min[e]-he[e]),(r<=0||u<0)&&Jt()>1?(a=A,u<0&&A>dt.x&&(a=dt.x)):ne.min.x!==ne.max.x&&(i=s)):(s<ne.max[e]&&(n=l.panEndFriction,s-ne.max[e],r=he[e]-ne.max[e]),(r<=0||u>0)&&Jt()>1?(a=A,u>0&&A<dt.x&&(a=dt.x)):ne.min.x!==ne.max.x&&(i=s))):a=A,"x"===e))return void 0!==a&&(Le(a,!0),X=a!==dt.x),ne.min.x!==ne.max.x&&(void 0!==i?pe.x=i:X||(pe.x+=t.x*n)),void 0!==a;ie||X||v>o.currItem.fitRatio&&(pe[e]+=t[e]*n)},Ot=function(e){if(!("mousedown"===e.type&&e.button>0))if(Yt)e.preventDefault();else if(!W||"mousedown"!==e.type){if(Ft(e,!0)&&e.preventDefault(),Se("pointerDown"),M){var t=i.arraySearch(ut,e.pointerId,"id");t<0&&(t=ut.length),ut[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=Dt(e),r=n.length;J=null,tt(),j&&1!==r||(j=ae=!0,i.bind(window,f,o),q=ce=se=K=X=$=V=G=!1,oe=null,Se("firstTouchStart",n),De(he,pe),de.x=de.y=0,De(ct,n[0]),De(At,ct),dt.x=ve.x*ge,ht=[{x:ct.x,y:ct.y}],R=Z=Fe(),Pe(v,!0),Ct(),Bt()),!ee&&r>1&&!ie&&!X&&(b=v,G=!1,ee=V=!0,de.y=de.x=0,De(he,pe),De(at,n[0]),De(st,n[1]),Mt(at,st,yt),bt.x=Math.abs(yt.x)-pe.x,bt.y=Math.abs(yt.y)-pe.y,te=kt(at,st))}},zt=function(e){if(e.preventDefault(),M){var t=i.arraySearch(ut,e.pointerId,"id");if(t>-1){var n=ut[t];n.x=e.pageX,n.y=e.pageY}}if(j){var r=Dt(e);if(oe||$||ee)J=r;else if(vt.x!==ve.x*ge)oe="h";else{var o=Math.abs(r[0].x-ct.x)-Math.abs(r[0].y-ct.y);Math.abs(o)>=ot&&(oe=o>0?"h":"v",J=r)}}},Zt=function(){if(J){var e=J.length;if(0!==e)if(De(at,J[0]),lt.x=at.x-ct.x,lt.y=at.y-ct.y,ee&&e>1){if(ct.x=at.x,ct.y=at.y,!lt.x&&!lt.y&&wt(J[1],st))return;De(st,J[1]),G||(G=!0,Se("zoomGestureStarted"));var t=kt(at,st),n=Wt(t);n>o.currItem.initialZoomLevel+o.currItem.initialZoomLevel/15&&(ce=!0);var r=1,i=qe(),a=Ke();if(n<i)if(l.pinchToClose&&!ce&&b<=o.currItem.initialZoomLevel){var s=i-n,c=1-s/(i/1.2);Te(c),Se("onPinchClose",c),se=!0}else r=(i-n)/i,r>1&&(r=1),n=i-r*(i/3);else n>a&&(r=(n-a)/(6*i),r>1&&(r=1),n=a+r*i);r<0&&(r=0),t,Mt(at,st,gt),de.x+=gt.x-yt.x,de.y+=gt.y-yt.y,De(yt,gt),pe.x=Qe("x",n),pe.y=Qe("y",n),q=n>v,v=n,Ie()}else{if(!oe)return;if(ae&&(ae=!1,Math.abs(lt.x)>=ot&&(lt.x-=J[0].x-At.x),Math.abs(lt.y)>=ot&&(lt.y-=J[0].y-At.y)),ct.x=at.x,ct.y=at.y,0===lt.x&&0===lt.y)return;if("v"===oe&&l.closeOnVerticalDrag&&!_t()){de.y+=lt.y,pe.y+=lt.y;var A=Nt();return K=!0,Se("onVerticalDrag",A),Te(A),void Ie()}It(Fe(),at.x,at.y),$=!0,ne=o.currItem.bounds;var u=Ht("x",lt);u||(Ht("y",lt),He(pe),Ie())}}},Rt=function(e){if(O.isOldAndroid){if(W&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(W),W=setTimeout((function(){W=0}),600))}var t;if(Se("pointerUp"),Ft(e,!1)&&e.preventDefault(),M){var n=i.arraySearch(ut,e.pointerId,"id");if(n>-1)if(t=ut.splice(n,1)[0],navigator.msPointerEnabled){var r={4:"mouse",2:"touch",3:"pen"};t.type=r[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}else t.type=e.pointerType||"mouse"}var a,s=Dt(e),c=s.length;if("mouseup"===e.type&&(c=0),2===c)return J=null,!0;1===c&&De(At,s[0]),0!==c||oe||ie||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Se("touchRelease",e,t));var A=-1;if(0===c&&(j=!1,i.unbind(window,f,o),Ct(),ee?A=0:-1!==mt&&(A=Fe()-mt)),mt=1===c?Fe():-1,a=-1!==A&&A<150?"zoom":"swipe",ee&&c<2&&(ee=!1,1===c&&(a="zoomPointerUp"),Se("zoomGestureEnded")),J=null,$||G||ie||K)if(tt(),P||(P=Pt()),P.calculateSwipeSpeed("x"),K){var u=Nt();if(u<l.verticalDragRange)o.close();else{var d=pe.y,h=le;nt("verticalDrag",0,1,300,i.easing.cubic.out,(function(e){pe.y=(o.currItem.initialPosition.y-d)*e+d,Te((1-h)*e+h),Ie()})),Se("onVerticalDrag",1)}}else{if((X||ie)&&0===c){var p=Kt(a,P);if(p)return;a="zoomPointerUp"}ie||("swipe"===a?!X&&v>o.currItem.fitRatio&&qt(P):jt())}},Pt=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(r){ht.length>1?(e=Fe()-R+50,t=ht[ht.length-2][r]):(e=Fe()-Z,t=At[r]),n.lastFlickOffset[r]=ct[r]-t,n.lastFlickDist[r]=Math.abs(n.lastFlickOffset[r]),n.lastFlickDist[r]>20?n.lastFlickSpeed[r]=n.lastFlickOffset[r]/e:n.lastFlickSpeed[r]=0,Math.abs(n.lastFlickSpeed[r])<.1&&(n.lastFlickSpeed[r]=0),n.slowDownRatio[r]=.95,n.slowDownRatioReverse[r]=1-n.slowDownRatio[r],n.speedDecelerationRatio[r]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(pe[e]>ne.min[e]?n.backAnimDestination[e]=ne.min[e]:pe[e]<ne.max[e]&&(n.backAnimDestination[e]=ne.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,nt("bounceZoomPan"+e,pe[e],n.backAnimDestination[e],t||300,i.easing.sine.out,(function(t){pe[e]=t,Ie()})))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,pe[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Ye.zoomPan&&(Ye.zoomPan.raf=N(n.panAnimLoop),n.now=Fe(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Ie(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return pe.x=Math.round(pe.x),pe.y=Math.round(pe.y),Ie(),void Je("zoomPan")}};return n},qt=function(e){if(e.calculateSwipeSpeed("y"),ne=o.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05)return e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0;et("zoomPan"),e.lastNow=Fe(),e.panAnimLoop()},Kt=function(e,t){var n,r,a;if(ie||(ft=d),"swipe"===e){var s=ct.x-At.x,c=t.lastFlickDist.x<10;s>it&&(c||t.lastFlickOffset.x>20)?r=-1:s<-it&&(c||t.lastFlickOffset.x<-20)&&(r=1)}r&&(d+=r,d<0?(d=l.loop?Jt()-1:0,a=!0):d>=Jt()&&(d=l.loop?0:Jt()-1,a=!0),a&&!l.loop||(be+=r,ge-=r,n=!0));var A,u=ve.x*ge,h=Math.abs(u-vt.x);return n||u>vt.x===t.lastFlickSpeed.x>0?(A=Math.abs(t.lastFlickSpeed.x)>0?h/Math.abs(t.lastFlickSpeed.x):333,A=Math.min(A,400),A=Math.max(A,250)):A=333,ft===d&&(n=!1),ie=!0,Se("mainScrollAnimStart"),nt("mainScroll",vt.x,u,A,i.easing.cubic.out,Le,(function(){tt(),ie=!1,ft=-1,(n||ft!==d)&&o.updateCurrItem(),Se("mainScrollAnimComplete")})),n&&o.updateCurrItem(!0),n},Wt=function(e){return 1/te*e*b},jt=function(){var e=v,t=qe(),n=Ke();v<t?e=t:v>n&&(e=n);var r,a=1,s=le;return se&&!q&&!ce&&v<t?(o.close(),!0):(se&&(r=function(e){Te((a-s)*e+s)}),o.zoomTo(e,0,200,i.easing.cubic.out,r),!0)};Ce("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,r,i){_=e+t,E=e+n,S=e+r,F=i?e+i:""};M=O.pointerEvent,M&&O.touch&&(O.touch=!1),M?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):O.touch?(e("touch","start","move","end","cancel"),I=!0):e("mouse","down","move","up"),f=E+" "+S+" "+F,g=_,M&&!I&&(I=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),o.likelyTouchDevice=I,m[_]=Ot,m[E]=zt,m[S]=Rt,F&&(m[F]=m[S]),O.touch&&(g+=" mousedown",f+=" mousemove mouseup",m.mousedown=m[_],m.mousemove=m[E],m.mouseup=m[S]),I||(l.allowPanToNext=!1)}}});var Vt,Gt,$t,Yt,Xt,Jt,en=function(t,n,r,a){var s;Vt&&clearTimeout(Vt),Yt=!0,$t=!0,t.initialLayout?(s=t.initialLayout,t.initialLayout=null):s=l.getThumbBoundsFn&&l.getThumbBoundsFn(d);var c=r?l.hideAnimationDuration:l.showAnimationDuration,A=function(){Je("initialZoom"),r?(o.template.removeAttribute("style"),o.bg.removeAttribute("style")):(Te(1),n&&(n.style.display="block"),i.addClass(e,"pswp--animated-in"),Se("initialZoom"+(r?"OutEnd":"InEnd"))),a&&a(),Yt=!1};if(!c||!s||void 0===s.x)return Se("initialZoom"+(r?"Out":"In")),v=t.initialZoomLevel,De(pe,t.initialPosition),Ie(),e.style.opacity=r?0:1,Te(1),void(c?setTimeout((function(){A()}),c):A());var h=function(){var n=u,a=!o.currItem.src||o.currItem.loadError||l.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),r||(v=s.w/t.w,pe.x=s.x,pe.y=s.y-Q,o[a?"template":"bg"].style.opacity=.001,Ie()),et("initialZoom"),r&&!n&&i.removeClass(e,"pswp--animated-in"),a&&(r?i[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout((function(){i.addClass(e,"pswp--animate_opacity")}),30)),Vt=setTimeout((function(){if(Se("initialZoom"+(r?"Out":"In")),r){var o=s.w/t.w,l={x:pe.x,y:pe.y},u=v,d=le,h=function(t){1===t?(v=o,pe.x=s.x,pe.y=s.y-H):(v=(o-u)*t+u,pe.x=(s.x-l.x)*t+l.x,pe.y=(s.y-H-l.y)*t+l.y),Ie(),a?e.style.opacity=1-t:Te(d-t*d)};n?nt("initialZoom",0,1,c,i.easing.cubic.out,h,A):(h(1),Vt=setTimeout(A,c+20))}else v=t.initialZoomLevel,De(pe,t.initialPosition),Ie(),Te(1),a?e.style.opacity=1:Te(1),Vt=setTimeout(A,c+20)}),r?25:90)};h()},tn={},nn=[],rn={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Gt.length}},on=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},an=function(e,t,n){var r=e.bounds;r.center.x=Math.round((tn.x-t)/2),r.center.y=Math.round((tn.y-n)/2)+e.vGap.top,r.max.x=t>tn.x?Math.round(tn.x-t):r.center.x,r.max.y=n>tn.y?Math.round(tn.y-n)+e.vGap.top:r.center.y,r.min.x=t>tn.x?0:r.center.x,r.min.y=n>tn.y?e.vGap.top:r.center.y},sn=function(e,t,n){if(e.src&&!e.loadError){var r=!n;if(r&&(e.vGap||(e.vGap={top:0,bottom:0}),Se("parseVerticalMargin",e)),tn.x=t.x,tn.y=t.y-e.vGap.top-e.vGap.bottom,r){var i=tn.x/e.w,o=tn.y/e.h;e.fitRatio=i<o?i:o;var a=l.scaleMode;"orig"===a?n=1:"fit"===a&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=on())}if(!n)return;return an(e,e.w*n,e.h*n),r&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=on(),e.initialPosition=e.bounds.center,e.bounds},ln=function(e,t,n,r,i,a){t.loadError||r&&(t.imageAppended=!0,un(t,r,t===o.currItem&&ke),n.appendChild(r),a&&setTimeout((function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)}),500))},cn=function(e){e.loading=!0,e.loaded=!1;var t=e.img=i.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},An=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=l.errorMsg.replace("%url%",e.src),!0},un=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var r=n?e.w:Math.round(e.w*e.fitRatio),i=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=r+"px",e.placeholder.style.height=i+"px"),t.style.width=r+"px",t.style.height=i+"px"}},dn=function(){if(nn.length){for(var e,t=0;t<nn.length;t++)e=nn[t],e.holder.index===e.index&&ln(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}};Ce("Controller",{publicMethods:{lazyLoadItem:function(e){e=Be(e);var t=Xt(e);t&&(!t.loaded&&!t.loading||k)&&(Se("gettingData",e,t),t.src&&cn(t))},initController:function(){i.extend(l,rn,!0),o.items=Gt=n,Xt=o.getItemAt,Jt=l.getNumItemsFn,l.loop,Jt()<3&&(l.loop=!1),Ee("beforeChange",(function(e){var t,n=l.preload,r=null===e||e>=0,i=Math.min(n[0],Jt()),a=Math.min(n[1],Jt());for(t=1;t<=(r?a:i);t++)o.lazyLoadItem(d+t);for(t=1;t<=(r?i:a);t++)o.lazyLoadItem(d-t)})),Ee("initialLayout",(function(){o.currItem.initialLayout=l.getThumbBoundsFn&&l.getThumbBoundsFn(d)})),Ee("mainScrollAnimComplete",dn),Ee("initialZoomInEnd",dn),Ee("destroy",(function(){for(var e,t=0;t<Gt.length;t++)e=Gt[t],e.container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);nn=null}))},getItemAt:function(e){return e>=0&&(void 0!==Gt[e]&&Gt[e])},allowProgressiveImg:function(){return l.forceProgressiveLoading||!I||l.mouseUsed||screen.width>1200},setContent:function(e,t){l.loop&&(t=Be(t));var n=o.getItemAt(e.index);n&&(n.container=null);var r,a=o.getItemAt(t);if(a){Se("gettingData",t,a),e.index=t,e.item=a;var s=a.container=i.createEl("pswp__zoom-wrap");if(!a.src&&a.html&&(a.html.tagName?s.appendChild(a.html):s.innerHTML=a.html),An(a),sn(a,fe),!a.src||a.loadError||a.loaded)a.src&&!a.loadError&&(r=i.createEl("pswp__img","img"),r.style.opacity=1,r.src=a.src,un(a,r),ln(t,a,s,r,!0));else{if(a.loadComplete=function(n){if(c){if(e&&e.index===t){if(An(n,!0))return n.loadComplete=n.img=null,sn(n,fe),Ne(n),void(e.index===d&&o.updateCurrZoomItem());n.imageAppended?!Yt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):O.transform&&(ie||Yt)?nn.push({item:n,baseDiv:s,img:n.img,index:t,holder:e,clearPlaceholder:!0}):ln(t,n,s,n.img,ie||Yt,!0)}n.loadComplete=null,n.img=null,Se("imageLoadComplete",t,n)}},i.features.transform){var A="pswp__img pswp__img--placeholder";A+=a.msrc?"":" pswp__img--placeholder--blank";var u=i.createEl(A,a.msrc?"img":"");a.msrc&&(u.src=a.msrc),un(a,u),s.appendChild(u),a.placeholder=u}a.loading||cn(a),o.allowProgressiveImg()&&(!$t&&O.transform?nn.push({item:a,baseDiv:s,img:a.img,index:t,holder:e}):ln(t,a,s,a.img,!0,!0))}$t||t!==d?Ne(a):(re=s.style,en(a,r||a.img)),e.el.innerHTML="",e.el.appendChild(s)}else e.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var hn,pn,fn={},gn=function(e,t,n){var r=document.createEvent("CustomEvent"),i={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};r.initCustomEvent("pswpTap",!0,!0,i),e.target.dispatchEvent(r)};Ce("Tap",{publicMethods:{initTap:function(){Ee("firstTouchStart",o.onTapStart),Ee("touchRelease",o.onTapRelease),Ee("destroy",(function(){fn={},hn=null}))},onTapStart:function(e){e.length>1&&(clearTimeout(hn),hn=null)},onTapRelease:function(e,t){if(t&&!$&&!V&&!Xe){var n=t;if(hn&&(clearTimeout(hn),hn=null,xt(n,fn)))return void Se("doubleTap",n);if("mouse"===t.type)return void gn(e,t,"mouse");var r=e.target.tagName.toUpperCase();if("BUTTON"===r||i.hasClass(e.target,"pswp__single-tap"))return void gn(e,t);De(fn,n),hn=setTimeout((function(){gn(e,t),hn=null}),300)}}}}),Ce("DesktopZoom",{publicMethods:{initDesktopZoom:function(){D||(I?Ee("mouseUsed",(function(){o.setupDesktopZoom()})):o.setupDesktopZoom(!0))},setupDesktopZoom:function(t){pn={};var n="wheel mousewheel DOMMouseScroll";Ee("bindEvents",(function(){i.bind(e,n,o.handleMouseWheel)})),Ee("unbindEvents",(function(){pn&&i.unbind(e,n,o.handleMouseWheel)})),o.mouseZoomedIn=!1;var r,a=function(){o.mouseZoomedIn&&(i.removeClass(e,"pswp--zoomed-in"),o.mouseZoomedIn=!1),v<1?i.addClass(e,"pswp--zoom-allowed"):i.removeClass(e,"pswp--zoom-allowed"),s()},s=function(){r&&(i.removeClass(e,"pswp--dragging"),r=!1)};Ee("resize",a),Ee("afterChange",a),Ee("pointerDown",(function(){o.mouseZoomedIn&&(r=!0,i.addClass(e,"pswp--dragging"))})),Ee("pointerUp",s),t||a()},handleMouseWheel:function(e){if(v<=o.currItem.fitRatio)return l.modal&&(!l.closeOnScroll||Xe||j?e.preventDefault():T&&Math.abs(e.deltaY)>2&&(u=!0,o.close())),!0;if(e.stopPropagation(),pn.x=0,"deltaX"in e)1===e.deltaMode?(pn.x=18*e.deltaX,pn.y=18*e.deltaY):(pn.x=e.deltaX,pn.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(pn.x=-.16*e.wheelDeltaX),e.wheelDeltaY?pn.y=-.16*e.wheelDeltaY:pn.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;pn.y=e.detail}Pe(v,!0);var t=pe.x-pn.x,n=pe.y-pn.y;(l.modal||t<=ne.min.x&&t>=ne.max.x&&n<=ne.min.y&&n>=ne.max.y)&&e.preventDefault(),o.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:fe.x/2+me.x,y:fe.y/2+me.y};var n=l.getDoubleTapZoom(!0,o.currItem),r=v===n;o.mouseZoomedIn=!r,o.zoomTo(r?o.currItem.initialZoomLevel:n,t,333),i[(r?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var mn,vn,bn,yn,wn,xn,kn,Cn,Bn,_n,En,Sn,Fn={history:!0,galleryUID:1},Tn=function(){return En.hash.substring(1)},Mn=function(){mn&&clearTimeout(mn),bn&&clearTimeout(bn)},In=function(){var e=Tn(),t={};if(e.length<5)return t;var n,r=e.split("&");for(n=0;n<r.length;n++)if(r[n]){var i=r[n].split("=");i.length<2||(t[i[0]]=i[1])}if(l.galleryPIDs){var o=t.pid;for(t.pid=0,n=0;n<Gt.length;n++)if(Gt[n].pid===o){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Nn=function(){if(bn&&clearTimeout(bn),Xe||j)bn=setTimeout(Nn,500);else{yn?clearTimeout(vn):yn=!0;var e=d+1,t=Xt(d);t.hasOwnProperty("pid")&&(e=t.pid);var n=kn+"&gid="+l.galleryUID+"&pid="+e;Cn||-1===En.hash.indexOf(n)&&(_n=!0);var r=En.href.split("#")[0]+"#"+n;Sn?"#"+n!==window.location.hash&&history[Cn?"replaceState":"pushState"]("",document.title,r):Cn?En.replace(r):En.hash=n,Cn=!0,vn=setTimeout((function(){yn=!1}),60)}};Ce("History",{publicMethods:{initHistory:function(){if(i.extend(l,Fn,!0),l.history){En=window.location,_n=!1,Bn=!1,Cn=!1,kn=Tn(),Sn="pushState"in history,kn.indexOf("gid=")>-1&&(kn=kn.split("&gid=")[0],kn=kn.split("?gid=")[0]),Ee("afterChange",o.updateURL),Ee("unbindEvents",(function(){i.unbind(window,"hashchange",o.onHashChange)}));var e=function(){xn=!0,Bn||(_n?history.back():kn?En.hash=kn:Sn?history.pushState("",document.title,En.pathname+En.search):En.hash=""),Mn()};Ee("unbindEvents",(function(){u&&e()})),Ee("destroy",(function(){xn||e()})),Ee("firstUpdate",(function(){d=In().pid}));var t=kn.indexOf("pid=");t>-1&&(kn=kn.substring(0,t),"&"===kn.slice(-1)&&(kn=kn.slice(0,-1))),setTimeout((function(){c&&i.bind(window,"hashchange",o.onHashChange)}),40)}},onHashChange:function(){if(Tn()===kn)return Bn=!0,void o.close();yn||(wn=!0,o.goTo(In().pid),wn=!1)},updateURL:function(){Mn(),wn||(Cn?mn=setTimeout(Nn,800):Nn())}}}),i.extend(o,rt)};return e}))},1128:function(e,t,n){"use strict";n.r(t),n.d(t,{decode:function(){return E},encode:function(){return S},toASCII:function(){return T},toUnicode:function(){return F},ucs2decode:function(){return x},ucs2encode:function(){return k}});n(57658);const r=2147483647,i=36,o=1,a=26,s=38,l=700,c=72,A=128,u="-",d=/^xn--/,h=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=i-o,m=Math.floor,v=String.fromCharCode;function b(e){throw new RangeError(f[e])}function y(e,t){const n=[];let r=e.length;while(r--)n[r]=t(e[r]);return n}function w(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(p,".");const i=e.split("."),o=y(i,t).join(".");return r+o}function x(e){const t=[];let n=0;const r=e.length;while(n<r){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}const k=e=>String.fromCodePoint(...e),C=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:i},B=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},_=function(e,t,n){let r=0;for(e=n?m(e/l):e>>1,e+=m(e/t);e>g*a>>1;r+=i)e=m(e/g);return m(r+(g+1)*e/(e+s))},E=function(e){const t=[],n=e.length;let s=0,l=A,d=c,h=e.lastIndexOf(u);h<0&&(h=0);for(let r=0;r<h;++r)e.charCodeAt(r)>=128&&b("not-basic"),t.push(e.charCodeAt(r));for(let c=h>0?h+1:0;c<n;){const A=s;for(let t=1,l=i;;l+=i){c>=n&&b("invalid-input");const A=C(e.charCodeAt(c++));A>=i&&b("invalid-input"),A>m((r-s)/t)&&b("overflow"),s+=A*t;const u=l<=d?o:l>=d+a?a:l-d;if(A<u)break;const h=i-u;t>m(r/h)&&b("overflow"),t*=h}const u=t.length+1;d=_(s-A,u,0==A),m(s/u)>r-l&&b("overflow"),l+=m(s/u),s%=u,t.splice(s++,0,l)}return String.fromCodePoint(...t)},S=function(e){const t=[];e=x(e);const n=e.length;let s=A,l=0,d=c;for(const r of e)r<128&&t.push(v(r));const h=t.length;let p=h;h&&t.push(u);while(p<n){let n=r;for(const t of e)t>=s&&t<n&&(n=t);const c=p+1;n-s>m((r-l)/c)&&b("overflow"),l+=(n-s)*c,s=n;for(const A of e)if(A<s&&++l>r&&b("overflow"),A===s){let e=l;for(let n=i;;n+=i){const r=n<=d?o:n>=d+a?a:n-d;if(e<r)break;const s=e-r,l=i-r;t.push(v(B(r+s%l,0))),e=m(s/l)}t.push(v(B(e,0))),d=_(l,c,p===h),l=0,++p}++l,++s}return t.join("")},F=function(e){return w(e,(function(e){return d.test(e)?E(e.slice(4).toLowerCase()):e}))},T=function(e){return w(e,(function(e){return h.test(e)?"xn--"+S(e):e}))},M={version:"2.1.0",ucs2:{decode:x,encode:k},decode:E,encode:S,toASCII:T,toUnicode:F};t["default"]=M},83545:function(e,t,n){n(57658),e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},22321:function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},35990:function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},33031:function(e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},56259:function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},58229:function(e,t,n){"use strict";t.Any=n(25580),t.Cc=n(22321),t.Cf=n(35990),t.P=n(33031),t.Z=n(56259)},25580:function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},43693:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(73396);function i(e,t,n,i,o,a){const s=(0,r.up)("spin");return(0,r.wg)(),(0,r.j4)(s,{className:"loading",tip:e.text,spinning:e.loading},{default:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"default")])),_:3},8,["tip","spinning"])}var o=n(82450),a=(0,r.aZ)({name:"am-loading",components:{Spin:o.Z},props:{text:String,loading:Boolean}}),s=n(40089);const l=(0,s.Z)(a,[["render",i]]);var c=l},93654:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ve},s:function(){return Pe}});var r=n(73396),i=n(87139);const o={class:"editor-outline"},a={key:0,class:"editor-outline-list"},s=["href","title"],l={key:0,class:"editor-video-list"},c=["src"],A={key:0,class:"editor-audio-list"},u=["src"];function d(e,t,n,d,h,p){const f=(0,r.up)("Empty"),g=(0,r.up)("TabPane"),m=(0,r.up)("Image"),v=(0,r.up)("ImagePreviewGroup"),b=(0,r.up)("Tabs");return(0,r.wg)(),(0,r.iD)("div",o,[(0,r.Wm)(b,{activeKey:e.activeKey,"onUpdate:activeKey":t[0]||(t[0]=t=>e.activeKey=t),onChange:e.handleChange},{default:(0,r.w5)((()=>[(0,r.Wm)(g,{key:"outline",tab:"大纲"},{default:(0,r.w5)((()=>[e.outlineData[e.activeKey]&&e.outlineData[e.activeKey].length>0?((0,r.wg)(),(0,r.iD)("div",a,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.outlineData[e.activeKey],(e=>((0,r.wg)(),(0,r.iD)("a",{key:`outline-${e.id}`,href:`#${e.id}`,class:(0,i.C_)(`editor-outline-item editor-outline-item-${e.depth}`),title:e.text},(0,i.zw)(e.text),11,s)))),128))])):((0,r.wg)(),(0,r.j4)(f,{key:1,image:e.simpleImage},null,8,["image"]))])),_:1}),(0,r.Wm)(g,{key:"image",tab:"图片"},{default:(0,r.w5)((()=>[e.outlineData[e.activeKey]&&e.outlineData[e.activeKey].length>0?((0,r.wg)(),(0,r.j4)(v,{key:0,class:"editor-image-list"},{default:(0,r.w5)((()=>[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.outlineData[e.activeKey],((e,t)=>((0,r.wg)(),(0,r.j4)(m,{key:`image-${t}`,class:(0,i.C_)("editor-image-item"),src:e.src},null,8,["src"])))),128))])),_:1})):((0,r.wg)(),(0,r.j4)(f,{key:1,image:e.simpleImage},null,8,["image"]))])),_:1}),(0,r.Wm)(g,{key:"video",tab:"视频"},{default:(0,r.w5)((()=>[e.outlineData[e.activeKey]&&e.outlineData[e.activeKey].length>0?((0,r.wg)(),(0,r.iD)("div",l,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.outlineData[e.activeKey],((e,t)=>((0,r.wg)(),(0,r.iD)("video",{key:`video-${t}`,class:(0,i.C_)("editor-video-item"),preload:"metadata",src:e.src,"webkit-playsinline":"webkit-playsinline",playsinline:"",controls:""},null,8,c)))),128))])):((0,r.wg)(),(0,r.j4)(f,{key:1,image:e.simpleImage},null,8,["image"]))])),_:1}),(0,r.Wm)(g,{key:"audio",tab:"音频"},{default:(0,r.w5)((()=>[e.outlineData[e.activeKey]&&e.outlineData[e.activeKey].length>0?((0,r.wg)(),(0,r.iD)("div",A,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.outlineData[e.activeKey],((e,t)=>((0,r.wg)(),(0,r.iD)("audio",{key:`audio-${t}`,class:(0,i.C_)("editor-audio-item"),preload:"none",src:e.src,"webkit-playsinline":"webkit-playsinline",playsinline:"",controls:""},null,8,u)))),128))])):((0,r.wg)(),(0,r.j4)(f,{key:1,image:e.simpleImage},null,8,["image"]))])),_:1})])),_:1},8,["activeKey","onChange"])])}n(57658);var h=n(44870),p=n(43629),f=n(7279),g=n(74806),m=n(47922),v=n(18914),b=n(95082),y=n(3336),w=n(82482),x=n(62078),k=n(54621),C=n(60681),B=n(13835),_="[object Number]";function E(e){return"number"==typeof e||(0,B.Z)(e)&&(0,C.Z)(e)==_}var S=E,F=n(83763),T=n(87495),M=n(38343),I=n(73),N=n(56560),U=n(19437),L=n(52166),Q=n(40032),D=n(88166),H=n(39299),O=n(11976);function z(e){var t=(0,h.iH)(null),n=(0,h.qj)((0,b.Z)({},e)),i=(0,h.iH)([]),o=function(e){null===t.value&&(i.value=[],t.value=(0,O.Z)((function(){var e;i.value.forEach((function(t){e=(0,b.Z)((0,b.Z)({},e),t)})),(0,H.Z)(n,e),t.value=null}))),i.value.push(e)};return(0,r.bv)((function(){t.value&&O.Z.cancel(t.value)})),[n,o]}function Z(e,t,n,r){var i=t+n,o=(n-r)/2;if(n>r){if(t>0)return(0,w.Z)({},e,o);if(t<0&&i<r)return(0,w.Z)({},e,-o)}else if(t<0||i>r)return(0,w.Z)({},e,t<0?o:-o);return{}}function R(e,t,n,r){var i=(0,M.g1)(),o=i.width,a=i.height,s=null;return e<=o&&t<=a?s={x:0,y:0}:(e>o||t>a)&&(s=(0,b.Z)((0,b.Z)({},Z("x",n,e,o)),Z("y",r,t,a))),s}var P=n(91172),q=Symbol("previewGroupContext"),K={provide:function(e){(0,r.JJ)(q,e)},inject:function(){return(0,r.f3)(q,{isPreviewGroup:(0,h.iH)(!1),previewUrls:(0,r.Fl)((function(){return new Map})),setPreviewUrls:function(){},current:(0,h.iH)(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},W=(0,r.aZ)({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,t){var n=t.slots,i=(0,r.Fl)((function(){var t={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return"object"===(0,y.Z)(e.preview)?ee(e.preview,t):t})),o=(0,h.qj)(new Map),a=(0,h.iH)(),s=(0,r.Fl)((function(){return i.value.visible})),l=(0,r.Fl)((function(){return i.value.getContainer})),c=function(e,t){var n,r;null===(n=(r=i.value).onVisibleChange)||void 0===n||n.call(r,e,t)},A=(0,I.Z)(!!s.value,{value:s,onChange:c}),u=(0,k.Z)(A,2),d=u[0],p=u[1],f=(0,h.iH)(null),g=(0,r.Fl)((function(){return void 0!==s.value})),m=(0,r.Fl)((function(){return Array.from(o.keys())})),v=(0,r.Fl)((function(){return m.value[i.value.current]})),w=(0,r.Fl)((function(){return new Map(Array.from(o).filter((function(e){var t=(0,k.Z)(e,2),n=t[1].canPreview;return!!n})).map((function(e){var t=(0,k.Z)(e,2),n=t[0],r=t[1].url;return[n,r]})))})),x=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];o.set(e,{url:t,canPreview:n})},C=function(e){a.value=e},B=function(e){f.value=e},_=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=function(){o.delete(e)};return o.set(e,{url:t,canPreview:n}),r},E=function(e){null===e||void 0===e||e.stopPropagation(),p(!1),B(null)};return(0,r.YP)(v,(function(e){C(e)}),{immediate:!0,flush:"post"}),(0,r.m0)((function(){d.value&&g.value&&C(v.value)}),{flush:"post"}),K.provide({isPreviewGroup:(0,h.iH)(!0),previewUrls:w,setPreviewUrls:x,current:a,setCurrent:C,setShowPreview:p,setMousePosition:B,registerImage:_}),function(){var t=(0,H.Z)({},((0,P.Z)(i.value),i.value));return(0,r.Wm)(r.HY,null,[n.default&&n.default(),(0,r.Wm)(Y,(0,b.Z)((0,b.Z)({},t),{},{"ria-hidden":!d.value,visible:d.value,prefixCls:e.previewPrefixCls,onClose:E,mousePosition:f.value,src:w.value.get(a.value),icons:e.icons,getContainer:l.value}),null)])}}}),j=W,V={x:0,y:0},G=(0,b.Z)((0,b.Z)({},(0,U.n)()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),$=(0,r.aZ)({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:G,emits:["close","afterClose"],setup:function(e,t){var n=t.emit,i=t.attrs,o=(0,h.qj)(e.icons),a=o.rotateLeft,s=o.rotateRight,l=o.zoomIn,c=o.zoomOut,A=o.close,u=o.left,d=o.right,p=(0,h.iH)(1),f=(0,h.iH)(0),g=z(V),m=(0,k.Z)(g,2),v=m[0],y=m[1],x=function(){return n("close")},C=(0,h.iH)(),B=(0,h.qj)({originX:0,originY:0,deltaX:0,deltaY:0}),_=(0,h.iH)(!1),E=K.inject(),S=E.previewUrls,T=E.current,I=E.isPreviewGroup,U=E.setCurrent,H=(0,r.Fl)((function(){return S.value.size})),O=(0,r.Fl)((function(){return Array.from(S.value.keys())})),Z=(0,r.Fl)((function(){return O.value.indexOf(T.value)})),P=(0,r.Fl)((function(){return I.value?S.value.get(T.value):e.src})),q=(0,r.Fl)((function(){return I.value&&H.value>1})),W=(0,h.iH)({wheelDirection:0}),j=function(){p.value=1,f.value=0,y(V),n("afterClose")},G=function(){p.value++,y(V)},$=function(){p.value>1&&p.value--,y(V)},Y=function(){f.value+=90},X=function(){f.value-=90},J=function(e){e.preventDefault(),e.stopPropagation(),Z.value>0&&U(O.value[Z.value-1])},ee=function(e){e.preventDefault(),e.stopPropagation(),Z.value<H.value-1&&U(O.value[Z.value+1])},te=(0,F.Z)((0,w.Z)({},"".concat(e.prefixCls,"-moving"),_.value)),ne="".concat(e.prefixCls,"-operations-operation"),re="".concat(e.prefixCls,"-operations-icon"),ie=[{icon:A,onClick:x,type:"close"},{icon:l,onClick:G,type:"zoomIn"},{icon:c,onClick:$,type:"zoomOut",disabled:(0,r.Fl)((function(){return 1===p.value}))},{icon:s,onClick:Y,type:"rotateRight"},{icon:a,onClick:X,type:"rotateLeft"}],oe=function(){if(e.visible&&_.value){var t=C.value.offsetWidth*p.value,n=C.value.offsetHeight*p.value,r=(0,M.os)(C.value),i=r.left,o=r.top,a=f.value%180!==0;_.value=!1;var s=R(a?n:t,a?t:n,i,o);s&&y((0,b.Z)({},s))}},ae=function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),B.deltaX=e.pageX-v.x,B.deltaY=e.pageY-v.y,B.originX=v.x,B.originY=v.y,_.value=!0)},se=function(t){e.visible&&_.value&&y({x:t.pageX-B.deltaX,y:t.pageY-B.deltaY})},le=function(t){if(e.visible){t.preventDefault();var n=t.deltaY;W.value={wheelDirection:n}}},ce=function(t){e.visible&&q.value&&(t.preventDefault(),t.keyCode===Q.Z.LEFT?Z.value>0&&U(O.value[Z.value-1]):t.keyCode===Q.Z.RIGHT&&Z.value<H.value-1&&U(O.value[Z.value+1]))},Ae=function(){e.visible&&(1!==p.value&&(p.value=1),v.x===V.x&&v.y===V.y||y(V))},ue=function(){};return(0,r.bv)((function(){(0,r.YP)([function(){return e.visible},_],(function(){var e,t;ue();var n=(0,L.Z)(window,"mouseup",oe,!1),r=(0,L.Z)(window,"mousemove",se,!1),i=(0,L.Z)(window,"wheel",le,{passive:!1}),o=(0,L.Z)(window,"keydown",ce,!1);try{window.top!==window.self&&(e=(0,L.Z)(window.top,"mouseup",oe,!1),t=(0,L.Z)(window.top,"mousemove",se,!1))}catch(a){(0,D.Kp)(!1,"[vc-image] ".concat(a))}ue=function(){n.remove(),r.remove(),i.remove(),o.remove(),e&&e.remove(),t&&t.remove()}}),{flush:"post",immediate:!0}),(0,r.YP)([W],(function(){var e=W.value.wheelDirection;e>0?$():e<0&&G()}))})),(0,r.Ah)((function(){ue()})),function(){var t=e.visible,n=e.prefixCls,o=e.rootClassName;return(0,r.Wm)(N.Z,(0,b.Z)((0,b.Z)({},i),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:n,onClose:x,afterClose:j,visible:t,wrapClassName:te,rootClassName:o,getContainer:e.getContainer}),{default:function(){return[(0,r.Wm)("ul",{class:"".concat(e.prefixCls,"-operations")},[ie.map((function(t){var n=t.icon,i=t.onClick,o=t.type,a=t.disabled;return(0,r.Wm)("li",{class:(0,F.Z)(ne,(0,w.Z)({},"".concat(e.prefixCls,"-operations-operation-disabled"),a&&(null===a||void 0===a?void 0:a.value))),onClick:i,key:o},[(0,r.Ho)(n,{class:re})])}))]),(0,r.Wm)("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(v.x,"px, ").concat(v.y,"px, 0)")}},[(0,r.Wm)("img",{onMousedown:ae,onDblclick:Ae,ref:C,class:"".concat(e.prefixCls,"-img"),src:P.value,alt:e.alt,style:{transform:"scale3d(".concat(p.value,", ").concat(p.value,", 1) rotate(").concat(f.value,"deg)")}},null)]),q.value&&(0,r.Wm)("div",{class:(0,F.Z)("".concat(e.prefixCls,"-switch-left"),(0,w.Z)({},"".concat(e.prefixCls,"-switch-left-disabled"),Z.value<=0)),onClick:J},[u]),q.value&&(0,r.Wm)("div",{class:(0,F.Z)("".concat(e.prefixCls,"-switch-right"),(0,w.Z)({},"".concat(e.prefixCls,"-switch-right-disabled"),Z.value>=H.value-1)),onClick:ee},[d])]}})}}}),Y=$,X=["icons","maskClassName"],J=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:T.Z.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},ee=function(e,t){var n=(0,b.Z)({},e);return Object.keys(t).forEach((function(r){void 0===e[r]&&(n[r]=t[r])})),n},te=0,ne=(0,r.aZ)({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:J(),emits:["click","error"],setup:function(e,t){var n=t.attrs,i=t.slots,o=t.emit,a=(0,r.Fl)((function(){return e.prefixCls})),s=(0,r.Fl)((function(){return"".concat(a.value,"-preview")})),l=(0,r.Fl)((function(){var t={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return"object"===(0,y.Z)(e.preview)?ee(e.preview,t):t})),c=(0,r.Fl)((function(){var t;return null!==(t=l.value.src)&&void 0!==t?t:e.src})),A=(0,r.Fl)((function(){return e.placeholder&&!0!==e.placeholder||i.placeholder})),u=(0,r.Fl)((function(){return l.value.visible})),d=(0,r.Fl)((function(){return l.value.getContainer})),p=(0,r.Fl)((function(){return void 0!==u.value})),f=function(e,t){var n,r;null===(n=(r=l.value).onVisibleChange)||void 0===n||n.call(r,e,t)},g=(0,I.Z)(!!u.value,{value:u,onChange:f}),m=(0,k.Z)(g,2),v=m[0],C=m[1];(0,r.YP)(v,(function(e,t){f(e,t)}));var B=(0,h.iH)(A.value?"loading":"normal");(0,r.YP)((function(){return e.src}),(function(){B.value=A.value?"loading":"normal"}));var _=(0,h.iH)(null),E=(0,r.Fl)((function(){return"error"===B.value})),T=K.inject(),N=T.isPreviewGroup,U=T.setCurrent,L=T.setShowPreview,Q=T.setMousePosition,D=T.registerImage,H=(0,h.iH)(te++),O=(0,r.Fl)((function(){return e.preview&&!E.value})),z=function(){B.value="normal"},Z=function(e){B.value="error",o("error",e)},R=function(e){if(!p.value){var t=(0,M.os)(e.target),n=t.left,r=t.top;N.value?(U(H.value),Q({x:n,y:r})):_.value={x:n,y:r}}N.value?L(!0):C(!0),o("click",e)},P=function(){C(!1),p.value||(_.value=null)},q=(0,h.iH)(null);(0,r.YP)((function(){return q}),(function(){"loading"===B.value&&q.value.complete&&(q.value.naturalWidth||q.value.naturalHeight)&&z()}));var W=function(){};(0,r.bv)((function(){(0,r.YP)([c,O],(function(){if(W(),!N.value)return function(){};W=D(H.value,c.value,O.value),O.value||W()}),{flush:"post",immediate:!0})})),(0,r.Ah)((function(){W()}));var j=function(e){return S(e)?e+"px":e};return function(){var t=e.prefixCls,a=e.wrapperClassName,A=e.fallback,u=e.src,h=e.placeholder,p=e.wrapperStyle,f=e.rootClassName,g=n.width,m=n.height,y=n.crossorigin,k=n.decoding,C=n.alt,S=n.sizes,T=n.srcset,M=n.usemap,I=n.class,U=n.style,L=l.value,Q=L.icons,D=L.maskClassName,H=(0,x.Z)(L,X),K=(0,F.Z)(t,a,f,(0,w.Z)({},"".concat(t,"-error"),E.value)),W=E.value&&A?A:c.value,V={crossorigin:y,decoding:k,alt:C,sizes:S,srcset:T,usemap:M,class:(0,F.Z)("".concat(t,"-img"),(0,w.Z)({},"".concat(t,"-img-placeholder"),!0===h),I),style:(0,b.Z)({height:m},U)};return(0,r.Wm)(r.HY,null,[(0,r.Wm)("div",{class:K,onClick:O.value?R:function(e){o("click",e)},style:(0,b.Z)({width:j(g),height:j(m)},p)},[(0,r.Wm)("img",(0,b.Z)((0,b.Z)((0,b.Z)({},V),E.value&&A?{src:A}:{onLoad:z,onError:Z,src:u}),{},{ref:q}),null),"loading"===B.value&&(0,r.Wm)("div",{"aria-hidden":"true",class:"".concat(t,"-placeholder")},[h||i.placeholder&&i.placeholder()]),i.previewMask&&O.value&&(0,r.Wm)("div",{class:["".concat(t,"-mask"),D]},[i.previewMask()])]),!N.value&&O.value&&(0,r.Wm)(Y,(0,b.Z)((0,b.Z)({},H),{},{"aria-hidden":!v.value,visible:v.value,prefixCls:s.value,onClose:P,mousePosition:_.value,src:W,alt:C,getContainer:d.value,icons:Q,rootClassName:f}),null)])}}});ne.PreviewGroup=j;var re=ne,ie=re,oe=n(91568),ae=n(34746),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},le=se,ce=n(9388);function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ue(e,t,n[t])}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var de=function(e,t){var n=Ae({},e,t.attrs);return(0,r.Wm)(ce.Z,Ae({},n,{icon:le}),null)};de.displayName="RotateLeftOutlined",de.inheritAttrs=!1;var he=de,pe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},fe=pe;function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){me(e,t,n[t])}))}return e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ve=function(e,t){var n=ge({},e,t.attrs);return(0,r.Wm)(ce.Z,ge({},n,{icon:fe}),null)};ve.displayName="RotateRightOutlined",ve.inheritAttrs=!1;var be=ve,ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},we=ye;function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ke(e,t,n[t])}))}return e}function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ce=function(e,t){var n=xe({},e,t.attrs);return(0,r.Wm)(ce.Z,xe({},n,{icon:we}),null)};Ce.displayName="ZoomInOutlined",Ce.inheritAttrs=!1;var Be=Ce,_e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},Ee=_e;function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Fe(e,t,n[t])}))}return e}function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Te=function(e,t){var n=Se({},e,t.attrs);return(0,r.Wm)(ce.Z,Se({},n,{icon:Ee}),null)};Te.displayName="ZoomOutOutlined",Te.inheritAttrs=!1;var Me=Te,Ie=n(65599),Ne=n(41127),Ue=n(14312),Le={rotateLeft:(0,r.Wm)(he,null,null),rotateRight:(0,r.Wm)(be,null,null),zoomIn:(0,r.Wm)(Be,null,null),zoomOut:(0,r.Wm)(Me,null,null),close:(0,r.Wm)(Ie.Z,null,null),left:(0,r.Wm)(Ne.Z,null,null),right:(0,r.Wm)(Ue.Z,null,null)},Qe=(0,r.aZ)({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String},setup:function(e,t){var n=t.attrs,i=t.slots,o=(0,ae.Z)("image",e),a=o.getPrefixCls,s=(0,r.Fl)((function(){return a("image-preview",e.previewPrefixCls)}));return function(){return(0,r.Wm)(j,(0,b.Z)((0,b.Z)({},(0,b.Z)((0,b.Z)({},n),e)),{},{icons:Le,previewPrefixCls:s.value}),i)}}}),De=Qe,He=n(42235),Oe=n(87129),ze=(0,r.aZ)({name:"AImage",inheritAttrs:!1,props:J(),setup:function(e,t){var n=t.slots,i=t.attrs,o=(0,ae.Z)("image",e),a=o.prefixCls,s=o.rootPrefixCls,l=o.configProvider,c=(0,r.Fl)((function(){var t=e.preview;if(!1===t)return t;var n="object"===(0,y.Z)(t)?t:{};return(0,b.Z)((0,b.Z)({icons:Le},n),{},{transitionName:(0,Oe.mL)(s.value,"zoom",n.transitionName),maskTransitionName:(0,Oe.mL)(s.value,"fade",n.maskTransitionName)})}));return function(){var t,o=(null===(t=l.locale)||void 0===t?void 0:t.Image)||oe.Z.Image,s=function(){return(0,r.Wm)("div",{class:"".concat(a.value,"-mask-info")},[(0,r.Wm)(He.Z,null,null),null===o||void 0===o?void 0:o.preview])},A=e.previewMask,u=void 0===A?n.previewMask||s:A;return(0,r.Wm)(ie,(0,b.Z)((0,b.Z)({},(0,b.Z)((0,b.Z)((0,b.Z)({},i),e),{},{prefixCls:a.value})),{},{preview:c.value}),(0,b.Z)((0,b.Z)({},n),{},{previewMask:"function"===typeof u?u:null}))}}});ze.PreviewGroup=De,ze.install=function(e){return e.component(ze.name,ze),e.component(ze.PreviewGroup.name,ze.PreviewGroup),e};var Ze=ze,Re=n(73057);const Pe=(e,t)=>{const n=[],{card:r}=e;switch(t){case"outline":return e.container.find("h1,h2,h3,h4,h5,h6").each((e=>{const t=(0,p.$)(e);r.closest(t)||t.parent()?.isRoot()&&n.push(t.get())})),qe.normalize(n);case"image":return e.container.find("img").each((e=>{const t=(0,p.$)(e);r.closest(t)&&t.parent()?.hasClass("data-image-meta")&&n.push(t.get())})),n;case"video":return e.container.find("video").each((e=>{const t=(0,p.$)(e);r.closest(t)&&t.parent()?.hasClass("data-video-content")&&n.push(t.get())})),n;case"audio":return e.container.find("audio").each((e=>{const t=(0,p.$)(e);r.closest(t)&&t.parent()?.hasClass("data-audio-content")&&n.push(t.get())})),n;default:break}},qe=new f.b;var Ke=(0,r.aZ)({name:"am-outline",components:{Tabs:m.Z,TabPane:v.Z,Image:Ze,ImagePreviewGroup:De,Empty:Re.Z},props:{engine:{type:Object,required:!0}},data(){return{simpleImage:Re.Z.PRESENTED_IMAGE_SIMPLE}},setup(e){const{engine:t}={...e},n=(0,h.iH)("outline"),i=(0,h.qj)({outline:[],image:[],video:[],audio:[]});(0,r.YP)([()=>e.engine],(()=>o())),(0,r.bv)((()=>{o(),t.on("change",(0,g.throttle)(o,400))}));const o=()=>{const e=Pe(t,n.value);i[n.value]=e};return{activeKey:n,outlineData:i,handleChange:o}}}),We=n(40089);const je=(0,We.Z)(Ke,[["render",d]]);var Ve=je},52417:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},39693:function(e,t,n){"use strict";function r(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}n.d(t,{Z:function(){return r}})},72036:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=0;function i(e){return"__private_"+r+++"_"+e}},24343:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(62040);function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var o=n(3336),a=n(52417);function s(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}function l(e){var t=i();return function(){var n,i=(0,r.Z)(e);if(t){var o=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return s(this,n)}}},26334:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(62040);function i(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=(0,r.Z)(e),null===e)break;return e}function o(){return o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},o.apply(this,arguments)}},62040:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},93806:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}n.d(t,{Z:function(){return i}})},66046:function(e,t,n){"use strict";n.d(t,{Vi:function(){return F}});n(57658);var r={grad:.9,turn:360,rad:360/(2*Math.PI)},i=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},o=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},a=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},s=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},l=function(e){return{r:a(e.r,0,255),g:a(e.g,0,255),b:a(e.b,0,255),a:a(e.a)}},c=function(e){return{r:o(e.r),g:o(e.g),b:o(e.b),a:o(e.a,3)}},A=/^#([0-9a-f]{3,8})$/i,u=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},d=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:o?a/o*100:0,v:o/255*100,a:i}},h=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:i}},p=function(e){return{h:s(e.h),s:a(e.s,0,100),l:a(e.l,0,100),a:a(e.a)}},f=function(e){return{h:o(e.h),s:o(e.s),l:o(e.l),a:o(e.a,3)}},g=function(e){return h((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},m=function(e){return{h:(t=d(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},v=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x={string:[[function(e){var t=A.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?o(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?o(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=y.exec(e)||w.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:l({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=v.exec(e)||b.exec(e);if(!t)return null;var n,i,o=p({h:(n=t[1],i=t[2],void 0===i&&(i="deg"),Number(n)*(r[i]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return g(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return i(t)&&i(n)&&i(r)?l({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var s=p({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return g(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,l=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var c=function(e){return{h:s(e.h),s:a(e.s,0,100),v:a(e.v,0,100),a:a(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(l)});return h(c)},"hsv"]]},k=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},C=function(e){return"string"==typeof e?k(e.trim(),x.string):"object"==typeof e&&null!==e?k(e,x.object):[null,void 0]},B=function(e,t){var n=m(e);return{h:n.h,s:a(n.s+100*t,0,100),l:n.l,a:n.a}},_=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},E=function(e,t){var n=m(e);return{h:n.h,s:n.s,l:a(n.l+100*t,0,100),a:n.a}},S=function(){function e(e){this.parsed=C(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return o(_(this.rgba),2)},e.prototype.isDark=function(){return _(this.rgba)<.5},e.prototype.isLight=function(){return _(this.rgba)>=.5},e.prototype.toHex=function(){return e=c(this.rgba),t=e.r,n=e.g,r=e.b,a=(i=e.a)<1?u(o(255*i)):"","#"+u(t)+u(n)+u(r)+a;var e,t,n,r,i,a},e.prototype.toRgb=function(){return c(this.rgba)},e.prototype.toRgbString=function(){return e=c(this.rgba),t=e.r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},e.prototype.toHsl=function(){return f(m(this.rgba))},e.prototype.toHslString=function(){return e=f(m(this.rgba)),t=e.h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},e.prototype.toHsv=function(){return e=d(this.rgba),{h:o(e.h),s:o(e.s),v:o(e.v),a:o(e.a,3)};var e},e.prototype.invert=function(){return F({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),F(B(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),F(B(this.rgba,-e))},e.prototype.grayscale=function(){return F(B(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),F(E(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),F(E(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?F({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):o(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=m(this.rgba);return"number"==typeof e?F({h:e,s:t.s,l:t.l,a:t.a}):o(t.h)},e.prototype.isEqual=function(e){return this.toHex()===F(e).toHex()},e}(),F=function(e){return e instanceof S?e:new S(e)}},95485:function(e){"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"","backsim":"∽","backsimeq":"⋍","Backslash":"","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"","Bernoullis":"","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"","caps":"∩︀","caret":"","caron":"ˇ","Cayleys":"","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"","dd":"","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":"","emsp14":"","emsp":"","ENG":"Ŋ","eng":"ŋ","ensp":"","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"","Escr":"","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"","exponentiale":"","ExponentialE":"","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"","frown":"⌢","fscr":"𝒻","Fscr":"","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":"","half":"½","hamilt":"","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"","HilbertSpace":"","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"","hyphen":"","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"","Igrave":"Ì","igrave":"ì","ii":"","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"","ImaginaryI":"","imagline":"","imagpart":"","imath":"ı","Im":"","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"","lscr":"𝓁","Lscr":"","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"","lsquor":"","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":"","Mellintrf":"","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"","middot":"·","minusb":"⊟","minus":"","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":"","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"","ord":"⩝","order":"","orderof":"","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"","pointint":"⨕","popf":"𝕡","Popf":"","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"","Prime":"″","primes":"","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":"","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"","rationals":"","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"","realine":"","realpart":"","reals":"","Re":"","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"","rscr":"𝓇","Rscr":"","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"","rsquor":"","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"","setmn":"","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"","smashp":"⨳","smeparsl":"⧤","smid":"","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"","ThickSpace":"","ThinSpace":"","thinsp":"","thkap":"≈","thksim":"","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"","Vee":"","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":"","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')}}]);
//# sourceMappingURL=705.cba30c55.js.map