This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
ServerSpacebarOld/assets/public/client/872a2255f3aaf4e3cfd1.js
2025-11-22 17:42:10 +01:00

2 lines
159 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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.

(this.webpackJsonp=this.webpackJsonp||[]).push([[13],{10382:function(e,t,n){var r=n(10383);e.exports=function(e){if(t=e,t&&t.window===t)return e;var t;var n=r(e);if(o){n.parentWindow.execScript("document._parentWindow = window;","Javascript");var i=n._parentWindow;return n._parentWindow=null,i}return n.defaultView||n.parentWindow};var o=n(10384)},10383:function(e,t){e.exports=function e(t){if(n(t))return t;if(n(t.ownerDocument))return t.ownerDocument;if(n(t.document))return t.document;if(t.parentNode)return e(t.parentNode);if(t.commonAncestorContainer)return e(t.commonAncestorContainer);if(t.startContainer)return e(t.startContainer);if(t.anchorNode)return e(t.anchorNode)};function n(e){return e&&9===e.nodeType}},10384:function(e,t){e.exports=!!document.attachEvent&&window!==document.parentWindow},10385:function(e,t){e.exports=function(e){var t=e.anchorNode,n=e.anchorOffset,r=e.focusNode,o=e.focusOffset,i=t.compareDocumentPosition(r);return!(4===i||0===i&&n<o)}},10386:function(e,t,n){"use strict";(function(r){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(10387)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(103))},10387:function(e,t,n){"use strict";e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function a(){if(a.enabled){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=a,s=Number(new Date),u=s-(n||s);i.diff=u,i.prev=n,i.curr=s,n=s,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var o=r.formatters[n];if("function"==typeof o){var a=t[l];e=o.call(i,a),t.splice(l,1),l--}return e})),r.formatArgs.call(i,t);var c=i.log||r.log;c.apply(i,t)}}return a.namespace=e,a.enabled=r.enabled(e),a.useColors=r.useColors(),a.color=t(e),a.destroy=o,a.extend=i,"function"==typeof r.init&&r.init(a),r.instances.push(a),a}function o(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function i(e,t){return r(this.namespace+(void 0===t?":":t)+e)}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){r.enable("")},r.enable=function(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(t=0;t<o;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var i=r.instances[t];i.enabled=r.enabled(i.namespace)}},r.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=n(9578),Object.keys(e).forEach((function(t){r[t]=e[t]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},10388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),o={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:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={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},s=1;s<20;s++)a["f"+s]=111+s;function u(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return l(e,t)})),o=function(e){return r.some((function(t){return c(t,e)}))};return null==n?o:o(n)}function l(e,t){var n=t&&t.byKey,r={},i=(e=e.replace("++","+add")).split("+"),a=i.length;for(var s in o)r[o[s]]=!1;var u=!0,l=!1,c=void 0;try{for(var h,p=i[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var v=h.value,g=v.endsWith("?")&&v.length>1;g&&(v=v.slice(0,-1));var m=d(v),y=o[m];1!==a&&y||(n?r.key=m:r.which=f(v)),y&&(r[y]=!g||null)}}catch(e){l=!0,c=e}finally{try{!u&&p.return&&p.return()}finally{if(l)throw c}}return r}function c(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function f(e){return e=d(e),a[e]||e.toUpperCase().charCodeAt(0)}function d(e){return e=e.toLowerCase(),e=i[e]||e}t.default=u,t.isHotkey=u,t.isCodeHotkey=function(e,t){return u(e,t)},t.isKeyHotkey=function(e,t){return u(e,{byKey:!0},t)},t.parseHotkey=l,t.compareHotkey=c,t.toKeyCode=f,t.toKeyName=d},10389:function(e,t,n){"use strict";t.atob=self.atob.bind(self),t.btoa=self.btoa.bind(self)},10397:function(e,t,n){var r=n(1101),o=n(10398);e.exports=function(e){return o(r(e).toLowerCase())}},10398:function(e,t,n){var r=n(10399)("toUpperCase");e.exports=r},10399:function(e,t,n){var r=n(10400),o=n(9604),i=n(10401),a=n(1101);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,s=n?n[0]:t.charAt(0),u=n?r(n,1).join(""):t.slice(1);return s[e]()+u}}},10400:function(e,t,n){var r=n(9597);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},10401:function(e,t,n){var r=n(10402),o=n(9604),i=n(10403);e.exports=function(e){return o(e)?i(e):r(e)}},10402:function(e,t){e.exports=function(e){return e.split("")}},10403:function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+o+")"+"?",l="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),c="(?:"+[i+r+"?",r,a,s,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+c+l,"g");e.exports=function(e){return e.match(f)||[]}},10404:function(e,t,n){var r=n(10405),o=n(10406),i=n(10409),a=RegExp("[']","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},10405:function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},10406:function(e,t,n){var r=n(10407),o=n(1101),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},10407:function(e,t,n){var r=n(10408)({"À":"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"});e.exports=r},10408:function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},10409:function(e,t,n){var r=n(10410),o=n(10411),i=n(1101),a=n(10412);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},10410:function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},10411:function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return n.test(e)}},10412:function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",r="["+n+"]",o="\\d+",i="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",s="[^\\ud800-\\udfff"+n+o+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",c="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+s+")",d="(?:"+c+"|"+s+")",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",p="[\\ufe0e\\ufe0f]?"+h+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,l].join("|")+")[\\ufe0e\\ufe0f]?"+h+")*"),v="(?:"+[i,u,l].join("|")+")"+p,g=RegExp([c+"?"+a+"+(?:['](?:d|ll|m|re|s|t|ve))?(?="+[r,c,"$"].join("|")+")",d+"+(?:['](?:D|LL|M|RE|S|T|VE))?(?="+[r,c+f,"$"].join("|")+")",c+"?"+f+"+(?:['](?:d|ll|m|re|s|t|ve))?",c+"+(?:['](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",o,v].join("|"),"g");e.exports=function(e){return e.match(g)||[]}},10845:function(e,t){var n=function(){"use strict";function e(){this.dataPoints_=[],this.color_="red",this.isVisible_=!0,this.cacheStartTime_=null,this.cacheStepSize_=0,this.cacheValues_=[]}function t(e,t){this.time=e,this.value=t}return e.prototype={toJSON:function(){if(this.dataPoints_.length<1)return{};for(var e=[],t=0;t<this.dataPoints_.length;++t)e.push(this.dataPoints_[t].value);return{startTime:this.dataPoints_[0].time,endTime:this.dataPoints_[this.dataPoints_.length-1].time,values:JSON.stringify(e)}},addPoint:function(e,n){var r=new Date(e);this.dataPoints_.push(new t(r,n)),this.dataPoints_.length>1e3&&this.dataPoints_.shift()},isVisible:function(){return this.isVisible_},show:function(e){this.isVisible_=e},getColor:function(){return this.color_},setColor:function(e){this.color_=e},getCount:function(){return this.dataPoints_.length},getValues:function(e,t,n){return this.cacheStartTime_==e&&this.cacheStepSize_==t&&this.cacheValues_.length==n||(this.cacheValues_=this.getValuesInternal_(e,t,n),this.cacheStartTime_=e,this.cacheStepSize_=t),this.cacheValues_},getValuesInternal_:function(e,t,n){for(var r=[],o=0,i=0,a=e,s=0;s<n;++s){for(;o<this.dataPoints_.length&&this.dataPoints_[o].time<a;)i=this.dataPoints_[o].value,++o;r[s]=i,a+=t}return r}},e}();e.exports=n},10846:function(e,t){var n=function(){"use strict";function e(e){this.scrollbar_={position_:0,range_:0},this.canvas_=e,this.gridColor="#CCC",this.textColor="#000",this.backgroundColor="#FFF",this.timeLocales=[],this.timeOptions={},this.startTime_=0,this.endTime_=1,this.graph_=null,this.scale_=1e3,this.updateScrollbarRange_(!0)}e.prototype={setScale:function(e){this.scale_=e},getLength_:function(){var e=this.endTime_-this.startTime_;return Math.floor(e/this.scale_)},graphScrolledToRightEdge_:function(){return this.scrollbar_.position_==this.scrollbar_.range_},updateScrollbarRange_:function(e){var t=this.getLength_()-this.canvas_.width;t<0&&(t=0),this.scrollbar_.position_>t&&(e=!0),this.scrollbar_.range_=t,e&&(this.scrollbar_.position_=t,this.repaint())},setDateRange:function(e,t){this.startTime_=e.getTime(),this.endTime_=t.getTime(),this.endTime_<=this.startTime_&&(this.startTime_=this.endTime_-1),this.updateScrollbarRange_(!0)},updateEndDate:function(e){this.endTime_=e||(new Date).getTime(),this.updateScrollbarRange_(this.graphScrolledToRightEdge_())},getStartDate:function(){return new Date(this.startTime_)},setDataSeries:function(e){this.graph_=new t;for(var n=0;n<e.length;++n)this.graph_.addDataSeries(e[n]);this.repaint()},addDataSeries:function(e){this.graph_||(this.graph_=new t),this.graph_.addDataSeries(e),this.repaint()},repaint:function(){if(null!==this.canvas_.offsetParent){this.repaintTimerRunning_=!1;var e=this.canvas_.width,t=this.canvas_.height,n=this.canvas_.getContext("2d");n.fillStyle=this.backgroundColor,n.fillRect(0,0,e,t);var r=n.font.match(/([0-9]+)px/)[1],o=parseInt(r);if(!(0==r.length||o<=0||4*o>t||e<50)){n.save(),n.translate(.5,.5);var i=this.scrollbar_.position_;0==this.scrollbar_.range_&&(i=this.getLength_()-this.canvas_.width);var a=this.startTime_+i*this.scale_,s=t;t-=o+4,this.drawTimeLabels(n,e,t,s,a),n.strokeStyle=this.gridColor,n.strokeRect(0,0,e-1,t-1),this.graph_&&(this.graph_.layout(e,t,o,a,this.scale_),this.graph_.drawTicks(n),this.graph_.drawLines(n),this.graph_.drawLabels(n)),n.restore()}}},drawTimeLabels:function(e,t,n,r,o){var i=6e4*Math.ceil(o/6e4);for(e.textBaseline="bottom",e.textAlign="center",e.fillStyle=this.textColor,e.strokeStyle=this.gridColor;;){var a=Math.round((i-o)/this.scale_);if(a>=t)break;var s=new Date(i).toLocaleTimeString(this.timeLocales,this.timeOptions);e.fillText(s,a,r),e.beginPath(),e.lineTo(a,0),e.lineTo(a,n),e.stroke(),i+=6e4}},getDataSeriesCount:function(){return this.graph_?this.graph_.dataSeries_.length:0},hasDataSeries:function(e){return!!this.graph_&&this.graph_.hasDataSeries(e)}};var t=function(){function e(){this.dataSeries_=[],this.width_=0,this.height_=0,this.fontHeight_=0,this.startTime_=0,this.scale_=0,this.min_=0,this.max_=0,this.labels_=[]}return e.prototype={addDataSeries:function(e){this.dataSeries_.push(e)},hasDataSeries:function(e){for(var t=0;t<this.dataSeries_.length;++t)if(this.dataSeries_[t]==e)return!0;return!1},getValues:function(e){return e.isVisible()?e.getValues(this.startTime_,this.scale_,this.width_):null},layout:function(e,t,n,r,o){this.width_=e,this.height_=t,this.fontHeight_=n,this.startTime_=r,this.scale_=o;for(var i=0,a=0,s=0;s<this.dataSeries_.length;++s){var u=this.getValues(this.dataSeries_[s]);if(u)for(var l=0;l<u.length;++l)u[l]>i?i=u[l]:u[l]<a&&(a=u[l])}this.layoutLabels_(a,i)},layoutLabels_:function(e,t){if(t-e<1024)this.layoutLabelsBasic_(e,t,2);else{var n=["","k","M","G","T","P"],r=1;for(e/=1024,t/=1024;n[r+1]&&t-e>=1024;)e/=1024,t/=1024,++r;this.layoutLabelsBasic_(e,t,2);for(var o=0;o<this.labels_.length;++o)this.labels_[o]+=" "+n[r];this.min_*=Math.pow(1024,r),this.max_*=Math.pow(1024,r)}},layoutLabelsBasic_:function(e,t,n){this.labels_=[];var r=t-e;if(0!=r){var o=2*this.fontHeight_+4,i=1+this.height_/o;i<2?i=2:i>6&&(i=6);for(var a=Math.pow(10,-n),s=n;!(Math.ceil(r/a)+1<=i);){if(Math.ceil(r/(2*a))+1<=i){a*=2;break}if(Math.ceil(r/(5*a))+1<=i){a*=5;break}a*=10,s>0&&--s}this.max_=Math.ceil(t/a)*a,this.min_=Math.floor(e/a)*a;for(var u=this.max_;u>=this.min_;u-=a)this.labels_.push(u.toFixed(s))}else this.min_=this.max_=t},drawTicks:function(e){var t,n;t=this.width_-1,n=this.width_-1-10,e.fillStyle=this.gridColor,e.beginPath();for(var r=1;r<this.labels_.length-1;++r){var o=Math.round(this.height_*r/(this.labels_.length-1));e.moveTo(t,o),e.lineTo(n,o)}e.stroke()},drawLines:function(e){var t=0,n=this.height_-1;this.max_&&(t=n/(this.max_-this.min_));for(var r=this.dataSeries_.length-1;r>=0;--r){var o=this.getValues(this.dataSeries_[r]);if(o){e.strokeStyle=this.dataSeries_[r].getColor(),e.beginPath();for(var i=0;i<o.length;++i)e.lineTo(i,n-Math.round((o[i]-this.min_)*t));e.stroke()}}},drawLabels:function(e){if(0!=this.labels_.length){var t=this.width_-3;e.fillStyle=this.textColor,e.textAlign="right",e.textBaseline="top",e.fillText(this.labels_[0],t,0),e.textBaseline="bottom";for(var n=(this.height_-1)/(this.labels_.length-1),r=1;r<this.labels_.length;++r)e.fillText(this.labels_[r],t,n*r)}}},e}();return e}();e.exports=n},8132:function(e,t,n){"use strict";e.exports.parse=function(e){var t,n=/^(?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))$|^((?:[a-z]{2,3}(?:(?:-[a-z]{3}){1,3})?)|[a-z]{4}|[a-z]{5,8})(?:-([a-z]{4}))?(?:-([a-z]{2}|\d{3}))?((?:-(?:[\da-z]{5,8}|\d[\da-z]{3}))*)?((?:-[\da-wy-z](?:-[\da-z]{2,8})+)*)?(-x(?:-[\da-z]{1,8})+)?$|^(x(?:-[\da-z]{1,8})+)$/i.exec(e);if(!n)return null;n.shift();var r=null,o=[];n[2]&&(r=(t=n[2].split("-")).shift(),o=t);var i=[];n[5]&&(i=n[5].split("-")).shift();var a=[];if(n[6]){var s;(t=n[6].split("-")).shift();for(var u=[];t.length;){var l=t.shift();1===l.length?s?(a.push({singleton:s,extension:u}),s=l,u=[]):s=l:u.push(l)}a.push({singleton:s,extension:u})}var c=[];n[7]&&((c=n[7].split("-")).shift(),c.shift());var f=[];return n[8]&&(f=n[8].split("-")).shift(),{langtag:{language:{language:r,extlang:o},script:n[3]||null,region:n[4]||null,variant:i,extension:a,privateuse:c},privateuse:f,grandfathered:{irregular:n[0]||null,regular:n[1]||null}}}},9089:function(e,t,n){var r=n(10397),o=n(10404)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=o},9461:function(e,t,n){const r=n(10845),o=n(10846);e.exports={TimelineDataSeries:r,TimelineGraphView:o}},9569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var a=window.DiscordNative;(0,r.default)(null!=a,"Can't get desktop sources outside of native app"),t=t||[i.DesktopSources.WINDOW,i.DesktopSources.SCREEN],n=n||{width:150,height:150};var s=[];t.includes(i.DesktopSources.SCREEN)&&e.supports(i.Features.SCREEN_PREVIEWS)&&(s.push(e.getScreenPreviews(n.width,n.height)),t=t.filter((function(e){return e!==i.DesktopSources.SCREEN})));t.includes(i.DesktopSources.WINDOW)&&e.supports(i.Features.WINDOW_PREVIEWS)&&(s.push(e.getWindowPreviews(n.width,n.height)),t=t.filter((function(e){return e!==i.DesktopSources.WINDOW})));0!==t.length&&s.push(a.desktopCapture.getDesktopCaptureSources({types:t,thumbnailSize:n}));return Promise.all(s).then((function(e){return o.default.flatten(e)}))},Object.defineProperty(t,"DesktopSources",{enumerable:!0,get:function(){return i.DesktopSources}});var r=a(n(21)),o=a(n(6)),i=n(31);function a(e){return e&&e.__esModule?e:{default:e}}},9601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e,t){this._elements=[],this._createElement=e,this._cleanElement=t}var t=e.prototype;return t.getElement=function(){return 0===this._elements.length?this._createElement():this._elements.pop()},t.poolElement=function(e){this._cleanElement(e),this._elements.push(e)},t.clearPool=function(){this._elements.length=0},e}();t.default=r},9602:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}var l=[];for(u=s;u<o.length;u++)l.push("..");return(l=l.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(103))},9603:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.truncateAndLocalizeNumber=void 0;var r,o=(r=n(690))&&r.__esModule?r:{default:r};t.truncateAndLocalizeNumber=function(e,t){var n=Math.round(10*e)/10;if(e<1e6)return new Intl.NumberFormat(t,{maximumFractionDigits:n%1==0?0:1}).format(e);var r=Math.round(e/1e6*10)/10,i=new Intl.NumberFormat(t,{maximumFractionDigits:r%1==0?0:1}).format(e/1e6);return o.default.Messages.NumberAbbreviations.MILLION.format({num:i})}},9604:function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},9605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timing=h,t.spring=p,t.parallel=v,t.sequence=g,t.default=t.SequenceAnimation=t.ParallelAnimation=t.SingleAnimation=void 0;var r,o=(r=n(265))&&r.__esModule?r:{default:r};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(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 u(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var l=function(){function e(e){this.animation=e}var t=e.prototype;return t.start=function(){var e=this;return new Promise((function(t){e.animation.start((function(){t()}))}))},t.stop=function(){this.animation.stop()},e}();t.SingleAnimation=l;var c=function(){function e(e){this.animations=e}var t=e.prototype;return t._map=function(e){return this.animations.map(e)},t.start=function(){var e=this;return new Promise((function(t){return Promise.all(e._map((function(e){return e.start()}))).then((function(){return t()}))}))},t.stop=function(){this._map((function(e){return e.stop()}))},e}();t.ParallelAnimation=c;var f=function(){function e(e){this.stopped=!1,this.animations=e}var t=e.prototype;return t.start=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.stopped=!1,t=a(this.animations);case 2:if((n=t()).done){e.next=10;break}if(r=n.value,!this.stopped){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,r.start();case 8:e.next=2;break;case 10:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),t.stop=function(){this.stopped=!0,this.animations.map((function(e){return e.stop()}))},e}();function d(e,t,n){var r=n(e,i({},t));return new l(r)}function h(e,t){return d(e,t,o.default.timing)}function p(e,t){return d(e,t,o.default.spring)}function v(e){return new c(e)}function g(e){return new f(e)}t.SequenceAnimation=f;var m=i({},o.default,{timing:h,spring:p,parallel:v,sequence:g});t.default=m},9606:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeDragItem=function(e){return function(t){var n,r;return(0,s.DropTarget)(e,m,E)((0,s.DragSource)(e,g,y)((r=n=function(e){function n(){return e.apply(this,arguments)||this}p(n,e);var r=n.prototype;return r.componentDidMount=function(){},r.render=function(){var e,n=this.props,r=n.connectDropTarget,a=n.connectDragPreview,s=n.connectDragSource,l=n.isDragging,c=n.dragClass,p=h(n,["connectDropTarget","connectDragPreview","connectDragSource","isDragging","dragClass"]);return r(s(f("div",{className:(0,i.default)(u.default.draggable,(e={},e[c]=l,e))},void 0,o.createElement(t,d({isDragging:l,connectDragPreview:a},p)))))},n}(o.Component),n.draggable=!0,n.defaultProps={dragClass:""},n.contextTypes={onHover:a.default.func,onDragStart:a.default.func,onDrop:a.default.func},r)))}},t.makeDragList=function(e){return function(t){var n,r;return(0,s.DropTarget)(e,{},(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),didDrop:t.didDrop()}}))((r=n=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleHover=function(e){if(e!==t._dragging){var n=t.props.onHover;n&&n(e,t._dragging)}},t.handleDragStart=function(e){if(e!==t._dragging){t._dragging=e;var n=t.props.onDragStart;n&&n(e)}},t.handleDrop=function(e){t._dragging=null;var n=t.props,r=n.onCancel,o=n.onDrop;e?o&&o(e):r&&r()},t}p(n,e);var r=n.prototype;return r.getChildContext=function(){return{onHover:this.handleHover,onDragStart:this.handleDragStart,onDrop:this.handleDrop}},r.componentDidUpdate=function(e){var t=this.props,n=t.onDragLeave,r=t.isOver,o=t.didDrop;e.isOver!==r&&!1===r&&!1===o&&n&&n()},r.render=function(){var e=this.props,n=e.connectDropTarget,r=h(e,["connectDropTarget"]);return n(f("div",{},void 0,o.createElement(t,r)))},n}(o.Component),n.childContextTypes={onHover:a.default.func,onDragStart:a.default.func,onDrop:a.default.func},r))}};var r,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=l(n(8)),a=l(n(14)),s=n(5410),u=l(n(7347));function l(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var s=new Array(a),u=0;u<a;u++)s[u]=arguments[u+3];t.children=s}if(t&&i)for(var l in i)void 0===t[l]&&(t[l]=i[l]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g={beginDrag:function(e,t,n){var r=e.dragId,o=n.context,i=o.onDragStart,a=o.onHover,s=o.onDrop;return i(r),{dragId:r,onDragStart:i,onHover:a,onDrop:s}},endDrag:function(e,t){(0,t.getItem().onDrop)(t.getDropResult())}},m={drop:function(e){return{dragId:e.dragId}},hover:function(e,t){var n=e.dragId;(0,t.getItem().onHover)(n)}};function y(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function E(e,t){return{connectDropTarget:e.dropTarget()}}},9607:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateGuildPermissionSpec=function(e,t){var n=function(e,t){var n;return(n={})[r.Permissions.VIEW_CHANNEL.toString()]={title:e.ROLE_PERMISSIONS_VIEW_CHANNEL,description:e.ROLE_PERMISSIONS_VIEW_CHANNEL_DESCRIPTION,flag:r.Permissions.VIEW_CHANNEL},n[r.Permissions.MANAGE_CHANNELS.toString()]={title:e.MANAGE_CHANNELS,description:e.ROLE_PERMISSIONS_MANAGE_CHANNELS_DESCRIPTION,flag:r.Permissions.MANAGE_CHANNELS},n[r.Permissions.MANAGE_ROLES.toString()]={title:e.MANAGE_ROLES,description:e.ROLE_PERMISSIONS_MANAGE_ROLES_DESCRIPTION,flag:r.Permissions.MANAGE_ROLES},n[r.Permissions.MANAGE_EMOJIS.toString()]={title:e.MANAGE_EMOJIS,description:e.ROLE_PERMISSIONS_MANAGE_EMOJIS_DESCRIPTION,flag:r.Permissions.MANAGE_EMOJIS},n[r.Permissions.VIEW_AUDIT_LOG.toString()]={title:e.VIEW_AUDIT_LOG,description:e.ROLE_PERMISSIONS_VIEW_AUDIT_LOG_DESCRIPTION,flag:r.Permissions.VIEW_AUDIT_LOG},n[r.Permissions.VIEW_GUILD_ANALYTICS.toString()]={title:e.VIEW_GUILD_ANALYTICS,description:e.ROLE_PERMISSIONS_VIEW_GUILD_ANALYTICS_DESCRIPTION,flag:r.Permissions.VIEW_GUILD_ANALYTICS},n[r.Permissions.MANAGE_WEBHOOKS.toString()]={title:e.MANAGE_WEBHOOKS,description:e.ROLE_PERMISSIONS_MANAGE_WEBHOOKS_DESCRIPTION,flag:r.Permissions.MANAGE_WEBHOOKS},n[r.Permissions.MANAGE_GUILD.toString()]={title:e.MANAGE_SERVER,description:e.ROLE_PERMISSIONS_MANAGE_SERVER_DESCRIPTION,flag:r.Permissions.MANAGE_GUILD},n[r.Permissions.CREATE_INSTANT_INVITE.toString()]={title:e.CREATE_INSTANT_INVITE,description:e.ROLE_PERMISSIONS_CREATE_INSTANT_INVITE_DESCRIPTION,flag:r.Permissions.CREATE_INSTANT_INVITE},n[r.Permissions.CHANGE_NICKNAME.toString()]={title:e.CHANGE_NICKNAME,description:e.ROLE_PERMISSIONS_CHANGE_NICKNAME_DESCRIPTION,flag:r.Permissions.CHANGE_NICKNAME},n[r.Permissions.MANAGE_NICKNAMES.toString()]={title:e.MANAGE_NICKNAMES,description:e.ROLE_PERMISSIONS_MANAGE_NICKNAMES_DESCRIPTION,flag:r.Permissions.MANAGE_NICKNAMES},n[r.Permissions.KICK_MEMBERS.toString()]={title:e.KICK_MEMBERS,description:e.ROLE_PERMISSIONS_KICK_MEMBERS_DESCRIPTION,flag:r.Permissions.KICK_MEMBERS},n[r.Permissions.BAN_MEMBERS.toString()]={title:e.BAN_MEMBERS,description:e.ROLE_PERMISSIONS_BAN_MEMBERS_DESCRIPTION,flag:r.Permissions.BAN_MEMBERS},n[r.Permissions.SEND_MESSAGES.toString()]={title:e.SEND_MESSAGES,description:e.ROLE_PERMISSIONS_SEND_MESSAGES_DESCRIPTION,flag:r.Permissions.SEND_MESSAGES},n[r.Permissions.EMBED_LINKS.toString()]={title:e.EMBED_LINKS,description:e.ROLE_PERMISSIONS_EMBED_LINKS_DESCRIPTION,flag:r.Permissions.EMBED_LINKS},n[r.Permissions.ATTACH_FILES.toString()]={title:e.ATTACH_FILES,description:e.ROLE_PERMISSIONS_ATTACH_FILES_DESCRIPTION,flag:r.Permissions.ATTACH_FILES},n[r.Permissions.ADD_REACTIONS.toString()]={title:e.ADD_REACTIONS,description:e.ROLE_PERMISSIONS_ADD_REACTIONS_DESCRIPTION,flag:r.Permissions.ADD_REACTIONS},n[r.Permissions.USE_EXTERNAL_EMOJIS.toString()]={title:e.ROLE_PERMISSIONS_USE_EXTERNAL_EMOJIS,description:e.ROLE_PERMISSIONS_USE_EXTERNAL_EMOJIS_DESCRIPTION,flag:r.Permissions.USE_EXTERNAL_EMOJIS},n[r.Permissions.MENTION_EVERYONE.toString()]={title:e.MENTION_EVERYONE,description:e.ROLE_PERMISSIONS_MENTION_EVERYONE_DESCRIPTION,flag:r.Permissions.MENTION_EVERYONE},n[r.Permissions.MANAGE_MESSAGES.toString()]={title:e.MANAGE_MESSAGES,description:e.ROLE_PERMISSIONS_MANAGE_MESSAGES_DESCRIPTION,flag:r.Permissions.MANAGE_MESSAGES},n[r.Permissions.READ_MESSAGE_HISTORY.toString()]={title:e.READ_MESSAGE_HISTORY,description:e.ROLE_PERMISSIONS_READ_MESSAGE_HISTORY_DESCRIPTION,flag:r.Permissions.READ_MESSAGE_HISTORY},n[r.Permissions.SEND_TTS_MESSAGES.toString()]={title:e.ROLE_PERMISSIONS_SEND_TTS_MESSAGES,description:e.ROLE_PERMISSIONS_SEND_TTS_MESSAGES_DESCRIPTION,flag:r.Permissions.SEND_TTS_MESSAGES},n[r.Permissions.USE_APPLICATION_COMMANDS.toString()]={title:e.ROLE_PERMISSIONS_USE_APPLICATION_COMMANDS,description:e.ROLE_PERMISSIONS_USE_APPLICATION_COMMANDS_GUILD_DESCRIPTION,flag:r.Permissions.USE_APPLICATION_COMMANDS},n[r.Permissions.CONNECT.toString()]={title:e.CONNECT,description:e.ROLE_PERMISSIONS_CONNECT_DESCRIPTION,flag:r.Permissions.CONNECT},n[r.Permissions.SPEAK.toString()]={title:e.SPEAK,description:e.ROLE_PERMISSIONS_SPEAK_DESCRIPTION,flag:r.Permissions.SPEAK},n[r.Permissions.STREAM.toString()]={title:e.VIDEO,description:e.ROLE_PERMISSIONS_STREAM_DESCRIPTION,flag:r.Permissions.STREAM},n[r.Permissions.USE_VAD.toString()]={title:e.USE_VAD,description:e.ROLE_PERMISSIONS_USE_VAD_DESCRIPTION,flag:r.Permissions.USE_VAD},n[r.Permissions.PRIORITY_SPEAKER.toString()]={title:e.PRIORITY_SPEAKER,description:(null==t?void 0:t.PRIORITY_SPEAKER_DESCRIPTION)||e.ROLE_PERMISSIONS_PRIORITY_SPEAKER_DESCRIPTION,flag:r.Permissions.PRIORITY_SPEAKER},n[r.Permissions.MUTE_MEMBERS.toString()]={title:e.MUTE_MEMBERS,description:e.ROLE_PERMISSIONS_MUTE_MEMBERS_DESCRIPTION,flag:r.Permissions.MUTE_MEMBERS},n[r.Permissions.DEAFEN_MEMBERS.toString()]={title:e.DEAFEN_MEMBERS,description:e.ROLE_PERMISSIONS_DEAFEN_MEMBERS_DESCRIPTION,flag:r.Permissions.DEAFEN_MEMBERS},n[r.Permissions.MOVE_MEMBERS.toString()]={title:e.MOVE_MEMBERS,description:e.ROLE_PERMISSIONS_MOVE_MEMBERS_DESCRIPTION,flag:r.Permissions.MOVE_MEMBERS},n[r.Permissions.REQUEST_TO_SPEAK.toString()]={title:e.REQUEST_TO_SPEAK,description:e.ROLE_PERMISSIONS_REQUEST_TO_SPEAK_DESCRIPTION,flag:r.Permissions.REQUEST_TO_SPEAK,isExperimental:!0},n[r.Permissions.ADMINISTRATOR.toString()]={title:e.ADMINISTRATOR,description:"string"==typeof e.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION?e.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION:e.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION.format(),flag:r.Permissions.ADMINISTRATOR},n}(e,t);if(t.showStageChannelPermissions)return[a(n,e),s(n,e),u(n,e),l(n,e),c(n,e,t),f(n,e)];return[a(n,e),s(n,e),u(n,e),l(n,e),f(n,e)]},t.generateChannelGeneralSection=function(e,t,n){var o;void 0===n&&(n={showManageWebhooks:!0});return{title:t,permissions:i((null===(o=n)||void 0===o?void 0:o.showManageWebhooks)?[r.Permissions.VIEW_CHANNEL,r.Permissions.MANAGE_CHANNELS,r.Permissions.MANAGE_ROLES,r.Permissions.MANAGE_WEBHOOKS]:[r.Permissions.VIEW_CHANNEL,r.Permissions.MANAGE_CHANNELS,r.Permissions.MANAGE_ROLES],e)}},t.generateChannelMembershipSection=function(e,t){return{title:t,permissions:i([r.Permissions.CREATE_INSTANT_INVITE],e)}},t.generateChannelTextSection=function(e,t){return{title:t,permissions:i([r.Permissions.SEND_MESSAGES,r.Permissions.EMBED_LINKS,r.Permissions.ATTACH_FILES,r.Permissions.ADD_REACTIONS,r.Permissions.USE_EXTERNAL_EMOJIS,r.Permissions.MENTION_EVERYONE,r.Permissions.MANAGE_MESSAGES,r.Permissions.READ_MESSAGE_HISTORY,r.Permissions.SEND_TTS_MESSAGES,r.Permissions.USE_APPLICATION_COMMANDS],e)}},t.generateChannelVoiceSection=function(e,t){return{title:t,permissions:i([r.Permissions.CONNECT,r.Permissions.SPEAK,r.Permissions.STREAM,r.Permissions.USE_VAD,r.Permissions.PRIORITY_SPEAKER,r.Permissions.MUTE_MEMBERS,r.Permissions.DEAFEN_MEMBERS,r.Permissions.MOVE_MEMBERS],e)}},t.generateChannelStageVoiceSection=function(e,t){return{title:t,permissions:i([r.Permissions.CONNECT,r.Permissions.USE_VAD,r.Permissions.MUTE_MEMBERS,r.Permissions.MOVE_MEMBERS],e)}},t.generateChannelStageSection=function(e,t){return{title:t,permissions:i([r.Permissions.REQUEST_TO_SPEAK],e)}};var r=n(109);function o(e,t){return void 0===t&&(t=!1),t||(e.permissions=e.permissions.filter((function(e){return!e.isExperimental}))),e}function i(e,t){return e.map((function(e){return t[e.toString()]}))}function a(e,t){return o({title:t.ROLE_PERMISSIONS_SECTION_GENERAL_GUILD,permissions:i([r.Permissions.VIEW_CHANNEL,r.Permissions.MANAGE_CHANNELS,r.Permissions.MANAGE_ROLES,r.Permissions.MANAGE_EMOJIS,r.Permissions.VIEW_AUDIT_LOG,r.Permissions.VIEW_GUILD_ANALYTICS,r.Permissions.MANAGE_WEBHOOKS,r.Permissions.MANAGE_GUILD],e)})}function s(e,t){return o({title:t.ROLE_PERMISSIONS_SECTION_MEMBERSHIP,permissions:i([r.Permissions.CREATE_INSTANT_INVITE,r.Permissions.CHANGE_NICKNAME,r.Permissions.MANAGE_NICKNAMES,r.Permissions.KICK_MEMBERS,r.Permissions.BAN_MEMBERS],e)})}function u(e,t){return o({title:t.ROLE_PERMISSIONS_SECTION_TEXT,permissions:i([r.Permissions.SEND_MESSAGES,r.Permissions.EMBED_LINKS,r.Permissions.ATTACH_FILES,r.Permissions.ADD_REACTIONS,r.Permissions.USE_EXTERNAL_EMOJIS,r.Permissions.MENTION_EVERYONE,r.Permissions.MANAGE_MESSAGES,r.Permissions.READ_MESSAGE_HISTORY,r.Permissions.SEND_TTS_MESSAGES,r.Permissions.USE_APPLICATION_COMMANDS],e)})}function l(e,t){return o({title:t.ROLE_PERMISSIONS_SECTION_VOICE,permissions:i([r.Permissions.CONNECT,r.Permissions.SPEAK,r.Permissions.STREAM,r.Permissions.USE_VAD,r.Permissions.PRIORITY_SPEAKER,r.Permissions.MUTE_MEMBERS,r.Permissions.DEAFEN_MEMBERS,r.Permissions.MOVE_MEMBERS],e)})}function c(e,t,n){return o({title:t.ROLE_PERMISSIONS_SECTION_STAGE,permissions:i([r.Permissions.REQUEST_TO_SPEAK],e)},n.showExperimental)}function f(e,t){return o({title:t.ROLE_PERMISSIONS_SECTION_ADVANCED,permissions:i([r.Permissions.ADMINISTRATOR],e)})}},9611:function(e,t,n){!function(e){"use strict";function t(e){return 10===e||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&Ne.indexOf(e)>=0}function n(e){return e>=48&&e<=57}function r(e){return e>=48&&e<=57||43===e||45===e||46===e}function o(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function i(e){for(;e.index<e.max&&t(e.path.charCodeAt(e.index));)e.index++}function a(e){var t,r=e.index,o=r,i=e.max,a=!1,s=!1,u=!1,l=!1;if(o>=i)e.err="SvgPath: missed param (at pos "+o+")";else if(43!==(t=e.path.charCodeAt(o))&&45!==t||(t=++o<i?e.path.charCodeAt(o):0),n(t)||46===t){if(46!==t){if(a=48===t,t=++o<i?e.path.charCodeAt(o):0,a&&o<i&&t&&n(t))return void(e.err="SvgPath: numbers started with `0` such as `09` are ilegal (at pos "+r+")");for(;o<i&&n(e.path.charCodeAt(o));)o++,s=!0;t=o<i?e.path.charCodeAt(o):0}if(46===t){for(l=!0,o++;n(e.path.charCodeAt(o));)o++,u=!0;t=o<i?e.path.charCodeAt(o):0}if(101===t||69===t){if(l&&!s&&!u)return void(e.err="SvgPath: invalid float exponent (at pos "+o+")");if(43!==(t=++o<i?e.path.charCodeAt(o):0)&&45!==t||o++,!(o<i&&n(e.path.charCodeAt(o))))return void(e.err="SvgPath: invalid float exponent (at pos "+o+")");for(;o<i&&n(e.path.charCodeAt(o));)o++}e.index=o,e.param=parseFloat(e.path.slice(r,o))+0}else e.err="SvgPath: param should start with 0..9 or `.` (at pos "+o+")"}function s(e){var t,n;n=(t=e.path[e.segmentStart]).toLowerCase();var r=e.data;if("m"===n&&r.length>2&&(e.result.push([t,r[0],r[1]]),r=r.slice(2),n="l",t="m"===t?"l":"L"),"r"===n)e.result.push([t].concat(r));else for(;r.length>=Ae[n]&&(e.result.push([t].concat(r.splice(0,Ae[n]))),Ae[n]););}function u(e){var t,n,o,u=e.max;if(e.segmentStart=e.index,function(e){switch(32|e){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}(e.path.charCodeAt(e.index)))if(n=Ae[e.path[e.index].toLowerCase()],e.index++,i(e),e.data=[],n){for(t=!1;;){for(o=n;o>0;o--){if(a(e),e.err.length)return;e.data.push(e.param),i(e),t=!1,e.index<u&&44===e.path.charCodeAt(e.index)&&(e.index++,i(e),t=!0)}if(!t){if(e.index>=e.max)break;if(!r(e.path.charCodeAt(e.index)))break}}s(e)}else s(e);else e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")"}function l(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function c(){if(!(this instanceof c))return new c;this.queue=[],this.cache=null}function f(e,t,n,r){var o=e*r-t*n<0?-1:1,i=(e*n+t*r)/(Math.sqrt(e*e+t*t)*Math.sqrt(e*e+t*t));return i>1&&(i=1),i<-1&&(i=-1),o*Math.acos(i)}function d(e,t,n,r,o,i,a,s,u,l){var c=l*(e-n)/2+u*(t-r)/2,d=-u*(e-n)/2+l*(t-r)/2,h=a*a,p=s*s,v=c*c,g=d*d,m=h*p-h*g-p*v;m<0&&(m=0),m/=h*g+p*v;var y=(m=Math.sqrt(m)*(o===i?-1:1))*a/s*d,E=m*-s/a*c,S=l*y-u*E+(e+n)/2,_=u*y+l*E+(t+r)/2,x=(c-y)/a,A=(d-E)/s,N=(-c-y)/a,w=(-d-E)/s,C=f(1,0,x,A),b=f(x,A,N,w);return 0===i&&b>0&&(b-=Ie),1===i&&b<0&&(b+=Ie),[S,_,C,b]}function h(e,t){var n=4/3*Math.tan(t/4),r=Math.cos(e),o=Math.sin(e),i=Math.cos(e+t),a=Math.sin(e+t);return[r,o,r-o*n,o+r*n,i+a*n,a-i*n,i,a]}function p(e,t,n){if(!(this instanceof p))return new p(e,t,n);this.rx=e,this.ry=t,this.ax=n}function v(e){if(!(this instanceof v))return new v(e);var t=we(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}function g(e,t,n,r,o,i,a,s){this.a={x:e,y:t},this.b={x:n,y:r},this.c={x:o,y:i},this.d={x:a,y:s},null!=a&&null!=s?(this.getArcLength=C,this.getPoint=_,this.getDerivative=y):(this.getArcLength=x,this.getPoint=S,this.getDerivative=m),this.init()}function m(e,t,n){return{x:2*(1-n)*(e[1]-e[0])+2*n*(e[2]-e[1]),y:2*(1-n)*(t[1]-t[0])+2*n*(t[2]-t[1])}}function y(e,t,n){return S([3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],[3*(t[1]-t[0]),3*(t[2]-t[1]),3*(t[3]-t[2])],n)}function E(e,t,n,r,o){for(var i=1,a=e/t,s=(e-n(r,o,a))/t;i>.001;){var u=n(r,o,a+s),l=n(r,o,a-s),c=Math.abs(e-u)/t,f=Math.abs(e-l)/t;c<i?(i=c,a+=s):f<i?(i=f,a-=s):s/=2}return a}function S(e,t,n){return{x:(1-n)*(1-n)*e[0]+2*(1-n)*n*e[1]+n*n*e[2],y:(1-n)*(1-n)*t[0]+2*(1-n)*n*t[1]+n*n*t[2]}}function _(e,t,n){return{x:(1-n)*(1-n)*(1-n)*e[0]+3*(1-n)*(1-n)*n*e[1]+3*(1-n)*n*n*e[2]+n*n*n*e[3],y:(1-n)*(1-n)*(1-n)*t[0]+3*(1-n)*(1-n)*n*t[1]+3*(1-n)*n*n*t[2]+n*n*n*t[3]}}function x(e,t,n){void 0===n&&(n=1);var r=e[0]-2*e[1]+e[2],o=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],a=2*t[1]-2*t[0],s=4*(r*r+o*o),u=4*(r*i+o*a),l=i*i+a*a;if(0===s)return n*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));var c=u/(2*s),f=n+c,d=l/s-c*c;return Math.sqrt(s)/2*(f*Math.sqrt(f*f+d)-c*Math.sqrt(c*c+d)+d*Math.log(Math.abs((f+Math.sqrt(f*f+d))/(c+Math.sqrt(c*c+d)))))}function A(e,t){return Ue[e][t]}function N(e,t,n){var r,o,i,a=n.length-1;if(0===a)return 0;if(0===e){for(o=0,i=0;i<=a;i++)o+=A(a,i)*Math.pow(1-t,a-i)*Math.pow(t,i)*n[i];return o}for(r=new Array(a),i=0;i<a;i++)r[i]=a*(n[i+1]-n[i]);return N(e-1,t,r)}function w(e,t,n){var r=N(1,n,e),o=N(1,n,t),i=r*r+o*o;return Math.sqrt(i)}function C(e,t,n){var r,o,i,a;for(void 0===n&&(n=1),r=n/2,o=0,i=0;i<20;i++)a=r*Ge[20][i]+r,o+=Ve[20][i]*w(e,t,a);return r*o}function b(e,t,n,r){var o=e*n+t*r;return o>1&&(o=1),o<-1&&(o=-1),(e*r-t*n<0?-1:1)*Math.acos(o)}function O(e,t){var n=4/3*Math.tan(t/4),r=Math.cos(e),o=Math.sin(e),i=Math.cos(e+t),a=Math.sin(e+t);return[r,o,r-o*n,o+r*n,i+a*n,a-i*n,i,a]}function M(e,t,n,r,o,i,a,s,u){var l=0,c=[],f=[];Ke(e,t,n,r,o,i,a,s,u).forEach((function(e){var t=new Be(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),n=t.getTotalLength();l+=n,c.push(n),f.push(t)})),this.length=l,this.partialLengths=c,this.curves=f}function I(e,t,n,r){this.x0=e,this.x1=t,this.y0=n,this.y1=r}function T(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function P(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function R(e,t,n){var r=e.map((function(e,n){return function(e,t){return function(n){return e.map((function(e,r){return e+n*(t[r]-e)}))}}(e,t[n])}));return function(e){var t=r.map((function(t){return t(e)}));return n?B(t):t}}function k(e){return"number"==typeof e&&isFinite(e)}function D(e){return function(e){for(var t=0;t<e.length-2;t++){var n=e[t],r=e[t+1],o=e[t+2];if(n[0]*(r[1]-o[1])+r[0]*(o[1]-n[1])+o[0]*(n[1]-r[1]))return!0}return!1}(e)?_e(e):[(e[0][0]+e[e.length-1][0])/2,(e[0][1]+e[e.length-1][1])/2]}function L(e){return new Re(e).abs()}function F(e){return e.toString().split("M").map((function(e,t){return e=e.trim(),t&&e?"M"+e:e})).filter((function(e){return e}))}function B(e){return"M"+e.join("L")+"Z"}function G(e,t){var n=L(e);return function(e){var t=e.segments||[],n=[];if(!t.length||"M"!==t[0][0])return!1;for(var r=0;r<t.length;r++){var o=t[r],i=o[0],a=o[1],s=o[2];if("M"===i&&r||"Z"===i)break;if("M"===i||"L"===i)n.push([a,s]);else if("H"===i)n.push([a,n[n.length-1][1]]);else{if("V"!==i)return!1;n.push([n[n.length-1][0],a])}}return!!n.length&&{ring:n}}(n)||function(e,t){var n,r,o=F(e)[0],i=[],a=3;if(!o)throw new TypeError(He);r=function(e){if("undefined"!=typeof window&&window&&window.document)try{var t=window.document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttributeNS(null,"d",e),t}catch(e){}return ze(e)}(o),n=r.getTotalLength(),t&&k(t)&&t>0&&(a=Math.max(a,Math.ceil(n/t)));for(var s=0;s<a;s++){var u=r.getPointAtLength(n*s/a);i.push([u.x,u.y])}return{ring:i,skipBisect:!0}}(n,t)}function V(e,t){for(var n=e.length+t,r=xe(e)/t,o=0,i=0,a=r/2;e.length<n;){var s=e[o],u=e[(o+1)%e.length],l=T(s,u);a<=i+l?(e.splice(o+1,0,l?P(s,u,(a-i)/l):s.slice(0)),a+=r):(i+=l,o++)}}function U(e,t){var n,r;if("string"==typeof e){var o=G(e,t);e=o.ring,r=o.skipBisect}else if(!Array.isArray(e))throw new TypeError(He);if(!function(e){return e.every((function(e){return Array.isArray(e)&&e.length>=2&&k(e[0])&&k(e[1])}))}(n=e.slice(0)))throw new TypeError(He);return n.length>1&&function(e,t){return T(e,t)<1e-9}(n[0],n[n.length-1])&&n.pop(),Se(n)>0&&n.reverse(),!r&&t&&k(t)&&t>0&&function(e,t){void 0===t&&(t=1/0);for(var n=0;n<e.length;n++)for(var r=e[n],o=n===e.length-1?e[0]:e[n+1];T(r,o)>t;)o=P(r,o,.5),e.splice(n+1,0,o)}(n,t),n}function j(e,t,n){var r;return V(e,(r=e.length-t.length)<0?-1*r:0),V(t,r>0?r:0),Ze(e,t),R(e,t,n)}function K(e,t,n){n=n||2;var r,o,i,a,s,u,l,c=t&&t.length,f=c?t[0]*n:e.length,d=W(e,0,f,n,!0),h=[];if(!d)return h;if(c&&(d=function(e,t,n,r){var o,i,a,s,u,l=[];for(o=0,i=t.length;o<i;o++)a=t[o]*r,s=o<i-1?t[o+1]*r:e.length,(u=W(e,a,s,r,!1))===u.next&&(u.steiner=!0),l.push(ee(u));for(l.sort(X),o=0;o<l.length;o++)$(l[o],n),n=q(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=i=e[0],o=a=e[1];for(var p=n;p<f;p+=n)(s=e[p])<r&&(r=s),(u=e[p+1])<o&&(o=u),s>i&&(i=s),u>a&&(a=u);l=Math.max(i-r,a-o)}return z(d,h,n,r,o,l),h}function W(e,t,n,r,o){var i,a;if(o===fe(e,t,n,r)>0)for(i=t;i<n;i+=r)a=ue(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=ue(i,e[i],e[i+1],a);return a&&oe(a,a.next)&&(le(a),a=a.next),a}function q(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!oe(r,r.next)&&0!==re(r.prev,r,r.next))r=r.next;else{if(le(r),(r=t=r.prev)===r.next)return null;n=!0}}while(n||r!==t);return t}function z(e,t,n,r,o,i,a){if(e){!a&&i&&function(e,t,n,r){var o=e;do{null===o.z&&(o.z=Q(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,a,s,u,l=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ);t++);for(u=l;s>0||u>0&&r;)0===s?(o=r,r=r.nextZ,u--):0!==u&&r?n.z<=r.z?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,u--):(o=n,n=n.nextZ,s--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,l*=2}while(a>1)}(o)}(e,r,o,i);for(var s,u,l=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?J(e,r,o,i):H(e))t.push(s.i/n),t.push(e.i/n),t.push(u.i/n),le(e),e=u.next,l=u.next;else if((e=u)===l){a?1===a?z(e=Z(e,t,n),t,n,r,o,i,2):2===a&&Y(e,t,n,r,o,i):z(q(e),t,n,r,o,i,1);break}}}function H(e){var t=e.prev,n=e,r=e.next;if(re(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(te(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&re(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function J(e,t,n,r){var o=e.prev,i=e,a=e.next;if(re(o,i,a)>=0)return!1;for(var s=o.x<i.x?o.x<a.x?o.x:a.x:i.x<a.x?i.x:a.x,u=o.y<i.y?o.y<a.y?o.y:a.y:i.y<a.y?i.y:a.y,l=o.x>i.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,c=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,f=Q(s,u,t,n,r),d=Q(l,c,t,n,r),h=e.nextZ;h&&h.z<=d;){if(h!==e.prev&&h!==e.next&&te(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&re(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(h=e.prevZ;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&te(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&re(h.prev,h,h.next)>=0)return!1;h=h.prevZ}return!0}function Z(e,t,n){var r=e;do{var o=r.prev,i=r.next.next;!oe(o,i)&&ie(o,r,r.next,i)&&ae(o,i)&&ae(i,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(i.i/n),le(r),le(r.next),r=e=i),r=r.next}while(r!==e);return r}function Y(e,t,n,r,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&ne(a,s)){var u=se(a,s);return a=q(a,a.next),u=q(u,u.next),z(a,t,n,r,o,i),void z(u,t,n,r,o,i)}s=s.next}a=a.next}while(a!==e)}function X(e,t){return e.x-t.x}function $(e,t){if(t=function(e,t){var n,r=t,o=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>a){if(a=s,s===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===a)return n.prev;var u,l=n,c=n.x,f=n.y,d=1/0;for(r=n.next;r!==l;)o>=r.x&&r.x>=c&&te(i<f?o:a,i,c,f,i<f?a:o,i,r.x,r.y)&&((u=Math.abs(i-r.y)/(o-r.x))<d||u===d&&r.x>n.x)&&ae(r,e)&&(n=r,d=u),r=r.next;return n}(e,t)){var n=se(t,e);q(n,n.next)}}function Q(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)/o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function ee(e){var t=e,n=e;do{t.x<n.x&&(n=t),t=t.next}while(t!==e);return n}function te(e,t,n,r,o,i,a,s){return(o-a)*(t-s)-(e-a)*(i-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(i-s)-(o-a)*(r-s)>=0}function ne(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ie(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&ae(e,t)&&ae(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function re(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function oe(e,t){return e.x===t.x&&e.y===t.y}function ie(e,t,n,r){return!!(oe(e,t)&&oe(n,r)||oe(e,r)&&oe(n,t))||re(e,t,n)>0!=re(e,t,r)>0&&re(n,r,e)>0!=re(n,r,t)>0}function ae(e,t){return re(e.prev,e,e.next)<0?re(e,t,e.next)>=0&&re(e,e.prev,t)>=0:re(e,t,e.prev)<0||re(e,e.next,t)<0}function se(e,t){var n=new ce(e.i,e.x,e.y),r=new ce(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function ue(e,t,n,r){var o=new ce(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function le(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function ce(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function fe(e,t,n,r){for(var o=0,i=t,a=n-r;i<n;i+=r)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}function de(e,t){var n=t.id,r=t.bbox,o=null==t.properties?{}:t.properties,i=he(e,t);return null==n&&null==r?{type:"Feature",properties:o,geometry:i}:null==r?{type:"Feature",id:n,properties:o,geometry:i}:{type:"Feature",id:n,bbox:r,properties:o,geometry:i}}function he(e,t){function n(e,t){t.length&&t.pop();for(var n=u[e<0?~e:e],r=0,o=n.length;r<o;++r)t.push(s(n[r],r));e<0&&Qe(t,o)}function r(e){return s(e)}function o(e){for(var t=[],r=0,o=e.length;r<o;++r)n(e[r],t);return t.length<2&&t.push(t[0]),t}function i(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function a(e){return e.map(i)}var s=$e(e.transform),u=e.arcs;return function e(t){var n,i=t.type;switch(i){case"GeometryCollection":return{type:i,geometries:t.geometries.map(e)};case"Point":n=r(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(r);break;case"LineString":n=o(t.arcs);break;case"MultiLineString":n=t.arcs.map(o);break;case"Polygon":n=a(t.arcs);break;case"MultiPolygon":n=t.arcs.map(a);break;default:return null}return{type:i,coordinates:n}}(t)}function pe(e,t){function n(e){e.forEach((function(t){t.forEach((function(t){(o[t=t<0?~t:t]||(o[t]=[])).push(e)}))})),i.push(e)}function r(t){return function(e){for(var t,n=-1,r=e.length,o=e[r-1],i=0;++n<r;)t=o,o=e[n],i+=t[0]*o[1]-t[1]*o[0];return Math.abs(i)}(he(e,{type:"Polygon",arcs:[t]}).coordinates[0])}var o={},i=[],a=[];return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":n(t.arcs);break;case"MultiPolygon":t.arcs.forEach(n)}})),i.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,a.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){o[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),i.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:a.map((function(t){var n,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){o[e<0?~e:e].length<2&&i.push(e)}))}))})),(n=(i=tt(e,i)).length)>1)for(var a,s,u=1,l=r(i[0]);u<n;++u)(a=r(i[u]))>l&&(s=i[0],i[0]=i[u],i[u]=s,l=a);return i}))}}function ve(e,t,n){void 0===n&&(n={});var r=n.maxSegmentLength;void 0===r&&(r=10);var o=n.string;void 0===o&&(o=!0);var i=n.single;void 0===i&&(i=!1);var a=U(e,r);a.length<t.length+2&&V(a,t.length+2-a.length);var s,u=at(a,t.length),l=t.map((function(e){return U(e,r)})),c="string"==typeof e&&e;return i&&!t.every((function(e){return"string"==typeof e}))||(s=t.slice(0)),ge(u,l,{match:!0,string:o,single:i,t0:c,t1:s})}function ge(e,t,n){void 0===n&&(n={});var r=n.string,o=n.single,i=n.t0,a=n.t1,s=n.match,u=s?st(e,t):e.map((function(e,t){return t})),l=u.map((function(n,o){return j(e[n],t[o],r)}));if(s&&Array.isArray(i)&&(i=u.map((function(e){return i[e]}))),o&&r&&(Array.isArray(i)&&(i=i.join(" ")),Array.isArray(a)&&(a=a.join(" "))),o){var c=r?function(e){return l.map((function(t){return t(e)})).join(" ")}:function(e){return l.map((function(t){return t(e)}))};return r&&(i||a)?function(e){return e<1e-4&&i||1-e<1e-4&&a||c(e)}:c}return r?(i=Array.isArray(i)?i.map((function(e){return"string"==typeof e&&e})):[],a=Array.isArray(a)?a.map((function(e){return"string"==typeof e&&e})):[],l.map((function(e,t){return i[t]||a[t]?function(n){return n<1e-4&&i[t]||1-n<1e-4&&a[t]||e(n)}:e}))):l}function me(e,t,n,r,o){return Ee(function(e,t,n){return function(r){var o=D(r),i=xe(r.concat([r[0]])),a=Math.atan2(r[0][1]-o[1],r[0][0]-o[0]),s=0;return r.map((function(o,u){var l;return u&&(s+=T(o,r[u-1])),l=a+2*Math.PI*(i?s/i:u/r.length),[Math.cos(l)*n+e,Math.sin(l)*n+t]}))}}(e,t,n),r,function(e,t,n){var r=e-n+","+t,o="A"+n+","+n+",0,1,1,";return"M"+r+o+(e+n)+","+t+o+r+"Z"}(e,t,n),2*Math.PI*n,o)}function ye(e,t,n,r,o,i){return Ee(function(e,t,n,r){return function(o){var i=D(o),a=xe(o.concat([o[0]])),s=Math.atan2(o[0][1]-i[1],o[0][0]-i[0]),u=0;s<0&&(s=2*Math.PI+s);var l=s/(2*Math.PI);return o.map((function(i,s){s&&(u+=T(i,o[s-1]));var c=function(e){return e<=1/8?[1,.5+4*e]:e<=3/8?[1.5-4*e,1]:e<=5/8?[0,2.5-4*e]:e<=7/8?[4*e-2.5,0]:[1,4*e-3.5]}((l+(a?u/a:s/o.length))%1);return[e+c[0]*n,t+c[1]*r]}))}}(e,t,n,r),o,function(e,t,n,r){var o=e+n,i=t+r;return"M"+e+","+t+"L"+o+","+t+"L"+o+","+i+"L"+e+","+i+"Z"}(e,t,n,r),2*n+2*r,i)}function Ee(e,t,n,r,o){void 0===o&&(o={});var i=o.maxSegmentLength;void 0===i&&(i=10);var a=o.string;void 0===a&&(a=!0);var s,u,l=U(t,i);return k(r)&&l.length<r/i&&V(l,Math.ceil(r/i-l.length)),s=e(l),u=R(s,l,a),a?function(e){return e<1e-4?n:u(e)}:u}var Se=function(e){for(var t,n=-1,r=e.length,o=e[r-1],i=0;++n<r;)t=o,o=e[n],i+=t[1]*o[0]-t[0]*o[1];return i/2},_e=function(e){for(var t,n,r=-1,o=e.length,i=0,a=0,s=e[o-1],u=0;++r<o;)t=s,s=e[r],u+=n=t[0]*s[1]-s[0]*t[1],i+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[i/(u*=3),a/u]},xe=function(e){for(var t,n,r=-1,o=e.length,i=e[o-1],a=i[0],s=i[1],u=0;++r<o;)t=a,n=s,t-=a=(i=e[r])[0],n-=s=i[1],u+=Math.sqrt(t*t+n*n);return u},Ae={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},Ne=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],we=function(e){var t=new o(e),n=t.max;for(i(t);t.index<n&&!t.err.length;)u(t);return t.err.length?t.result=[]:t.result.length&&("mM".indexOf(t.result[0][0])<0?(t.err="SvgPath: string should start with `M` or `m`",t.result=[]):t.result[0][0]="M"),{err:t.err,segments:t.result}};c.prototype.matrix=function(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]||(this.cache=null,this.queue.push(e)),this},c.prototype.translate=function(e,t){return 0===e&&0===t||(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},c.prototype.scale=function(e,t){return 1===e&&1===t||(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},c.prototype.rotate=function(e,t,n){var r,o,i;return 0!==e&&(this.translate(t,n),r=e*Math.PI/180,o=Math.cos(r),i=Math.sin(r),this.queue.push([o,i,-i,o,0,0]),this.cache=null,this.translate(-t,-n)),this},c.prototype.skewX=function(e){return 0!==e&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},c.prototype.skewY=function(e){return 0!==e&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},c.prototype.toArray=function(){var e=this;if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],1===this.queue.length)return this.cache;for(var t=1;t<this.queue.length;t++)e.cache=l(e.cache,e.queue[t]);return this.cache},c.prototype.calc=function(e,t,n){var r;return this.queue.length?(this.cache||(this.cache=this.toArray()),[e*(r=this.cache)[0]+t*r[2]+(n?0:r[4]),e*r[1]+t*r[3]+(n?0:r[5])]):[e,t]};var Ce=c,be={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Oe=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Me=/[\s,]+/,Ie=2*Math.PI,Te=Math.PI/180;p.prototype.transform=function(e){var t=Math.cos(this.ax*Te),n=Math.sin(this.ax*Te),r=[this.rx*(e[0]*t+e[2]*n),this.rx*(e[1]*t+e[3]*n),this.ry*(-e[0]*n+e[2]*t),this.ry*(-e[1]*n+e[3]*t)],o=r[0]*r[0]+r[2]*r[2],i=r[1]*r[1]+r[3]*r[3],a=((r[0]-r[3])*(r[0]-r[3])+(r[2]+r[1])*(r[2]+r[1]))*((r[0]+r[3])*(r[0]+r[3])+(r[2]-r[1])*(r[2]-r[1])),s=(o+i)/2;if(a<1e-10*s)return this.rx=this.ry=Math.sqrt(s),this.ax=0,this;var u=r[0]*r[1]+r[2]*r[3],l=s+(a=Math.sqrt(a))/2,c=s-a/2;return this.ax=Math.abs(u)<1e-10&&Math.abs(l-i)<1e-10?90:180*Math.atan(Math.abs(u)>Math.abs(l-i)?(l-o)/u:u/(l-i))/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(c)):(this.ax+=90,this.rx=Math.sqrt(c),this.ry=Math.sqrt(l)),this},p.prototype.isDegenerate=function(){return this.rx<1e-10*this.ry||this.ry<1e-10*this.rx};var Pe=p;v.prototype.__matrix=function(e){var t,n=this;e.queue.length&&this.iterate((function(r,o,i,a){var s,u,l,c;switch(r[0]){case"v":u=0===(s=e.calc(0,r[1],!0))[0]?["v",s[1]]:["l",s[0],s[1]];break;case"V":u=(s=e.calc(i,r[1],!1))[0]===e.calc(i,a,!1)[0]?["V",s[1]]:["L",s[0],s[1]];break;case"h":u=0===(s=e.calc(r[1],0,!0))[1]?["h",s[0]]:["l",s[0],s[1]];break;case"H":u=(s=e.calc(r[1],a,!1))[1]===e.calc(i,a,!1)[1]?["H",s[0]]:["L",s[0],s[1]];break;case"a":case"A":var f=e.toArray(),d=Pe(r[1],r[2],r[3]).transform(f);if(f[0]*f[3]-f[1]*f[2]<0&&(r[5]=r[5]?"0":"1"),s=e.calc(r[6],r[7],"a"===r[0]),"A"===r[0]&&r[6]===i&&r[7]===a||"a"===r[0]&&0===r[6]&&0===r[7]){u=["a"===r[0]?"l":"L",s[0],s[1]];break}u=d.isDegenerate()?["a"===r[0]?"l":"L",s[0],s[1]]:[r[0],d.rx,d.ry,d.ax,r[4],r[5],s[0],s[1]];break;case"m":c=o>0,u=["m",(s=e.calc(r[1],r[2],c))[0],s[1]];break;default:for(u=[l=r[0]],c=l.toLowerCase()===l,t=1;t<r.length;t+=2)s=e.calc(r[t],r[t+1],c),u.push(s[0],s[1])}n.segments[o]=u}),!0)},v.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(1===this.__stack.length)return this.__matrix(this.__stack[0]),void(this.__stack=[]);for(e=Ce(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},v.prototype.toString=function(){var e,t,n=this,r=[];this.__evaluateStack();for(var o=0;o<this.segments.length;o++)t=n.segments[o][0],e=o>0&&"m"!==t&&"M"!==t&&t===n.segments[o-1][0],r=r.concat(e?n.segments[o].slice(1):n.segments[o]);return r.join(" ").replace(/ ?([achlmqrstvz]) ?/gi,"$1").replace(/ \-/g,"-").replace(/zm/g,"z m")},v.prototype.translate=function(e,t){return this.__stack.push(Ce().translate(e,t||0)),this},v.prototype.scale=function(e,t){return this.__stack.push(Ce().scale(e,t||0===t?t:e)),this},v.prototype.rotate=function(e,t,n){return this.__stack.push(Ce().rotate(e,t||0,n||0)),this},v.prototype.skewX=function(e){return this.__stack.push(Ce().skewX(e)),this},v.prototype.skewY=function(e){return this.__stack.push(Ce().skewY(e)),this},v.prototype.matrix=function(e){return this.__stack.push(Ce().matrix(e)),this},v.prototype.transform=function(e){return e.trim()?(this.__stack.push(function(e){var t,n,r=new Ce;return e.split(Oe).forEach((function(e){if(e.length){if(void 0!==be[e])return void(t=e);switch(n=e.split(Me).map((function(e){return+e||0})),t){case"matrix":return void(6===n.length&&r.matrix(n));case"scale":return void(1===n.length?r.scale(n[0],n[0]):2===n.length&&r.scale(n[0],n[1]));case"rotate":return void(1===n.length?r.rotate(n[0],0,0):3===n.length&&r.rotate(n[0],n[1],n[2]));case"translate":return void(1===n.length?r.translate(n[0],0):2===n.length&&r.translate(n[0],n[1]));case"skewX":return void(1===n.length&&r.skewX(n[0]));case"skewY":return void(1===n.length&&r.skewY(n[0]))}}})),r}(e)),this):this},v.prototype.round=function(e){var t,n=0,r=0,o=0,i=0;return e=e||0,this.__evaluateStack(),this.segments.forEach((function(a){var s=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":return s&&(a[1]+=o),o=a[1]-a[1].toFixed(e),void(a[1]=+a[1].toFixed(e));case"V":case"v":return s&&(a[1]+=i),i=a[1]-a[1].toFixed(e),void(a[1]=+a[1].toFixed(e));case"Z":case"z":return o=n,void(i=r);case"M":case"m":return s&&(a[1]+=o,a[2]+=i),o=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),n=o,r=i,a[1]=+a[1].toFixed(e),void(a[2]=+a[2].toFixed(e));case"A":case"a":return s&&(a[6]+=o,a[7]+=i),o=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),void(a[7]=+a[7].toFixed(e));default:return t=a.length,s&&(a[t-2]+=o,a[t-1]+=i),o=a[t-2]-a[t-2].toFixed(e),i=a[t-1]-a[t-1].toFixed(e),void a.forEach((function(t,n){n&&(a[n]=+a[n].toFixed(e))}))}})),this},v.prototype.iterate=function(e,t){var n,r,o,i=this.segments,a={},s=!1,u=0,l=0,c=0,f=0;if(t||this.__evaluateStack(),i.forEach((function(t,n){var r=e(t,n,u,l);Array.isArray(r)&&(a[n]=r,s=!0);var o=t[0]===t[0].toLowerCase();switch(t[0]){case"m":case"M":return u=t[1]+(o?u:0),l=t[2]+(o?l:0),c=u,void(f=l);case"h":case"H":return void(u=t[1]+(o?u:0));case"v":case"V":return void(l=t[1]+(o?l:0));case"z":case"Z":return u=c,void(l=f);default:u=t[t.length-2]+(o?u:0),l=t[t.length-1]+(o?l:0)}})),!s)return this;for(o=[],n=0;n<i.length;n++)if(void 0!==a[n])for(r=0;r<a[n].length;r++)o.push(a[n][r]);else o.push(i[n]);return this.segments=o,this},v.prototype.abs=function(){return this.iterate((function(e,t,n,r){var o,i=e[0],a=i.toUpperCase();if(i!==a)switch(e[0]=a,i){case"v":return void(e[1]+=r);case"a":return e[6]+=n,void(e[7]+=r);default:for(o=1;o<e.length;o++)e[o]+=o%2?n:r}}),!0),this},v.prototype.rel=function(){return this.iterate((function(e,t,n,r){var o,i=e[0],a=i.toLowerCase();if(i!==a&&(0!==t||"M"!==i))switch(e[0]=a,i){case"V":return void(e[1]-=r);case"A":return e[6]-=n,void(e[7]-=r);default:for(o=1;o<e.length;o++)e[o]-=o%2?n:r}}),!0),this},v.prototype.unarc=function(){return this.iterate((function(e,t,n,r){var o,i,a,s=[],u=e[0];return"A"!==u&&"a"!==u?null:("a"===u?(i=n+e[6],a=r+e[7]):(i=e[6],a=e[7]),0===(o=function(e,t,n,r,o,i,a,s,u){var l=Math.sin(u*Ie/360),c=Math.cos(u*Ie/360),f=c*(e-n)/2+l*(t-r)/2,p=-l*(e-n)/2+c*(t-r)/2;if(0===f&&0===p)return[];if(0===a||0===s)return[];a=Math.abs(a),s=Math.abs(s);var v=f*f/(a*a)+p*p/(s*s);v>1&&(a*=Math.sqrt(v),s*=Math.sqrt(v));var g=d(e,t,n,r,o,i,a,s,l,c),m=[],y=g[2],E=g[3],S=Math.max(Math.ceil(Math.abs(E)/(Ie/4)),1);E/=S;for(var _=0;_<S;_++)m.push(h(y,E)),y+=E;return m.map((function(e){for(var t=0;t<e.length;t+=2){var n=e[t+0],r=e[t+1],o=c*(n*=a)-l*(r*=s),i=l*n+c*r;e[t+0]=o+g[0],e[t+1]=i+g[1]}return e}))}(n,r,i,a,e[4],e[5],e[1],e[2],e[3])).length?[["a"===e[0]?"l":"L",e[6],e[7]]]:(o.forEach((function(e){s.push(["C",e[2],e[3],e[4],e[5],e[6],e[7]])})),s))})),this},v.prototype.unshort=function(){var e,t,n,r,o,i=this.segments;return this.iterate((function(a,s,u,l){var c,f=a[0],d=f.toUpperCase();s&&("T"===d?(c="t"===f,"Q"===(n=i[s-1])[0]?(e=n[1]-u,t=n[2]-l):"q"===n[0]?(e=n[1]-n[3],t=n[2]-n[4]):(e=0,t=0),r=-e,o=-t,c||(r+=u,o+=l),i[s]=[c?"q":"Q",r,o,a[1],a[2]]):"S"===d&&(c="s"===f,"C"===(n=i[s-1])[0]?(e=n[3]-u,t=n[4]-l):"c"===n[0]?(e=n[3]-n[5],t=n[4]-n[6]):(e=0,t=0),r=-e,o=-t,c||(r+=u,o+=l),i[s]=[c?"c":"C",r,o,a[1],a[2],a[3],a[4]]))})),this};var Re=v,ke={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},De=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Le=function(e){var t=[];return e.replace(De,(function(e,n,r){var o=n.toLowerCase();for(r=function(e){var t=e.match(Fe);return t?t.map(Number):[]}(r),"m"===o&&r.length>2&&(t.push([n].concat(r.splice(0,2))),o="l",n="m"===n?"l":"L");r.length>=0;){if(r.length===ke[o])return r.unshift(n),t.push(r);if(r.length<ke[o])throw new Error("malformed path data");t.push([n].concat(r.splice(0,ke[o])))}})),t},Fe=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Be=function(e,t,n,r,o,i,a,s){return new g(e,t,n,r,o,i,a,s)};g.prototype={constructor:g,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(e){var t=E(e,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t)},getTangentAtLength:function(e){var t=E(e,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),n=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t),r=Math.sqrt(n.x*n.x+n.y*n.y);return r>0?{x:n.x/r,y:n.y/r}:{x:0,y:0}},getPropertiesAtLength:function(e){var t,n=E(e,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),r=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],n),o=Math.sqrt(r.x*r.x+r.y*r.y);t=o>0?{x:r.x/o,y:r.y/o}:{x:0,y:0};var i=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],n);return{x:i.x,y:i.y,tangentX:t.x,tangentY:t.y}}};var Ge=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],Ve=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Ue=[[1],[1,1],[1,2,1],[1,3,3,1]],je=2*Math.PI,Ke=function(e,t,n,r,o,i,a,s,u){var l=Math.sin(o*je/360),c=Math.cos(o*je/360),f=c*(e-s)/2+l*(t-u)/2,d=-l*(e-s)/2+c*(t-u)/2;if(0===f&&0===d)return[];if(0===n||0===r)return[];n=Math.abs(n),r=Math.abs(r);var h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=function(e,t,n,r,o,i,a,s,u,l){var c=l*(e-n)/2+u*(t-r)/2,f=-u*(e-n)/2+l*(t-r)/2,d=a*a,h=s*s,p=c*c,v=f*f,g=d*h-d*v-h*p;g<0&&(g=0),g/=d*v+h*p;var m=(g=Math.sqrt(g)*(o===i?-1:1))*a/s*f,y=g*-s/a*c,E=l*m-u*y+(e+n)/2,S=u*m+l*y+(t+r)/2,_=(c-m)/a,x=(f-y)/s,A=(-c-m)/a,N=(-f-y)/s,w=b(1,0,_,x),C=b(_,x,A,N);return 0===i&&C>0&&(C-=je),1===i&&C<0&&(C+=je),[E,S,w,C]}(e,t,s,u,i,a,n,r,l,c),v=[],g=p[2],m=p[3],y=Math.max(Math.ceil(Math.abs(m)/(je/4)),1);m/=y;for(var E=0;E<y;E++)v.push(O(g,m)),g+=m;return v.map((function(e){for(var t=0;t<e.length;t+=2){var o=e[t+0],i=e[t+1],a=c*(o*=n)-l*(i*=r),s=l*o+c*i;e[t+0]=a+p[0],e[t+1]=s+p[1]}return e}))},We=function(e,t,n,r,o,i,a,s,u){return new M(e,t,n,r,o,i,a,s,u)};M.prototype={constructor:M,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(e){e<0?e=0:e>this.length&&(e=this.length);for(var t=this.partialLengths.length-1;this.partialLengths[t]>=e&&this.partialLengths[t]>0;)t--;t<this.partialLengths.length-1&&t++;for(var n=0,r=0;r<t;r++)n+=this.partialLengths[r];return this.curves[t].getPointAtLength(e-n)},getTangentAtLength:function(e){e<0?e=0:e>this.length&&(e=this.length);for(var t=this.partialLengths.length-1;this.partialLengths[t]>=e&&this.partialLengths[t]>0;)t--;t<this.partialLengths.length-1&&t++;for(var n=0,r=0;r<t;r++)n+=this.partialLengths[r];return this.curves[t].getTangentAtLength(e-n)},getPropertiesAtLength:function(e){var t=this.getTangentAtLength(e),n=this.getPointAtLength(e);return{x:n.x,y:n.y,tangentX:t.x,tangentY:t.y}}};var qe=function(e,t,n,r){return new I(e,t,n,r)};I.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},I.prototype.getPointAtLength=function(e){var t=e/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),n=(this.x1-this.x0)*t,r=(this.y1-this.y0)*t;return{x:this.x0+n,y:this.y0+r}},I.prototype.getTangentAtLength=function(){var e=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/e,y:(this.y1-this.y0)/e}},I.prototype.getPropertiesAtLength=function(e){var t=this.getPointAtLength(e),n=this.getTangentAtLength();return{x:t.x,y:t.y,tangentX:n.x,tangentY:n.y}};var ze=function(e){function t(e){if(!e)return null;for(var i,a=Le(e),s=[0,0],u=[0,0],l=0;l<a.length;l++)"M"===a[l][0]?(s=[a[l][1],a[l][2]],o.push(null)):"m"===a[l][0]?(s=[a[l][1]+s[0],a[l][2]+s[1]],o.push(null)):"L"===a[l][0]?(n+=Math.sqrt(Math.pow(s[0]-a[l][1],2)+Math.pow(s[1]-a[l][2],2)),o.push(new qe(s[0],a[l][1],s[1],a[l][2])),s=[a[l][1],a[l][2]]):"l"===a[l][0]?(n+=Math.sqrt(Math.pow(a[l][1],2)+Math.pow(a[l][2],2)),o.push(new qe(s[0],a[l][1]+s[0],s[1],a[l][2]+s[1])),s=[a[l][1]+s[0],a[l][2]+s[1]]):"H"===a[l][0]?(n+=Math.abs(s[0]-a[l][1]),o.push(new qe(s[0],a[l][1],s[1],s[1])),s[0]=a[l][1]):"h"===a[l][0]?(n+=Math.abs(a[l][1]),o.push(new qe(s[0],s[0]+a[l][1],s[1],s[1])),s[0]=a[l][1]+s[0]):"V"===a[l][0]?(n+=Math.abs(s[1]-a[l][1]),o.push(new qe(s[0],s[0],s[1],a[l][1])),s[1]=a[l][1]):"v"===a[l][0]?(n+=Math.abs(a[l][1]),o.push(new qe(s[0],s[0],s[1],s[1]+a[l][1])),s[1]=a[l][1]+s[1]):"z"===a[l][0]||"Z"===a[l][0]?(n+=Math.sqrt(Math.pow(a[0][1]-s[0],2)+Math.pow(a[0][2]-s[1],2)),o.push(new qe(s[0],a[0][1],s[1],a[0][2])),s=[a[0][1],a[0][2]]):"C"===a[l][0]?(i=new Be(s[0],s[1],a[l][1],a[l][2],a[l][3],a[l][4],a[l][5],a[l][6]),n+=i.getTotalLength(),s=[a[l][5],a[l][6]],o.push(i)):"c"===a[l][0]?(i=new Be(s[0],s[1],s[0]+a[l][1],s[1]+a[l][2],s[0]+a[l][3],s[1]+a[l][4],s[0]+a[l][5],s[1]+a[l][6]),n+=i.getTotalLength(),s=[a[l][5]+s[0],a[l][6]+s[1]],o.push(i)):"S"===a[l][0]?(i=l>0&&["C","c","S","s"].indexOf(a[l-1][0])>-1?new Be(s[0],s[1],2*s[0]-a[l-1][a[l-1].length-4],2*s[1]-a[l-1][a[l-1].length-3],a[l][1],a[l][2],a[l][3],a[l][4]):new Be(s[0],s[1],s[0],s[1],a[l][1],a[l][2],a[l][3],a[l][4]),n+=i.getTotalLength(),s=[a[l][3],a[l][4]],o.push(i)):"s"===a[l][0]?(i=l>0&&["C","c","S","s"].indexOf(a[l-1][0])>-1?new Be(s[0],s[1],s[0]+i.d.x-i.c.x,s[1]+i.d.y-i.c.y,s[0]+a[l][1],s[1]+a[l][2],s[0]+a[l][3],s[1]+a[l][4]):new Be(s[0],s[1],s[0],s[1],s[0]+a[l][1],s[1]+a[l][2],s[0]+a[l][3],s[1]+a[l][4]),n+=i.getTotalLength(),s=[a[l][3]+s[0],a[l][4]+s[1]],o.push(i)):"Q"===a[l][0]?(i=new Be(s[0],s[1],a[l][1],a[l][2],a[l][3],a[l][4]),n+=i.getTotalLength(),o.push(i),s=[a[l][3],a[l][4]],u=[a[l][1],a[l][2]]):"q"===a[l][0]?(i=new Be(s[0],s[1],s[0]+a[l][1],s[1]+a[l][2],s[0]+a[l][3],s[1]+a[l][4]),n+=i.getTotalLength(),u=[s[0]+a[l][1],s[1]+a[l][2]],s=[a[l][3]+s[0],a[l][4]+s[1]],o.push(i)):"T"===a[l][0]?(i=l>0&&["Q","q","T","t"].indexOf(a[l-1][0])>-1?new Be(s[0],s[1],2*s[0]-u[0],2*s[1]-u[1],a[l][1],a[l][2]):new qe(s[0],a[l][1],s[1],a[l][2]),o.push(i),n+=i.getTotalLength(),u=[2*s[0]-u[0],2*s[1]-u[1]],s=[a[l][1],a[l][2]]):"t"===a[l][0]?(i=l>0&&["Q","q","T","t"].indexOf(a[l-1][0])>-1?new Be(s[0],s[1],2*s[0]-u[0],2*s[1]-u[1],s[0]+a[l][1],s[1]+a[l][2]):new qe(s[0],s[0]+a[l][1],s[1],s[1]+a[l][2]),n+=i.getTotalLength(),u=[2*s[0]-u[0],2*s[1]-u[1]],s=[a[l][1]+s[0],a[l][2]+s[0]],o.push(i)):"A"===a[l][0]?(i=new We(s[0],s[1],a[l][1],a[l][2],a[l][3],a[l][4],a[l][5],a[l][6],a[l][7]),n+=i.getTotalLength(),s=[a[l][6],a[l][7]],o.push(i)):"a"===a[l][0]&&(i=new We(s[0],s[1],a[l][1],a[l][2],a[l][3],a[l][4],a[l][5],s[0]+a[l][6],s[1]+a[l][7]),n+=i.getTotalLength(),s=[s[0]+a[l][6],s[1]+a[l][7]],o.push(i)),r.push(n);return t}var n=0,r=[],o=[];t.getTotalLength=function(){return n},t.getPointAtLength=function(e){var t=i(e);return o[t.i].getPointAtLength(t.fraction)},t.getTangentAtLength=function(e){var t=i(e);return o[t.i].getTangentAtLength(t.fraction)},t.getPropertiesAtLength=function(e){var t=i(e);return o[t.i].getPropertiesAtLength(t.fraction)};var i=function(e){e<0?e=0:e>n&&(e=n);for(var t=r.length-1;r[t]>=e&&r[t]>0;)t--;return t++,{fraction:e-r[t-1],i:t}};return t(e)},He='All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).\nExample valid ways of supplying a shape would be:\n[[0, 0], [10, 0], [10, 10]]\n"M0,0 L10,0 L10,10Z"\n',Je="flubber.all() expects two arrays of equal length as arguments. Each element in both arrays should be an array of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).",Ze=function(e,t){for(var n,r,o,i=e.length,a=1/0,s=0;s<i;s++)!function(o){r=0,t.forEach((function(t,n){var a=T(e[(o+n)%i],t);r+=a*a})),r<a&&(a=r,n=o)}(s);n&&(o=e.splice(0,n),e.splice.apply(e,[e.length,0].concat(o)))},Ye=K;K.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,a=Math.abs(fe(e,0,i,n));if(o)for(var s=0,u=t.length;s<u;s++){var l=t[s]*n,c=s<u-1?t[s+1]*n:e.length;a-=Math.abs(fe(e,l,c,n))}var f=0;for(s=0;s<r.length;s+=3){var d=r[s]*n,h=r[s+1]*n,p=r[s+2]*n;f+=Math.abs((e[d]-e[p])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[p+1]-e[d+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},K.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[o][i][a]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n};var Xe=function(e){return e},$e=function(e){if(null==e)return Xe;var t,n,r=e.scale[0],o=e.scale[1],i=e.translate[0],a=e.translate[1];return function(e,s){s||(t=n=0);var u=2,l=e.length,c=new Array(l);for(c[0]=(t+=e[0])*r+i,c[1]=(n+=e[1])*o+a;u<l;)c[u]=e[u],++u;return c}},Qe=function(e,t){for(var n,r=e.length,o=r-t;o<--r;)n=e[o],e[o++]=e[r],e[r]=n},et=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return de(e,t)}))}:de(e,t)},tt=function(e,t){function n(t){var n,r=e.arcs[t<0?~t:t],o=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,o]:[o,n]}function r(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){o[e<0?~e:e]=1})),s.push(r)}}var o={},i={},a={},s=[],u=-1;return t.forEach((function(n,r){var o,i=e.arcs[n<0?~n:n];i.length<3&&!i[1][0]&&!i[1][1]&&(o=t[++u],t[u]=n,t[r]=o)})),t.forEach((function(e){var t,r,o=n(e),s=o[0],u=o[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=u,r=i[u]){delete i[r.start];var l=r===t?t:t.concat(r);i[l.start=t.start]=a[l.end=r.end]=l}else i[t.start]=a[t.end]=t;else if(t=i[u])if(delete i[t.start],t.unshift(e),t.start=s,r=a[s]){delete a[r.end];var c=r===t?t:r.concat(t);i[c.start=r.start]=a[c.end=t.end]=c}else i[t.start]=a[t.end]=t;else i[(t=[e]).start=s]=a[t.end=u]=t})),r(a,i),r(i,a),t.forEach((function(e){o[e<0?~e:e]||s.push([e])})),s},nt=function(e,t){for(var n=0,r=e.length;n<r;){var o=n+r>>>1;e[o]<t?n=o+1:r=o}return n},rt=function(e){function t(e,t){e.forEach((function(e){e<0&&(e=~e);var n=r[e];n?n.push(t):r[e]=[t]}))}function n(e,n){e.forEach((function(e){t(e,n)}))}var r={},o=e.map((function(){return[]})),i={LineString:t,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach((function(e){n(e,t)}))}};for(var a in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in i&&i[t.type](t.arcs,n)})),r)for(var s=r[a],u=s.length,l=0;l<u;++l)for(var c=l+1;c<u;++c){var f,d=s[l],h=s[c];(f=o[d])[a=nt(f,h)]!==h&&f.splice(a,0,h),(f=o[h])[a=nt(f,d)]!==d&&f.splice(a,0,d)}return o},ot=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},it=function(e){return 1===e.length&&(e=function(e){return function(t,n){return ot(e(t),n)}}(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}},at=(it(ot).right,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2),function(e,t){return function(e,t){for(var n=e.objects.triangles.geometries,r=it((function(e){return e.area})).left;n.length>t;)!function(){var t=n[0],o=rt(n)[0][0],i=n[o],a=pe(e,[t,i]);a.area=t.area+i.area,a.type="Polygon",a.arcs=a.arcs[0],n.splice(o,1),n.shift(),n.splice(r(n,a.area),0,a)}();if(t>n.length)throw new RangeError("Can't collapse topology into "+t+" pieces.");return et(e,e.objects.triangles).features.map((function(e){return e.geometry.coordinates[0].pop(),e.geometry.coordinates[0]}))}(function(e,t){var n={},r={type:"Topology",objects:{triangles:{type:"GeometryCollection",geometries:[]}},arcs:[]};return e.forEach((function(e){var o=[];e.forEach((function(e,i){var a=e[0]<e[1]?e.join(","):e[1]+","+e[0],s=e.map((function(e){return t[e]}));a in n?o.push(~n[a]):(o.push(n[a]=r.arcs.length),r.arcs.push(s))})),r.objects.triangles.geometries.push({type:"Polygon",area:Math.abs(Se(e.map((function(e){return t[e[0]]})))),arcs:[o]})})),r.objects.triangles.geometries.sort((function(e,t){return e.area-t.area})),r}(function(e){for(var t=Ye(e.reduce((function(e,t){return e.concat([t[0]],[t[1]])}),[])),n=[],r=0,o=t.length;r<o;r+=3)n.push([[t[r],t[r+1]],[t[r+1],t[r+2]],[t[r+2],t[r]]]);return n}(e),e),t)}),st=function(e,t){if(e.length>8)return e.map((function(e,t){return t}));var n=e.map((function(e){return t.map((function(t){return function(e,t){var n=T(D(e),D(t));return n*n}(e,t)}))}));return function(e,t,n){var r=1/0,o=e.map((function(e,t){return t}));return function e(t,i,a){void 0===i&&(i=[]),void 0===a&&(a=0);for(var s=0;s<t.length;s++){var u=t.splice(s,1),l=n[u[0]][i.length];a+l<r&&(t.length?e(t.slice(),i.concat(u),a+l):(r=a+l,o=i.concat(u))),t.length&&t.splice(s,0,u[0])}}(o),o}(e,0,n)};e.interpolate=function(e,t,n){void 0===n&&(n={});var r=n.maxSegmentLength;void 0===r&&(r=10);var o=n.string;void 0===o&&(o=!0);var i=j(U(e,r),U(t,r),o);return!o||"string"!=typeof e&&"string"!=typeof t?i:function(n){return n<1e-4&&"string"==typeof e?e:1-n<1e-4&&"string"==typeof t?t:i(n)}},e.separate=ve,e.combine=function(e,t,n){void 0===n&&(n={});var r=n.maxSegmentLength;void 0===r&&(r=10);var o=n.string;void 0===o&&(o=!0);var i=n.single;void 0===i&&(i=!1);var a=ve(t,e,{maxSegmentLength:r,string:o,single:i});return i?function(e){return a(1-e)}:a.map((function(e){return function(t){return e(1-t)}}))},e.interpolateAll=function(e,t,n){void 0===n&&(n={});var r=n.maxSegmentLength;void 0===r&&(r=10);var o=n.string;void 0===o&&(o=!0);var i=n.single;if(void 0===i&&(i=!1),!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||!e.length)throw new TypeError(Je);var a,s,u=function(e){return U(e,r)},l=e.map(u),c=t.map(u);return i?(e.every((function(e){return"string"==typeof e}))&&(a=e.slice(0)),t.every((function(e){return"string"==typeof e}))&&(s=t.slice(0))):(a=e.slice(0),s=t.slice(0)),ge(l,c,{string:o,single:i,t0:a,t1:s,match:!1})},e.splitPathString=function(e){return F(L(e))},e.toPathString=B,e.fromCircle=me,e.toCircle=function(e,t,n,r,o){var i=me(t,n,r,e,o);return function(e){return i(1-e)}},e.fromRect=ye,e.toRect=function(e,t,n,r,o,i){var a=ye(t,n,r,o,e,i);return function(e){return a(1-e)}},Object.defineProperty(e,"__esModule",{value:!0})}(t)},9916:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i="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},a="object"===("undefined"==typeof window?"undefined":i(window))&&"object"===("undefined"==typeof document?"undefined":i(document))&&9===document.nodeType,s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=void 0;if(a){var l=!0,c=!1,f=void 0;try{for(var d,h=[["edge",/Edge\/([0-9\._]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["android",/Android\s([0-9\.]+)/],["safari",/Version\/([0-9\._]+).*Safari/]][Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var p=d.value,v=s(p,2),g=v[0];if(v[1].test(window.navigator.userAgent)){u=g;break}}}catch(e){c=!0,f=e}finally{try{!l&&h.return&&h.return()}finally{if(c)throw f}}}var m=void 0;if(a){var y=!0,E=!1,S=void 0;try{for(var _,x=[["ios",/os ([\.\_\d]+) like mac os/i],["macos",/mac os x/i],["android",/android/i],["firefoxos",/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/i],["windows",/windows\s*(?:nt)?\s*([\.\_\d]+)/i]][Symbol.iterator]();!(y=(_=x.next()).done);y=!0){var A=_.value,N=s(A,2),w=N[0];if(N[1].test(window.navigator.userAgent)){m=w;break}}}catch(e){E=!0,S=e}finally{try{!y&&x.return&&x.return()}finally{if(E)throw S}}}var C=[];if(a){var b=!0,O=!1,M=void 0;try{for(var I,T=[["inputeventslevel1",function(e){return"inputType"in(e.InputEvent?new e.InputEvent("input"):{})}],["inputeventslevel2",function(e){var t=e.document.createElement("div");return t.contentEditable=!0,"onbeforeinput"in t}]][Symbol.iterator]();!(b=(I=T.next()).done);b=!0){var P=I.value,R=s(P,2),k=R[0];(0,R[1])(window)&&C.push(k)}}catch(e){O=!0,M=e}finally{try{!b&&T.return&&T.return()}finally{if(O)throw M}}}var D=[[/^9([.]0|)/,28],[/^8[.]1/,27],[/^8([.]0|)/,26],[/^7[.]1/,25],[/^7([.]0|)/,24],[/^6([.]0|)/,23],[/^5[.]1/,22],[/^5([.]0|)/,21],[/^4[.]4/,20]];var L="firefox"===u,F="safari"===u,B="ie"===u,G="edge"===u,V="android"===m,U="ios"===m,j="macos"===m,K=function(){if("android"!==m)return null;var e=window.navigator.userAgent.match(/Android\s([0-9\.]+)/);if(null==e)return null;var t=e[1],n=!0,r=!1,o=void 0;try{for(var i,a=D[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,l=s(u,2),c=l[0],f=l[1];if(t.match(c))return f}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return null}(),W=(C.includes("inputeventslevel1"),C.includes("inputeventslevel2")||V&&(28===K||null===K)),q=n(7654),z=n(10382),H=n.n(z),J=n(10385),Z=n.n(J),Y=n(10386),X=n.n(Y),$=n(14),Q=n.n($),ee=function(e,t){0},te=n(5417),ne=n.n(te),re=n(9586),oe=n.n(re),ie=n(10388),ae={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:["delete"],extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z"},se={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["shift?+delete","ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},ue={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},le={},ce=U||j,fe=!ce;[].concat(Object.keys(ae)).concat(Object.keys(se)).concat(Object.keys(ue)).forEach((function(e){var t="is"+e[0].toUpperCase()+e.slice(1);if(!le[t]){var n=ae[e],r=se[e],o=ue[e],i=n&&Object(ie.isKeyHotkey)(n),a=r&&Object(ie.isKeyHotkey)(r),s=o&&Object(ie.isKeyHotkey)(o);le[t]=function(e){return!(!i||!i(e))||(!!(ce&&a&&a(e))||!!(fe&&s&&s(e)))}}}));var de=le,he=n(10389);function pe(e){var t=JSON.stringify(e);return Object(he.btoa)(encodeURIComponent(t))}function ve(e){var t=decodeURIComponent(Object(he.atob)(e));return JSON.parse(t)}var ge={deserialize:function(e,t){var n=ve(e);return q.Value.fromJSON(n,t)},deserializeNode:function(e,t){var n=ve(e);return q.Node.fromJSON(n,t)},serialize:function(e,t){return pe(e.toJSON(t))},serializeNode:function(e,t){return pe(e.toJSON(t))}},me=n(7653),ye=n(88),Ee=function(e,t){if(!e)throw new Error("Invariant failed: "+(t||""))},Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_e=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},xe=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},Ae=0;var Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ae++,n=e.placeholder,r=e.when,i=e.style,a=void 0===i?{}:i;function s(e,n,o){if(!n.query(r,e))return o();var i=o(),a=e.texts(),s=_e(a,1)[0],u=e.texts({direction:"backward"}),l=_e(u,1)[0],c=_e(s,2),f=c[0],d=c[1],h=_e(l,2),p=h[0],v=h[1],g={type:"placeholder",data:{key:t},anchor:{key:f.key,offset:0,path:d},focus:{key:p.key,offset:p.text.length,path:v}};return[].concat(xe(i),[g])}function u(e,r,i){var s=e.children,u=e.decoration;if("placeholder"===u.type&&u.data.get("key")===t){var l=Se({pointerEvents:"none",display:"inline-block",width:"0",maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.333",verticalAlign:"text-top"},a);return o.a.createElement("span",null,o.a.createElement("span",{contentEditable:!1,style:l},n),s)}return i()}return Ee("string"==typeof n,"You must pass `SlateReactPlaceholder` an `options.placeholder` string."),Ee("string"==typeof r||"function"==typeof r,"You must pass `SlateReactPlaceholder` an `options.when` query."),{decorateNode:s,renderDecoration:u}};function we(e,t){function n(n,r,o,i,a){var s=r[o];return null!=s||n?null==s&&n?new Error("The "+a+" `"+o+"` is marked as required in `"+i+"`, but it was not supplied."):t(s)?null:new Error("Invalid "+a+" `"+o+"` supplied to `"+i+"`, expected a Slate `"+e+"` but received: "+s):null}function r(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.apply(void 0,[!1].concat(t))}return r.isRequired=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.apply(void 0,[!0].concat(t))},r}var Ce={block:we("Block",(function(e){return q.Block.isBlock(e)})),blocks:we("List<Block>",(function(e){return q.Block.isBlockList(e)})),change:we("Change",(function(e){return q.Change.isChange(e)})),data:we("Data",(function(e){return q.Data.isData(e)})),document:we("Document",(function(e){return q.Document.isDocument(e)})),inline:we("Inline",(function(e){return q.Inline.isInline(e)})),inlines:we("Inline",(function(e){return q.Inline.isInlineList(e)})),leaf:we("Leaf",(function(e){return q.Leaf.isLeaf(e)})),leaves:we("List<Leaf>",(function(e){return q.Leaf.isLeafList(e)})),mark:we("Mark",(function(e){return q.Mark.isMark(e)})),marks:we("Set<Mark>",(function(e){return q.Mark.isMarkSet(e)})),node:we("Node",(function(e){return q.Node.isNode(e)})),nodes:we("List<Node>",(function(e){return q.Node.isNodeList(e)})),range:we("Range",(function(e){return q.Range.isRange(e)})),ranges:we("List<Range>",(function(e){return q.Range.isRangeList(e)})),selection:we("Selection",(function(e){return q.Selection.isSelection(e)})),value:we("Value",(function(e){return q.Value.isValue(e)})),text:we("Text",(function(e){return q.Text.isText(e)})),texts:we("List<Text>",(function(e){return q.Text.isTextList(e)}))},be=function(e,t){return e===t};var Oe=function(e,t){var n;void 0===t&&(t=be);var r,o=[],i=!1,a=function(e,n){return t(e,o[n],n)};return function(){for(var t=arguments.length,s=new Array(t),u=0;u<t;u++)s[u]=arguments[u];return i&&n===this&&s.length===o.length&&s.every(a)||(r=e.apply(this,s),i=!0,n=this,o=s),r}};n.d(t,"Editor",(function(){return Qt})),n.d(t,"cloneFragment",(function(){return wt})),n.d(t,"findDOMNode",(function(){return Bt})),n.d(t,"findDOMPoint",(function(){return en})),n.d(t,"findDOMRange",(function(){return tn})),n.d(t,"findNode",(function(){return nn})),n.d(t,"findPath",(function(){return rn})),n.d(t,"findPoint",(function(){return on})),n.d(t,"findRange",(function(){return sn})),n.d(t,"getEventRange",(function(){return un})),n.d(t,"getEventTransfer",(function(){return Pt})),n.d(t,"setEventTransfer",(function(){return Dt})),n.d(t,"ReactPlugin",(function(){return Xt}));var Me=["onBeforeInput","onBlur","onClick","onContextMenu","onCompositionEnd","onCompositionUpdate","onCompositionStart","onCopy","onCut","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onInput","onFocus","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPaste","onSelect"],Ie="data-slate-editor",Te="data-slate-fragment",Pe="data-key",Re="data-slate-leaf",ke="data-slate-length",De="data-slate-object",Le="data-offset-key",Fe="data-slate-spacer",Be="data-slate-string",Ge="data-slate-zero-width",Ve={BLOCK:"["+De+'="block"]',EDITOR:"["+Ie+"]",INLINE:"["+De+'="inline"]',KEY:"["+Pe+"]",LEAF:"["+Re+"]",OBJECT:"["+De+"]",STRING:"["+Be+"]",TEXT:"["+De+'="text"]',VOID:"["+"data-slate-void"+"]",ZERO_WIDTH:"["+Ge+"]"},Ue=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},je=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ke=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},ze=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},He=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Je=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},Ze=/^([\w-]+)(?::(\d+))?$/;var Ye={parse:function(e){var t=Ze.exec(e);if(!t)throw new Error('Invalid offset key string "'+e+'".');var n=He(t,3),r=(n[0],n[1]),o=n[2];return{key:r,index:parseInt(o,10)}},stringify:function(e){return e.key+":"+e.index}},Xe=function(e){function t(e){Ue(this,t);var n=ze(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.ref=o.a.createRef(),n.forceUpdateFlag=!1,n}return qe(t,e),je(t,[{key:"shouldComponentUpdate",value:function(e){var t=""===e.text,n=this.ref.current,r=n.textContent;if(r!==(t?"\ufeff":e.text))return!0;if(this.props.decorations.map((function(e){return e.type})).join(" ")!==e.decorations.map((function(e){return e.type})).join(" "))return!0;if(t&&""!==r.replace(/[\uFEFF]/g,""))return!0;var o=1===e.parent.nodes.size&&1===e.leaves.length,i=!L&&o;if(t?(n.hasAttribute(Ge)||n.setAttribute(Ge,"n"),n.hasAttribute(ke)||n.setAttribute(ke,"0"),n.hasAttribute(Be)&&n.removeAttribute(Be,"true")):(n.hasAttribute(Ge)&&n.removeAttribute(Ge),n.hasAttribute(ke)&&n.removeAttribute(ke),n.hasAttribute(Be)||n.setAttribute(Be,"true")),i){var a=!1,s=!0,u=!1,l=void 0;try{for(var c,f=n.childNodes[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){if("BR"===c.value.tagName){a=!0;break}}}catch(e){u=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}a||n.appendChild(window.document.createElement("br"))}else{var d=!0,h=!1,p=void 0;try{for(var v,g=n.childNodes[Symbol.iterator]();!(d=(v=g.next()).done);d=!0){var m=v.value;"BR"===m.tagName&&n.removeChild(m)}}catch(e){h=!0,p=e}finally{try{!d&&g.return&&g.return()}finally{if(h)throw p}}}return!1}},{key:"componentDidMount",value:function(){this.forceUpdateFlag=!this.forceUpdateFlag}},{key:"componentDidUpdate",value:function(){this.forceUpdateFlag=!this.forceUpdateFlag}},{key:"render",value:function(){var e,t,n=this.props,r=n.decorations,i=n.node,a=n.index,s=n.offset,u=n.text,l=n.editor,c=n.parent,f=n.leaves,d=Ye.stringify({key:i.key,index:a}),h=1===c.nodes.size&&1===f.length,p=""===u,v=!L&&h,g=(Ke(e={},Re,!0),Ke(e,Le,d),Ke(e,"key",this.forceUpdateFlag?"A":"B"),e),m=p?o.a.createElement("span",We({ref:this.ref},(Ke(t={},Ge,"z"),Ke(t,ke,0),t)),"\ufeff",v?o.a.createElement("br",null):null):o.a.createElement("span",We({ref:this.ref},Ke({},Be,!0)),u,v?o.a.createElement("br",null):null);if(""!==u){var y=!0,E=!1,S=void 0;try{for(var _,x=r[Symbol.iterator]();!(y=(_=x.next()).done);y=!0){var A=_.value,N=l.run("renderDecoration",{editor:l,decorations:r,node:i,offset:s,text:u,decoration:A,children:m,attributes:Ke({},De,"decoration")});N&&(m=N)}}catch(e){E=!0,S=e}finally{try{!y&&x.return&&x.return()}finally{if(E)throw S}}}return o.a.createElement("span",g,m)}}]),t}(o.a.Component),$e=o.a.forwardRef((function(e,t){var n,r=e.decorations,i=e.node,a=e.parent,s=e.editor,u=e.style,l=i.key,c=i.getLeaves(r),f=0;return o.a.createElement("span",We({ref:t,style:u},(Ke(n={},De,i.object),Ke(n,Pe,l),n)),c.map((function(e,t){var n=e.text,r=f;return f+=n.length,o.a.createElement(Xe,{key:i.key+"-"+t,block:a,editor:s,index:t,decorations:e.decorations,node:i,offset:r,parent:a,leaves:c,text:n})})))})),Qe=function(e){function t(){var e,n,r;Ue(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=ze(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.tmp={nodeRefs:{}},r.ref=o.a.createRef(),ze(r,n)}return qe(t,e),je(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.node!==e.node}},{key:"render",value:function(){var e,n=this,r=this.props,i=r.editor,a=r.node,s=r.parent,u=a.getDecorations(i),l=[];if(a.nodes.size>1||1===a.nodes.size&&" "!==a.nodes.first().text){var c=function(e){var r=l.length,s=function(e){e?n.tmp.nodeRefs[r]=e:delete n.tmp.nodeRefs[r]};if("inline"===e.object)l.push(o.a.createElement(t,{ref:s,key:e.key,editor:i,node:e,parent:a}));else{var c=u.map((function(e){return tt(a,r,e)})).filter((function(e){return e}));l.push(o.a.createElement($e,{ref:s,key:e.key,editor:i,node:e,parent:a,decorations:c}))}},f=!0,d=!1,h=void 0;try{for(var p,v=a.nodes[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){c(p.value)}}catch(e){d=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw h}}}var g=(Ke(e={},De,a.object),Ke(e,Pe,a.key),Ke(e,"ref",this.ref),e);return i.run("renderInline",{attributes:g,children:l,editor:i,node:a,parent:s})}}]),t}(o.a.Component),et=function(e){function t(){var e,n,r;Ue(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=ze(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.tmp={nodeRefs:{}},r.ref=o.a.createRef(),ze(r,n)}return qe(t,e),je(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.node!==e.node}},{key:"render",value:function(){var e,n=this,r=this.props,i=r.editor,a=r.node,s=r.parent,u=a.getDecorations(i),l=[],c=function(e){var r=l.length,s=function(e){e?n.tmp.nodeRefs[r]=e:delete n.tmp.nodeRefs[r]};if("block"===e.object)l.push(o.a.createElement(t,{ref:s,key:e.key,editor:i,node:e,parent:a}));else if("inline"===e.object)l.push(o.a.createElement(Qe,{ref:s,key:e.key,editor:i,node:e,parent:a}));else{var c=u.map((function(e){return tt(a,r,e)})).filter((function(e){return e}));l.push(o.a.createElement($e,{ref:s,key:e.key,editor:i,node:e,parent:a,decorations:c}))}},f=!0,d=!1,h=void 0;try{for(var p,v=a.nodes[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){c(p.value)}}catch(e){d=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw h}}var g=(Ke(e={},De,a.object),Ke(e,Pe,a.key),Ke(e,"ref",this.ref),e);a.isLeafBlock()&&("rtl"===a.getTextDirection()&&(g.dir="rtl"));return i.run("renderBlock",{attributes:g,children:l,editor:i,node:a,parent:s})}}]),t}(o.a.Component);function tt(e,t,n){if(n.isUnset)return null;var r=e.nodes.get(t),o=n,i=o.start,a=o.end,s=i.path,u=a.path,l=s.first(),c=u.first();if(l===t)i=i.setPath(s.rest());else if(l<t&&t<=c)if("text"===r.object)i=i.moveTo(q.PathUtils.create([t]),0).setKey(r.key);else{var f=r.texts(),d=He(f,1)[0],h=He(d,2),p=h[0],v=h[1];i=i.moveTo(v,0).setKey(p.key)}else i=null;if(c===t)a=a.setPath(u.rest());else if(l<=t&&t<c)if("text"===r.object){var g=r.text.length;a=a.moveTo(q.PathUtils.create([t]),g).setKey(r.key)}else{var m=r.texts({direction:"backward"}),y=He(m,1)[0],E=He(y,2),S=E[0],_=E[1];a=a.moveTo(_,S.text.length).setKey(S.key)}else a=null;return i&&a?n=(n=n.setAnchor(i)).setFocus(a):null}var nt=function(e){function t(){var e,n,r;Ue(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=ze(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.tmp={nodeRefs:{}},ze(r,n)}return qe(t,e),je(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.node!==e.node}},{key:"render",value:function(){var e=this,t=this.props,n=t.editor,r=t.node,i=[],a=function(t){var a="text"===t.object?$e:"block"===t.object?et:Qe,s=i.length;i.push(o.a.createElement(a,{key:t.key,editor:n,node:t,parent:r,ref:function(t){t?e.tmp.nodeRefs[s]=t:delete e.tmp.nodeRefs[s]}}))},s=!0,u=!1,l=void 0;try{for(var c,f=r.nodes[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){a(c.value)}}catch(e){u=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return i}}]),t}(o.a.Component),rt=["auto","overlay","scroll"],ot=U&&!!window.navigator.userAgent.match(/os 11_/i);function it(e){if(!ot&&e.anchorNode){var t=H()(e.anchorNode),n=function(e,t){for(var n=e.parentNode,r=void 0;!r&&n.parentNode;){var o=t.getComputedStyle(n).overflowY;if(rt.includes(o)){r=n;break}n=n.parentNode}return r||t.document.body}(e.anchorNode,t),r=n===t.document.body||n===t.document.documentElement,o=Z()(e),i=e.getRangeAt(0).cloneRange();i.collapse(o);var a=i.getBoundingClientRect();F&&i.collapsed&&0===a.top&&0===a.height&&(0===i.startOffset?i.setEnd(i.endContainer,1):i.setStart(i.startContainer,i.startOffset-1),0===(a=i.getBoundingClientRect()).top&&0===a.height&&i.getClientRects().length&&(a=i.getClientRects()[0]));var s=void 0,u=void 0,l=void 0,c=void 0,f=0,d=0,h=0,p=0,v=0,g=0,m=0,y=0;if(r){s=t.innerWidth,u=t.innerHeight,l=t.pageYOffset,c=t.pageXOffset}else{var E=n.offsetWidth,S=n.offsetHeight,_=n.scrollTop,x=n.scrollLeft,A=t.getComputedStyle(n),N=A.borderTopWidth,w=A.borderBottomWidth,C=A.borderLeftWidth,b=A.borderRightWidth,O=A.paddingTop,M=A.paddingBottom,I=A.paddingLeft,T=A.paddingRight,P=n.getBoundingClientRect();s=E,u=S,f=P.top+parseInt(N,10),d=P.left+parseInt(C,10),h=parseInt(N,10)+parseInt(w,10),p=parseInt(C,10)+parseInt(b,10),v=parseInt(O,10),g=parseInt(M,10),m=parseInt(I,10),y=parseInt(T,10),l=_,c=x}var R=a.top+l-f,k=a.left+c-d,D=c,L=l;k<c?D=k-m:k+a.width+p>c+s&&(D=k+p+y-s),R<l?L=R-v:R+a.height+h>l+u&&(L=R+h+g+a.height-u),r?t.scrollTo(D,L):(n.scrollTop=L,n.scrollLeft=D)}}function at(e){if(B){var t=window.document.body.createTextRange();t.collapse(),t.select()}else e.removeAllRanges()}var st=/Permission denied to access property "nodeType"/,ut=X()("slate:content");ut.update=X()("slate:update");var lt=function(e){function t(){var e,n,r;Ue(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=ze(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.tmp={isUpdatingSelection:!1,nodeRef:o.a.createRef(),nodeRefs:{},contentKey:0,nativeSelection:{}},r.ref=o.a.createRef(),r.setRef=function(e){r.ref.current=e,r.props.editor.el=e,r.props.domRef&&r.props.domRef(e)},r.handlers=Me.reduce((function(e,t){return e[t]=function(e){return r.onEvent(t,e)},e}),{}),r.updateSelection=function(){if(r.ref.current){var e=r.props.editor;if(!e.isComposing()||!W){var t=e.value.selection,n=t.isBackward,o=window.getSelection(),i=window.document.activeElement;if(ut.update.enabled&&ut.update("updateSelection",{selection:t.toJSON()}),o){var a=o.rangeCount,s=o.anchorNode,u=!1;t.isBlurred&&i===r.ref.current&&(r.ref.current.blur(),u=!0);var l=!0,c=!0,f=!1,d=void 0;try{for(var h,p=["anchorNode","anchorOffset","focusNode","focusOffset","isCollapsed","rangeCount","type"][Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;r.tmp.nativeSelection[v]!==o[v]&&(l=!1)}}catch(e){f=!0,d=e}finally{try{!c&&p.return&&p.return()}finally{if(f)throw d}}if(t.isUnset&&a&&r.isInEditor(s)&&l&&(at(o),u=!0),t.isFocused&&i!==r.ref.current&&(r.ref.current.focus({preventScroll:!0}),u=!0),t.isFocused&&t.isSet){var g=!!o.rangeCount&&o.getRangeAt(0),m=ct(e,t);if(!m)return void ee(!1,"Unable to find a native DOM range from the current selection.");var y=m.startContainer,E=m.startOffset,S=m.endContainer,_=m.endOffset;if(g&&(y===g.startContainer&&E===g.startOffset&&S===g.endContainer&&_===g.endOffset||y===g.endContainer&&E===g.endOffset&&S===g.startContainer&&_===g.startOffset))return;u=!0,r.tmp.isUpdatingSelection=!0,at(o),o.setBaseAndExtent?n?o.setBaseAndExtent(m.endContainer,m.endOffset,m.startContainer,m.startOffset):o.setBaseAndExtent(m.startContainer,m.startOffset,m.endContainer,m.endOffset):o.addRange(m),!0===e.userActionPerformed()&&it(o),setTimeout((function(){L&&r.ref.current&&r.ref.current.focus(),r.tmp.isUpdatingSelection=!1,ut.update("updateSelection:setTimeout",{anchorOffset:window.getSelection().anchorOffset})}))}u&&(ut.enabled||ut.update.enabled)&&(ut("updateSelection",{selection:t,native:o,activeElement:i}),ut.update("updateSelection:applied",{selection:t.toJSON(),native:{anchorOffset:o.anchorOffset,focusOffset:o.focusOffset}}))}}}},r.isInEditor=function(e){var t=void 0;try{if(8===e.nodeType)return!1;t=3===e.nodeType?e.parentNode:e}catch(e){if(L&&st.test(e.message))return!1;throw e}return t.isContentEditable&&(t===r.ref.current||t.closest(Ve.EDITOR)===r.ref.current)},r.onNativeSelectionChange=ne()((function(e){if(!r.props.readOnly){var t=window.document.activeElement,n=window.getSelection();ut.update("onNativeSelectionChange",{anchorOffset:n.anchorOffset}),t===r.ref.current&&(r.tmp.nativeSelection={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset,isCollapsed:n.isCollapsed,rangeCount:n.rangeCount,type:n.type},r.props.onEvent("onSelect",e))}}),100),ze(r,n)}return qe(t,e),je(t,[{key:"componentDidCatch",value:function(e,t){console.error("!! COMPONENT DID CATCH"),console.error(e),console.error(t),ut("componentDidCatch",{error:e,info:t}),this.setState({})}},{key:"componentDidMount",value:function(){window.document.addEventListener("selectionchange",this.onNativeSelectionChange),W&&this.ref.current&&this.ref.current.addEventListener("beforeinput",this.handlers.onBeforeInput),this.updateSelection(),this.props.onEvent("onComponentDidMount")}},{key:"componentWillUnmount",value:function(){window&&window.document.removeEventListener("selectionchange",this.onNativeSelectionChange),W&&this.ref.current.removeEventListener("beforeinput",this.handlers.onBeforeInput),this.props.onEvent("onComponentWillUnmount")}},{key:"componentDidUpdate",value:function(){ut.update("componentDidUpdate"),this.updateSelection(),this.props.editor.clearUserActionPerformed(),this.props.onEvent("onComponentDidUpdate")}},{key:"onEvent",value:function(e,t){ut("onEvent",e);var n=t.nativeEvent||t,r="keydown"===t.type&&(de.isUndo(n)||de.isRedo(n));if(!this.tmp.isUpdatingSelection&&!r||"onSelect"!==e&&"onBlur"!==e&&"onFocus"!==e){if(!V&&"onSelect"===e){var o=this.props.editor,i=o.value.selection,a=window.getSelection(),s=o.findRange(a);if(s&&s.equals(i.toRange()))return void this.updateSelection()}if("onDragEnd"===e||"onDragEnter"===e||"onDragExit"===e||"onDragLeave"===e||"onDragOver"===e||"onDragStart"===e||"onDrop"===e)if(t.target.closest(Ve.EDITOR)!==this.ref.current)return;("onBeforeInput"!==e&&"onBlur"!==e&&"onCompositionEnd"!==e&&"onCompositionUpdate"!==e&&"onCompositionStart"!==e&&"onCopy"!==e&&"onCut"!==e&&"onFocus"!==e&&"onInput"!==e&&"onKeyDown"!==e&&"onKeyUp"!==e&&"onPaste"!==e&&"onSelect"!==e||this.isInEditor(t.target))&&this.props.onEvent(e,t)}}},{key:"render",value:function(){var e,n=this.props,r=this.handlers,i=n.id,a=n.className,s=n.readOnly,u=n.editor,l=n.tabIndex,c=n.role,f=n.tagName,d=n.spellCheck,h=n.onContextMenu,p=f,v=u.value.document,g=We({outline:"none",whiteSpace:"pre-wrap",wordWrap:"break-word"},s?{}:{WebkitUserModify:"read-write-plaintext-only"},n.style);ut("render",{props:n}),ut.update("render",this.tmp.contentKey,v.text),this.props.onEvent("onRender");var m=(Ke(e={},Ie,!0),Ke(e,Pe,v.key),e),y=oe()(this.props,Object.keys(t.__propTypes));return o.a.createElement(p,We({},y,{key:this.tmp.contentKey},r,m,{ref:this.setRef,contentEditable:!s||null,suppressContentEditableWarning:!0,id:i,className:a,autoCorrect:n.autoCorrect?"on":"off",spellCheck:d,style:g,role:s?null:c||"textbox",tabIndex:l,onContextMenu:h,"data-gramm":!!y["data-gramm"]&&void 0}),o.a.createElement(nt,{editor:u,node:v,ref:this.tmp.nodeRef}))}}]),t}(o.a.Component);function ct(e,t){try{return e.findDOMRange(t)}catch(e){console.error(e)}}lt.__propTypes={autoCorrect:Q.a.bool.isRequired,className:Q.a.string,contentKey:Q.a.number,editor:Q.a.object.isRequired,id:Q.a.string,onContextMenu:Q.a.func,onEvent:Q.a.func.isRequired,domRef:Q.a.func,readOnly:Q.a.bool.isRequired,role:Q.a.string,spellCheck:Q.a.bool.isRequired,style:Q.a.object,tabIndex:Q.a.number,tagName:Q.a.string},lt.defaultProps={style:{},tagName:"div"};var ft=[].concat(Je(Me),["commands","decorateNode","queries","renderAnnotation","renderBlock","renderDecoration","renderDocument","renderEditor","renderInline","renderMark","schema"]);function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ft.reduce((function(t,n){return n in e&&(t[n]=e[n]),t}),{});return t}function ht(){return{decorateNode:function(){return[]},renderAnnotation:function(e){var t=e.attributes,n=e.children;return o.a.createElement("span",t,n)},renderBlock:function(e){var t=e.attributes,n=e.children;return o.a.createElement("div",We({},t,{style:{position:"relative"}}),n)},renderDecoration:function(e){var t=e.attributes,n=e.children;return o.a.createElement("span",t,n)},renderDocument:function(e){return e.children},renderEditor:function(e){return e.children},renderInline:function(e){var t=e.attributes,n=e.children;return o.a.createElement("span",We({},t,{style:{position:"relative"}}),n)},renderMark:function(e){var t=e.attributes,n=e.children;return o.a.createElement("span",t,n)}}}function pt(e){return null==e?null:(null==e.closest&&(e=e.parentElement),e.hasAttribute(Ve.KEY)?e:e.closest(Ve.KEY))}function vt(e,t,n){try{return{failed:!1,value:n()}}catch(n){console.warn("Safely handling caught error, reconciling dom",n);var r=pt(t);if(null==r)return{failed:!0};var o=r.getAttribute(Pe),i=e.value.document.getNode(o);if(null==i)return{failed:!0};var a="block"===i.object?i:e.value.document.getClosestBlock(i.key);if(null==a)return{failed:!0};var s=e.value.document.nodes.indexOf(a),u=window.getSelection();if(null!=u&&u.isCollapsed&&a===i&&s>=0&&"DIV"===r.tagName&&1===r.childNodes.length&&(r.childNodes[0]===u.anchorNode||r===u.anchorNode)){console.log(" replacing entire line via dom text"),e.replaceNodeByKey(a.key,q.Block.create({type:"line",nodes:[q.Text.create({text:r.textContent})]}));var l={key:e.value.document.nodes.get(s).nodes.first().key,offset:u.anchorOffset};e.select(q.Range.create({anchor:l,focus:l}))}else console.log(" replacing entire line"),e.replaceNodeByKey(a.key,q.Block.create(a.toJSON()));return{failed:!0}}}function gt(e,t){var n=e.value,r=n.document,o=n.selection,i=r.getPath(t.key),a=e.findDOMNode(i),s=r.getClosestBlock(i),u=t.text,l=a.textContent,c=s.nodes.last()===t,f=l.charAt(l.length-1);if(c&&"\n"===f&&(l=l.slice(0,-1)),u.replace(/[\uFEFF\b]/g,"")!==l.replace(/[\uFEFF\b]/g,"")){var d=o.moveAnchorTo(i,0).moveFocusTo(i,u.length);d=r.resolveRange(d),console.warn("!! Forced to reconcile dom node :(("),e.insertTextAtRange(d,l.replace(/[\uFEFF\b]/g,""),t.marks)}}function mt(e,t){return vt(e,t,(function(){var n=t.parentElement.closest("[data-key]"),r=e.findNode(n);gt(e,r)})).value}function yt(){return{commands:{reconcileNode:gt,reconcileDOMNode:mt}}}function Et(){function e(e,t){t=q.PathUtils.create(t);var n=e.tmp.contentRef.current;if(!n)return null;if(!t.size)return n.ref.current||null;return function e(t,n){if(!t)return null;if(!n.size)return t.ref?t.ref.current||null:t||null;var r=n.first(),o=n.rest();return e(t.tmp.nodeRefs[r],o)}(n.tmp.nodeRef.current,t)}function t(t,n){var r=e(t,n.path),o=0;if(!r)return null;var i=Array.from(r.querySelectorAll(Ve.STRING+", "+Ve.ZERO_WIDTH)),a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value,d=f.childNodes[0],h=d.textContent.length,p=h;f.hasAttribute(ke)&&(p=parseInt(f.getAttribute(ke),10));var v=o+p;if(n.offset<=v)return{node:d,offset:Math.min(h,Math.max(0,n.offset-o))};o=v}}catch(e){s=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw u}}return null}function n(e,t){var n=e.tmp.contentRef.current,r=t;r.hasAttribute(Pe)||(r=r.closest(Ve.KEY));var o=null==r?null:r.getAttribute(Pe);if(!r||!o)return null;if(r===n.ref.current)return q.PathUtils.create([]);var i=e.value.document.getPath(o);if(i)return i;var a=function e(t,n){if(r===t)return n;if(!t.ref)return null;if(r===t.ref.current)return n;if(!t.tmp)return null;var o=t.tmp.nodeRefs,i=Object.keys(o),a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value,d=o[f],h=parseInt(f,10),p=e(d,[].concat(Je(n),[h]));if(p)return p}}catch(e){s=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw u}}return null}(n.tmp.nodeRef.current,[]);return a?q.PathUtils.create(a):null}function r(e,t,r){var o=function(e,t){if(1===e.nodeType&&e.childNodes.length){var n=0===t,r=n?"forward":"backward";for(e=St(e,n?t:t-1,r);1===e.nodeType&&e.childNodes.length;){var o=n?0:e.childNodes.length-1;e=St(e,o,r)}t=n?0:e.textContent.length}return{node:e,offset:t}}(t,r),i=o.node,a=o.offset,s=H()(t),u=i.parentNode,l=u.closest(Ve.LEAF),c=void 0,f=void 0,d=void 0;if(l){c=l.closest(Ve.TEXT);var h=s.document.createRange();h.setStart(c,0),h.setEnd(i,a);var p=h.cloneContents(),v=p.querySelectorAll(Ve.ZERO_WIDTH);Array.from(v).forEach((function(e){e.parentNode.removeChild(e)})),f=p.textContent.length,d=c}else{var g=u.closest(Ve.VOID);if(!g)return null;if(!(l=g.querySelector(Ve.LEAF)))return null;c=l.closest(Ve.TEXT),f=(d=l).textContent.length}f===d.textContent.length&&u.hasAttribute(Ge)&&f--;var m=n(e,c);return m?e.value.document.createPoint({path:m,offset:f}):null}function o(e,t){var n=t.anchorNode||t.startContainer;if(!n)return null;var o=H()(n);(t instanceof o.Range||o.StaticRange&&t instanceof o.StaticRange)&&(t={anchorNode:t.startContainer,anchorOffset:t.startOffset,focusNode:t.endContainer,focusOffset:t.endOffset});var i=t,a=i.anchorNode,s=i.anchorOffset,u=i.focusNode,l=i.focusOffset,c=i.isCollapsed,f=e.value,d=r(e,a,s),h=c?d:r(e,u,l);return d&&h?f.document.createRange({anchor:d,focus:h}):null}return{queries:{findDOMNode:e,findDOMPoint:t,findDOMRange:function(e,n){var r=n.anchor,o=n.focus,i=n.isBackward,a=n.isCollapsed,s=t(e,r),u=a?s:t(e,o);if(!s||!u)return null;var l=H()(s.node).document.createRange(),c=i?u:s,f=i?s:u;return l.setStart(c.node,c.offset),l.setEnd(f.node,f.offset),l},findEventRange:function(e,t){t.nativeEvent&&(t=t.nativeEvent);var r=t,i=r.clientX,a=r.clientY,s=r.target;if(null==i||null==a)return null;var u=e.value.document,l=n(e,t.target);if(!l)return null;var c=u.getNode(l);if(e.isVoid(c)){var f=s.getBoundingClientRect(),d="inline"===c.object?i-f.left<f.left+f.width-i:a-f.top<f.top+f.height-a,h=u.createRange(),p=d?"moveToEndOfNode":"moveToStartOfNode",v=u[d?"getPreviousText":"getNextText"](l);return v?h[p](v):null}var g=H()(s),m=void 0;if(g.document.caretRangeFromPoint)m=g.document.caretRangeFromPoint(i,a);else if(g.document.caretPositionFromPoint){var y=g.document.caretPositionFromPoint(i,a);(m=g.document.createRange()).setStart(y.offsetNode,y.offset),m.setEnd(y.offsetNode,y.offset)}else if(g.document.body.createTextRange){m=g.document.body.createTextRange();try{m.moveToPoint(i,a)}catch(e){return null}}return o(e,m)},findNode:function(e,t){var r=n(e,t);return r?e.value.document.getNode(r):null},findPath:n,findPoint:r,findRange:o,findSelection:function(e,t){var n=e.value,r=n.document;if(!t.rangeCount)return null;var i=o(e,t);if(!i)return null;var a=i,s=a.anchor,u=a.focus,l=r.getNode(s.path),c=r.getNode(u.path),f=r.getClosestInline(s.path),d=r.getClosestInline(u.path),h=r.getClosestBlock(u.path),p=r.getClosestBlock(s.path);if(p&&!e.isVoid(p)&&0===s.offset&&h&&e.isVoid(h)&&0!==u.offset&&(i=i.setFocus(u.setOffset(0))),f&&!e.isVoid(f)&&s.offset===l.text.length){var v=r.getClosestBlock(s.path),g=r.getDepth(v.key),m=q.PathUtils.drop(s.path,g),y=v.texts({path:m}),E=He(y,1)[0];if(E){var S=He(E,2)[1],_=s.path.slice(0,g).concat(S);i=i.moveAnchorTo(_,0)}}if(d&&!e.isVoid(d)&&u.offset===c.text.length){var x=r.getClosestBlock(u.path),A=r.getDepth(x.key),N=q.PathUtils.drop(u.path,A),w=x.texts({path:N}),C=He(w,1)[0];if(C){var b=He(C,2)[1],O=u.path.slice(0,A).concat(b);i=i.moveFocusTo(O,0)}}var M=r.createSelection(i);return M=(M=M.setIsFocused(!0)).set("marks",n.selection.marks)}}}}function St(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(8===o.nodeType||1===o.nodeType&&0===o.childNodes.length||1===o.nodeType&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],"forward"===n&&i++,"backward"===n&&i--);return o||null}var _t={FRAGMENT:"application/x-slate-fragment",HTML:"text/html",NODE:"application/x-slate-node",RICH:"text/rtf",TEXT:"text/plain"},xt=_t.FRAGMENT,At=_t.HTML,Nt=_t.TEXT;function wt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};Object(ye.default)(!q.Value.isValue(t),"As of Slate 0.42.0, the `cloneFragment` utility takes an `editor` instead of a `value`.");var r=H()(e.target),o=r.getSelection(),i=t.value,a=i.document,s=i.fragment,u=i.selection,l=u.start,c=u.end,f=a.getClosestVoid(l.path,t),d=a.getClosestVoid(c.path,t);if(!o.isCollapsed||f){var h=ge.serializeNode(s),p=o.getRangeAt(0),v=p.cloneContents(),g=v.childNodes[0];if(v.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(g=e)})),d){var m=p.cloneRange(),y=a.getPath(d.key);if(y){var E=t.findDOMNode(y);m.setEndAfter(E),v=m.cloneContents()}}if(f&&(g=v.childNodes[0].childNodes[1].firstChild),[].slice.call(v.querySelectorAll(Ve.ZERO_WIDTH)).forEach((function(e){var t="n"===e.getAttribute(Ge);e.textContent=t?"\n":""})),3===g.nodeType){var S=r.document.createElement("span");S.style.whiteSpace="pre",S.appendChild(g),v.appendChild(S),g=S}g.setAttribute(Te,h);var _=q.Value.create({document:s}),x=me.default.serialize(_),A=r.document.createElement("div");if(A.appendChild(v),e.clipboardData&&e.clipboardData.setData&&!B)return e.preventDefault(),e.clipboardData.setData(Nt,x),e.clipboardData.setData(xt,h),e.clipboardData.setData(At,A.innerHTML),void n();var N=e.target.closest(Ve.EDITOR);A.setAttribute("contenteditable",!0),A.style.position="absolute",A.style.left="-9999px",N.appendChild(A),o.selectAllChildren(A),r.requestAnimationFrame((function(){N.removeChild(A),at(o),o.addRange(p),n()}))}}var Ct=_t.FRAGMENT,bt=_t.HTML,Ot=_t.NODE,Mt=_t.RICH,It=_t.TEXT,Tt=/ data-slate-fragment="([^\s"]+)"/;function Pt(e){!B&&e.nativeEvent&&(e=e.nativeEvent);var t=e.dataTransfer||e.clipboardData,n=Rt(t,Ct),r=Rt(t,Ot),o=Rt(t,bt),i=Rt(t,Mt),a=Rt(t,It),s=void 0;if(!n&&o&&~o.indexOf(" "+Te+'="')){var u=Tt.exec(o),l=He(u,2),c=(l[0],l[1]);c&&(n=c)}if(a){var f=function(e){var t="SLATE-DATA-EMBED::";if(e.substring(0,t.length)!==t)return{TEXT:e};try{return JSON.parse(e.substring(t.length))}catch(e){throw new Error("Unable to parse custom Slate drag event data.")}}(a);f[Ct]&&(n=f[Ct]),f[Ot]&&(r=f[Ot]),f[It]&&(a=f[It])}n&&(n=ge.deserializeNode(n)),r&&(r=ge.deserializeNode(r));try{t.items&&t.items.length?s=Array.from(t.items).map((function(e){return"file"===e.kind?e.getAsFile():null})).filter((function(e){return e})):t.files&&t.files.length&&(s=Array.from(t.files))}catch(e){t.files&&t.files.length&&(s=Array.from(t.files))}var d={files:s,fragment:n,html:o,node:r,rich:i,text:a};return d.type=function(e){return e.fragment?"fragment":e.node?"node":e.rich&&e.html?"html":e.rich&&e.text?"text":e.files&&e.files.length?"files":e.html?"html":e.text?"text":"unknown"}(d),d}function Rt(e,t){return e.types&&e.types.length?-1!==Array.from(e.types).indexOf(t)&&e.getData(t)||null:t===It&&e.getData("Text")||null}var kt=_t.TEXT;function Dt(e,t,n){var r=_t[t.toUpperCase()];if(!r)throw new Error('Cannot set unknown transfer type "'+r+'".');e.nativeEvent&&(e=e.nativeEvent);var o=e.dataTransfer||e.clipboardData;try{o.setData(r,n),o.setData("text",o.getData("text"))}catch(e){var i="SLATE-DATA-EMBED::",a=o.getData(kt),s={};if(a.substring(0,i.length)===i)try{s=JSON.parse(a.substring(i.length))}catch(e){throw new Error("Failed to parse Slate data from `DataTransfer` object.")}else s[kt]=a;s[r]=n;var u=""+i+JSON.stringify(s);o.setData(kt,u)}}var Lt=X()("slate:after");function Ft(){var e=null,t=!1;return{onBeforeInput:function(e,t,n){var r=t.value,o=e.getTargetRanges(),i=He(o,1)[0];if(!i)return n();Lt("onBeforeInput",{event:e}),e.preventDefault();var a=r.document,s=r.selection,u=t.findRange(i);switch(e.inputType){case"deleteByDrag":case"deleteByCut":case"deleteContent":case"deleteContentBackward":case"deleteContentForward":t.deleteAtRange(u);break;case"deleteWordBackward":t.deleteWordBackwardAtRange(u);break;case"deleteWordForward":t.deleteWordForwardAtRange(u);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":t.deleteLineBackwardAtRange(u);break;case"deleteSoftLineForward":case"deleteHardLineForward":t.deleteLineForwardAtRange(u);break;case"insertLineBreak":case"insertParagraph":a.hasVoidParent(s.start.path,t)?t.moveToStartOfNextText():t.splitBlockAtRange(u);break;case"insertFromYank":case"insertReplacementText":case"insertText":var l=null==e.data?e.dataTransfer.getData("text/plain"):e.data;if(null==l)break;t.insertTextAtRange(u,l,s.marks),s.marks&&r.document!==t.value.document&&t.select({marks:null})}n()},onBlur:function(e,t,n){Lt("onBlur",{event:e}),t.blur(),n()},onClick:function(e,t,n){if(t.readOnly)return n();var r=t.value.document,o=t.findPath(e.target);if(!o)return n();Lt("onClick",{event:e});var i=r.getNode(o),a=r.getAncestors(o);i&&(t.isVoid(i)||a.some((function(e){return t.isVoid(e)})))&&t.focus().moveToEndOfNode(i),n()},onCopy:function(e,t,n){Lt("onCopy",{event:e}),wt(e,t),n()},onCut:function(e,t,n){Lt("onCut",{event:e}),wt(e,t,(function(){var e=t.value,n=e.document,r=e.selection,o=r.end,i=void 0;if(r.isCollapsed){var a=!0,s=!1,u=void 0;try{for(var l,c=n.ancestors(o.path)[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value,d=He(f,2),h=d[0],p=d[1];if(t.isVoid(h)){i=p;break}}}catch(e){s=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw u}}}i?t.removeNodeByKey(i):t.delete()})),n()},onDragEnd:function(t,n,r){Lt("onDragEnd",{event:t}),e=null,r()},onDragStart:function(t,n,r){Lt("onDragStart",{event:t}),e=!0;var o=n.value,i=o.document,a=n.findPath(t.target),s=i.getNode(a),u=i.getAncestors(a),l=s&&(n.isVoid(s)||u.some((function(e){return n.isVoid(e)}))),c=o.blocks.some((function(e){return e===s}));l&&!c&&n.moveToRangeOfNode(s);var f=n.value.fragment;Dt(t,"fragment",ge.serializeNode(f)),r()},onDrop:function(t,n,r){var o=n.value,i=o.document,a=o.selection,s=H()(t.target),u=n.findEventRange(t);if(!u)return r();Lt("onDrop",{event:t});var l=Pt(t),c=l.type,f=l.fragment,d=l.text;n.focus();var h=n.findDOMNode(u.focus.path);h&&h.dispatchEvent(new MouseEvent("mouseup",{view:s,bubbles:!0,cancelable:!0}));var p=a;if(n.select(u),e&&n.deleteAtRange(p),"text"===c||"html"===c){var v=u.anchor,g=i.hasVoidParent(v.path,n);if(g){for(var m=v.path,y=i.getNode(v.path);g;){var E=i.texts({path:m}),S=He(E,1)[0];if(!S)break;var _=He(S,2);y=_[0],m=_[1],g=i.hasVoidParent(m,n)}y&&n.moveToStartOfNode(y)}d&&d.split("\n").forEach((function(e,t){t>0&&n.splitBlock(),n.insertText(e)}))}"fragment"===c&&n.insertFragment(f),r()},onFocus:function(e,n,r){Lt("onFocus",{event:e}),!t||B||G?n.focus():n.deselect().focus(),r()},onInput:function(e,t,n){Lt("onInput");var r=H()(e.target),o=r.getSelection(),i=t.findSelection(o);i?t.select(i):t.blur(),r.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterOnInput:",JSON.stringify(t.value.selection.toJSON()));var a=o.anchorNode;t.reconcileDOMNode(a),r.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterReconci:",JSON.stringify(t.value.selection.toJSON())),r.ENABLE_SLATE_LOGGING&&console.log(" editor: len: "+t.value.document.text.length+" selSlate: "+t.value.selection.anchor.offset+" selNative: "+r.getSelection().anchorOffset+" document: "+JSON.stringify(t.value.document.toJSON())),n()},onKeyDown:function(e,t,n){Lt("onKeyDown",{event:e});var r=t.value,o=r.document,i=r.selection,a=i.start,s=o.getClosestBlock(a.path),u=null!=s&&"rtl"===s.getTextDirection();return de.isDeleteBackward(e)&&!U?t.deleteCharBackward():de.isDeleteForward(e)&&!U?t.deleteCharForward():de.isDeleteLineBackward(e)?t.deleteLineBackward():de.isDeleteLineForward(e)?t.deleteLineForward():de.isDeleteWordBackward(e)?t.deleteWordBackward():de.isDeleteWordForward(e)?t.deleteWordForward():de.isRedo(e)?t.redo():de.isUndo(e)?t.undo():de.isMoveLineBackward(e)?(e.preventDefault(),u?t.moveToEndOfBlock():t.moveToStartOfBlock()):de.isMoveLineForward(e)?(e.preventDefault(),u?t.moveToStartOfBlock():t.moveToEndOfBlock()):de.isExtendLineBackward(e)?(e.preventDefault(),u?t.moveFocusToEndOfBlock():t.moveFocusToStartOfBlock()):de.isExtendLineForward(e)?(e.preventDefault(),u?t.moveFocusToStartOfBlock():t.moveFocusToEndOfBlock()):de.isMoveBackward(e)?(e.preventDefault(),i.isCollapsed?u?t.moveForward():t.moveBackward():u?t.moveToEnd():t.moveToStart()):de.isMoveForward(e)?(e.preventDefault(),i.isCollapsed?u?t.moveBackward():t.moveForward():u?t.moveToStart():t.moveToEnd()):de.isMoveWordBackward(e)?(e.preventDefault(),u?t.moveWordForward():t.moveWordBackward()):de.isMoveWordForward(e)?(e.preventDefault(),u?t.moveWordBackward():t.moveWordForward()):!u&&de.isExtendBackward(e)||u&&de.isExtendForward(e)?(e.preventDefault(),t.moveFocusBackward()):!u&&de.isExtendForward(e)||u&&de.isExtendBackward(e)?(e.preventDefault(),t.moveFocusForward()):void n()},onMouseDown:function(e,n,r){Lt("onMouseDown",{event:e}),t=!0,r()},onMouseUp:function(e,n,r){Lt("onMouseUp",{event:e}),t=!1,r()},onPaste:function(e,t,n){Lt("onPaste",{event:e});var r=t.value,o=Pt(e),i=o.type,a=o.fragment,s=o.text;if("fragment"===i&&t.insertFragment(a),"text"===i||"html"===i){if(!s)return n();var u=r.document,l=r.selection,c=r.startBlock;if(t.isVoid(c))return n();var f=c,d=u.getInsertMarksAtRange(l),h=me.default.deserialize(s,{defaultBlock:f,defaultMarks:d}).document;t.insertFragment(h)}n()},onSelect:function(e,n,r){Lt("onSelect",{event:e});var o=H()(e.target),i=o.getSelection(),a=n.findSelection(i);o.ENABLE_SLATE_LOGGING&&i&&n.value.selection.anchor&&a&&a.anchor&&console.log("!! onSelect domOffset:"+i.anchorOffset+" oldSlate: "+n.value.selection.anchor.offset+" newSlate: "+a.anchor.offset),a?n.select(a):n.blur(),t=!1,r()}}}function Bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;q.Node.isNode(e)&&(e=e.key);var n=t.document.querySelector("["+Pe+'="'+e+'"]');if(!n)throw new Error('Unable to find a DOM node for "'+e+'". This is often because of forgetting to add `props.attributes` to a custom component.');return n}var Gt=X()("slate:before");function Vt(){var e=null,t=!1,n=!1,r=!1,o=!1,i=null,a=null;function s(e){window.ENABLE_SLATE_LOGGING&&console.log("!! syncDomToSlateAst");var t=i||[];if(i=null,f(e,t),0===t.length)return!1;var n=window.getSelection(),r=n.anchorNode,o=n.anchorOffset;window.ENABLE_SLATE_LOGGING&&console.log(" textNode: "+r.textContent+" "+r.textContent.length);var a=!1,s=function(t){vt(e,t,(function(){return function(e,t){var n=t.getAttribute(Pe);t=Bt(n);var r=e.value.document.getPath(n),o=e.value.document.getNode(n);(function(e,t){var n=t.querySelectorAll(Ve.STRING+", "+Ve.ZERO_WIDTH),r=!0,o=!1,i=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,l=u.hasAttribute(Be),c=u.hasAttribute(Ge);if(l||c){var f=u.textContent.indexOf("\ufeff")>=0;(l&&f||c&&"\ufeff"!==u.textContent)&&(window.ENABLE_SLATE_LOGGING&&console.log(" REPLACING "+u.childNodes.length),function e(t,n){var r=!0,o=!1,i=void 0;try{for(var a,s=t.childNodes[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;1===u.nodeType?e(u,n):3===u.nodeType&&n(u)}}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}}(u,(function(e){for(;;){var t=e.textContent.indexOf("\ufeff");if(-1===t)break;e.deleteData(t,1)}})),u.removeAttribute(Ge),u.removeAttribute(ke))}}}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}})(0,t),window.ENABLE_SLATE_LOGGING&&console.log(" slateDomSpan: "+t.textContent+" "+t.textContent.length);window.ENABLE_SLATE_LOGGING&&console.log(" slateAstNode: "+o.text+" "+o.text.length);window.ENABLE_SLATE_LOGGING&&console.log(" flush selBeforeInsert:",JSON.stringify(e.value.selection.toJSON()));window.ENABLE_SLATE_LOGGING&&console.log(" editor: len: "+e.value.document.text.length+" selSlate: "+e.value.selection.anchor.offset+" selNative: "+window.getSelection().anchorOffset+" document: "+JSON.stringify(e.value.document.toJSON()));var i=t.textContent.replace(/[\uFEFF\b]/g,"");!function(e,t,n,r){var o=t.text;if(r===o)return;var i=t.key,a=function(e,t){for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return n;return Math.min(e.length,t.length)}(r,o),s=function(e,t){for(var n=e.length,r=t.length,o=0;o<n&&o<r;o++)if(e[n-o-1]!==t[r-o-1])return o;return Math.min(n,r)}(r.substring(a),o.substring(a));if(a+s!==o.length)e.insertTextAtRange(q.Range.create({anchor:{path:n,key:i,offset:0},focus:{path:n,key:i,offset:t.text.length}}),r);else{var u=r.substring(a,r.length-s);e.controller.fastInsertText(n,a,u,null)}}(e,o,r,i)}(e,t)})).failed&&(a=!0)},u=!0,l=!1,c=void 0;try{for(var d,h=t[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){s(d.value)}}catch(e){l=!0,c=e}finally{try{!u&&h.return&&h.return()}finally{if(l)throw c}}return window.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterInsert :",JSON.stringify(e.value.selection.toJSON())),window.ENABLE_SLATE_LOGGING&&console.log(" editor: len: "+e.value.document.text.length+" selSlate: "+e.value.selection.anchor.offset+" selNative: "+o+" document: "+JSON.stringify(e.value.document.toJSON())),a?void 0:(vt(e,r,(function(){return function(e,t,n){var r=Math.min(t.textContent.length,n),o=e.findPoint(t,r);if(null==o)throw Error("Unable to translate dom position to slate position!");(function(e,t,n,r){var o=e.value.selection;if(!o.isCollapsed||o.anchor.key!==n||o.anchor.offset!==r){var i={path:t,key:n,offset:r};e.select(q.Range.create({anchor:i,focus:i}))}})(e,o.path,o.key,o.offset),window.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterSelect1:",JSON.stringify(e.value.selection.toJSON()));!function(e,t){var n=window.getSelection();null!=n&&n.anchorNode===e&&n.focusNode===e&&n.anchorOffset===t&&n.focusOffset===t||n.collapse(e,t)}(t,r)}(e,r,o)})),window.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterSelect2:",JSON.stringify(e.value.selection.toJSON())),mt(e,r),window.ENABLE_SLATE_LOGGING&&console.log(" flush selAfterReconci:",JSON.stringify(e.value.selection.toJSON())),window.ENABLE_SLATE_LOGGING&&console.log(" editor: len: "+e.value.document.text.length+" selSlate: "+e.value.selection.anchor.offset+" selNative: "+window.getSelection().anchorOffset+" document: "+JSON.stringify(e.value.document.toJSON())),!0)}function u(e){i||(i=[]),f(e,i)}function l(){var e=window.getSelection();a=null==e?null:e.anchorNode}function c(){return t&&(null==a&&(t=!1),window.document.body.contains(a)||(console.warn("Aborting composition because previously selection node is no longer in the dom!"),t=!1)),t}function f(e,t){var n=pt(window.getSelection().anchorNode);-1===t.indexOf(n)&&t.push(n)}return{onBeforeInput:function(e,t,n){if(t.ensureSelection(),window.ENABLE_SLATE_LOGGING&&console.log("!! onBeforeInput with data:"+JSON.stringify(e.data)+" inputType:"+e.inputType+" has2:"+W+" isSynthetic:"+!!e.nativeEvent),!c()){var r=!!e.nativeEvent;if(!t.readOnly&&(o=!0,!r||!W))if(r){var i=t.value.selection.isCollapsed;i||t.delete();var a=(e.data||"").replace(/\n\r/g,"\n").replace(/\r/g,"\n"),s=a.indexOf("\n")>=0;if(i&&!s)u(t);else if(e.preventDefault(),s){var l=a.split("\n");l.map((function(e,n){0!==e.length&&(window.ENABLE_SLATE_LOGGING&&console.log(" insert: |"+JSON.stringify(e)+"|"),t.insertText(e,null,!1)),n!==l.length-1&&(window.ENABLE_SLATE_LOGGING&&console.log(" inserting line break"),t.splitBlock())}))}else t.insertText(e.data,null,!1)}else Gt("onBeforeInput",{event:e}),n()}},onBlur:function(t,r,o){if(!n&&!r.readOnly){var i=t.relatedTarget,a=t.target,s=H()(a);if(e!==s.document.activeElement){if(i){var u=r.findDOMNode([]);if(i===u)return;if(i.hasAttribute(Fe))return;var l=r.findNode(i);if(null!=u&&u.contains(i)&&l&&!r.isVoid(l))return}Gt("onBlur",{event:t}),o()}}},onClick:function(e,t,n){Gt("onClick",{event:e}),o=!0,n()},onCompositionEnd:function(e,n,r){window.ENABLE_SLATE_LOGGING&&console.log("!! onCompositionEnd isComposing:"+t),o=!0,t=!1,l(),u(n),s(n),Gt("onCompositionEnd",{event:e}),r()},onCompositionUpdate:function(){window.ENABLE_SLATE_LOGGING&&console.log("!! onCompositionUpdate isComposing:"+t),t=!0,l()},onCompositionStart:function(e,n,r){n.ensureSelection(),window.ENABLE_SLATE_LOGGING&&console.log("!! onCompositionStart isComposing:"+t+" isCollapsed:"+n.value.selection.isCollapsed),t=!0;var i=n.value.selection;o=!0,i.isCollapsed||n.delete(),l(),u(n),Gt("onCompositionStart",{event:e}),r()},onCopy:function(e,t,r){var o=H()(e.target);n=!0,o.requestAnimationFrame((function(){return n=!1})),Gt("onCopy",{event:e}),r()},onCut:function(e,t,r){if(!t.readOnly){var o=H()(e.target);n=!0,o.requestAnimationFrame((function(){return n=!1})),Gt("onCut",{event:e}),r()}},onDragEnd:function(e,t,n){r=!1,Gt("onDragEnd",{event:e}),n()},onDragEnter:function(e,t,n){Gt("onDragEnter",{event:e}),n()},onDragExit:function(e,t,n){Gt("onDragExit",{event:e}),n()},onDragLeave:function(e,t,n){Gt("onDragLeave",{event:e}),n()},onDragOver:function(e,t,n){var o=t.findNode(e.target);o&&!t.isVoid(o)||e.preventDefault(),B&&e.preventDefault(),r||(r=!0,B||(e.nativeEvent.dataTransfer.dropEffect="move")),Gt("onDragOver",{event:e}),n()},onDragStart:function(e,t,n){r=!0,Gt("onDragStart",{event:e}),n()},onDrop:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Gt("onDrop",{event:e}),n())},onFocus:function(t,r,o){if(!n&&!r.readOnly){var i=r.findDOMNode([]),a=H()(t.target);e=a.document.activeElement,L&&null!=t&&null!=i&&t.target!==i?i.focus():(Gt("onFocus",{event:t}),o())}},onInput:function(e,n,r){if(n.ensureSelection(),window.ENABLE_SLATE_LOGGING&&console.log("!! onInput isComposing:"+t+" hasOp:"+!!i),c()){if(W)return;return u(n),void s(n)}s(n)||n.value.selection.isBlurred||(o=!0,Gt("onInput",{event:e}),r())},onKeyDown:function(e,n,r){if(!n.readOnly)if(n.ensureSelection(),window.ENABLE_SLATE_LOGGING&&console.log("!! onKeyDown isComposing:"+t+" hasOp:"+!!i+" mods:"+(e.ctrlKey?"ctrl-":"")+(e.altKey?"alt-":"")+(e.shiftKey?"shift-":"")+(e.metaKey?"meta-":"")+" key:"+e.key+" which:"+e.which),c())de.isCompose(e)&&e.preventDefault();else{if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||null==e.key))switch(e.key.toLowerCase()){case"arrowdown":case"arrowleft":case"arrowright":case"arrowup":case"pageup":case"pagedown":case"backspace":case"delete":case"insert":case"home":case"end":case"enter":case"tab":case"space":break;default:return}!U&&(de.isBold(e)||de.isDeleteBackward(e)||de.isDeleteForward(e)||de.isDeleteLineBackward(e)||de.isDeleteLineForward(e)||de.isDeleteWordBackward(e)||de.isDeleteWordForward(e)||de.isItalic(e)||de.isRedo(e)||de.isTransposeCharacter(e)||de.isUndo(e))&&e.preventDefault(),o=!0,Gt("onKeyDown",{event:e}),r()}},onPaste:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Gt("onPaste",{event:e}),n())},onSelect:function(t,r,i){if(!n&&!(r.readOnly||c()&&W)){var a=H()(t.target);e=a.document.activeElement,o=!0,Gt("onSelect",{event:t}),i()}},queries:{userActionPerformed:function(){return o},isComposing:c},commands:{clearUserActionPerformed:function(){return o=!1,null}}}}function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t;return[Vt()].concat(Je(n),[Ft()])}function jt(e){var t=e.nativeEvent||e;switch(t.type){case"keydown":return t.type+" "+JSON.stringify(t.key);case"input":case"beforeinput":case"textInput":return t.type+":"+t.inputType+" "+JSON.stringify(t.data);default:return t.type}}var Kt=X()("slate:events");function Wt(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=Me[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){e[o.value]=function(e,t,n){var r=jt(e);Kt(r),n()}}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}return e}var qt=X()("slate:batch-events");function zt(){var e=null,t=null,n=[];function r(){qt("\n"+n.join("\n")),n.length=0}function o(o){0===n.length&&(e=new Date);var i=jt(o),a=new Date;n.push("- "+(a-e)+" - "+i),clearTimeout(t),t=setTimeout(r,2e3)}var i={},a=!0,s=!1,u=void 0;try{for(var l,c=Me[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){i[l.value]=function(e,t,n){o(e),n()}}}catch(e){s=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw u}}return i}var Ht=X()("slate:mutations"),Jt=["type","oldValue","target","addedNodes","removedNodes","attributeName","attributeNamespace","nextSibling","previousSibling"];function Zt(e){if(e.nodeType===window.Node.TEXT_NODE)return e.textContent;if(e.nodeType===window.Node.ELEMENT_NODE){var t=e.outerHTML,n=e.innerHTML;return null==t?JSON.stringify(e.textContent):t.slice(0,t.indexOf(n))}return"Node(type="+e.nodeType}function Yt(){var e=new window.MutationObserver((function(e){var t=Array.from(e).map((function(e){var t={};return Jt.forEach((function(n){var r=e[n];if(null!=r)if(r instanceof window.NodeList){if(0===r.length)return;t[n]=Array.from(r).map(Zt).join(", ")}else r instanceof window.Node&&(r=Zt(r)),t[n]=r})),t}));Ht.apply(void 0,[t.length+" Mutations"].concat(Je(t)))})),t=null;function n(n,r,o){var i=r.findDOMNode([]);if(i===t)return o();Ht("start"),e.observe(i,{childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0}),t=i,o()}return{onComponentDidMount:n,onComponentDidUpdate:n,onComponentWillUnmount:function(n,r,o){Ht("stop"),e.disconnect(),t=null,o()}}}function Xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.placeholder,n=void 0===t?"":t,r=X.a.enabled("slate:events")?Wt():null,o=X.a.enabled("slate:batch-events")?zt():null,i=X.a.enabled("slate:mutations")?Yt():null,a=ht(),s=yt(),u=Et(),l=dt(e),c=Ut(e),f={commands:{restoreDOM:function(e){var t=e.tmp.contentRef.current.tmp;t.contentKey=t.contentKey+1}}},d=V||null===n?null:Ne({placeholder:n,when:function(e,t){return"document"===t.object&&""===t.text&&1===t.nodes.size&&1===Array.from(t.texts()).length}});return[r,o,i,l,c,f,d,a,s,u]}var $t=X()("slate:editor"),Qt=function(e){function t(){var e,n,r;Ue(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=ze(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={value:r.props.defaultValue,contentKey:0},r.tmp={mounted:!1,change:null,resolves:0,updates:0,contentRef:o.a.createRef()},r.resolveController=Oe((function(){var e=arguments[5];ee(r.tmp.resolves<5||r.tmp.resolves!==r.tmp.updates,"A Slate <Editor> component is re-resolving the `plugins`, `schema`, `commands`, `queries` or `placeholder` prop on each update, which leads to poor performance. This is often due to passing in a new references for these props with each render by declaring them inline in your render function. Do not do this! Declare them outside your render function, or memoize them instead."),r.tmp.resolves++;var t=e(We({},r.props,{editor:r,value:r.props.value||r.state.value})),n=function(e){r.tmp.mounted?r.handleChange(e):r.tmp.change=e};r.controller=new q.Editor({plugins:[t],onChange:n},{controller:r,construct:!1}),r.controller.run("onConstruct")})),ze(r,n)}return qe(t,e),je(t,[{key:"componentDidMount",value:function(){this.tmp.mounted=!0,this.tmp.updates++,this.props.autoFocus&&this.focus(),this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentDidUpdate",value:function(){this.tmp.updates++,this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentWillUnmount",value:function(){this.tmp.mounted=!1}},{key:"render",value:function(){var e=this;$t("render",this);var n=this.props,r=n.commands,i=n.placeholder,a=n.plugins,s=n.queries,u=n.schema;this.resolveController(a,u,r,s,i,Xt);var l=this.props,c=l.options,f=l.readOnly,d=l.value,h=this.state.value,p=d||h,v=this.state.contentKey;this.controller.setReadOnly(f),this.controller.setValue(p,c);var g=this.props,m=g.autoCorrect,y=g.className,E=g.id,S=g.role,_=g.spellCheck,x=g.tabIndex,A=g.style,N=g.tagName,w=g.onContextMenu,C=oe()(this.props,Object.keys(t.__propTypes)),b=o.a.createElement(lt,We({},C,{ref:this.tmp.contentRef,autoCorrect:m,className:y,contentKey:v,editor:this,id:E,onContextMenu:w,onEvent:function(t,n){return e.run(t,n)},readOnly:f,role:S,spellCheck:_,style:A,tabIndex:x,tagName:N}));return this.controller.run("renderEditor",We({},this.props,{editor:this,children:b}))}},{key:"handleChange",value:function(e){var t=this.props.onChange;this.state.value&&this.setState({value:e.value}),t(e)}},{key:"applyOperation",value:function(){var e;return(e=this.controller).applyOperation.apply(e,arguments)}},{key:"command",value:function(){var e;return(e=this.controller).command.apply(e,arguments)}},{key:"hasCommand",value:function(){var e;return(e=this.controller).hasCommand.apply(e,arguments)}},{key:"hasQuery",value:function(){var e;return(e=this.controller).hasQuery.apply(e,arguments)}},{key:"normalize",value:function(){var e;return(e=this.controller).normalize.apply(e,arguments)}},{key:"query",value:function(){var e;return(e=this.controller).query.apply(e,arguments)}},{key:"registerCommand",value:function(){var e;return(e=this.controller).registerCommand.apply(e,arguments)}},{key:"registerQuery",value:function(){var e;return(e=this.controller).registerQuery.apply(e,arguments)}},{key:"run",value:function(){var e;return(e=this.controller).run.apply(e,arguments)}},{key:"withoutNormalizing",value:function(){var e;return(e=this.controller).withoutNormalizing.apply(e,arguments)}},{key:"call",value:function(){var e;return(e=this.controller).call.apply(e,arguments)}},{key:"change",value:function(){var e;return(e=this.controller).change.apply(e,arguments)}},{key:"onChange",value:function(){var e;return(e=this.controller).onChange.apply(e,arguments)}},{key:"applyOperations",value:function(){var e;return(e=this.controller).applyOperations.apply(e,arguments)}},{key:"setOperationFlag",value:function(){var e;return(e=this.controller).setOperationFlag.apply(e,arguments)}},{key:"getFlag",value:function(){var e;return(e=this.controller).getFlag.apply(e,arguments)}},{key:"unsetOperationFlag",value:function(){var e;return(e=this.controller).unsetOperationFlag.apply(e,arguments)}},{key:"withoutNormalization",value:function(){var e;return(e=this.controller).withoutNormalization.apply(e,arguments)}},{key:"operations",get:function(){return this.controller.operations}},{key:"readOnly",get:function(){return this.controller.readOnly}},{key:"value",get:function(){return this.controller.value}},{key:"editor",get:function(){return this.controller.editor}},{key:"schema",get:function(){Object(ye.default)(!1,"As of Slate 0.42, the `editor.schema` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}},{key:"stack",get:function(){Object(ye.default)(!1,"As of Slate 0.42, the `editor.stack` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}}]),t}(o.a.Component);function en(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;ee(!1,"As of slate-react@0.22 the `findDOMPoint(point)` helper is deprecated in favor of `editor.findDOMPoint(point)`.");var n=Bt(e.key,t),r=0,o=Array.from(n.querySelectorAll(Ve.STRING+", "+Ve.ZERO_WIDTH)),i=!0,a=!1,s=void 0;try{for(var u,l=o[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value,f=c.childNodes[0],d=f.textContent.length,h=d;c.hasAttribute(ke)&&(h=parseInt(c.getAttribute(ke),10));var p=r+h;if(e.offset<=p){var v=Math.min(d,Math.max(0,e.offset-r));return{node:f,offset:v}}r=p}}catch(e){a=!0,s=e}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}return null}function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;ee(!1,"As of slate-react@0.22 the `findDOMRange(range)` helper is deprecated in favor of `editor.findDOMRange(range)`.");var n=e.anchor,r=e.focus,o=e.isBackward,i=e.isCollapsed,a=en(n,t),s=i?a:en(r,t);if(!a||!s)return null;var u=t.document.createRange(),l=o?s:a,c=o?a:s;return u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset),u}function nn(e,t){ee(!1,"As of slate-react@0.22 the `findNode(element)` helper is deprecated in favor of `editor.findNode(element)`."),Object(ye.default)(!q.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.closest(Ve.KEY);if(!n)return null;var r=n.getAttribute(Pe);return r&&t.value.document.getNode(r)||null}function rn(e,t){ee(!1,"As of slate-react@0.22 the `findPath(element)` helper is deprecated in favor of `editor.findPath(element)`.");var n=nn(e,t);return n?t.value.document.getPath(n):null}function on(e,t,n){ee(!1,"As of slate-react@0.22 the `findPoint(node, offset)` helper is deprecated in favor of `editor.findPoint(node, offset)`."),Object(ye.default)(!q.Value.isValue(n),"As of Slate 0.42.0, the `findPoint` utility takes an `editor` instead of a `value`.");var r=function(e,t){if(1===e.nodeType&&e.childNodes.length){var n=t===e.childNodes.length,r=n?"backward":"forward";for(e=an(e,n?t-1:t,r);1===e.nodeType&&e.childNodes.length;){var o=n?e.childNodes.length-1:0;e=an(e,o,r)}t=n?e.textContent.length:0}return{node:e,offset:t}}(e,t),o=r.node,i=r.offset,a=H()(e),s=o.parentNode,u=s.closest(Ve.LEAF),l=void 0,c=void 0;if(u){var f=a.document.createRange(),d=u.closest(Ve.TEXT);f.setStart(d,0),f.setEnd(o,i),c=d;var h=f.cloneContents(),p=h.querySelectorAll("["+Ge+"]");l=h.textContent.length-p.length}else{var v=s.closest(Ve.VOID);if(!v)return null;if(!(u=v.querySelector(Ve.LEAF)))return null;l=(c=u).textContent.length}l===c.textContent.length&&s.hasAttribute(Ge)&&l--;var g=u.getAttribute(Le);if(!g)return null;var m=Ye.parse(g).key,y=n.value;return y.document.hasDescendant(m)?y.document.createPoint({key:m,offset:l}):null}function an(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(8===o.nodeType||1===o.nodeType&&0===o.childNodes.length||1===o.nodeType&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],"forward"===n&&i++,"backward"===n&&i--);return o||null}function sn(e,t){ee(!1,"As of slate-react@0.22 the `findRange(selection)` helper is deprecated in favor of `editor.findRange(selection)`."),Object(ye.default)(!q.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.anchorNode||e.startContainer;if(!n)return null;var r=H()(n);(e instanceof r.Range||r.StaticRange&&e instanceof r.StaticRange)&&(e={anchorNode:e.startContainer,anchorOffset:e.startOffset,focusNode:e.endContainer,focusOffset:e.endOffset});var o=e,i=o.anchorNode,a=o.anchorOffset,s=o.focusNode,u=o.focusOffset,l=o.isCollapsed,c=t.value,f=on(i,a,t),d=l?f:on(s,u,t);return f&&d?c.document.createRange({anchor:f,focus:d}):null}function un(e,t){ee(!1,"As of slate-react@0.22 the `getEventRange(event, editor)` helper is deprecated in favor of `editor.findEventRange(event)`."),Object(ye.default)(!q.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`."),e.nativeEvent&&(e=e.nativeEvent);var n=e,r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)return null;var a=t.value.document,s=rn(e.target,t);if(!s)return null;var u=a.getNode(s);if(t.isVoid(u)){var l=i.getBoundingClientRect(),c="inline"===u.object?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=a.createRange(),d=c?"moveToEndOfNode":"moveToStartOfNode",h=a[c?"getPreviousText":"getNextText"](s);return h?f[d](h):null}var p=H()(i),v=void 0;if(p.document.caretRangeFromPoint)v=p.document.caretRangeFromPoint(r,o);else if(p.document.caretPositionFromPoint){var g=p.document.caretPositionFromPoint(r,o);(v=p.document.createRange()).setStart(g.offsetNode,g.offset),v.setEnd(g.offsetNode,g.offset)}else if(p.document.body.createTextRange){v=p.document.body.createTextRange();try{v.moveToPoint(r,o)}catch(e){return null}}var m=sn(v,t);return m||null}Qt.__propTypes=We({autoCorrect:Q.a.bool,autoFocus:Q.a.bool,className:Q.a.string,defaultValue:Ce.value,id:Q.a.string,onChange:Q.a.func,onContextMenu:Q.a.func,options:Q.a.object,placeholder:Q.a.any,plugins:Q.a.array,readOnly:Q.a.bool,role:Q.a.string,schema:Q.a.object,spellCheck:Q.a.bool,style:Q.a.object,tabIndex:Q.a.number,value:Ce.value},Me.reduce((function(e,t){return e[t]=Q.a.func,e}),{}),["decorateNode","renderAnnotation","renderBlock","renderDecoration","renderDocument","renderEditor","renderInline","renderMark"].reduce((function(e,t){return e[t]=Q.a.func,e}),{})),Qt.defaultProps={autoFocus:!1,autoCorrect:!0,onChange:function(){},options:{},placeholder:"",plugins:[],readOnly:!1,schema:{},spellCheck:!0};var ln={Editor:Qt,cloneFragment:wt,findDOMNode:Bt,findDOMPoint:en,findDOMRange:tn,findNode:nn,findPath:rn,findPoint:on,findRange:sn,getEventRange:un,getEventTransfer:Pt,setEventTransfer:Dt,ReactPlugin:Xt};t.default=ln}}]);
//# sourceMappingURL=872a2255f3aaf4e3cfd1.js.map