diff --git a/dist/js/field.js b/dist/js/field.js index 3397fb7..5ade62e 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=264)}([function(e,t,n){var r;r=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var _=y&&(c||d&&(null==w||w<12.11)),k=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,z=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return M(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var D=function(){this.id=null};function q(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push(Q(K)+" ");return K[e]}function Q(e){return e[e.length-1]}function G(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function se(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?me(n,se(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?me(e.line,t):n<0?me(e.line,0):e}(t,se(e,t.line).text.length)}function ke(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new ze(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Pe(n,o.marker)<0)&&(n=o.marker)}return n}function qe(e,t,n,r,i){var o=se(e,t),a=Se&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ge(c.to,n)>=0:ge(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ge(c.from,r)<=0:ge(c.from,r)<0)))return!0}}}function Be(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function $e(e,t){var n=se(e,t),r=Be(n);return n==r?t:de(r)}function He(e,t){if(t>e.lastLine())return t;var n,r=se(e,t);if(!Ue(e,r))return t;for(;n=Re(r);)r=n.find(1,!0).line;return de(r)+1}function Ue(e,t){var n=Se&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Qe=null;function Ge(e,t,n){var r;Qe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Qe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Qe=i)}return null!=r?r:Qe}var Xe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var d,f=l.length,p=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function rt(e,t){var n=tt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function st(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function lt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ct(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ut(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function dt(e){lt(e),ct(e)}function ft(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ht,mt,gt=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function vt(e){if(null==ht){var t=A("span","​");T(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=ht?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function yt(e){if(null!=mt)return mt;var t=T(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(mt=r.right-n.right<3)}var bt,xt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},wt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},_t="oncopy"in(bt=A("div"))||(bt.setAttribute("oncopy","return;"),"function"==typeof bt.oncopy),kt=null;var Ct={},St={};function zt(e){if("string"==typeof e&&St.hasOwnProperty(e))e=St[e];else if(e&&"string"==typeof e.name&&St.hasOwnProperty(e.name)){var t=St[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return zt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return zt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Mt(e,t){t=zt(t);var n=Ct[t.name];if(!n)return Mt(e,"text/plain");var r=n(e,t);if(Tt.hasOwnProperty(t.name)){var i=Tt[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Tt={};function At(e,t){I(t,Tt.hasOwnProperty(e)?Tt[e]:Tt[e]={})}function Et(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Lt(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ot(e,t,n){return!e.startState||e.startState(t,n)}var Ft=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.post},Ft.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ft.prototype.backUp=function(e){this.pos-=e},Ft.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ft.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ft.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var jt=function(e,t){this.state=e,this.lookAhead=t},Pt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function Nt(e,t,n,r){var i=[e.state.modeGen],o={};Wt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,Wt(e,t.text,s.mode,n,function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Et(e.doc.mode,r.state),o=Nt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Rt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Pt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=se(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof jt?c.lookAhead:0)<=o.modeFrontier))return s;var u=R(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&se(r,o-1).stateAfter,s=a?Pt.fromSaved(r,a,o):new Pt(r,Ot(r.mode),o);return r.iter(o,t,function(n){Dt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pt.fromSaved=function(e,t,n){return t instanceof jt?new Pt(e,Et(e.mode,t.state),n,t.lookAhead):new Pt(e,Et(e.mode,t),n)},Pt.prototype.save=function(e){var t=!1!==e?Et(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jt(t,this.maxLookAhead):t};var $t=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ht(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=se(a,(t=_e(a,t)).line),c=Rt(e,t.line,n),u=new Ft(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&Dt(e,t,r,d.pos),d.pos=t.length,l=null):l=Ut(Bt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=d=s="",f=null,v=1/0;for(var y=[],b=void 0,x=0;xh||_.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,c=""),_.className&&(l+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&w.from==h&&(u+=" "+_.startStyle),_.endStyle&&w.to==v&&(b||(b=[])).push(_.endStyle,w.to),_.title&&!d&&(d=_.title),_.collapsed&&(!f||Pe(f.marker,_)<0)&&(f=w)):w.from>h&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=p)break;for(var S=Math.min(p,v);;){if(g){var z=h+g.length;if(!f){var M=z>S?g.slice(0,S-h):g;t.addToken(t,M,a?a+l:l,u,h+M.length==v?c:"",d,s)}if(z>=S){g=g.slice(S-h),h=S;break}h=z,u=""}g=i.slice(o,o=n[m++]),a=Gt(n[m++],t.cm.options)}}else for(var T=1;Tn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function En(e,t,n,r){return Fn(e,On(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Nn(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&ie(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+nr(e.display),top:h.top,bottom:h.bottom}:Pn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){var r=1==s[t].level;return a(n?e-1:e,r!=n)}var d=Ge(s,l,c),f=Qe,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Yn(e,t){var n=0;t=_e(e.doc,t),e.options.lineWrapping||(n=nr(e.display)*t.ch);var r=se(e.doc,t.line),i=Ve(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var o=me(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Gn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,!0,-1);var i=fe(r,n),o=r.first+r.size-1;if(i>o)return Qn(r.first+r.size-1,se(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=se(r,i);;){var s=er(e,a,i,t,n),l=De(a,s.ch+(s.xRel>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=se(r,i=c.line)}}function Xn(e,t,n,r){r-=Hn(t);var i=t.text.length,o=ae(function(t){return Fn(e,n,t-1).bottom<=r},i,0);return{begin:o,end:i=ae(function(t){return Fn(e,n,t).top>r},o,i)}}function Zn(e,t,n,r){return n||(n=On(e,t)),Xn(e,t,n,Un(e,t,Fn(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Ve(t);var o=On(e,t),a=Hn(t),s=0,l=t.text.length,c=!0,u=Ze(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var s=Xn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f=c||p.to<=l)){var h=1!=p.level,m=Fn(e,r,h?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=mg)&&(u=p,d=g)}}u||(u=i[i.length-1]);u.fromc&&(u={from:u.from,to:c,level:u.level});return u}:function(e,t,n,r,i,o,a){var s=ae(function(s){var l=i[s],c=1!=l.level;return Jn(Kn(e,me(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Kn(e,me(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Jn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l})(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=ae(function(t){var n=Fn(e,o,t);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},s,l),v=!1;if(m){var y=r-m.left=x.bottom}return Qn(n,g=oe(t.text,g,1),p,v,r-f)}function tr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jn){jn=A("pre");for(var t=0;t<49;++t)jn.appendChild(document.createTextNode("x")),jn.appendChild(A("br"));jn.appendChild(document.createTextNode("x"))}T(e.measure,jn);var n=jn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t]);T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function or(e){var t=tr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/nr(e.display)-3);return function(i){if(Ue(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==f,w=0==d,_=!m||d==m.length-1;if(y.top-v.top<=3){var k=(c?x:b)&&_,C=(c?b:x)&&w?s:(g?v:y).left,S=k?l:(g?y:v).right;u(C,v.top,S-C,v.bottom)}else{var z,M,T,A;g?(z=c&&b&&w?s:v.left,M=c?l:h(e,i,"before"),T=c?s:h(t,i,"after"),A=c&&x&&_?l:y.right):(z=c?h(e,i,"before"):s,M=!c&&b&&w?l:v.right,T=!c&&x&&_?s:y.left,A=c?h(t,i,"after"):l),u(z,v.top,M-z,v.bottom),v.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function mr(e){e.state.focused||(e.display.input.focus(),vr(e))}function gr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yr(e))},100)}function vr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(rt(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),hr(e))}function yr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(rt(e,"blur",e,t),e.state.focused=!1,z(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function br(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||u<-.005)&&(ue(i.line,o),xr(i.line),i.rest))for(var d=0;d=a&&(o=fe(t,Ve(se(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function _r(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;ao&&(t.bottom=t.top+o);var s=e.doc.height+Cn(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Mn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Sr(e,t){null!=t&&(Tr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function zr(e){Tr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mr(e,t,n){null==t&&null==n||Tr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Tr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ar(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Ar(e,t,n,r){var i=Cr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mr(e,i.scrollLeft,i.scrollTop)}function Er(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||si(e,{top:t}),Lr(e,t,!0),n&&si(e),ni(e,100))}function Lr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Or(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,_r(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var jr=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),et(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},jr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jr.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new D,this.disableVert=new D},jr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)})},jr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pr=function(){};function Nr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Ir(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&br(e),Ir(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ir(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Pr.prototype.update=function(){return{bottom:0,right:0}},Pr.prototype.setScrollLeft=function(){},Pr.prototype.setScrollTop=function(){},Pr.prototype.clear=function(){};var Rr={native:jr,null:Pr};function Dr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Rr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?Or(e,t):Er(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var qr=0;function Br(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function $r(e){!function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ur(e){var t=e.cm,n=t.display;e.updatedDisplay&&br(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=En(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Mn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Wr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+zn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?me(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?me(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Kn(e,t),l=n&&n!=t?Kn(e,n):s,c=Cr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Er(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Or(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,_e(r,e.scrollToPos.from),_e(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;at)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Se&&$e(e.doc,t)i.viewFrom?Jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Jr(e);else if(t<=i.viewFrom){var o=ei(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Jr(e)}else if(n>=i.viewTo){var a=ei(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jr(e)}else{var s=ei(e,t,t,-1),l=ei(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Jr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==q(a,n)&&a.push(n)}}}function Jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!Se||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;$e(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function ti(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Rt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Et(t.mode,r.state):null,l=Nt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&fn)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Kr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==ti(e))return!1;kr(e)&&(Jr(e),t.dims=rr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=$e(e.doc,o),a=He(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Ve(se(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=ti(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=O();if(!t||!L(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&L(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(p=!1),un(e,f,u,n)),p&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(he(e.options,u)))),a=f.node.nextSibling}else{var h=vn(e,f,u,n);o.insertBefore(h,a)}u+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=O()&&(e.activeElt.focus(),e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ni(e,400)),n.updateLineNumbers=null,!0}function ai(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Mn(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-Tn(e),n.top)}),t.visible=wr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);r=!1){br(e);var i=Fr(e);cr(e),Nr(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var n=new ii(e,t);if(oi(e,n)){br(e),ai(e,n);var r=Fr(e);cr(e),Nr(e,r),ci(e,r),n.finish()}}function li(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+zn(e)+"px"}function ui(e){var t=e.display.gutters,n=e.options.gutters;M(t);for(var r=0;r-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ii.prototype.signal=function(e,t){at(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;es.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var f=t.target,p=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&ge(e,r.to())<=0)return n}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var n=e[t];e.sort(function(e,t){return ge(e.from(),t.from())}),t=q(e,n);for(var r=1;r=0){var a=xe(o.from(),i.from()),s=be(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new yi(l?s:a,l?a:s))}}return new vi(e,t)}function xi(e,t){return new vi([new yi(e,t||e)],0)}function wi(e){return e.text?me(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function _i(e,t){if(ge(e,t.from)<0)return e;if(ge(e,t.to)<=0)return wi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=wi(t).ch-t.to.ch),me(n,r)}function ki(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ai(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(ji(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}(i,i.lastOp==r)))a=Q(o.changes),0==ge(t.from,t.to)&&0==ge(t.from,a.to)?a.to=wi(t):o.changes.push(Fi(e,t));else{var l=Q(i.done);for(l&&l.ranges||Ii(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||rt(e,"historyAdded")}function Ni(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Q(i.done),t))?i.done[i.done.length-1]=t:Ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ji(i.undone)}function Ii(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ri(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Di(e){if(!e)return null;for(var t,n=0;n-1&&(Q(s)[d]=c[d],delete c[d])}}}return r}function $i(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ge(t,i)<0;o!=ge(n,i)<0?(i=t,t=n):o!=ge(t,n)<0&&(t=n)}return new yi(i,t)}return new yi(n||t,t)}function Hi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Yi(e,new vi([$i(e.sel.primary(),t,n,i)],0),r)}function Ui(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(rt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=to(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=ge(c,n))&&(r<0?u<0:u>0))return Ji(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=to(e,d,r,d.line==t.line?o:null)),d?Ji(e,d,t,r,i):null}}return t}function eo(e,t,n,r,i){var o=r||1,a=Ji(e,t,n,o,i)||!i&&Ji(e,t,n,o,!0)||Ji(e,t,n,-o,i)||!i&&Ji(e,t,n,-o,!0);return a||(e.cantEdit=!0,me(e.first,0))}function to(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?_e(e,me(t.line-1)):null:n>0&&t.ch==(r||se(e,t.line)).text.length?t.line0)){var u=[l,1],d=ge(c.from,s.from),f=ge(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)oo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ge(t.from,t.to)){var n=ki(e,t);Pi(e,t,n,e.cm?e.cm.curOp.id:NaN),lo(e,t,n,Ae(e,t));var r=[];Ai(e,function(e,n){n||-1!=q(r,e.history)||(po(e.history,t),r.push(e.history)),lo(e,t,null,Ae(e,t))})}}function ao(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c=0;--p){var h=f(p);if(h)return h.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new vi(G(e.sel.ranges,function(e){return new yi(me(e.anchor.line+t,e.anchor.ch),me(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Xr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:me(o,se(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=le(e,t.from,t.to),n||(n=ki(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=de(Be(se(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));r.sel.contains(t.from,t.to)>-1&&ot(e);Ti(r,t,n,or(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=Ke(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=se(e,r).stateAfter;if(i&&(!(i instanceof jt)||r+i.lookAhead1||!(this.children[0]instanceof mo))){var s=[];this.collapse(s),this.children=[new mo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(qe(e,t.line,t,n,o)||t.line!=n.line&&qe(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Pi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&Be(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&ue(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new ze(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Ue(e,t)&&ue(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ce=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Xr(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)Zr(c,u,"text");o.atomic&&Xi(c.doc),ln(c,"markerAdded",c,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Br(e),at(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Xr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xi(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&$r(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)io(this,r[l]);s?Ki(this,s):this.cm&&zr(this.cm)}),undo:Gr(function(){ao(this,"undo")}),redo:Gr(function(){ao(this,"redo")}),undoSelection:Gr(function(){ao(this,"undo",!0)}),redoSelection:Gr(function(){ao(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=_e(this,e),t=_e(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),_e(this,me(n,t))},indexFromPos:function(e){var t=(e=_e(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Qi(t.doc,xi(n,n)),d)for(var f=0;f=0;t--)co(e.doc,"",r[t].from,r[t].to,"+delete");zr(e)})}function Ko(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Yo(e,t,n){var r=Ko(e,t.ch,n);return null==r?null:new me(t.line,r,n<0?"after":"before")}function Qo(e,t,n,r,i){if(e){var o=Ze(n,t.doc.direction);if(o){var a,s=i<0?Q(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=On(t,n);a=i<0?n.text.length-1:0;var u=Fn(t,c,a).top;a=ae(function(e){return Fn(t,c,e).top==u},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ko(n,a,1))}else a=i<0?s.to:s.from;return new me(r,a,l)}}return new me(r,i<0?n.text.length:0,i<0?"before":"after")}Ro.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ro.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ro.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ro.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ro.default=y?Ro.macDefault:Ro.pcDefault;var Go={selectAll:no,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Vo(e,function(t){if(t.empty()){var n=se(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new me(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),me(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=se(e.doc,i.line-1).text;a&&(i=new me(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),me(i.line-1,a.length-1),i,"+transpose"))}n.push(new yi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Kr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ge((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(ge(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=Yr(e,function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,nt(i.wrapper.ownerDocument,"mouseup",c),nt(i.wrapper.ownerDocument,"mousemove",u),nt(i.scroller,"dragstart",d),nt(i.scroller,"drop",c),o||(lt(t),r.addNew||Hi(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0);e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();et(i.wrapper.ownerDocument,"mouseup",c),et(i.wrapper.ownerDocument,"mousemove",u),et(i.scroller,"dragstart",d),et(i.scroller,"drop",c),gr(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;lt(t);var a,s,l=o.sel,c=l.ranges;r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new yi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==r.unit)r.addNew||(a=new yi(n,n)),n=sr(e,t,!0,!0),s=-1;else{var u=fa(e,n,r.unit);a=r.extend?$i(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Yi(o,bi(c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Yi(o,bi(c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Wi(o,s,a,U):(s=0,Yi(o,new vi([a],0),U),l=o.sel);var d=n;function f(t){if(0!=ge(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=R(se(o,n.line).text,n.ch,c),f=R(se(o,t.line).text,t.ch,c),p=Math.min(u,f),h=Math.max(u,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=se(o,m).text,y=V(v,p,c);p==h?i.push(new yi(me(m,y),me(m,y))):v.length>y&&i.push(new yi(me(m,y),me(m,V(v,h,c))))}i.length||i.push(new yi(n,n)),Yi(o,bi(l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,w=fa(e,t,r.unit),_=x.anchor;ge(w.anchor,_)>0?(b=w.head,_=xe(x.from(),w.anchor)):(b=w.anchor,_=be(x.to(),w.head));var k=l.ranges.slice(0);k[s]=function(e,t){var n=t.anchor,r=t.head,i=se(e.doc,n.line);if(0==ge(n,r)&&n.sticky==r.sticky)return t;var o=Ze(i);if(!o)return t;var a=Ge(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=Ge(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new yi(new me(n.line,h,m),r)}(e,new yi(_e(o,_),b)),Yi(o,bi(k,s),U)}}var p=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,lt(t),i.input.focus(),nt(i.wrapper.ownerDocument,"mousemove",g),nt(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=Yr(e,function(t){0!==t.buttons&&pt(t)?function t(n){var a=++h;var s=sr(e,n,!0,"rectangle"==r.unit);if(!s)return;if(0!=ge(s,d)){e.curOp.focus=O(),f(s);var l=wr(i,o);(s.line>=l.to||s.linep.bottom?20:0;c&&setTimeout(Yr(e,function(){h==a&&(i.scroller.scrollTop+=c,t(n))}),50)}}(t):m(t)}),v=Yr(e,m);e.state.selectingText=v,et(i.wrapper.ownerDocument,"mousemove",g),et(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):ft(e)==n.scroller&<(e):2==i?(r&&Hi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(k?ma(t,e):gr(t)))}}function fa(e,t,n){if("char"==n)return new yi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new yi(me(t.line,0),_e(e.doc,me(t.line+1,0)));var r=n(e,t);return new yi(r.from,r.to)}function pa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&<(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!at(e,n))return ut(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return rt(e,n,e,fe(e.doc,o),e.options.gutters[l],t),ut(t)}}function ha(e,t){return pa(e,t,"gutterClick",!0)}function ma(e,t){_n(e.display,t)||function(e,t){if(!at(e,"gutterContextMenu"))return!1;return pa(e,t,"gutterContextMenu",!1)}(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function ga(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qn(e)}ua.prototype.compare=function(e,t,n){return this.time+400>e&&0==ge(t,this.pos)&&n==this.button};var va={toString:function(){return"CodeMirror.Init"}},ya={},ba={};function xa(e){ui(e),Xr(e),_r(e)}function wa(e,t,n){if(!t!=!(n&&n!=va)){var r=e.display.dragFunctions,i=t?et:nt;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function _a(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(z(e.display.wrapper,"CodeMirror-wrap"),Ye(e)),ar(e),Xr(e),qn(e),setTimeout(function(){return Nr(e)},100)}function ka(e,t){var r=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?I(t):{},I(ya,t,!1),di(t);var i=t.value;"string"==typeof i?i=new zo(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new ka.inputStyles[t.inputStyle](this),c=this.display=new function(e,t,r){var i=this;this.input=r,i.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=E("div",null,"CodeMirror-code"),i.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=A("div",null,"CodeMirror-cursors"),i.measure=A("div",null,"CodeMirror-measure"),i.lineMeasure=A("div",null,"CodeMirror-measure"),i.lineSpace=E("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=E("div",[i.lineSpace],"CodeMirror-lines");i.mover=A("div",[o],null,"position: relative"),i.sizer=A("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=A("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),i.gutters=A("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=A("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=A("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}(e,i,o);for(var u in c.wrapper.CodeMirror=this,ui(this),ga(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Dr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new D,keySeq:null,specialChars:null},t.autofocus&&!v&&c.input.focus(),a&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",Yr(e,da)),et(t.scroller,"dblclick",a&&s<11?Yr(e,function(t){if(!it(e,t)){var n=sr(e,t);if(n&&!ha(e,t)&&!_n(e.display,t)){lt(t);var r=e.findWordAt(n);Hi(e.doc,r.anchor,r.head)}}}):function(t){return it(e,t)||lt(t)});k||et(t.scroller,"contextmenu",function(t){return ma(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ha(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!_n(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new yi(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new yi(me(s.line,0),_e(e.doc,me(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),lt(n)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Er(e,t.scroller.scrollTop),Or(e,t.scroller.scrollLeft,!0),rt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return gi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return gi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||dt(t)},over:function(t){it(e,t)||(!function(e,t){var n=sr(e,t);if(n){var r=document.createDocumentFragment();dr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),dt(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Mo<100))dt(t);else if(!it(e,t)&&!_n(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:Yr(e,To),leave:function(t){it(e,t)||Ao(e)}};var l=t.input.getField();et(l,"keyup",function(t){return aa.call(e,t)}),et(l,"keydown",Yr(e,oa)),et(l,"keypress",Yr(e,sa)),et(l,"focus",function(t){return vr(e,t)}),et(l,"blur",function(t){return yr(e,t)})}(this),Oo(),Br(this),this.curOp.forceUpdate=!0,Ei(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout(N(vr,this),20):yr(this),ba)ba.hasOwnProperty(u)&&ba[u](r,t[u],va);kr(this),t.finishInit&&t.finishInit(this);for(var p=0;p150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(se(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f1)if(za&&za.text.join("\n")==t){if(r.ranges.length%za.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),h=f.to();f.empty()&&(n&&n>0?p=me(p.line,p.ch-n):e.state.overwrite&&!s?h=me(h.line,Math.min(se(o,h.line).text.length,h.ch+Q(l).length)):za&&za.lineWise&&za.text.join("\n")==t&&(p=h=me(p.line,0))),a=e.curOp.updateInput;var m={from:p,to:h,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,m),ln(e,"inputRead",e,m)}t&&!s&&Ea(e,t),zr(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Kr(t,function(){return Ta(t,n,0,null,"paste")}),!0}function Ea(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Sa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(se(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Sa(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function La(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ge(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=d?"before":"after";return new me(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new me(n.line,l(e,1),"before"):new me(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Yo(s,t,n))){if(r||(a=t.line+n)=e.first+e.size||(t=new me(a,t.ch,t.sticky),!(s=se(e,a))))return!1;t=Qo(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||l(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",h=te(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||f||h||(h="s"),c&&c!=h){n<0&&(n=1,l(),t.sticky="after");break}if(h&&(c=h),n>0&&!l(!f))break}var m=eo(e,t,o,a,!0);return ve(o,m)&&(m.hitSide=!0),m}function Pa(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*tr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Gn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Na=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new D,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ia(e,t){var n=Ln(e,t.line);if(!n||n.hidden)return null;var r=se(e.doc,t.line),i=An(n,r,t.line),o=Ze(r,e.doc.direction),a="left";o&&(a=Ge(o,t.ch)%2?"right":"left");var s=Nn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ra(e,t){return t&&(e.bad=!0),e}function Da(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ra(e.clipPos(me(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ia(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=me(a.line-1,se(r.doc,a.line-1).length)),s.ch==se(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=de(i.view[0].line),n=i.view[0].node):(t=de(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=lr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=de(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(me(r,0),me(i+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&u(le(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&f.length>1;)if(Q(d)==Q(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=me(t,p),_=me(l,f.length?Q(f).length-h:0);return d.length>1||d[0]||ge(w,_)?(co(r.doc,d,w,_,"+input"),!0):void 0},Na.prototype.ensurePolled=function(){this.forceCompositionEnd()},Na.prototype.reset=function(){this.forceCompositionEnd()},Na.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Na.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Na.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Kr(this.cm,function(){return Xr(e.cm)})},Na.prototype.setUneditable=function(e){e.contentEditable="false"},Na.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Yr(this.cm,Ta)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Na.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Na.prototype.onContextMenu=function(){},Na.prototype.resetPosition=function(){},Na.prototype.needsContentAttribute=!0;var Ba=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new D,this.hasSelection=!1,this.composing=null};Ba.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!it(r,e)){if(r.somethingSelected())Ma({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=La(r);Ma({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=!0)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),et(i,"input",function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),et(i,"paste",function(e){it(r,e)||Aa(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),et(i,"cut",o),et(i,"copy",o),et(e.scroller,"paste",function(t){_n(e,t)||it(r,t)||(r.state.pasteIncoming=!0,n.focus())}),et(e.lineSpace,"selectstart",function(t){_n(e,t)||lt(t)}),et(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),et(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ba.prototype.createField=function(e){this.wrapper=Fa(),this.textarea=this.wrapper.firstChild},Ba.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=ur(e);if(e.options.moveInputWithCursor){var i=Kn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ba.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ba.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ba.prototype.getField=function(){return this.textarea},Ba.prototype.supportsTouch=function(){return!1},Ba.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||O()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ba.prototype.blur=function(){this.textarea.blur()},Ba.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ba.prototype.receivedFocus=function(){this.slowPoll()},Ba.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ba.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Ba.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||wt(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ba.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ba.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ba.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea,o=sr(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Yr(n,Yi)(n.doc,xi(o),H);var u=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var p,h=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),r.input.focus(),l&&window.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),k){dt(e);var m=function(){nt(window,"mouseup",m),setTimeout(v,20)};et(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=u,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Yr(n,no)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ba.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ba.prototype.setUneditable=function(){},Ba.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=va&&i(e,t,n)}:i)}e.defineOption=n,e.Init=va,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,Si(e)},!0),n("indentUnit",2,Si,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){zi(e),qn(e),Xr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(me(r,o))}r++});for(var i=n.length-1;i>=0;i--)co(e.doc,t,n[i],me(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=va&&e.refresh()}),n("specialCharPlaceholder",Zt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){ga(e),xa(e)},!0),n("keyMap","default",function(e,t,n){var r=Wo(t),i=n!=va&&Wo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],function(e){di(e.options),xa(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ir(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Nr(e)},!0),n("scrollbarStyle","native",function(e){Dr(e),Nr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e){di(e.options),xa(e)},!0),n("firstLineNumber",1,xa,!0),n("lineNumberFormatter",function(e){return e},xa,!0),n("showCursorWhenSelecting",!1,cr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("readOnly",!1,function(e,t){"nocursor"==t&&(yr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,wa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,cr,!0),n("singleCursorHeightPerLine",!0,cr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,zi,!0),n("addModeClass",!1,zi,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,zi,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}(ka),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Yr(this,t[e])(this,n,i),rt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Wo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Sa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&zr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Wi(this.doc,r,new yi(o,c[r].to()),H)}}}),getTokenAt:function(e,t){return Ht(this,e,t)},getLineTokens:function(e,t){return Ht(this,me(e),t,!0)},getTokenTypeAt:function(e){e=_e(this.doc,e);var t,n=It(this,se(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=se(this.doc,e)}else r=e;return Un(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ve(r):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=Kn(this,_e(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Cr(o,a)).scrollTop&&Er(o,s.scrollTop),null!=s.scrollLeft&&Or(o,s.scrollLeft))},triggerOnKeyDown:Qr(oa),triggerOnKeyPress:Qr(sa),triggerOnKeyUp:aa,triggerOnMouseDown:Qr(da),execCommand:function(e){if(Go.hasOwnProperty(e))return Go[e].call(null,this)},triggerElectric:Qr(function(e){Ea(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=_e(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&ar(this),rt(this,"refresh",this)}),swapDoc:Qr(function(e){var t=this.doc;return t.cm=null,Ei(this,e),qn(this),this.display.input.reset(),Mr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},st(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(ka);var $a,Ha="iter insert remove copy getEditor constructor".split(" ");for(var Ua in zo.prototype)zo.prototype.hasOwnProperty(Ua)&&q(Ha,Ua)<0&&(ka.prototype[Ua]=function(e){return function(){return e.apply(this.doc,arguments)}}(zo.prototype[Ua]));return st(zo),ka.inputStyles={textarea:Ba,contenteditable:Na},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ct[e]=t}.apply(this,arguments)},ka.defineMIME=function(e,t){St[e]=t},ka.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){zo.prototype[e]=t},ka.fromTextArea=function(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=O();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(et(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=ka(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},($a=ka).off=nt,$a.on=et,$a.wheelEventPixels=mi,$a.Doc=zo,$a.splitLines=xt,$a.countColumn=R,$a.findColumn=V,$a.isWordChar=ee,$a.Pass=$,$a.signal=rt,$a.Line=Vt,$a.changeEnd=wi,$a.scrollbarModel=Rr,$a.Pos=me,$a.cmpPos=ge,$a.modes=Ct,$a.mimeModes=St,$a.resolveMode=zt,$a.getMode=Mt,$a.modeExtensions=Tt,$a.extendMode=At,$a.copyState=Et,$a.startState=Ot,$a.innerMode=Lt,$a.commands=Go,$a.keyMap=Ro,$a.keyName=Uo,$a.isModifierKey=$o,$a.lookupKey=Bo,$a.normalizeKeyMap=qo,$a.StringStream=Ft,$a.SharedTextMarker=_o,$a.TextMarker=xo,$a.LineWidget=vo,$a.e_preventDefault=lt,$a.e_stopPropagation=ct,$a.e_stop=dt,$a.addClass=F,$a.contains=L,$a.rmClass=z,$a.keyNames=jo,ka.version="5.40.0",ka},e.exports=r()},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i=0&&u.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;n=l||(l=g(t)),r=w.bind(null,n,a,!1),i=w.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=d(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var r=[],i=0;i")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=g,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;h(e)}}function g(e,t,n){return"openTag"==e?(n.tagStart=t.column(),v):"closeTag"==e?y:g}function v(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",w):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",w(e,t,n)):(a="error",v)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",b):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",b(e,t,n)):(a="error",x)}function b(e,t,n){return"endTag"!=e?(a="error",b):(h(n),g)}function x(e,t,n){return a="error",b(e,0,n)}function w(e,t,n){if("word"==e)return a="attribute",_;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new function(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}(n,r,i==n.indented)),g}return a="error",w}function _(e,t,n){return"equals"==e?k:(l.allowMissing||(a="error"),w(e,0,n))}function k(e,t,n){return"string"==e?C:"word"==e&&l.allowUnquoted?(a="string",w):(a="error",w(e,0,n))}function C(e,t,n){return"string"==e?C:w(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=w)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})(n(0))},function(e,t,n){(function(e){"use strict";e.defineMode("javascript",function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,n){return r=e,i=n,t}function m(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=m,h("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=m),h("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return h("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=g,g(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):Ve(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),h("operator","operator",e.current());if(u.test(r)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return h(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",i)}return h("variable","variable",i)}}function g(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return h("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=m;break}r=!r&&"\\"==n}return h("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=y.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function _(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var k={state:null,column:null,marked:null,cc:null};function C(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function S(){return C.apply(null,arguments),!0}function z(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function M(e){var t=k.state;if(k.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new A(r,n.vars,!0):null}return z(t,n.vars)?n:new A(n.prev,new E(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!z(e,t.localVars))return void(t.localVars=new E(e,t.localVars));n.globalVars&&!z(e,t.globalVars)&&(t.globalVars=new E(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,n){this.prev=e,this.vars=t,this.block=n}function E(e,t){this.name=e,this.next=t}var L=new E("this",new E("arguments",null));function O(){k.state.context=new A(k.state.context,k.state.localVars,!1),k.state.localVars=L}function F(){k.state.context=new A(k.state.context,k.state.localVars,!0),k.state.localVars=null}function j(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function P(e,t){var n=function(){var n=k.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,k.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function N(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function I(e){return function t(n){return n==e?S():";"==e||"}"==n||")"==n||"]"==n?C():S(t)}}function R(e,t){return"var"==e?S(P("vardef",t),ye,I(";"),N):"keyword a"==e?S(P("form"),$,R,N):"keyword b"==e?S(P("form"),R,N):"keyword d"==e?k.stream.match(/^\s*$/,!1)?S():S(P("stat"),U,I(";"),N):"debugger"==e?S(I(";")):"{"==e?S(P("}"),F,ae,N,j):";"==e?S():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==N&&k.state.cc.pop()(),S(P("form"),$,R,N,ke)):"function"==e?S(Ae):"for"==e?S(P("form"),Ce,R,N):"class"==e||c&&"interface"==t?(k.marked="keyword",S(P("form"),Oe,N)):"variable"==e?c&&"declare"==t?(k.marked="keyword",S(R)):c&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?S(Ue):"type"==t?S(ue,I("operator"),ue,I(";")):S(P("form"),be,I("{"),P("}"),ae,N,N)):c&&"namespace"==t?(k.marked="keyword",S(P("form"),q,ae,N)):c&&"abstract"==t?(k.marked="keyword",S(R)):S(P("stat"),J):"switch"==e?S(P("form"),$,I("{"),P("}","switch"),F,ae,N,N,j):"case"==e?S(q,I(":")):"default"==e?S(I(":")):"catch"==e?S(P("form"),O,D,R,N,j):"export"==e?S(P("stat"),Ne,N):"import"==e?S(P("stat"),Re,N):"async"==e?S(R):"@"==t?S(q,R):C(P("stat"),q,I(";"),N)}function D(e){if("("==e)return S(Ee,I(")"))}function q(e,t){return H(e,t,!1)}function B(e,t){return H(e,t,!0)}function $(e){return"("!=e?C():S(P(")"),q,I(")"),N)}function H(e,t,n){if(k.state.fatArrowAt==k.stream.start){var r=n?G:Q;if("("==e)return S(O,P(")"),ie(Ee,")"),N,I("=>"),r,j);if("variable"==e)return C(O,be,I("=>"),r,j)}var i=n?V:W;return x.hasOwnProperty(e)?S(i):"function"==e?S(Ae,i):"class"==e||c&&"interface"==t?(k.marked="keyword",S(P("form"),Le,N)):"keyword c"==e||"async"==e?S(n?B:q):"("==e?S(P(")"),U,I(")"),N,i):"operator"==e||"spread"==e?S(n?B:q):"["==e?S(P("]"),He,N,i):"{"==e?oe(te,"}",null,i):"quasi"==e?C(K,i):"new"==e?S(function(e){return function(t){return"."==t?S(e?Z:X):"variable"==t&&c?S(me,e?V:W):C(e?B:q)}}(n)):"import"==e?S(q):S()}function U(e){return e.match(/[;\}\)\],]/)?C():C(q)}function W(e,t){return","==e?S(q):V(e,t,!1)}function V(e,t,n){var r=0==n?W:V,i=0==n?q:B;return"=>"==e?S(O,n?G:Q,j):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?S(r):c&&"<"==t&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?S(P(">"),ie(ue,">"),N,r):"?"==t?S(q,I(":"),i):S(i):"quasi"==e?C(K,r):";"!=e?"("==e?oe(B,")","call",r):"."==e?S(ee,r):"["==e?S(P("]"),U,I("]"),N,r):c&&"as"==t?(k.marked="keyword",S(ue,r)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),S(i)):void 0:void 0}function K(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?S(K):S(q,Y)}function Y(e){if("}"==e)return k.marked="string-2",k.state.tokenize=v,S(K)}function Q(e){return b(k.stream,k.state),C("{"==e?R:q)}function G(e){return b(k.stream,k.state),C("{"==e?R:B)}function X(e,t){if("target"==t)return k.marked="keyword",S(W)}function Z(e,t){if("target"==t)return k.marked="keyword",S(V)}function J(e){return":"==e?S(N,R):C(W,I(";"),N)}function ee(e){if("variable"==e)return k.marked="property",S()}function te(e,t){if("async"==e)return k.marked="property",S(te);if("variable"==e||"keyword"==k.style){return k.marked="property","get"==t||"set"==t?S(ne):(c&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),S(re));var n}else{if("number"==e||"string"==e)return k.marked=s?"property":k.style+" property",S(re);if("jsonld-keyword"==e)return S(re);if(c&&T(t))return k.marked="keyword",S(te);if("["==e)return S(q,se,I("]"),re);if("spread"==e)return S(B,re);if("*"==t)return k.marked="keyword",S(te);if(":"==e)return C(re)}}function ne(e){return"variable"!=e?C(re):(k.marked="property",S(Ae))}function re(e){return":"==e?S(B):"("==e?C(Ae):void 0}function ie(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=k.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S(function(n,r){return n==t||r==t?C():C(e)},r)}return i==t||o==t?S():S(I(t))}return function(n,i){return n==t||i==t?S():C(e,r)}}function oe(e,t,n){for(var r=3;r"),ue):void 0}function de(e){if("=>"==e)return S(ue)}function fe(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",S(fe)):"?"==t?S(fe):":"==e?S(ue):"["==e?S(q,se,I("]"),fe):void 0}function pe(e,t){return"variable"==e&&k.stream.match(/^\s*[?:]/,!1)||"?"==t?S(pe):":"==e?S(ue):C(ue)}function he(e,t){return"<"==t?S(P(">"),ie(ue,">"),N,he):"|"==t||"."==e||"&"==t?S(ue):"["==e?S(I("]"),he):"extends"==t||"implements"==t?(k.marked="keyword",S(ue)):void 0}function me(e,t){if("<"==t)return S(P(">"),ie(ue,">"),N,he)}function ge(){return C(ue,ve)}function ve(e,t){if("="==t)return S(ue)}function ye(e,t){return"enum"==t?(k.marked="keyword",S(Ue)):C(be,se,we,_e)}function be(e,t){return c&&T(t)?(k.marked="keyword",S(be)):"variable"==e?(M(t),S()):"spread"==e?S(be):"["==e?oe(be,"]"):"{"==e?oe(xe,"}"):void 0}function xe(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?S(be):"}"==e?C():S(I(":"),be,we)):(M(t),S(we))}function we(e,t){if("="==t)return S(B)}function _e(e){if(","==e)return S(ye)}function ke(e,t){if("keyword b"==e&&"else"==t)return S(P("form","else"),R,N)}function Ce(e,t){return"await"==t?S(Ce):"("==e?S(P(")"),Se,I(")"),N):void 0}function Se(e){return"var"==e?S(ye,I(";"),Me):";"==e?S(Me):"variable"==e?S(ze):C(q,I(";"),Me)}function ze(e,t){return"in"==t||"of"==t?(k.marked="keyword",S(q)):S(W,Me)}function Me(e,t){return";"==e?S(Te):"in"==t||"of"==t?(k.marked="keyword",S(q)):C(q,I(";"),Te)}function Te(e){")"!=e&&S(q)}function Ae(e,t){return"*"==t?(k.marked="keyword",S(Ae)):"variable"==e?(M(t),S(Ae)):"("==e?S(O,P(")"),ie(Ee,")"),N,le,R,j):c&&"<"==t?S(P(">"),ie(ge,">"),N,Ae):void 0}function Ee(e,t){return"@"==t&&S(q,Ee),"spread"==e?S(Ee):c&&T(t)?(k.marked="keyword",S(Ee)):C(be,se,we)}function Le(e,t){return"variable"==e?Oe(e,t):Fe(e,t)}function Oe(e,t){if("variable"==e)return M(t),S(Fe)}function Fe(e,t){return"<"==t?S(P(">"),ie(ge,">"),N,Fe):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(k.marked="keyword"),S(c?ue:q,Fe)):"{"==e?S(P("}"),je,N):void 0}function je(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",S(je)):"variable"==e||"keyword"==k.style?(k.marked="property",S(c?Pe:Ae,je)):"["==e?S(q,se,I("]"),c?Pe:Ae,je):"*"==t?(k.marked="keyword",S(je)):";"==e?S(je):"}"==e?S():"@"==t?S(q,je):void 0}function Pe(e,t){return"?"==t?S(Pe):":"==e?S(ue,we):"="==t?S(B):C(Ae)}function Ne(e,t){return"*"==t?(k.marked="keyword",S($e,I(";"))):"default"==t?(k.marked="keyword",S(q,I(";"))):"{"==e?S(ie(Ie,"}"),$e,I(";")):C(R)}function Ie(e,t){return"as"==t?(k.marked="keyword",S(I("variable"))):"variable"==e?C(B,Ie):void 0}function Re(e){return"string"==e?S():"("==e?C(q):C(De,qe,$e)}function De(e,t){return"{"==e?oe(De,"}"):("variable"==e&&M(t),"*"==t&&(k.marked="keyword"),S(Be))}function qe(e){if(","==e)return S(De,qe)}function Be(e,t){if("as"==t)return k.marked="keyword",S(De)}function $e(e,t){if("from"==t)return k.marked="keyword",S(q)}function He(e){return"]"==e?S():C(ie(B,"]"))}function Ue(){return C(P("form"),be,I("{"),P("}"),ie(We,"}"),N,N)}function We(){return C(be,we)}function Ve(e,t,n){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return j.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new A(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=g&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var o=e.cc;for(k.state=e,k.stream=i,k.marked=null,k.cc=o,k.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?q:R)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&_(e,r)?"variable-2":t}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==g)return e.Pass;if(t.tokenize!=m)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==N)l=l.prev;else if(u!=ke)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==W||i==V)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,p=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||o:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=q&&t!=B||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})(n(0))},function(e,t,n){(function(e){"use strict";function t(e){for(var t={},n=0;n0;i--)n.context=n.context.prev;return M(e,t,n)}function A(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var E={top:function(e,t,n){if("{"==e)return S(n,t,"block");if("}"==e&&n.context.prev)return z(n);if(x&&/@component/i.test(e))return S(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return S(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return S(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return S(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return S(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return S(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(o="property","maybeprop"):p.hasOwnProperty(r)?(o="string-2","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?E.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?S(n,t,"prop"):M(e,t,n)},prop:function(e,t,n){if(";"==e)return z(n);if("{"==e&&y)return S(n,t,"propBlock");if("}"==e||"{"==e)return T(e,t,n);if("("==e)return S(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)A(t);else if("interpolation"==e)return S(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?z(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?T(e,t,n):")"==e?z(n):"("==e?S(n,t,"parens"):"interpolation"==e?S(n,t,"interpolation"):("word"==e&&A(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):M(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):E.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return S(n,t,"atBlock_parens");if("}"==e||";"==e)return T(e,t,n);if("{"==e)return z(n)&&S(n,t,y?"block":"top");if("interpolation"==e)return S(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?"string-2":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?T(e,t,n):"{"==e?z(n)&&S(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?z(n):"{"==e||"}"==e?T(e,t,n,2):E.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?S(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):M(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,z(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?S(n,t,"top"):M(e,t,n)},at:function(e,t,n){return";"==e?z(n):"{"==e||"}"==e?T(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?z(n):"{"==e||";"==e?T(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new C(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||function(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?w(null,"compare"):'"'==n||"'"==n?(t.tokenize=_(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=k,w("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0})(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=E[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=t(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(f),h=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),x=n.concat(i).concat(a).concat(l).concat(u).concat(f).concat(g).concat(y);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})})(n(0))},function(e,t,n){var r=n(163),i=n(164),o=n(165),a=n(166),s=n(167);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t>>1,q=[["ary",C],["bind",v],["bindKey",y],["curry",x],["curryRight",w],["flip",z],["partial",_],["partialRight",k],["rearg",S]],B="[object Arguments]",$="[object Array]",H="[object AsyncFunction]",U="[object Boolean]",W="[object Date]",V="[object DOMException]",K="[object Error]",Y="[object Function]",Q="[object GeneratorFunction]",G="[object Map]",X="[object Number]",Z="[object Null]",J="[object Object]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",ae="[object WeakMap]",se="[object WeakSet]",le="[object ArrayBuffer]",ce="[object DataView]",ue="[object Float32Array]",de="[object Float64Array]",fe="[object Int8Array]",pe="[object Int16Array]",he="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ve="[object Uint16Array]",ye="[object Uint32Array]",be=/\b__p \+= '';/g,xe=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_e=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Ce=RegExp(_e.source),Se=RegExp(ke.source),ze=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Te=/<%=([\s\S]+?)%>/g,Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oe=/[\\^$.*+?()[\]{}|]/g,Fe=RegExp(Oe.source),je=/^\s+|\s+$/g,Pe=/^\s+/,Ne=/\s+$/,Ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Be=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,He=/\w*$/,Ue=/^[-+]0x[0-9a-f]+$/i,We=/^0b[01]+$/i,Ve=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ge=/($^)/,Xe=/['\n\r\u2028\u2029\\]/g,Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Je="\\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",et="[\\ud800-\\udfff]",tt="["+Je+"]",nt="["+Ze+"]",rt="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",at="[^\\ud800-\\udfff"+Je+rt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",lt="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",ut="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ft="(?:"+ot+"|"+at+")",pt="(?:"+dt+"|"+at+")",ht="(?:"+nt+"|"+st+")"+"?",mt="[\\ufe0e\\ufe0f]?"+ht+("(?:\\u200d(?:"+[lt,ct,ut].join("|")+")[\\ufe0e\\ufe0f]?"+ht+")*"),gt="(?:"+[it,ct,ut].join("|")+")"+mt,vt="(?:"+[lt+nt+"?",nt,ct,ut,et].join("|")+")",yt=RegExp("['’]","g"),bt=RegExp(nt,"g"),xt=RegExp(st+"(?="+st+")|"+vt+mt,"g"),wt=RegExp([dt+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,dt,"$"].join("|")+")",pt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,dt+ft,"$"].join("|")+")",dt+"?"+ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dt+"+(?:['’](?: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_])",rt,gt].join("|"),"g"),_t=RegExp("[\\u200d\\ud800-\\udfff"+Ze+"\\ufe0e\\ufe0f]"),kt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],St=-1,zt={};zt[ue]=zt[de]=zt[fe]=zt[pe]=zt[he]=zt[me]=zt[ge]=zt[ve]=zt[ye]=!0,zt[B]=zt[$]=zt[le]=zt[U]=zt[ce]=zt[W]=zt[K]=zt[Y]=zt[G]=zt[X]=zt[J]=zt[te]=zt[ne]=zt[re]=zt[ae]=!1;var Mt={};Mt[B]=Mt[$]=Mt[le]=Mt[ce]=Mt[U]=Mt[W]=Mt[ue]=Mt[de]=Mt[fe]=Mt[pe]=Mt[he]=Mt[G]=Mt[X]=Mt[J]=Mt[te]=Mt[ne]=Mt[re]=Mt[ie]=Mt[me]=Mt[ge]=Mt[ve]=Mt[ye]=!0,Mt[K]=Mt[Y]=Mt[ae]=!1;var Tt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},At=parseFloat,Et=parseInt,Lt="object"==typeof e&&e&&e.Object===Object&&e,Ot="object"==typeof self&&self&&self.Object===Object&&self,Ft=Lt||Ot||Function("return this")(),jt="object"==typeof t&&t&&!t.nodeType&&t,Pt=jt&&"object"==typeof r&&r&&!r.nodeType&&r,Nt=Pt&&Pt.exports===jt,It=Nt&&Lt.process,Rt=function(){try{var e=Pt&&Pt.require&&Pt.require("util").types;return e||It&&It.binding&&It.binding("util")}catch(e){}}(),Dt=Rt&&Rt.isArrayBuffer,qt=Rt&&Rt.isDate,Bt=Rt&&Rt.isMap,$t=Rt&&Rt.isRegExp,Ht=Rt&&Rt.isSet,Ut=Rt&&Rt.isTypedArray;function Wt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Vt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Zt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function wn(e,t){for(var n=e.length;n--&&ln(t,e[n],0)>-1;);return n}var _n=pn({"À":"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"}),kn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Cn(e){return"\\"+Tt[e]}function Sn(e){return _t.test(e)}function zn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Mn(e,t){return function(n){return e(t(n))}}function Tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Pn=function e(t){var n,r=(t=null==t?Ft:Pn.defaults(Ft.Object(),t,Pn.pick(Ft,Ct))).Array,i=t.Date,Ze=t.Error,Je=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=r.prototype,at=Je.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ct=at.toString,ut=st.hasOwnProperty,dt=0,ft=(n=/[^.]+$/.exec(lt&<.keys&<.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pt=st.toString,ht=ct.call(tt),mt=Ft._,gt=nt("^"+ct.call(ut).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=Nt?t.Buffer:o,xt=t.Symbol,_t=t.Uint8Array,Tt=vt?vt.allocUnsafe:o,Lt=Mn(tt.getPrototypeOf,tt),Ot=tt.create,jt=st.propertyIsEnumerable,Pt=ot.splice,It=xt?xt.isConcatSpreadable:o,Rt=xt?xt.iterator:o,on=xt?xt.toStringTag:o,pn=function(){try{var e=qo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Nn=t.clearTimeout!==Ft.clearTimeout&&t.clearTimeout,In=i&&i.now!==Ft.Date.now&&i.now,Rn=t.setTimeout!==Ft.setTimeout&&t.setTimeout,Dn=et.ceil,qn=et.floor,Bn=tt.getOwnPropertySymbols,$n=vt?vt.isBuffer:o,Hn=t.isFinite,Un=ot.join,Wn=Mn(tt.keys,tt),Vn=et.max,Kn=et.min,Yn=i.now,Qn=t.parseInt,Gn=et.random,Xn=ot.reverse,Zn=qo(t,"DataView"),Jn=qo(t,"Map"),er=qo(t,"Promise"),tr=qo(t,"Set"),nr=qo(t,"WeakMap"),rr=qo(tt,"create"),ir=nr&&new nr,or={},ar=da(Zn),sr=da(Jn),lr=da(er),cr=da(tr),ur=da(nr),dr=xt?xt.prototype:o,fr=dr?dr.valueOf:o,pr=dr?dr.toString:o;function hr(e){if(Ts(e)&&!vs(e)&&!(e instanceof yr)){if(e instanceof vr)return e;if(ut.call(e,"__wrapped__"))return fa(e)}return new vr(e)}var mr=function(){function e(){}return function(t){if(!Ms(t))return{};if(Ot)return Ot(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function gr(){}function vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function yr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=I,this.__views__=[]}function br(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Nr(e,t,n,r,i,a){var s,l=t&f,c=t&p,u=t&h;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Ms(e))return e;var d=vs(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ut.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return ro(e,s)}else{var m=Ho(e),g=m==Y||m==Q;if(ws(e))return Xi(e,l);if(m==J||m==B||g&&!i){if(s=c||g?{}:Wo(e),!l)return c?function(e,t){return io(e,$o(e),t)}(e,function(e,t){return e&&io(t,ol(t),e)}(s,e)):function(e,t){return io(e,Bo(e),t)}(e,Or(s,e))}else{if(!Mt[m])return i?e:{};s=function(e,t,n){var r,i,o,a=e.constructor;switch(t){case le:return Zi(e);case U:case W:return new a(+e);case ce:return function(e,t){var n=t?Zi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case ue:case de:case fe:case pe:case he:case me:case ge:case ve:case ye:return Ji(e,n);case G:return new a;case X:case re:return new a(e);case te:return(o=new(i=e).constructor(i.source,He.exec(i))).lastIndex=i.lastIndex,o;case ne:return new a;case ie:return r=e,fr?tt(fr.call(r)):{}}}(e,m,l)}}a||(a=new kr);var v=a.get(e);if(v)return v;if(a.set(e,s),Fs(e))return e.forEach(function(r){s.add(Nr(r,t,n,r,e,a))}),s;if(As(e))return e.forEach(function(r,i){s.set(i,Nr(r,t,n,i,e,a))}),s;var y=d?o:(u?c?Fo:Oo:c?ol:il)(e);return Kt(y||e,function(r,i){y&&(r=e[i=r]),Ar(s,i,Nr(r,t,n,i,e,a))}),s}function Ir(e,t,n){var r=n.length;if(null==e)return!r;for(e=tt(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function Rr(e,t,n){if("function"!=typeof e)throw new it(l);return ia(function(){e.apply(o,n)},t)}function Dr(e,t,n,r){var i=-1,o=Xt,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=Jt(t,vn(n))),r?(o=Zt,s=!1):t.length>=a&&(o=bn,s=!1,t=new _r(t));e:for(;++i-1},xr.prototype.set=function(e,t){var n=this.__data__,r=Er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new(Jn||xr),string:new br}},wr.prototype.delete=function(e){var t=Ro(this,e).delete(e);return this.size-=t?1:0,t},wr.prototype.get=function(e){return Ro(this,e).get(e)},wr.prototype.has=function(e){return Ro(this,e).has(e)},wr.prototype.set=function(e,t){var n=Ro(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},_r.prototype.add=_r.prototype.push=function(e){return this.__data__.set(e,c),this},_r.prototype.has=function(e){return this.__data__.has(e)},kr.prototype.clear=function(){this.__data__=new xr,this.size=0},kr.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},kr.prototype.get=function(e){return this.__data__.get(e)},kr.prototype.has=function(e){return this.__data__.has(e)},kr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xr){var r=n.__data__;if(!Jn||r.length0&&n(s)?t>1?Wr(s,t-1,n,r,i):en(i,s):r||(i[i.length]=s)}return i}var Vr=lo(),Kr=lo(!0);function Yr(e,t){return e&&Vr(e,t,il)}function Qr(e,t){return e&&Kr(e,t,il)}function Gr(e,t){return Gt(t,function(t){return Cs(e[t])})}function Xr(e,t){for(var n=0,r=(t=Ki(t,e)).length;null!=e&&nt}function ti(e,t){return null!=e&&ut.call(e,t)}function ni(e,t){return null!=e&&t in tt(e)}function ri(e,t,n){for(var i=n?Zt:Xt,a=e[0].length,s=e.length,l=s,c=r(s),u=1/0,d=[];l--;){var f=e[l];l&&t&&(f=Jt(f,vn(t))),u=Kn(f.length,u),c[l]=!n&&(t||a>=120&&f.length>=120)?new _r(l&&f):o}f=e[0];var p=-1,h=c[0];e:for(;++p=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)})}function bi(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Pt.call(s,l,1),Pt.call(e,l,1);return e}function wi(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Ko(i)?Pt.call(e,i,1):Di(e,i)}}return e}function _i(e,t){return e+qn(Gn()*(t-e+1))}function ki(e,t){var n="";if(!e||t<1||t>j)return n;do{t%2&&(n+=e),(t=qn(t/2))&&(e+=e)}while(t);return n}function Ci(e,t){return oa(ta(e,t,El),e+"")}function Si(e){return Sr(pl(e))}function zi(e,t){var n=pl(e);return la(n,Pr(t,0,n.length))}function Mi(e,t,n,r){if(!Ms(e))return e;for(var i=-1,a=(t=Ki(t,e)).length,s=a-1,l=e;null!=l&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!Ps(a)&&(n?a<=t:a=a){var u=t?null:Co(e);if(u)return En(u);s=!1,i=bn,c=new _r}else c=t?[]:l;e:for(;++r=r?e:Li(e,t,n)}var Gi=Nn||function(e){return Ft.clearTimeout(e)};function Xi(e,t){if(t)return e.slice();var n=e.length,r=Tt?Tt(n):new e.constructor(n);return e.copy(r),r}function Zi(e){var t=new e.constructor(e.byteLength);return new _t(t).set(new _t(e)),t}function Ji(e,t){var n=t?Zi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function eo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=Ps(e),s=t!==o,l=null===t,c=t==t,u=Ps(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=tt(t);++r-1?i[a?t[s]:s]:o}}function ho(e){return Lo(function(t){var n=t.length,r=n,i=vr.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new it(l);if(i&&!s&&"wrapper"==Po(a))var s=new vr([],!0)}for(r=s?r:n;++r1&&x.reverse(),f&&ul))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,f=!0,p=n&g?new _r:o;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Kt(q,function(n){var r="_."+n[0];t&n[1]&&!Xt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Re);return t?t[1].split(De):[]}(r),n)))}function sa(e){var t=0,n=0;return function(){var r=Yn(),i=E-(r-n);if(n=r,i>0){if(++t>=A)return arguments[0]}else t=0;return e.apply(o,arguments)}}function la(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return Oa(e,n="function"==typeof n?(e.pop(),n):o)});function Da(e){var t=hr(e);return t.__chain__=!0,t}function qa(e,t){return t(e)}var Ba=Lo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return jr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof yr&&Ko(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:qa,args:[i],thisArg:o}),new vr(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)});var $a=oo(function(e,t,n){ut.call(e,n)?++e[n]:Fr(e,n,1)});var Ha=po(ga),Ua=po(va);function Wa(e,t){return(vs(e)?Kt:qr)(e,Io(t,3))}function Va(e,t){return(vs(e)?Yt:Br)(e,Io(t,3))}var Ka=oo(function(e,t,n){ut.call(e,n)?e[n].push(t):Fr(e,n,[t])});var Ya=Ci(function(e,t,n){var i=-1,o="function"==typeof t,a=bs(e)?r(e.length):[];return qr(e,function(e){a[++i]=o?Wt(t,e,n):ii(e,t,n)}),a}),Qa=oo(function(e,t,n){Fr(e,n,t)});function Ga(e,t){return(vs(e)?Jt:pi)(e,Io(t,3))}var Xa=oo(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Za=Ci(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Yo(e,t[0],t[1])?t=[]:n>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),yi(e,Wr(t,1),[])}),Ja=In||function(){return Ft.Date.now()};function es(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,zo(e,C,o,o,o,o,t)}function ts(e,t){var n;if("function"!=typeof t)throw new it(l);return e=Bs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var ns=Ci(function(e,t,n){var r=v;if(n.length){var i=Tn(n,No(ns));r|=_}return zo(e,r,t,n,i)}),rs=Ci(function(e,t,n){var r=v|y;if(n.length){var i=Tn(n,No(rs));r|=_}return zo(t,r,e,n,i)});function is(e,t,n){var r,i,a,s,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new it(l);function m(t){var n=r,a=i;return r=i=o,d=t,s=e.apply(a,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||p&&e-d>=a}function v(){var e=Ja();if(g(e))return y(e);c=ia(v,function(e){var n=t-(e-u);return p?Kn(n,a-(e-d)):n}(e))}function y(e){return c=o,h&&r?m(e):(r=i=o,s)}function b(){var e=Ja(),n=g(e);if(r=arguments,i=this,u=e,n){if(c===o)return function(e){return d=e,c=ia(v,t),f?m(e):s}(u);if(p)return c=ia(v,t),m(u)}return c===o&&(c=ia(v,t)),s}return t=Hs(t)||0,Ms(n)&&(f=!!n.leading,a=(p="maxWait"in n)?Vn(Hs(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==o&&Gi(c),d=0,r=u=i=c=o},b.flush=function(){return c===o?s:y(Ja())},b}var os=Ci(function(e,t){return Rr(e,1,t)}),as=Ci(function(e,t,n){return Rr(e,Hs(t)||0,n)});function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(l);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function ls(e){if("function"!=typeof e)throw new it(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=wr;var cs=Yi(function(e,t){var n=(t=1==t.length&&vs(t[0])?Jt(t[0],vn(Io())):Jt(Wr(t,1),vn(Io()))).length;return Ci(function(r){for(var i=-1,o=Kn(r.length,n);++i=t}),gs=oi(function(){return arguments}())?oi:function(e){return Ts(e)&&ut.call(e,"callee")&&!jt.call(e,"callee")},vs=r.isArray,ys=Dt?vn(Dt):function(e){return Ts(e)&&Jr(e)==le};function bs(e){return null!=e&&zs(e.length)&&!Cs(e)}function xs(e){return Ts(e)&&bs(e)}var ws=$n||Hl,_s=qt?vn(qt):function(e){return Ts(e)&&Jr(e)==W};function ks(e){if(!Ts(e))return!1;var t=Jr(e);return t==K||t==V||"string"==typeof e.message&&"string"==typeof e.name&&!Ls(e)}function Cs(e){if(!Ms(e))return!1;var t=Jr(e);return t==Y||t==Q||t==H||t==ee}function Ss(e){return"number"==typeof e&&e==Bs(e)}function zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}function Ms(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ts(e){return null!=e&&"object"==typeof e}var As=Bt?vn(Bt):function(e){return Ts(e)&&Ho(e)==G};function Es(e){return"number"==typeof e||Ts(e)&&Jr(e)==X}function Ls(e){if(!Ts(e)||Jr(e)!=J)return!1;var t=Lt(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==ht}var Os=$t?vn($t):function(e){return Ts(e)&&Jr(e)==te};var Fs=Ht?vn(Ht):function(e){return Ts(e)&&Ho(e)==ne};function js(e){return"string"==typeof e||!vs(e)&&Ts(e)&&Jr(e)==re}function Ps(e){return"symbol"==typeof e||Ts(e)&&Jr(e)==ie}var Ns=Ut?vn(Ut):function(e){return Ts(e)&&zs(e.length)&&!!zt[Jr(e)]};var Is=wo(fi),Rs=wo(function(e,t){return e<=t});function Ds(e){if(!e)return[];if(bs(e))return js(e)?Fn(e):ro(e);if(Rt&&e[Rt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Rt]());var t=Ho(e);return(t==G?zn:t==ne?En:pl)(e)}function qs(e){return e?(e=Hs(e))===F||e===-F?(e<0?-1:1)*P:e==e?e:0:0===e?e:0}function Bs(e){var t=qs(e),n=t%1;return t==t?n?t-n:t:0}function $s(e){return e?Pr(Bs(e),0,I):0}function Hs(e){if("number"==typeof e)return e;if(Ps(e))return N;if(Ms(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ms(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(je,"");var n=We.test(e);return n||Ke.test(e)?Et(e.slice(2),n?2:8):Ue.test(e)?N:+e}function Us(e){return io(e,ol(e))}function Ws(e){return null==e?"":Ii(e)}var Vs=ao(function(e,t){if(Zo(t)||bs(t))io(t,il(t),e);else for(var n in t)ut.call(t,n)&&Ar(e,n,t[n])}),Ks=ao(function(e,t){io(t,ol(t),e)}),Ys=ao(function(e,t,n,r){io(t,ol(t),e,r)}),Qs=ao(function(e,t,n,r){io(t,il(t),e,r)}),Gs=Lo(jr);var Xs=Ci(function(e,t){e=tt(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&Yo(t[0],t[1],i)&&(r=1);++n1),t}),io(e,Fo(e),n),r&&(n=Nr(n,f|p|h,Ao));for(var i=t.length;i--;)Di(n,t[i]);return n});var cl=Lo(function(e,t){return null==e?{}:function(e,t){return bi(e,t,function(t,n){return el(e,n)})}(e,t)});function ul(e,t){if(null==e)return{};var n=Jt(Fo(e),function(e){return[e]});return t=Io(t),bi(e,n,function(e,n){return t(e,n[0])})}var dl=So(il),fl=So(ol);function pl(e){return null==e?[]:yn(e,il(e))}var hl=uo(function(e,t,n){return t=t.toLowerCase(),e+(n?ml(t):t)});function ml(e){return kl(Ws(e).toLowerCase())}function gl(e){return(e=Ws(e))&&e.replace(Qe,_n).replace(bt,"")}var vl=uo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),yl=uo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),bl=co("toLowerCase");var xl=uo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var wl=uo(function(e,t,n){return e+(n?" ":"")+kl(t)});var _l=uo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),kl=co("toUpperCase");function Cl(e,t,n){return e=Ws(e),(t=n?o:t)===o?function(e){return kt.test(e)}(e)?function(e){return e.match(wt)||[]}(e):function(e){return e.match(qe)||[]}(e):e.match(t)||[]}var Sl=Ci(function(e,t){try{return Wt(e,o,t)}catch(e){return ks(e)?e:new Ze(e)}}),zl=Lo(function(e,t){return Kt(t,function(t){t=ua(t),Fr(e,t,ns(e[t],e))}),e});function Ml(e){return function(){return e}}var Tl=ho(),Al=ho(!0);function El(e){return e}function Ll(e){return ci("function"==typeof e?e:Nr(e,f))}var Ol=Ci(function(e,t){return function(n){return ii(n,e,t)}}),Fl=Ci(function(e,t){return function(n){return ii(e,n,t)}});function jl(e,t,n){var r=il(t),i=Gr(t,r);null!=n||Ms(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Gr(t,il(t)));var o=!(Ms(n)&&"chain"in n&&!n.chain),a=Cs(e);return Kt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,en([this.value()],arguments))})}),e}function Pl(){}var Nl=yo(Jt),Il=yo(Qt),Rl=yo(rn);function Dl(e){return Qo(e)?fn(ua(e)):function(e){return function(t){return Xr(t,e)}}(e)}var ql=xo(),Bl=xo(!0);function $l(){return[]}function Hl(){return!1}var Ul=vo(function(e,t){return e+t},0),Wl=ko("ceil"),Vl=vo(function(e,t){return e/t},1),Kl=ko("floor");var Yl,Ql=vo(function(e,t){return e*t},1),Gl=ko("round"),Xl=vo(function(e,t){return e-t},0);return hr.after=function(e,t){if("function"!=typeof t)throw new it(l);return e=Bs(e),function(){if(--e<1)return t.apply(this,arguments)}},hr.ary=es,hr.assign=Vs,hr.assignIn=Ks,hr.assignInWith=Ys,hr.assignWith=Qs,hr.at=Gs,hr.before=ts,hr.bind=ns,hr.bindAll=zl,hr.bindKey=rs,hr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return vs(e)?e:[e]},hr.chain=Da,hr.chunk=function(e,t,n){t=(n?Yo(e,t,n):t===o)?1:Vn(Bs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,l=r(Dn(i/t));ai?0:i+n),(r=r===o||r>i?i:Bs(r))<0&&(r+=i),r=n>r?0:$s(r);n>>0)?(e=Ws(e))&&("string"==typeof t||null!=t&&!Os(t))&&!(t=Ii(t))&&Sn(e)?Qi(Fn(e),0,n):e.split(t,n):[]},hr.spread=function(e,t){if("function"!=typeof e)throw new it(l);return t=null==t?0:Vn(Bs(t),0),Ci(function(n){var r=n[t],i=Qi(n,0,t);return r&&en(i,r),Wt(e,this,i)})},hr.tail=function(e){var t=null==e?0:e.length;return t?Li(e,1,t):[]},hr.take=function(e,t,n){return e&&e.length?Li(e,0,(t=n||t===o?1:Bs(t))<0?0:t):[]},hr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Li(e,(t=r-(t=n||t===o?1:Bs(t)))<0?0:t,r):[]},hr.takeRightWhile=function(e,t){return e&&e.length?Bi(e,Io(t,3),!1,!0):[]},hr.takeWhile=function(e,t){return e&&e.length?Bi(e,Io(t,3)):[]},hr.tap=function(e,t){return t(e),e},hr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(l);return Ms(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(e,t,{leading:r,maxWait:t,trailing:i})},hr.thru=qa,hr.toArray=Ds,hr.toPairs=dl,hr.toPairsIn=fl,hr.toPath=function(e){return vs(e)?Jt(e,ua):Ps(e)?[e]:ro(ca(Ws(e)))},hr.toPlainObject=Us,hr.transform=function(e,t,n){var r=vs(e),i=r||ws(e)||Ns(e);if(t=Io(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ms(e)&&Cs(o)?mr(Lt(e)):{}}return(i?Kt:Yr)(e,function(e,r,i){return t(n,e,r,i)}),n},hr.unary=function(e){return es(e,1)},hr.union=Ta,hr.unionBy=Aa,hr.unionWith=Ea,hr.uniq=function(e){return e&&e.length?Ri(e):[]},hr.uniqBy=function(e,t){return e&&e.length?Ri(e,Io(t,2)):[]},hr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Ri(e,o,t):[]},hr.unset=function(e,t){return null==e||Di(e,t)},hr.unzip=La,hr.unzipWith=Oa,hr.update=function(e,t,n){return null==e?e:qi(e,t,Vi(n))},hr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:qi(e,t,Vi(n),r)},hr.values=pl,hr.valuesIn=function(e){return null==e?[]:yn(e,ol(e))},hr.without=Fa,hr.words=Cl,hr.wrap=function(e,t){return us(Vi(t),e)},hr.xor=ja,hr.xorBy=Pa,hr.xorWith=Na,hr.zip=Ia,hr.zipObject=function(e,t){return Ui(e||[],t||[],Ar)},hr.zipObjectDeep=function(e,t){return Ui(e||[],t||[],Mi)},hr.zipWith=Ra,hr.entries=dl,hr.entriesIn=fl,hr.extend=Ks,hr.extendWith=Ys,jl(hr,hr),hr.add=Ul,hr.attempt=Sl,hr.camelCase=hl,hr.capitalize=ml,hr.ceil=Wl,hr.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Hs(n))==n?n:0),t!==o&&(t=(t=Hs(t))==t?t:0),Pr(Hs(e),t,n)},hr.clone=function(e){return Nr(e,h)},hr.cloneDeep=function(e){return Nr(e,f|h)},hr.cloneDeepWith=function(e,t){return Nr(e,f|h,t="function"==typeof t?t:o)},hr.cloneWith=function(e,t){return Nr(e,h,t="function"==typeof t?t:o)},hr.conformsTo=function(e,t){return null==t||Ir(e,t,il(t))},hr.deburr=gl,hr.defaultTo=function(e,t){return null==e||e!=e?t:e},hr.divide=Vl,hr.endsWith=function(e,t,n){e=Ws(e),t=Ii(t);var r=e.length,i=n=n===o?r:Pr(Bs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},hr.eq=ps,hr.escape=function(e){return(e=Ws(e))&&Se.test(e)?e.replace(ke,kn):e},hr.escapeRegExp=function(e){return(e=Ws(e))&&Fe.test(e)?e.replace(Oe,"\\$&"):e},hr.every=function(e,t,n){var r=vs(e)?Qt:$r;return n&&Yo(e,t,n)&&(t=o),r(e,Io(t,3))},hr.find=Ha,hr.findIndex=ga,hr.findKey=function(e,t){return an(e,Io(t,3),Yr)},hr.findLast=Ua,hr.findLastIndex=va,hr.findLastKey=function(e,t){return an(e,Io(t,3),Qr)},hr.floor=Kl,hr.forEach=Wa,hr.forEachRight=Va,hr.forIn=function(e,t){return null==e?e:Vr(e,Io(t,3),ol)},hr.forInRight=function(e,t){return null==e?e:Kr(e,Io(t,3),ol)},hr.forOwn=function(e,t){return e&&Yr(e,Io(t,3))},hr.forOwnRight=function(e,t){return e&&Qr(e,Io(t,3))},hr.get=Js,hr.gt=hs,hr.gte=ms,hr.has=function(e,t){return null!=e&&Uo(e,t,ti)},hr.hasIn=el,hr.head=ba,hr.identity=El,hr.includes=function(e,t,n,r){e=bs(e)?e:pl(e),n=n&&!r?Bs(n):0;var i=e.length;return n<0&&(n=Vn(i+n,0)),js(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ln(e,t,n)>-1},hr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Bs(n);return i<0&&(i=Vn(r+i,0)),ln(e,t,i)},hr.inRange=function(e,t,n){return t=qs(t),n===o?(n=t,t=0):n=qs(n),function(e,t,n){return e>=Kn(t,n)&&e=-j&&e<=j},hr.isSet=Fs,hr.isString=js,hr.isSymbol=Ps,hr.isTypedArray=Ns,hr.isUndefined=function(e){return e===o},hr.isWeakMap=function(e){return Ts(e)&&Ho(e)==ae},hr.isWeakSet=function(e){return Ts(e)&&Jr(e)==se},hr.join=function(e,t){return null==e?"":Un.call(e,t)},hr.kebabCase=vl,hr.last=ka,hr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Bs(n))<0?Vn(r+i,0):Kn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):sn(e,un,i,!0)},hr.lowerCase=yl,hr.lowerFirst=bl,hr.lt=Is,hr.lte=Rs,hr.max=function(e){return e&&e.length?Hr(e,El,ei):o},hr.maxBy=function(e,t){return e&&e.length?Hr(e,Io(t,2),ei):o},hr.mean=function(e){return dn(e,El)},hr.meanBy=function(e,t){return dn(e,Io(t,2))},hr.min=function(e){return e&&e.length?Hr(e,El,fi):o},hr.minBy=function(e,t){return e&&e.length?Hr(e,Io(t,2),fi):o},hr.stubArray=$l,hr.stubFalse=Hl,hr.stubObject=function(){return{}},hr.stubString=function(){return""},hr.stubTrue=function(){return!0},hr.multiply=Ql,hr.nth=function(e,t){return e&&e.length?vi(e,Bs(t)):o},hr.noConflict=function(){return Ft._===this&&(Ft._=mt),this},hr.noop=Pl,hr.now=Ja,hr.pad=function(e,t,n){e=Ws(e);var r=(t=Bs(t))?On(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return bo(qn(i),n)+e+bo(Dn(i),n)},hr.padEnd=function(e,t,n){e=Ws(e);var r=(t=Bs(t))?On(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Gn();return Kn(e+i*(t-e+At("1e-"+((i+"").length-1))),t)}return _i(e,t)},hr.reduce=function(e,t,n){var r=vs(e)?tn:hn,i=arguments.length<3;return r(e,Io(t,4),n,i,qr)},hr.reduceRight=function(e,t,n){var r=vs(e)?nn:hn,i=arguments.length<3;return r(e,Io(t,4),n,i,Br)},hr.repeat=function(e,t,n){return t=(n?Yo(e,t,n):t===o)?1:Bs(t),ki(Ws(e),t)},hr.replace=function(){var e=arguments,t=Ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},hr.result=function(e,t,n){var r=-1,i=(t=Ki(t,e)).length;for(i||(i=1,e=o);++rj)return[];var n=I,r=Kn(e,I);t=Io(t),e-=I;for(var i=gn(r,t);++n=a)return e;var l=n-On(r);if(l<1)return r;var c=s?Qi(s,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(s&&(l+=c.length-l),Os(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=nt(i.source,Ws(He.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===o?l:f)}}else if(e.indexOf(Ii(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},hr.unescape=function(e){return(e=Ws(e))&&Ce.test(e)?e.replace(_e,jn):e},hr.uniqueId=function(e){var t=++dt;return Ws(e)+t},hr.upperCase=_l,hr.upperFirst=kl,hr.each=Wa,hr.eachRight=Va,hr.first=ba,jl(hr,(Yl={},Yr(hr,function(e,t){ut.call(hr.prototype,t)||(Yl[t]=e)}),Yl),{chain:!1}),hr.VERSION="4.17.10",Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){hr[e].placeholder=hr}),Kt(["drop","take"],function(e,t){yr.prototype[e]=function(n){n=n===o?1:Vn(Bs(n),0);var r=this.__filtered__&&!t?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=Kn(n,r.__takeCount__):r.__views__.push({size:Kn(n,I),type:e+(r.__dir__<0?"Right":"")}),r},yr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Kt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==L||3==n;yr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Io(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Kt(["head","last"],function(e,t){var n="take"+(t?"Right":"");yr.prototype[e]=function(){return this[n](1).value()[0]}}),Kt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");yr.prototype[e]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(El)},yr.prototype.find=function(e){return this.filter(e).head()},yr.prototype.findLast=function(e){return this.reverse().find(e)},yr.prototype.invokeMap=Ci(function(e,t){return"function"==typeof e?new yr(this):this.map(function(n){return ii(n,e,t)})}),yr.prototype.reject=function(e){return this.filter(ls(Io(e)))},yr.prototype.slice=function(e,t){e=Bs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new yr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Bs(t))<0?n.dropRight(-t):n.take(t-e)),n)},yr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},yr.prototype.toArray=function(){return this.take(I)},Yr(yr.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=hr[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(hr.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof yr,c=s[0],u=l||vs(t),d=function(e){var t=i.apply(hr,en([e],s));return r&&f?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new yr(this);var g=e.apply(t,s);return g.__actions__.push({func:qa,args:[d],thisArg:o}),new vr(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?r?g.value()[0]:g.value():g)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);hr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(vs(i)?i:[],e)}return this[n](function(n){return t.apply(vs(n)?n:[],e)})}}),Yr(yr.prototype,function(e,t){var n=hr[t];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:t,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var e=new yr(this.__wrapped__);return e.__actions__=ro(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ro(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ro(this.__views__),e},yr.prototype.reverse=function(){if(this.__filtered__){var e=new yr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},yr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=vs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},hr.prototype.plant=function(e){for(var t,n=this;n instanceof gr;){var r=fa(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},hr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof yr){var t=e;return this.__actions__.length&&(t=new yr(this)),(t=t.reverse()).__actions__.push({func:qa,args:[Ma],thisArg:o}),new vr(t,this.__chain__)}return this.thru(Ma)},hr.prototype.toJSON=hr.prototype.valueOf=hr.prototype.value=function(){return $i(this.__wrapped__,this.__actions__)},hr.prototype.first=hr.prototype.head,Rt&&(hr.prototype[Rt]=function(){return this}),hr}();Ft._=Pn,(i=function(){return Pn}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(t,n(8),n(12)(e))},function(e,t,n){var r=n(7)(n(4),"Map");e.exports=r},function(e,t,n){var r=n(179),i=n(186),o=n(188),a=n(189),s=n(190);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(5),i=n(22),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=47)}([function(e,t,n){"use strict";var r=n(46),i=n(158),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){l.headers[e]={}}),r.forEach(["post","put","patch"],function(e){l.headers[e]=r.merge(o)}),e.exports=l}).call(t,n(73))},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(112),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,o.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9),i=n(1).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=!0},function(e,t,n){"use strict";var r=n(14);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){var r=n(11).f,i=n(17),o=n(2)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(58)("keys"),i=n(63);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(52),i=n(27);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(12).Symbol;e.exports=r},function(e,t,n){var r=n(172),i=n(191);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["1/2","1/3","2/3","1/4","3/4","1/5","2/5","3/5","4/5","1/6","5/6"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(156);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return o(r).default}});var i=n(64);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Errors",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,n){"use strict";(function(t){var r=n(0),i=n(99),o=n(102),a=n(108),s=n(106),l=n(45),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(101);e.exports=function(e){return new Promise(function(u,d){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest,m="onreadystatechange",g=!1;if("test"===t.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,m="onload",g=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var v=e.auth.username||"",y=e.auth.password||"";p.Authorization="Basic "+c(v+":"+y)}if(h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[m]=function(){if(h&&(4===h.readyState||g)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:t,config:e,request:h};i(u,d,n),h=null}},h.onerror=function(){d(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){d(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var b=n(104),x=(e.withCredentials||s(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;x&&(p[e.xsrfHeaderName]=x)}if("setRequestHeader"in h&&r.forEach(p,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),d(e),h=null)}),void 0===f&&(f=null),h.send(f)})}}).call(t,n(73))},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(98);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;rn;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},p=function(e){delete v[e]},"process"==n(15)(d)?r=function(e){d.nextTick(a(y,e,1))}:m&&m.now?r=function(e){m.now(a(y,e,1))}:h?(o=(i=new h).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:f,clear:p}},function(e,t,n){var r=n(34),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(27);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.record(t)}return r(e,[{key:"all",value:function(){return this.errors}},{key:"has",value:function(e){var t=this.errors.hasOwnProperty(e);t||(t=Object.keys(this.errors).filter(function(t){return t.startsWith(e+".")||t.startsWith(e+"[")}).length>0);return t}},{key:"first",value:function(e){return this.get(e)[0]}},{key:"get",value:function(e){return this.errors[e]||[]}},{key:"any",value:function(){return Object.keys(this.errors).length>0}},{key:"record",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=e}},{key:"clear",value:function(e){if(e){var t=Object.assign({},this.errors);Object.keys(t).filter(function(t){return t===e||t.startsWith(e+".")||t.startsWith(e+"[")}).forEach(function(e){return delete t[e]}),this.errors=t}else this.errors={}}}]),e}();t.default=i},function(e,t,n){var r=n(179),i=n(231),o=n(13),a=n(232),s=n(68),l=n(233),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),f=!n&&!u&&!d&&l(e),p=n||u||d||f,h=p?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||h.push(g);return h}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(243))},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)}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(180);e.exports=function(e){return null==e?"":r(e)}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:null;return this.viaManyToMany?this.detachResources(e):Nova.request({url:"/nova-api/"+this.resourceName,method:"delete",params:(0,o.default)({},this.queryString,{resources:a(e)})}).then(n||function(){t.deleteModalOpen=!1,t.getResources()})},deleteSelectedResources:function(){this.deleteResources(this.selectedResources)},deleteAllMatchingResources:function(){var e=this;return this.viaManyToMany?this.detachAllMatchingResources():Nova.request({url:this.deleteAllMatchingResourcesEndpoint,method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},detachResources:function(e){var t=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,o.default)({},this.queryString,{resources:a(e)})}).then(function(){t.deleteModalOpen=!1,t.getResources()})},detachAllMatchingResources:function(){var e=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},forceDeleteResources:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/force",method:"delete",params:(0,o.default)({},this.queryString,{resources:a(e)})}).then(n||function(){t.deleteModalOpen=!1,t.getResources()})},forceDeleteSelectedResources:function(){this.forceDeleteResources(this.selectedResources)},forceDeleteAllMatchingResources:function(){var e=this;return Nova.request({url:this.forceDeleteSelectedResourcesEndpoint,method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then(function(){e.deleteModalOpen=!1,e.getResources()})},restoreResources:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/restore",method:"put",params:(0,o.default)({},this.queryString,{resources:a(e)})}).then(n||function(){t.restoreModalOpen=!1,t.getResources()})},restoreSelectedResources:function(){this.restoreResources(this.selectedResources)},restoreAllMatchingResources:function(){var e=this;return Nova.request({url:this.restoreAllMatchingResourcesEndpoint,method:"put",params:(0,o.default)({},this.queryString,{resources:"all"})}).then(function(){e.restoreModalOpen=!1,e.getResources()})}},computed:{deleteAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens:"/nova-api/"+this.resourceName},forceDeleteSelectedResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/force":"/nova-api/"+this.resourceName+"/force"},restoreAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/restore":"/nova-api/"+this.resourceName+"/restore"},queryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,trashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(26)),i=s(n(110)),o=s(n(228)),a=s(n(230));function s(e){return e&&e.__esModule?e:{default:e}}t.default={data:function(){return{filters:[],currentFilters:[]}},methods:{initializeFilterValuesFromQueryString:function(){this.clearAllFilters(),this.encodedFilters&&(this.currentFilters=JSON.parse(atob(this.encodedFilters)),this.syncFilterValues())},clearAllFilters:function(){this.currentFilters=[],(0,o.default)(this.filters,function(e){e.currentValue=""})},syncFilterValues:function(){var e=this;(0,o.default)(this.filters,function(t){t.currentValue=(0,a.default)(_(e.currentFilters).find(function(e){return t.class==e.class}),"value",t.currentValue)})},filterChanged:function(){var e;this.updateQueryString((e={},(0,r.default)(e,this.pageParameter,1),(0,r.default)(e,this.filterParameter,btoa((0,i.default)(this.currentFilters))),e))}},computed:{encodedFilters:function(){return this.$route.query[this.filterParameter]||""}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{resourceName:{},field:{}},data:function(){return{value:""}},mounted:function(){var e=this;this.setInitialValue(),this.field.fill=this.fill,Nova.$on(this.field.attribute+"-value",function(t){e.value=t})},destroyed:function(){Nova.$off(this.field.attribute+"-value")},methods:{setInitialValue:function(){this.value=this.field.value||""},fill:function(e){e.append(this.field.attribute,this.value||"")},handleChange:function(e){this.value=e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);t.default={props:{errors:{default:function(){return new r.Errors}}},data:function(){return{errorClass:"border-danger"}},computed:{errorClasses:function(){return this.hasError?[this.errorClass]:[]},fieldAttribute:function(){return this.field.attribute},hasError:function(){return this.errors.has(this.fieldAttribute)},firstError:function(){if(this.hasError)return this.errors.first(this.fieldAttribute)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(115)),i=a(n(113)),o=a(n(40));function a(e){return e&&e.__esModule?e:{default:e}}t.default={props:{loadCards:{type:Boolean,default:!0}},data:function(){return{cards:[]}},created:function(){this.fetchCards()},methods:{fetchCards:function(){var e=(0,i.default)(r.default.mark(function e(){var t,n;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loadCards){e.next=6;break}return e.next=3,Nova.request().get(this.cardsEndpoint);case 3:t=e.sent,n=t.data,this.cards=n;case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},computed:{shouldShowCards:function(){return this.cards.length>0},smallCards:function(){return _.filter(this.cards,function(e){return-1!==o.default.indexOf(e.width)})},largeCards:function(){return _.filter(this.cards,function(e){return"full"==e.width})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{toAppTimezone:function(e){return e?moment.tz(e,this.userTimezone).clone().tz(Nova.config.timezone).format("YYYY-MM-DD kk:mm:ss"):e},fromAppTimezone:function(e){return e?moment.tz(e,Nova.config.timezone).clone().tz(this.userTimezone).format("YYYY-MM-DD kk:mm:ss"):e},localizeDateTimeField:function(e){if(!e.value)return e.value;var t=moment.tz(e.value,Nova.config.timezone).clone().tz(this.userTimezone);return e.format?t.format(e.format):this.usesTwelveHourTime?t.format("YYYY-MM-DD h:mm:ss A"):t.format("YYYY-MM-DD kk:mm:ss")},localizeDateField:function(e){if(!e.value)return e.value;var t=moment.tz(e.value,Nova.config.timezone).clone().tz(this.userTimezone);return e.format?t.format(e.format):t.format("YYYY-MM-DD")}},computed:{userTimezone:function(){return Nova.config.userTimezone?Nova.config.userTimezone:moment.tz.guess()},usesTwelveHourTime:function(){return _.endsWith((new Date).toLocaleString(),"AM")||_.endsWith((new Date).toLocaleString(),"PM")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(227),o=(r=i)&&r.__esModule?r:{default:r};t.default={methods:{updateQueryString:function(e){this.$router.push({query:(0,o.default)(e,this.$route.query)})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={computed:{resourceInformation:function(){var e=this;return _.find(Nova.config.resources,function(t){return t.uriKey==e.resourceName})},viaResourceInformation:function(){var e=this;if(this.viaResource)return _.find(Nova.config.resources,function(t){return t.uriKey==e.viaResource})},authorizedToCreate:function(){return this.resourceInformation.authorizedToCreate}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(26),o=(r=i)&&r.__esModule?r:{default:r};t.default={methods:{selectPreviousPage:function(){this.updateQueryString((0,o.default)({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.updateQueryString((0,o.default)({},this.pageParameter,this.currentPage+1))}},computed:{currentPage:function(){return parseInt(this.$route.query[this.pageParameter]||1)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(26),o=(r=i)&&r.__esModule?r:{default:r};t.default={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.updateQueryString((0,o.default)({},this.perPageParameter,this.perPage))}},computed:{currentPerPage:function(){return this.$route.query[this.perPageParameter]||25}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(226),o=(r=i)&&r.__esModule?r:{default:r};t.default={data:function(){return{search:"",selectedResource:"",availableResources:[]}},methods:{selectResource:function(e){this.selectedResource=e},handleSearchCleared:function(){this.availableResources=[]},clearSelection:function(){this.selectedResource="",this.availableResources=[]},performSearch:function(e){var t=this;this.search=e;var n=e.trim();""!=n?this.debouncer(function(){t.selectedResource="",t.getAvailableResources(n)},500):this.clearSelection()},debouncer:(0,o.default)(function(e){return e()},500)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{withTrashed:!1}},methods:{toggleWithTrashed:function(){this.withTrashed=!this.withTrashed},enableWithTrashed:function(){this.withTrashed=!0},disableWithTrashed:function(){this.withTrashed=!1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)};var r,i=n(240),o=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(48),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return o.default.all([e,new o.default(function(e){setTimeout(function(){return e()},t)})]).then(function(e){return e[0]})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e>1||0==e?r.Inflector.pluralize(t):r.Inflector.singularize(t)};var r=n(47)},function(e,t,n){"use strict";var r={uncountableWords:["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],pluralRules:[[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],singularRules:[[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("s$","gi"),""]],nonTitlecasedWords:["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],idSuffix:new RegExp("(_ids|_id)$","g"),underbar:new RegExp("_","g"),spaceOrUnderbar:new RegExp("[ _]","g"),uppercase:new RegExp("([A-Z])","g"),underbarPrefix:new RegExp("^_"),applyRules:function(e,t,n,r){if(r)e=r;else if(!(n.indexOf(e.toLowerCase())>-1))for(var i=0;i>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new i;t=t<<8|n}return a}},function(e,t,n){"use strict";var r=n(0);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,function(e,t){null!==e&&void 0!==e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))}))}),o=a.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){e.exports={default:n(116),__esModule:!0}},function(e,t,n){e.exports={default:n(117),__esModule:!0}},function(e,t,n){e.exports={default:n(118),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(48),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new o.default(function(e,n){return function r(i,a){try{var s=t[i](a),l=s.value}catch(e){return void n(e)}if(!s.done)return o.default.resolve(l).then(function(e){r("next",e)},function(e){r("throw",e)});e(l)}("next")})}}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(111),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default||function(e){for(var t=1;tu;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(16),i=n(127),o=n(126),a=n(4),s=n(61),l=n(146),c={},u={};(t=e.exports=function(e,t,n,d,f){var p,h,m,g,v=f?function(){return e}:l(e),y=r(n,d,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(p=s(e.length);p>b;b++)if((g=t?y(a(h=e[b])[0],h[1]):y(e[b]))===c||g===u)return g}else for(m=v.call(e);!(h=m.next()).done;)if((g=i(m,y,h.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},function(e,t,n){e.exports=!n(5)&&!n(29)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(10),i=n(2)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){"use strict";var r=n(133),i=n(57),o=n(32),a={};n(7)(a,n(2)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(2)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(1),i=n(60).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==n(15)(a);e.exports=function(){var e,t,n,c=function(){var r,i;for(l&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var d=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){"use strict";var r=n(54),i=n(135),o=n(138),a=n(62),s=n(52),l=Object.assign;e.exports=!l||n(29)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var n=a(e),l=arguments.length,c=1,u=i.f,d=o.f;l>c;)for(var f,p=s(arguments[c++]),h=u?r(p).concat(u(p)):r(p),m=h.length,g=0;m>g;)d.call(p,f=h[g++])&&(n[f]=p[f]);return n}:l},function(e,t,n){var r=n(4),i=n(134),o=n(50),a=n(33)("IE_PROTO"),s=function(){},l=function(){var e,t=n(28)("iframe"),r=o.length;for(t.style.display="none",n(51).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("