From 834ef7def261ffbdcd39f9006ed834fa0f650d16 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 15 Mar 2023 22:16:54 +0100 Subject: [PATCH 1/8] UMD module --- dist/readthedocs-doc-diff.js | 2 +- webpack.config.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/readthedocs-doc-diff.js b/dist/readthedocs-doc-diff.js index 2fd79ac..be20471 100644 --- a/dist/readthedocs-doc-diff.js +++ b/dist/readthedocs-doc-diff.js @@ -1 +1 @@ -(()=>{var e={416:(e,t,n)=>{"use strict";var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,I=new o.DomIterator(t,y),j=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=I.next(),g=c.done,_=c.value,d=j.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=I.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=j.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};n(n.s=416)})(); \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index bfce4fb..a030629 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,6 +13,9 @@ module.exports = (env, argv) => { filename: "[name].js?[fullhash]", chunkFilename: "[name].js?[chunkhash]", path: path.join(__dirname, "dist"), + library: { + type: "umd", + }, }, optimization: { minimize: is_production, From 2184c185f9ba2353202abc487caf1ba033dd937d Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 15 Mar 2023 22:50:20 +0100 Subject: [PATCH 2/8] Define `output.library.name` --- dist/readthedocs-doc-diff.js | 2 +- webpack.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/readthedocs-doc-diff.js b/dist/readthedocs-doc-diff.js index be20471..00163a1 100644 --- a/dist/readthedocs-doc-diff.js +++ b/dist/readthedocs-doc-diff.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["doc-diff"]=t():e["doc-diff"]=t()}(self,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index a030629..42a80dd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,6 +14,7 @@ module.exports = (env, argv) => { chunkFilename: "[name].js?[chunkhash]", path: path.join(__dirname, "dist"), library: { + name: "doc-diff", type: "umd", }, }, From 5aee089d7bfe75a39334efb578487a515475eedd Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 15 Mar 2023 23:48:03 +0100 Subject: [PATCH 3/8] I'm not sure what else to try --- dist/readthedocs-doc-diff.js | 2 +- package.json | 2 +- webpack.config.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/readthedocs-doc-diff.js b/dist/readthedocs-doc-diff.js index 00163a1..b5cc6d7 100644 --- a/dist/readthedocs-doc-diff.js +++ b/dist/readthedocs-doc-diff.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["doc-diff"]=t():e["doc-diff"]=t()}(self,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.docdiff=t():e.docdiff=t()}(this,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file diff --git a/package.json b/package.json index 611e3e6..457911c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "readthedocs-doc-diff", "version": "1.0.0", "description": "Read the Docs doc visual diff extension", - "main": "dist/readthedocs-doc-diff.js", + "module": "dist/readthedocs-doc-diff.js", "engines": { "node": ">=14.0.0", "npm": ">=7.0.0" diff --git a/webpack.config.js b/webpack.config.js index 42a80dd..903bec9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,9 +13,10 @@ module.exports = (env, argv) => { filename: "[name].js?[fullhash]", chunkFilename: "[name].js?[chunkhash]", path: path.join(__dirname, "dist"), + globalObject: "this", library: { - name: "doc-diff", - type: "umd", + name: "docdiff", + type: "umd", }, }, optimization: { From c580e442f24386cfd86bbba990bf413565fb3a2c Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 15 Mar 2023 23:49:54 +0100 Subject: [PATCH 4/8] again? --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 457911c..611e3e6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "readthedocs-doc-diff", "version": "1.0.0", "description": "Read the Docs doc visual diff extension", - "module": "dist/readthedocs-doc-diff.js", + "main": "dist/readthedocs-doc-diff.js", "engines": { "node": ">=14.0.0", "npm": ">=7.0.0" From bcd70487304a95a299483343f66a84c5db83317b Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 16 Mar 2023 00:02:55 +0100 Subject: [PATCH 5/8] we need to export the function --- dist/readthedocs-doc-diff.js | 2 +- src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/readthedocs-doc-diff.js b/dist/readthedocs-doc-diff.js index b5cc6d7..e7f9b7f 100644 --- a/dist/readthedocs-doc-diff.js +++ b/dist/readthedocs-doc-diff.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.docdiff=t():e.docdiff=t()}(this,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t);var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return function(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.docdiff=t():e.docdiff=t()}(this,(()=>(()=>{var e={416:(e,t,n)=>{"use strict";n.r(t),n.d(t,{compare:()=>s});var r,i=n(224),o=n(52),a={addedClass:"doc-diff-added",modifiedClass:"doc-diff-modified",removedClass:"doc-diff-removed",skipModified:!0};function f(){var e={base_host:"",base_version:"latest",base_language:"en",base_page:"index.html",root_selector:"div.document[role='main']",inject_styles:!0};return new Promise((function(t,n){var r=document.querySelector("script#READTHEDOCS_DATA");if(r)try{var i=JSON.parse(r.innerText);e.base_host="https://"+i.project+".readthedocs.io",e.base_language=i.language,e.base_page=i.page+".html"}catch(e){console.debug("Error parsing configuration data",e)}var o=document.querySelector("script#doc-diff-config");if(o)try{var a=JSON.parse(o.innerText);Object.assign(e,a)}catch(e){console.debug("Error parsing configuration data",e)}return void 0===e.base_url&&(e.base_url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"latest",r=arguments.length>3?arguments[3]:void 0,i=[];i=null==n&&null==t?[e,r]:null==t?[e,n,r]:[e,t,n,r];return i.join("/")}(e.base_host,e.base_language,e.base_version,e.base_page)),t(e)}))}function s(e){return new Promise((function(t,n){fetch(e.base_url).then((function(e){return e.text()})).then((function(r){var f=(new DOMParser).parseFromString(r,"text/html").documentElement.querySelector(e.root_selector),s=document.querySelector(e.root_selector);null!=f&&null!=s||n(new Error("Element not found in both documents.")),e.inject_styles&&(document.adoptedStyleSheets=[o.Z]);var l=(0,i.visualDomDiff)(f,s,a);s.replaceWith(l.firstElementChild),t(!0)}))}))}e=n.hmd(e),n.c[n.s]!==e&&(r=new Promise((function(e){if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){e()}),{capture:!0,once:!0,passive:!0})})),new Promise((function(e){r.then((function(){return f()})).then((function(e){return s(e)})).then((function(){e()})).catch((function(e){console.error(e.message)}))})))},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(81),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".doc-diff-added {\n background-color: rgb(171, 242, 188);\n text-decoration: none;\n}\n\n.doc-diff-modified {\n}\n\n.doc-diff-removed {\n background-color: rgba(255, 129, 130, 0.4);\n text-decoration: none;\n}\n",""]);var f=new CSSStyleSheet;f.replaceSync(a.toString());const s=f},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var f=0;f0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},27:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,f=this.diff_commonPrefix(e,n),s=e.substring(0,f);e=e.substring(f),n=n.substring(f),f=this.diff_commonSuffix(e,n);var l=e.substring(e.length-f);e=e.substring(0,e.length-f),n=n.substring(0,n.length-f);var h=this.diff_compute_(e,n,a,o);return s&&h.unshift(new t.Diff(0,s)),l&&h.push(new t.Diff(0,l)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var f=e.length>r.length?e:r,s=e.length>r.length?r:e,l=f.indexOf(s);if(-1!=l)return a=[new t.Diff(1,f.substring(0,l)),new t.Diff(0,s),new t.Diff(1,f.substring(l+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var h=this.diff_halfMatch_(e,r);if(h){var u=h[0],c=h[1],d=h[2],g=h[3],p=h[4],v=this.diff_main(u,d,i,o),_=this.diff_main(c,g,i,o);return v.concat([new t.Diff(0,p)],_)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,f=this.diff_main(e,r,!1,i);this.diff_charsToLines_(f,a),this.diff_cleanupSemantic(f),f.push(new t.Diff(0,""));for(var s=0,l=0,h=0,u="",c="";s=1&&h>=1){f.splice(s-l-h,l+h),s=s-l-h;for(var d=this.diff_main(u,c,!1,i),g=d.length-1;g>=0;g--)f.splice(s,0,d[g]);s+=d.length}h=0,l=0,u="",c=""}s++}return f.pop(),f},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,f=Math.ceil((o+a)/2),s=f,l=2*f,h=new Array(l),u=new Array(l),c=0;ci);m++){for(var y=-m+p;y<=m-v;y+=2){for(var w=s+y,x=(T=y==-m||y!=m&&h[w-1]o)v+=2;else if(x>a)p+=2;else if(g){if((M=s+d-y)>=0&&M=(N=o-u[M]))return this.diff_bisectSplit_(e,r,T,x,i)}}for(var D=-m+_;D<=m-b;D+=2){for(var N,M=s+D,E=(N=D==-m||D!=m&&u[M-1]o)b+=2;else if(E>a)_+=2;else if(!g){if((w=s+d-D)>=0&&w=(N=o-N))return this.diff_bisectSplit_(e,r,T,x,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),f=e.substring(n),s=t.substring(r),l=this.diff_main(o,a,!1,i),h=this.diff_main(f,s,!1,i);return l.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,f=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,a,f,h]:null}var a,f,s,l,h,u=o(n,r,Math.ceil(n.length/4)),c=o(n,r,Math.ceil(n.length/2));return u||c?(a=c?u&&u[4].length>c[4].length?u:c:u,e.length>t.length?(f=a[0],s=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],f=a[2],s=a[3]),[f,s,l,h,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=0,l=0,h=0,u=0;f0?i[o-1]:-1,s=0,l=0,h=0,u=0,a=null,r=!0)),f++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),f=1;f=p?(g>=c.length/2||g>=d.length/2)&&(e.splice(f,0,new t.Diff(0,d.substring(0,g))),e[f-1][1]=c.substring(0,c.length-g),e[f+1][1]=d.substring(g),f++):(p>=c.length/2||p>=d.length/2)&&(e.splice(f,0,new t.Diff(0,c.substring(0,p))),e[f-1][0]=1,e[f-1][1]=d.substring(0,d.length-p),e[f+1][0]=n,e[f+1][1]=c.substring(p),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),f=o&&r.match(t.whitespaceRegex_),s=a&&i.match(t.whitespaceRegex_),l=f&&r.match(t.linebreakRegex_),h=s&&i.match(t.linebreakRegex_),u=l&&e.match(t.blanklineEndRegex_),c=h&&n.match(t.blanklineStartRegex_);return u||c?5:l||h?4:o&&!f&&s?3:f||s?2:o||a?1:0}for(var r=1;r=c&&(c=d,l=i,h=o,u=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=h,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,f=0,s=!1,l=!1,h=!1,u=!1;f0?i[o-1]:-1,h=u=!1),r=!0)),f++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,f="",s="";i1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(s,f))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),i++),s=s.substring(r),f=f.substring(r)),0!==(r=this.diff_commonSuffix(s,f))&&(e[i][1]=s.substring(s.length-r)+e[i][1],s=s.substring(0,s.length-r),f=f.substring(0,f.length-r))),i-=o+a,e.splice(i,o+a),f.length&&(e.splice(i,0,new t.Diff(n,f)),i++),s.length&&(e.splice(i,0,new t.Diff(1,s)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,f="",s=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(i=1;it));r++)a=i,f=o;return e.length!=r&&e[r][0]===n?f:f+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=//g,a=/\n/g,f=0;f");switch(s){case 1:t[f]=''+l+"";break;case n:t[f]=''+l+"";break;case 0:t[f]=""+l+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,f=e.indexOf(t,n);-1!=f&&(a=Math.min(o(0,f),a),-1!=(f=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,f),a)));var s,l,h=1<=g;_--){var b=r[e.charAt(_-1)];if(v[_]=0===d?(v[_+1]<<1|1)&b:(v[_+1]<<1|1)&b|(u[_+1]|u[_])<<1|1|u[_+1],v[_]&h){var m=o(d,_-1);if(m<=a){if(a=m,!((f=_-1)>n))break;g=Math.max(1,2*n-f)}}}if(o(d+1,n)>a)break;u=v}return f},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var f=[],s=new t.patch_obj,l=0,h=0,u=0,c=o,d=o,g=0;g=2*this.Patch_Margin&&l&&(this.patch_addContext_(s,c),f.push(s),s=new t.patch_obj,l=0,c=d,h=u)}1!==p&&(h+=v.length),p!==n&&(u+=v.length)}return l&&(this.patch_addContext_(s,c),f.push(s)),f},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(f=this.match_main(t,h.substring(0,this.Match_MaxBits),l))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),l+h.length-this.Match_MaxBits))||f>=u)&&(f=-1):f=this.match_main(t,h,l),-1==f)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=f-l,h==(s=-1==u?t.substring(f,f+h.length):t.substring(f,u+this.Match_MaxBits)))t=t.substring(0,f)+this.diff_text2(e[a].diffs)+t.substring(f+h.length);else{var c=this.diff_main(h,s,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(c)/h.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,g=0,p=0;pa[0][1].length){var f=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=f,o.start2-=f,o.length1+=f,o.length2+=f}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){f=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,f),o.length1+=f,o.length2+=f}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i2*r?(l.length1+=c.length,a+=c.length,h=!1,l.diffs.push(new t.Diff(u,c)),o.diffs.shift()):(c=c.substring(0,r-l.length1-this.Patch_Margin),l.length1+=c.length,a+=c.length,0===u?(l.length2+=c.length,f+=c.length):h=!1,l.diffs.push(new t.Diff(u,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}s=(s=this.diff_text2(l.diffs)).substring(s.length-this.Patch_Margin);var d=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==d&&(l.length1+=d.length,l.length2+=d.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=d:l.diffs.push(new t.Diff(0,d))),h||e.splice(++i,0,l)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>y,__asyncValues:()=>x,__await:()=>m,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>O,__classPrivateFieldSet:()=>S,__createBinding:()=>c,__decorate:()=>f,__exportStar:()=>d,__extends:()=>i,__generator:()=>u,__importDefault:()=>E,__importStar:()=>M,__makeTemplateObject:()=>D,__metadata:()=>l,__param:()=>s,__read:()=>p,__rest:()=>a,__spread:()=>v,__spreadArray:()=>b,__spreadArrays:()=>_,__values:()=>g});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;f--)(i=e[f])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function f(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,f)}s((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function f(o){return function(f){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var e=[],t=0;t1||f(e,t)}))})}function f(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,l):h(o[0][2],n)}catch(e){h(o[0][3],e)}var n}function s(e){f("next",e)}function l(e){f("throw",e)}function h(e,t){e(t),o.shift(),o.length&&f(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&c(t,e,n);return N(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function S(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function O(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(402),i=new Set;i.add("IMG"),i.add("VIDEO"),i.add("IFRAME"),i.add("OBJECT"),i.add("SVG");var o=new Set;o.add("BDO"),o.add("BDI"),o.add("Q"),o.add("CITE"),o.add("CODE"),o.add("DATA"),o.add("TIME"),o.add("VAR"),o.add("DFN"),o.add("ABBR"),o.add("STRONG"),o.add("EM"),o.add("BIG"),o.add("SMALL"),o.add("MARK"),o.add("SUB"),o.add("SUP"),o.add("SAMP"),o.add("KBD"),o.add("B"),o.add("I"),o.add("S"),o.add("U"),o.add("SPAN"),t.optionsToConfig=function(e){var t=void 0===e?{}:e,n=t.addedClass,a=void 0===n?"vdd-added":n,f=t.modifiedClass,s=void 0===f?"vdd-modified":f,l=t.removedClass,h=void 0===l?"vdd-removed":l,u=t.skipModified,c=void 0!==u&&u,d=t.skipChildren,g=t.skipSelf,p=t.diffText;return{addedClass:a,diffText:void 0===p?r.diffText:p,modifiedClass:s,removedClass:h,skipModified:c,skipChildren:function(e){if(!r.isElement(e)&&!r.isDocumentFragment(e)&&!r.isDocument(e))return!0;if(d){var t=d(e);if("boolean"==typeof t)return t}return i.has(e.nodeName)},skipSelf:function(e){if(!r.isText(e)&&!r.isElement(e))return!0;if(g){var t=g(e);if("boolean"==typeof t)return t}return o.has(e.nodeName)}}}},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),i=n(967),o=n(844),a=n(402),f=function(e){return"TH"===e?"TD":e},s=function(e,t){return new o.DomIterator(e,t).reduce((function(e,t){return e+(a.isText(t)?t.data:a.charForNodeName(f(t.nodeName)))}),"")},l=function(e){return a.isText(e)?e.length:1},h=function(e){return"TR"===e.nodeName},u={skipChildren:h,skipSelf:function(e){return!h(e)}};t.visualDomDiff=function e(t,n,h){var c,d;void 0===h&&(h={});var g,p,v,_,b,m=n.ownerDocument||n,y=i.optionsToConfig(h),w=y.addedClass,x=y.diffText,D=y.modifiedClass,N=y.removedClass,M=y.skipSelf,E=y.skipChildren,T=function(e){return!M(e)},S=function(e,t){return a.getAncestors(e,t).filter(T).length},O=function(e){return a.isElement(e)&&M(e)},A=function(e,t){return a.getAncestors(e,t).filter(O).reverse()},C=function(e){return Z.has(e)?1:J.has(e)?-1:0},P=x(s(t,y),s(n,y)),k=0,j=new o.DomIterator(t,y),I=new o.DomIterator(n,y),F=0,R=0,B=0;v=P[k++],c=j.next(),g=c.done,_=c.value,d=I.next(),p=d.done,b=d.value;var L=m.createDocumentFragment(),U=L,q=0,Q=L,V=0,G=null,H=null,J=new Set,Z=new Set,$=new Set,z=new Map,K=new Array,X=new Map;function Y(){for(var e=S(_,t);q>e;){if(!U.parentNode)return a.never();U===G&&(G=null),U=U.parentNode,q--}if(q!==e)return a.never()}function W(){for(var e=S(b,n);V>e;){if(!Q.parentNode)return a.never();Q===H&&(H=null),Q=Q.parentNode,V--}if(V!==e)return a.never()}function ee(e){if(U!==Q||H||G)return a.never();if(a.isText(e)){var r=A(_,t),i=A(b,n);z.set(e,i);var o=r.length;if(o!==i.length)$.add(e);else for(var f=0;ft)return a.never()}function ie(e){var t,n=l(_);if((R+=e)===n)t=j.next(),g=t.done,_=t.value,R=0;else if(R>n)return a.never()}function oe(e){var t,n=l(b);if((B+=e)===n)t=I.next(),p=t.done,b=t.value,B=0;else if(B>n)return a.never()}for(;v;)if(v[0]===r.DIFF_DELETE){if(g)return a.never();Y();var ae=Math.min(v[1].length-F,l(_)-R),fe=v[1].substring(F,F+ae);te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),re(ae),ie(ae)}else if(v[0]===r.DIFF_INSERT){if(p)return a.never();W();var se=Math.min(v[1].length-F,l(b)-B);fe=v[1].substring(F,F+se);ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)),re(se),oe(se)}else{if(g||p)return a.never();Y(),W();var le=Math.min(v[1].length-F,l(_)-R,l(b)-B);fe=v[1].substring(F,F+le);U===Q&&(a.isText(_)&&a.isText(b)||f(_.nodeName)===f(b.nodeName)&&!E(_)&&!E(b)||a.areNodesEqual(_,b))?ee(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1)):(te(a.isText(_)?m.createTextNode(fe):_.cloneNode(!1)),ne(a.isText(b)?m.createTextNode(fe):b.cloneNode(!1))),re(le),ie(le),oe(le)}return J.forEach((function(e){for(var t=e.parentNode,n=e.previousSibling;n&&Z.has(n);)t.insertBefore(e,n),n=e.previousSibling})),K.forEach((function(t){var n=t.newTable,r=t.oldTable,i=t.outputTable;if(!a.isTableValid(r,!0)||!a.isTableValid(n,!0)||!a.isTableValid(i,!1)){new o.DomIterator(i).forEach((function(e){Z.delete(e),J.delete(e),$.delete(e),z.delete(e)}));var f=i.parentNode,s=r.cloneNode(!0),l=n.cloneNode(!0);return f.insertBefore(s,i),f.insertBefore(l,i),f.removeChild(i),J.add(s),void Z.add(l)}var c=[];new o.DomIterator(i,u).some((function(e){var t=X.get(e);if(!t)return!1;var n=t.oldRow,r=t.newRow,i=n.childNodes.length,o=r.childNodes.length,a=Math.max(i,o),f=Math.min(i,o);if(e.childNodes.length===a)for(var s=e.childNodes,l=0,h=s.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.rootNode=e,this.config=t,this.descend=!0,this.nextNode=this.rootNode,this.skipSelf(this.nextNode)&&this.next()}return e.prototype.toArray=function(){for(var e,t=[],n=this.next(),r=n.done,i=n.value;!r;)t.push(i),r=(e=this.next()).done,i=e.value;return t},e.prototype.forEach=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;)e(i),r=(t=this.next()).done,i=t.value},e.prototype.reduce=function(e,t){for(var n,r=t,i=this.next(),o=i.done,a=i.value;!o;)r=e(r,a),o=(n=this.next()).done,a=n.value;return r},e.prototype.some=function(e){for(var t,n=this.next(),r=n.done,i=n.value;!r;){if(e(i))return!0;r=(t=this.next()).done,i=t.value}return!1},e.prototype.next=function(){if(!this.nextNode)return{done:!0,value:this.rootNode};var e=this.nextNode;return this.descend&&this.nextNode.firstChild&&!this.skipChildren(this.nextNode)?this.nextNode=this.nextNode.firstChild:this.nextNode===this.rootNode?this.nextNode=null:this.nextNode.nextSibling?(this.nextNode=this.nextNode.nextSibling,this.descend=!0):(this.nextNode=this.nextNode.parentNode,this.descend=!1,this.next()),this.nextNode&&this.skipSelf(this.nextNode)&&this.next(),{done:!1,value:e}},e.prototype.skipSelf=function(e){return!(!this.config||!this.config.skipSelf)&&this.config.skipSelf(e)},e.prototype.skipChildren=function(e){return!(!this.config||!this.config.skipChildren)&&this.config.skipChildren(e)},e}();t.DomIterator=n},224:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(655).__exportStar(n(145),t)},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);function i(e){return e.nodeType===e.ELEMENT_NODE}function o(e){return e.nodeType===e.TEXT_NODE}function a(e){return e.nodeType===e.COMMENT_NODE}function f(e,t){return e===t}function s(e,t,n){if(void 0===n&&(n=f),e.length!==t.length)return!1;for(var r=0,i=e.length;r="豈"?t++:(n[1]=a.substring(0,a.length-1),i[1]=l+f.substring(0,f.length-1),o[1]=l+s,0===n[1].length&&e.splice(t,1))}else t++}}t.isElement=i,t.isText=o,t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE},t.isDocumentFragment=function(e){return e.nodeType===e.DOCUMENT_FRAGMENT_NODE},t.isComment=a,t.strictEqual=f,t.areArraysEqual=s,t.areNodesEqual=function e(t,n,r){if(void 0===r&&(r=!1),t===n)return!0;if(t.nodeType!==n.nodeType||t.nodeName!==n.nodeName)return!1;if(o(t)||a(t)){if(t.data!==n.data)return!1}else if(i(t)){var f=l(t).sort();if(!s(f,l(n).sort()))return!1;for(var h=0,u=f.length;h0&&o.push([r.DIFF_EQUAL,l.substring(0,g)]),c.diff_cleanupSemantic(o),d(i,o),o.length=0,i.push([r.DIFF_EQUAL,l.substring(g,h-p)]),p>0&&o.push([r.DIFF_EQUAL,l.substring(h-p)])}else o.push(s)}else o.push(s)}return c.diff_cleanupSemantic(o),d(i,o),o.length=0,c.diff_cleanupMerge(i),u(i),i},t.markUpNode=function(e,t,n){var r=e.ownerDocument,o=e.parentNode,a=e.previousSibling;if(i(e))e.classList.add(n);else if(a&&a.nodeName===t&&a.classList.contains(n))a.appendChild(e);else{var f=r.createElement(t);f.classList.add(n),o.insertBefore(f,e),f.appendChild(e)}},t.isTableValid=function(e,t){var n;return function(e){var t=e.childNodes,n=t.length,i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(n.s=416)})())); \ No newline at end of file diff --git a/src/index.js b/src/index.js index fec485b..73044ab 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import { setup } from "./extension"; +import { setup, compare } from "./extension"; /** * Automatically set this up if it is included via `