/*! Ace-diff | github.com/ace-diff/ace-diff */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("brace")):"function"==typeof define&&define.amd?define(["brace"],e):"object"==typeof exports?exports.AceDiff=e(require("brace")):t.AceDiff=e(t.ace)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=29)}([function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(16),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(15),i=n(46),o=n(47),s="[object Null]",a="[object Undefined]",f=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:f&&f in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(34),i=n(35),o=n(36),s=n(37),a=n(38);function f(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=n}},function(t,e,n){(function(t){var r=n(1),i=n(78),o="object"==typeof e&&e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,f=(a?a.isBuffer:void 0)||i;t.exports=f}).call(e,n(12)(t))},function(t,e,n){var r=n(80),i=n(81),o=n(82),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},function(t,e,n){var r=n(86),i=n(88),o=n(13);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t'+s.innerHTML+"",this.editors={left:{ace:r.default.edit(this.options.left.id),markers:[],lineLengths:[]},right:{ace:r.default.edit(this.options.right.id),markers:[],lineLengths:[]},editorHeight:null},function(t){var e=(new Date).getTime(),n=(new Date).getTime(),r=void 0;t.editors.left.ace.getSession().on("changeScrollTop",function(e){r=(new Date).getTime(),n+50n?"lines":"targetOnly");r--,e.markers.push(e.ace.session.addMarker(new u(n,0,r,1),o,"fullLine"))}function m(t,e,n){var r,i,o;x(t),O(t),i=(r=t).editors.left.ace.getSession().getScrollTop(),o=r.editors.right.ace.getSession().getScrollTop(),r.copyRightContainer.style.cssText="top: "+-i+"px",r.copyLeftContainer.style.cssText="top: "+-o+"px"}function x(t){t.editors.left.markers.forEach(function(t){this.editors.left.ace.getSession().removeMarker(t)},t),t.editors.right.markers.forEach(function(t){this.editors.right.ace.getSession().removeMarker(t)},t)}function L(t,e,n,r,i){var o={},s=/^\n/.test(i);if(e===g.DIFF_INSERT){var a=E(t.editors.left,n,i),f=M(t.editors.right,r),c=S(t.editors.right,f),h=S(t.editors.left,a.startLine),l=f;0===S(t.editors.left,a.startLine)&&s&&(s=!1),0===a.startChar&&T(t.editors.right,r,s)&&(l=f+1);var u=a.startLine===a.endLine,p=0;(a.startChar>0||u&&i.length0&&a.startChar0||u&&i.length0&&a.startChar0&&S(t,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),0===r.endChar&&r.endLine--;var f=/\n$/.test(n);return r.startChar>0&&f&&r.endLine++,r}function S(t,e){return w(t,e).length}function w(t,e){return t.ace.getSession().doc.getLine(e)}function M(t,e){for(var n=t.ace.getSession().doc.getAllLines(),r=0,i=0,o=0;oe.leftStartLine&&t.options.left.copyLinkEnabled){var r=j({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(r)}e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled&&(r=j({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent}),t.copyLeftContainer.appendChild(r))}(this,t,e))},t)}p.prototype={setOptions:function(t){(0,i.default)(this.options,t),this.diff()},getNumDiffs:function(){return this.diffs.length},getEditors:function(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff:function(){var t=new s.default,e=this.editors.left.ace.getSession().getValue(),n=this.editors.right.ace.getSession().getValue(),r=t.diff_main(n,e);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=b(this.editors.left),this.editors.right.lineLengths=b(this.editors.right);var i=[],o={left:0,right:0};r.forEach(function(t,e,n){var s=t[0],a=t[1];n[e+1]&&a.endsWith("\n")&&n[e+1][1].startsWith("\n")&&(a+="\n",r[e][1]=a,r[e+1][1]=r[e+1][1].replace(/^\n/,"")),0!==a.length&&(s===g.DIFF_EQUAL?(o.left+=a.length,o.right+=a.length):s===g.DIFF_DELETE?(i.push(L(this,g.DIFF_DELETE,o.left,o.right,a)),o.right+=a.length):s===g.DIFF_INSERT&&(i.push(L(this,g.DIFF_INSERT,o.left,o.right,a)),o.left+=a.length))},this),this.diffs=function(t,e){var n=[];function r(e){return t.options.diffGranularity===g.DIFF_GRANULARITY_SPECIFIC?e<1:e<=1}e.forEach(function(t,e){if(0!==e){for(var i=!1,o=0;othis.options.maxDiffs||(x(this),O(this))},destroy:function(){var t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();var e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);var r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),(n=(e=this.editors.right.ace.container).cloneNode(!1)).textContent=r,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML=""}},e.default=p},function(e,n){e.exports=t},function(t,e,n){var r=n(32),i=n(90)(function(t,e,n){r(t,e,n)});t.exports=i},function(t,e,n){var r=n(33),i=n(17),o=n(65),s=n(67),a=n(0),f=n(26);t.exports=function t(e,n,c,h,l){e!==n&&o(n,function(o,f){if(a(o))l||(l=new r),s(e,n,f,c,t,h,l);else{var u=h?h(e[f],o,f+"",e,n,l):void 0;void 0===u&&(u=o),i(e,f,u)}},f)}},function(t,e,n){var r=n(4),i=n(39),o=n(40),s=n(41),a=n(42),f=n(43);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=f,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(5),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(5);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(5);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(5);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(4);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(4),i=n(14),o=n(52),s=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(6),i=n(13),o=n(27),s=n(0);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&o(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(0),i=n(100),o=n(101),s="Expected a function",a=Math.max,f=Math.min;t.exports=function(t,e,n){var c,h,l,u,g,p,d=0,v=!1,_=!1,b=!0;if("function"!=typeof t)throw new TypeError(s);function y(e){var n=c,r=h;return c=h=void 0,d=e,u=t.apply(r,n)}function m(t){var n=t-p;return void 0===p||n>=e||n<0||_&&t-d>=l}function x(){var t,n,r=i();if(m(r))return L(r);g=setTimeout(x,(n=e-((t=r)-p),_?f(n,l-(t-d)):n))}function L(t){return g=void 0,b&&c?y(t):(c=h=void 0,u)}function E(){var t,n=i(),r=m(n);if(c=arguments,h=this,p=n,r){if(void 0===g)return d=t=p,g=setTimeout(x,e),v?y(t):u;if(_)return g=setTimeout(x,e),y(p)}return void 0===g&&(g=setTimeout(x,e)),u}return e=o(e)||0,r(n)&&(v=!!n.leading,l=(_="maxWait"in n)?a(o(n.maxWait)||0,e):l,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==g&&clearTimeout(g),d=0,c=p=h=g=void 0},E.flush=function(){return void 0===g?u:L(i())},E}},function(t,e,n){var r=n(1);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(0),i=n(102),o=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,c=/^0o[0-7]+$/i,h=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=f.test(t);return n||c.test(t)?h(t.slice(2),n?2:8):a.test(t)?o:+t}},function(t,e,n){var r=n(3),i=n(2),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){"use strict";function r(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}r.Diff,r.prototype.diff_main=function(t,e,n,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=r;if(null==t||null==e)throw new Error("Null input. (diff_main)");if(t==e)return t?[[0,t]]:[];void 0===n&&(n=!0);var o=n,s=this.diff_commonPrefix(t,e),a=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=this.diff_commonSuffix(t,e);var f=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var c=this.diff_compute_(t,e,o,i);return a&&c.unshift([0,a]),f&&c.push([0,f]),this.diff_cleanupMerge(c),c},r.prototype.diff_compute_=function(t,e,n,r){var i;if(!t)return[[1,e]];if(!e)return[[-1,t]];var o=t.length>e.length?t:e,s=t.length>e.length?e:t,a=o.indexOf(s);if(-1!=a)return i=[[1,o.substring(0,a)],[0,s],[1,o.substring(a+s.length)]],t.length>e.length&&(i[0][0]=i[2][0]=-1),i;if(1==s.length)return[[-1,t],[1,e]];var f=this.diff_halfMatch_(t,e);if(f){var c=f[0],h=f[1],l=f[2],u=f[3],g=f[4],p=this.diff_main(c,l,n,r),d=this.diff_main(h,u,n,r);return p.concat([[0,g]],d)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},r.prototype.diff_lineMode_=function(t,e,n){t=(h=this.diff_linesToChars_(t,e)).chars1,e=h.chars2;var r=h.lineArray,i=this.diff_main(t,e,!1,n);this.diff_charsToLines_(i,r),this.diff_cleanupSemantic(i),i.push([0,""]);for(var o=0,s=0,a=0,f="",c="";o=1&&a>=1){i.splice(o-s-a,s+a),o=o-s-a;for(var h,l=(h=this.diff_main(f,c,!1,n)).length-1;l>=0;l--)i.splice(o,0,h[l]);o+=h.length}a=0,s=0,f="",c=""}o++}return i.pop(),i},r.prototype.diff_bisect_=function(t,e,n){for(var r=t.length,i=e.length,o=Math.ceil((r+i)/2),s=o,a=2*o,f=new Array(a),c=new Array(a),h=0;hn);_++){for(var b=-_+g;b<=_-p;b+=2){for(var y=s+b,m=(w=b==-_||b!=_&&f[y-1]r)p+=2;else if(m>i)g+=2;else if(u){if((E=s+l-b)>=0&&E=(L=r-c[E]))return this.diff_bisectSplit_(t,e,w,m,n)}}for(var x=-_+d;x<=_-v;x+=2){for(var L,E=s+x,S=(L=x==-_||x!=_&&c[E-1]r)v+=2;else if(S>i)d+=2;else if(!u){if((y=s+l-x)>=0&&y=(L=r-L))return this.diff_bisectSplit_(t,e,w,m,n)}}}}return[[-1,t],[1,e]]},r.prototype.diff_bisectSplit_=function(t,e,n,r,i){var o=t.substring(0,n),s=e.substring(0,r),a=t.substring(n),f=e.substring(r),c=this.diff_main(o,s,!1,i),h=this.diff_main(a,f,!1,i);return c.concat(h)},r.prototype.diff_linesToChars_=function(t,e){var n=[],r={};function i(t){for(var e="",i=0,o=-1,s=n.length;or?t=t.substring(n-r):ne.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,o,s,a,h]:null}var s,a,f,c,h,l=o(n,r,Math.ceil(n.length/4)),u=o(n,r,Math.ceil(n.length/2));return l||u?(s=u?l&&l[4].length>u[4].length?l:u:l,t.length>e.length?(a=s[0],f=s[1],c=s[2],h=s[3]):(c=s[0],h=s[1],a=s[2],f=s[3]),[a,f,c,h,s[4]]):null},r.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,i=null,o=0,s=0,a=0,f=0,c=0;o0?n[r-1]:-1,s=0,a=0,f=0,c=0,i=null,e=!0)),o++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=g?(u>=h.length/2||u>=l.length/2)&&(t.splice(o,0,[0,l.substring(0,u)]),t[o-1][1]=h.substring(0,h.length-u),t[o+1][1]=l.substring(u),o++):(g>=h.length/2||g>=l.length/2)&&(t.splice(o,0,[0,h.substring(0,g)]),t[o-1][0]=1,t[o-1][1]=l.substring(0,l.length-g),t[o+1][0]=-1,t[o+1][1]=h.substring(g),o++),o++}o++}},r.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),i=e.charAt(0),o=n.match(r.nonAlphaNumericRegex_),s=i.match(r.nonAlphaNumericRegex_),a=o&&n.match(r.whitespaceRegex_),f=s&&i.match(r.whitespaceRegex_),c=a&&n.match(r.linebreakRegex_),h=f&&i.match(r.linebreakRegex_),l=c&&t.match(r.blanklineEndRegex_),u=h&&e.match(r.blanklineStartRegex_);return l||u?5:c||h?4:o&&!a&&f?3:a||f?2:o||s?1:0}for(var n=1;n=u&&(u=g,c=i,h=o,l=s)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=h,l?t[n+1][1]=l:(t.splice(n+1,1),n--))}n++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,i=null,o=0,s=!1,a=!1,f=!1,c=!1;o0?n[r-1]:-1,f=c=!1),e=!0)),o++;e&&this.diff_cleanupMerge(t)},r.prototype.diff_cleanupMerge=function(t){t.push([0,""]);for(var e,n=0,r=0,i=0,o="",s="";n1?(0!==r&&0!==i&&(0!==(e=this.diff_commonPrefix(s,o))&&(n-r-i>0&&0==t[n-r-i-1][0]?t[n-r-i-1][1]+=s.substring(0,e):(t.splice(0,0,[0,s.substring(0,e)]),n++),s=s.substring(e),o=o.substring(e)),0!==(e=this.diff_commonSuffix(s,o))&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),o=o.substring(0,o.length-e))),0===r?t.splice(n-i,r+i,[1,s]):0===i?t.splice(n-r,r+i,[-1,o]):t.splice(n-r-i,r+i,[-1,o],[1,s]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;ne));n++)o=r,s=i;return t.length!=n&&-1===t[n][0]?s:s+(e-o)},r.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,r=//g,o=/\n/g,s=0;s");switch(a){case 1:e[s]=''+f+"";break;case-1:e[s]=''+f+"";break;case 0:e[s]=""+f+""}}return e.join("")},r.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(e),i=this;function o(t,r){var o=t/e.length,s=Math.abs(n-r);return i.Match_Distance?o+s/i.Match_Distance:s?1:o}var s=this.Match_Threshold,a=t.indexOf(e,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=t.lastIndexOf(e,n+e.length))&&(s=Math.min(o(0,a),s)));var f,c,h=1<=p;_--){var b=r[t.charAt(_-1)];if(v[_]=0===g?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(l[_+1]|l[_])<<1|1|l[_+1],v[_]&h){var y=o(g,_-1);if(y<=s){if(s=y,!((a=_-1)>n))break;p=Math.max(1,2*n-a)}}}if(o(g+1,n)>s)break;l=v}return a},r.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&"object"==typeof t&&void 0===e&&void 0===n)o=t,i=this.diff_text1(o);else if("string"==typeof t&&e&&"object"==typeof e&&void 0===n)i=t,o=e;else{if("string"!=typeof t||"string"!=typeof e||!n||"object"!=typeof n)throw new Error("Unknown call format to patch_make.");i=t,o=n}if(0===o.length)return[];for(var s=[],a=new r.patch_obj,f=0,c=0,h=0,l=i,u=i,g=0;g=2*this.Patch_Margin&&f&&(this.patch_addContext_(a,l),s.push(a),a=new r.patch_obj,f=0,l=u,c=h)}1!==p&&(c+=d.length),-1!==p&&(h+=d.length)}return f&&(this.patch_addContext_(a,l),s.push(a)),s},r.prototype.patch_deepCopy=function(t){for(var e=[],n=0;nthis.Match_MaxBits?-1!=(s=this.match_main(e,c.substring(0,this.Match_MaxBits),f))&&(-1==(h=this.match_main(e,c.substring(c.length-this.Match_MaxBits),f+c.length-this.Match_MaxBits))||s>=h)&&(s=-1):s=this.match_main(e,c,f),-1==s)i[o]=!1,r-=t[o].length2-t[o].length1;else if(i[o]=!0,r=s-f,c==(a=-1==h?e.substring(s,s+c.length):e.substring(s,h+this.Match_MaxBits)))e=e.substring(0,s)+this.diff_text2(t[o].diffs)+e.substring(s+c.length);else{var l=this.diff_main(c,a,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(l)/c.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(l);for(var u,g=0,p=0;po[0][1].length){var s=e-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(0==(o=(i=t[t.length-1]).diffs).length||0!=o[o.length-1][0])o.push([0,n]),i.length1+=e,i.length2+=e;else if(e>o[o.length-1][1].length){s=e-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,s),i.length1+=s,i.length2+=s}return n},r.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,n=0;n2*e?(f.length1+=l.length,o+=l.length,c=!1,f.diffs.push([h,l]),i.diffs.shift()):(l=l.substring(0,e-f.length1-this.Patch_Margin),f.length1+=l.length,o+=l.length,0===h?(f.length2+=l.length,s+=l.length):c=!1,f.diffs.push([h,l]),l==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(l.length))}a=(a=this.diff_text2(f.diffs)).substring(a.length-this.Patch_Margin);var u=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==u&&(f.length1+=u.length,f.length2+=u.length,0!==f.diffs.length&&0===f.diffs[f.diffs.length-1][0]?f.diffs[f.diffs.length-1][1]+=u:f.diffs.push([0,u])),c||t.splice(++n,0,f)}}},r.prototype.patch_toText=function(t){for(var e=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){var i=t+(n-t)/2;return"M "+t+" "+e+" C "+i+","+e+" "+i+","+r+" "+n+","+r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=Math.random().toString(36).substr(2,5),r="js-"+e+"-"+n,i=t.querySelector("."+e);if(i)return i.id=i.id||r,i.id;var o=document.createElement("div");return t.appendChild(o),o.className=e,o.id=r,o.id}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={on:function(t,e,n,r){var i="document"===t?document:document.querySelector(t);i.addEventListener(e,function(t){for(var e=i.querySelectorAll(n),o=t.target,s=0,a=e.length;s