From 94cc2a35d4643ec7d047a7899d7e668ec10fab9b Mon Sep 17 00:00:00 2001 From: "A. Block" <3756473+zendive@users.noreply.github.com> Date: Wed, 15 Nov 2023 02:11:59 +0200 Subject: [PATCH] v3.0.4 (#17) Update dependencies and patch vulnerabilities in postcss@<8.4.31, semver<7.5.2 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 9 +- .vscode/extensions.json | 2 +- Makefile | 42 +-- bundle/js/jsdiff-panel.js | 32 +- manifest.json | 2 +- package.json | 27 +- pnpm-lock.yaml | 466 ++++++++++++++------------- 7 files changed, 295 insertions(+), 285 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d197587..bc01133 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: '' assignees: zendive - --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' (e.g. https://jsfiddle.net/, https://codepen.io/) 2. Click on '....' 3. See error @@ -23,9 +23,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser version [e.g. chrome 100] - - Version [e.g. 3.0.2] + +- OS: [e.g. iOS] +- Browser version [e.g. chrome 100] +- Version [e.g. 3.0.2] **Additional context** Add any other context about the problem here. diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c83e263..8b74947 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["esbenp.prettier-vscode"] + "recommendations": ["esbenp.prettier-vscode", "jebbs.plantuml"] } diff --git a/Makefile b/Makefile index dd3216b..09b7ab1 100644 --- a/Makefile +++ b/Makefile @@ -1,46 +1,38 @@ ZIP_FILE="extension.zip" -HASH_ALG=sha384 -BIN=node_modules/.bin +HASH_ALG="sha384" .PHONY: - install all dev prod build format lint clean + install clean all lint dev prod zip install: npm i -g pnpm pnpm i -all: build +clean: + rm -rf ./node_modules + rm -rf $(ZIP_FILE) + rm -rf ./bundle/js/ + +all: + make lint + make prod + make zip + +lint: + npx prettier . --write + npx tsc -noEmit dev: NODE_OPTIONS="--loader=ts-node/esm" \ - $(BIN)/webpack --progress --watch --mode=development + npx webpack --progress --watch --mode=development prod: NODE_OPTIONS="--loader=ts-node/esm --no-warnings=ExperimentalWarning" \ NODE_ENV="production" \ - $(BIN)/webpack --mode=production - -build: - make lint - make prod - make zip - make print_zip_hash + npx webpack --mode=production zip: rm -rf $(ZIP_FILE) zip -r $(ZIP_FILE) ./bundle ./manifest.json > /dev/null - -print_zip_hash: FILE_HASH=$$(openssl dgst -$(HASH_ALG) -binary $(ZIP_FILE) | openssl base64 -A); \ echo "$(ZIP_FILE) $(HASH_ALG):$$FILE_HASH" - -format: - $(BIN)/prettier . --write - -lint: - $(BIN)/tsc -noEmit - -clean: - rm -rf ./node_modules - rm -rf $(ZIP_FILE) - rm -rf ./bundle/js/ diff --git a/bundle/js/jsdiff-panel.js b/bundle/js/jsdiff-panel.js index 04cd5e3..b38339b 100644 --- a/bundle/js/jsdiff-panel.js +++ b/bundle/js/jsdiff-panel.js @@ -1,12 +1,12 @@ -(()=>{var Oa={851:(me,q,ee)=>{"use strict";ee.d(q,{Z:()=>ve});var oe=ee(916),fe=ee.n(oe),ne=ee(282),re=ee.n(ne),le=re()(fe());le.push([me.id,'.jsondiffpatch-delta{font-family:"Bitstream Vera Sans Mono","DejaVu Sans Mono",Monaco,Courier,monospace;font-size:12px;margin:0;padding:0 0 0 12px;display:inline-block}.jsondiffpatch-delta pre{font-family:"Bitstream Vera Sans Mono","DejaVu Sans Mono",Monaco,Courier,monospace;font-size:12px;margin:0;padding:0;display:inline-block}ul.jsondiffpatch-delta{list-style-type:none;padding:0 0 0 20px;margin:0}.jsondiffpatch-delta ul{list-style-type:none;padding:0 0 0 20px;margin:0}.jsondiffpatch-added .jsondiffpatch-property-name,.jsondiffpatch-added .jsondiffpatch-value pre,.jsondiffpatch-modified .jsondiffpatch-right-value pre,.jsondiffpatch-textdiff-added{background:#bfb}.jsondiffpatch-deleted .jsondiffpatch-property-name,.jsondiffpatch-deleted pre,.jsondiffpatch-modified .jsondiffpatch-left-value pre,.jsondiffpatch-textdiff-deleted{background:#fbb;text-decoration:line-through}.jsondiffpatch-unchanged,.jsondiffpatch-movedestination{color:gray}.jsondiffpatch-unchanged,.jsondiffpatch-movedestination>.jsondiffpatch-value{transition:all .5s;-webkit-transition:all .5s;overflow-y:hidden}.jsondiffpatch-unchanged-showing .jsondiffpatch-unchanged,.jsondiffpatch-unchanged-showing .jsondiffpatch-movedestination>.jsondiffpatch-value{max-height:100px}.jsondiffpatch-unchanged-hidden .jsondiffpatch-unchanged,.jsondiffpatch-unchanged-hidden .jsondiffpatch-movedestination>.jsondiffpatch-value{max-height:0}.jsondiffpatch-unchanged-hiding .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-hidden .jsondiffpatch-movedestination>.jsondiffpatch-value{display:block}.jsondiffpatch-unchanged-visible .jsondiffpatch-unchanged,.jsondiffpatch-unchanged-visible .jsondiffpatch-movedestination>.jsondiffpatch-value{max-height:100px}.jsondiffpatch-unchanged-hiding .jsondiffpatch-unchanged,.jsondiffpatch-unchanged-hiding .jsondiffpatch-movedestination>.jsondiffpatch-value{max-height:0}.jsondiffpatch-unchanged-showing .jsondiffpatch-arrow,.jsondiffpatch-unchanged-hiding .jsondiffpatch-arrow{display:none}.jsondiffpatch-value{display:inline-block}.jsondiffpatch-property-name{display:inline-block;padding-right:5px;vertical-align:top}.jsondiffpatch-property-name:after{content:": "}.jsondiffpatch-child-node-type-array>.jsondiffpatch-property-name:after{content:": ["}.jsondiffpatch-child-node-type-array:after{content:"],"}div.jsondiffpatch-child-node-type-array:before{content:"["}div.jsondiffpatch-child-node-type-array:after{content:"]"}.jsondiffpatch-child-node-type-object>.jsondiffpatch-property-name:after{content:": {"}.jsondiffpatch-child-node-type-object:after{content:"},"}div.jsondiffpatch-child-node-type-object:before{content:"{"}div.jsondiffpatch-child-node-type-object:after{content:"}"}.jsondiffpatch-value pre:after{content:","}li:last-child>.jsondiffpatch-value pre:after,.jsondiffpatch-modified>.jsondiffpatch-left-value pre:after{content:""}.jsondiffpatch-modified .jsondiffpatch-value{display:inline-block}.jsondiffpatch-modified .jsondiffpatch-right-value{margin-left:5px}.jsondiffpatch-moved .jsondiffpatch-value{display:none}.jsondiffpatch-moved .jsondiffpatch-moved-destination{display:inline-block;background:#ffb;color:#888}.jsondiffpatch-moved .jsondiffpatch-moved-destination:before{content:" => "}ul.jsondiffpatch-textdiff{padding:0}.jsondiffpatch-textdiff-location{color:#bbb;display:inline-block;min-width:60px}.jsondiffpatch-textdiff-line{display:inline-block}.jsondiffpatch-textdiff-line-number:after{content:","}.jsondiffpatch-error{background:red;color:#fff;font-weight:bold}',""]);const ve=le},251:(me,q,ee)=>{"use strict";ee.d(q,{Z:()=>ve});var oe=ee(916),fe=ee.n(oe),ne=ee(282),re=ee.n(ne),le=re()(fe());le.push([me.id,".header{flex-shrink:0;width:100%;background-color:var(--header-background);border-bottom:var(--header-border);display:flex;align-items:center;height:var(--header-height);min-width:512px;user-select:none}.header .-toolbox{display:flex;justify-content:center;align-items:center;padding-left:10px}.header .-toolbox .btn{height:var(--header-height);cursor:pointer;border:none;border-radius:0;outline:none;background-color:var(--button-background);color:var(--colour-text);margin:0 2px}.header .-toolbox .btn:hover{background-color:var(--button-hackground-hover)}.header .-toolbox .-last-updated{cursor:default;margin-left:10px}.header .-toolbox .-last-updated .-value{font-weight:bold;color:var(--colour-text);opacity:.5}.header .-last-error{display:flex;justify-content:center;align-items:center;padding-left:10px;color:#b62121}.header .-badge{position:fixed;top:0;right:1rem;display:flex;flex-direction:column;align-items:center;padding:4px 4px}.header .-badge .-version{font-family:monospace}.header .-badge .-icon img{width:32px}",""]);const ve=le},987:(me,q,ee)=>{"use strict";ee.d(q,{Z:()=>ve});var oe=ee(916),fe=ee.n(oe),ne=ee(282),re=ee.n(ne),le=re()(fe());le.push([me.id,".panel-loader[data-v-56122f3a]{background-color:rgba(0,0,0,0);height:2px;width:100%;overflow:hidden;position:fixed;top:0;display:block}.panel-loader>.-eye[data-v-56122f3a]{background-image:linear-gradient(to right, rgba(179, 7, 247, 0) 15%, rgb(241, 14, 14) 50%, rgba(179, 7, 247, 0) 85%);color:rgba(0,0,0,0);height:100%;width:20%;animation:wt-scanning-eye-animation-56122f3a 1s linear infinite alternate,wt-scanning-eye-animation-blink-56122f3a 1.25s linear infinite alternate}@keyframes wt-scanning-eye-animation-56122f3a{from{transform:translateX(-100%)}to{transform:translateX(500%)}}@keyframes wt-scanning-eye-animation-blink-56122f3a{0%{filter:hue-rotate(0deg)}80%{filter:hue-rotate(0deg)}100%{filter:hue-rotate(360deg)}}",""]);const ve=le},978:(me,q,ee)=>{"use strict";ee.d(q,{Z:()=>ve});var oe=ee(916),fe=ee.n(oe),ne=ee(282),re=ee.n(ne),le=re()(fe());le.push([me.id,":root{--colour-background: #fff;--colour-text: #000;--colour-text-diff: #000;--colour-found: 0, 222, 255;--header-height: 1.625rem;--header-background: #fff;--header-border: 1px solid #bbb;--button-background: rgba(0, 0, 0, 0.05);--button-hackground-hover: rgba(0, 0, 0, 0.3);--diff-added-background: #bbffbb;--diff-deleted-background: #ffbbbb}.dark{--colour-background: rgb(32 33 36);--colour-text: rgb(189, 198, 207);--colour-found: 0, 191, 255;--header-background: rgb(41, 42, 45);--header-border: 1px solid rgb(73, 76, 80)}*{box-sizing:border-box}body{margin:0 0 0 0;padding:0;overflow:hidden;height:100%}.jsdiff-panel{background-color:var(--colour-background);color:var(--colour-text);display:flex;flex-direction:column;height:100vh}.jsdiff-panel .-body{flex:1 0 0%;overflow:auto;overflow-wrap:break-word;overflow-anchor:none;transform:translateZ(0)}.jsdiff-panel .-body .-match{display:flex;align-items:center;height:100%}.jsdiff-panel .-body .-match .-center{margin:0 auto;text-align:center;font-size:26px;color:#bbb}.jsdiff-panel .-body .-empty{display:flex;height:calc(100vh - var(--header-height));justify-content:center;align-items:center}.jsdiff-panel .-body .-empty .-links{margin-top:16px;font-size:11px}.jsdiff-panel .-body .-empty .-center{margin:0 auto;text-align:center;font-size:26px;color:#bbb}.jsdiff-panel .-body .-content{padding:.5rem 0}.jsdiff-panel .-body .-content .-delta .jsdiff-found{outline:2px solid rgba(var(--colour-found), 1);outline-offset:-1px}.jsdiff-panel .-body .-content .-delta .jsdiff-found.jsdiff-found-this{color:var(--colour-text-diff);animation:found_this .8s infinite alternate}@keyframes found_this{0%{background-color:rgba(var(--colour-found), 0.6)}100%{background-color:rgba(var(--colour-found), 1)}}.jsdiff-panel .jsondiffpatch-delta pre{white-space:pre-wrap;word-break:break-all}.jsdiff-panel .jsondiffpatch-added .jsondiffpatch-property-name,.jsdiff-panel .jsondiffpatch-added .jsondiffpatch-value pre,.jsdiff-panel .jsondiffpatch-modified .jsondiffpatch-right-value pre,.jsdiff-panel .jsondiffpatch-textdiff-added{background:var(--diff-added-background);color:var(--colour-text-diff)}.jsdiff-panel .jsondiffpatch-deleted .jsondiffpatch-property-name,.jsdiff-panel .jsondiffpatch-deleted pre,.jsdiff-panel .jsondiffpatch-modified .jsondiffpatch-left-value pre,.jsdiff-panel .jsondiffpatch-textdiff-deleted{background:var(--diff-deleted-background);text-decoration:line-through;color:var(--colour-text-diff)}",""]);const ve=le},282:me=>{"use strict";me.exports=function(q){var ee=[];return ee.toString=function(){return this.map(function(fe){var ne="",re=typeof fe[5]<"u";return fe[4]&&(ne+="@supports (".concat(fe[4],") {")),fe[2]&&(ne+="@media ".concat(fe[2]," {")),re&&(ne+="@layer".concat(fe[5].length>0?" ".concat(fe[5]):""," {")),ne+=q(fe),re&&(ne+="}"),fe[2]&&(ne+="}"),fe[4]&&(ne+="}"),ne}).join("")},ee.i=function(fe,ne,re,le,ve){typeof fe=="string"&&(fe=[[null,fe,void 0]]);var Ke={};if(re)for(var Oe=0;Oe"u"||(Ee[1]="@layer".concat(Ee[5].length>0?" ".concat(Ee[5]):""," {").concat(Ee[1],"}")),Ee[5]=ve),ne&&(Ee[2]&&(Ee[1]="@media ".concat(Ee[2]," {").concat(Ee[1],"}")),Ee[2]=ne),le&&(Ee[4]?(Ee[1]="@supports (".concat(Ee[4],") {").concat(Ee[1],"}"),Ee[4]=le):Ee[4]="".concat(le)),ee.push(Ee))}},ee}},916:me=>{"use strict";me.exports=function(q){return q[1]}},298:()=>{},301:function(me,q,ee){(function(oe,fe){fe(q,ee(298))})(this,function(oe,fe){"use strict";class ne{constructor(s){this.selfOptions=s||{},this.pipes={}}options(s){return s&&(this.selfOptions=s),this.selfOptions}pipe(s,c){let d=c;if(typeof s=="string"){if(typeof d>"u")return this.pipes[s];this.pipes[s]=d}if(s&&s.name){if(d=s,d.processor===this)return d;this.pipes[d.name]=d}return d.processor=this,d}process(s,c){let d=s;d.options=this.options();let g=c||s.pipe||"default",l,f;for(;g;)typeof d.nextAfterChildren<"u"&&(d.next=d.nextAfterChildren,d.nextAfterChildren=null),typeof g=="string"&&(g=this.pipe(g)),g.process(d),f=d,l=g,g=null,d&&d.next&&(d=d.next,g=f.nextPipe||d.pipe||l);return d.hasResult?d.result:void 0}}class re{constructor(s){this.name=s,this.filters=[]}process(s){if(!this.processor)throw new Error("add this pipe to a processor before using it");const c=this.debug,d=this.filters.length,g=s;for(let l=0;ls.filterName)}after(s){const c=this.indexOf(s),d=Array.prototype.slice.call(arguments,1);if(!d.length)throw new Error("a filter is required");return d.unshift(c+1,0),Array.prototype.splice.apply(this.filters,d),this}before(s){const c=this.indexOf(s),d=Array.prototype.slice.call(arguments,1);if(!d.length)throw new Error("a filter is required");return d.unshift(c,0),Array.prototype.splice.apply(this.filters,d),this}replace(s){const c=this.indexOf(s),d=Array.prototype.slice.call(arguments,1);if(!d.length)throw new Error("a filter is required");return d.unshift(c,1),Array.prototype.splice.apply(this.filters,d),this}remove(s){const c=this.indexOf(s);return this.filters.splice(c,1),this}clear(){return this.filters.length=0,this}shouldHaveResult(s){if(s===!1){this.resultCheck=null;return}if(this.resultCheck)return;const c=this;return this.resultCheck=d=>{if(!d.hasResult){console.log(d);const g=new Error(`${c.name} failed`);throw g.noResult=!0,g}},this}}class le{setResult(s){return this.result=s,this.hasResult=!0,this}exit(){return this.exiting=!0,this}switchTo(s,c){return typeof s=="string"||s instanceof re?this.nextPipe=s:(this.next=s,c&&(this.nextPipe=c)),this}push(s,c){return s.parent=this,typeof c<"u"&&(s.childName=c),s.root=this.root||this,s.options=s.options||this.options,this.children?(this.children[this.children.length-1].next=s,this.children.push(s)):(this.children=[s],this.nextAfterChildren=this.next||null,this.next=s),s.next=this,this}}const ve=typeof Array.isArray=="function"?Array.isArray:C=>C instanceof Array;function Ke(C){const s=/^\/(.*)\/([gimyu]*)$/.exec(C.toString());return new RegExp(s[1],s[2])}function Oe(C){if(typeof C!="object")return C;if(C===null)return null;if(ve(C))return C.map(Oe);if(C instanceof Date)return new Date(C.getTime());if(C instanceof RegExp)return Ke(C);const s={};for(const c in C)Object.prototype.hasOwnProperty.call(C,c)&&(s[c]=Oe(C[c]));return s}class ge extends le{constructor(s,c){super(),this.left=s,this.right=c,this.pipe="diff"}setResult(s){if(this.options.cloneDiffValues&&typeof s=="object"){const c=typeof this.options.cloneDiffValues=="function"?this.options.cloneDiffValues:Oe;typeof s[0]=="object"&&(s[0]=c(s[0])),typeof s[1]=="object"&&(s[1]=c(s[1]))}return le.prototype.setResult.apply(this,arguments)}}class G extends le{constructor(s,c){super(),this.left=s,this.delta=c,this.pipe="patch"}}class Ee extends le{constructor(s){super(),this.delta=s,this.pipe="reverse"}}const Je=typeof Array.isArray=="function"?Array.isArray:function(C){return C instanceof Array},Et=function(s){if(s.left===s.right){s.setResult(void 0).exit();return}if(typeof s.left>"u"){if(typeof s.right=="function")throw new Error("functions are not supported");s.setResult([s.right]).exit();return}if(typeof s.right>"u"){s.setResult([s.left,0,0]).exit();return}if(typeof s.left=="function"||typeof s.right=="function")throw new Error("functions are not supported");if(s.leftType=s.left===null?"null":typeof s.left,s.rightType=s.right===null?"null":typeof s.right,s.leftType!==s.rightType){s.setResult([s.left,s.right]).exit();return}if(s.leftType==="boolean"||s.leftType==="number"){s.setResult([s.left,s.right]).exit();return}if(s.leftType==="object"&&(s.leftIsArray=Je(s.left)),s.rightType==="object"&&(s.rightIsArray=Je(s.right)),s.leftIsArray!==s.rightIsArray){s.setResult([s.left,s.right]).exit();return}s.left instanceof RegExp&&(s.right instanceof RegExp?s.setResult([s.left.toString(),s.right.toString()]).exit():s.setResult([s.left,s.right]).exit())};Et.filterName="trivial";const Tt=function(s){if(typeof s.delta>"u"){s.setResult(s.left).exit();return}if(s.nested=!Je(s.delta),!s.nested){if(s.delta.length===1){s.setResult(s.delta[0]).exit();return}if(s.delta.length===2){if(s.left instanceof RegExp){const c=/^\/(.*)\/([gimyu]+)$/.exec(s.delta[1]);if(c){s.setResult(new RegExp(c[1],c[2])).exit();return}}s.setResult(s.delta[1]).exit();return}s.delta.length===3&&s.delta[2]===0&&s.setResult(void 0).exit()}};Tt.filterName="trivial";const ye=function(s){if(typeof s.delta>"u"){s.setResult(s.delta).exit();return}if(s.nested=!Je(s.delta),!s.nested){if(s.delta.length===1){s.setResult([s.delta[0],0,0]).exit();return}if(s.delta.length===2){s.setResult([s.delta[1],s.delta[0]]).exit();return}s.delta.length===3&&s.delta[2]===0&&s.setResult([s.delta[0]]).exit()}};ye.filterName="trivial";function De(C){if(!C||!C.children)return;const s=C.children.length;let c,d=C.result;for(let g=0;g"u")&&(d=d||{},d[c.childName]=c.result);d&&C.leftIsArray&&(d._t="a"),C.setResult(d).exit()}De.filterName="collectChildren";function Wt(C){if(C.leftIsArray||C.leftType!=="object")return;let s,c;const d=C.options.propertyFilter;for(s in C.left)Object.prototype.hasOwnProperty.call(C.left,s)&&(d&&!d(s,C)||(c=new ge(C.left[s],C.right[s]),C.push(c,s)));for(s in C.right)Object.prototype.hasOwnProperty.call(C.right,s)&&(d&&!d(s,C)||typeof C.left[s]>"u"&&(c=new ge(void 0,C.right[s]),C.push(c,s)));if(!C.children||C.children.length===0){C.setResult(void 0).exit();return}C.exit()}Wt.filterName="objects";const Se=function(s){if(!s.nested||s.delta._t)return;let c,d;for(c in s.delta)d=new G(s.left[c],s.delta[c]),s.push(d,c);s.exit()};Se.filterName="objects";const Yn=function(s){if(!s||!s.children||s.delta._t)return;const c=s.children.length;let d;for(let g=0;gb?--l:--g}return f};var ao={get:function(C,s,c,d){const g=d||{},l=zr(C,s,c||Js,g),f=Qn(l,C,s,g);return typeof C=="string"&&typeof s=="string"&&(f.sequence=f.sequence.join("")),f}};const mt=3,Zr=typeof Array.isArray=="function"?Array.isArray:C=>C instanceof Array,It=typeof Array.prototype.indexOf=="function"?(C,s)=>C.indexOf(s):(C,s)=>{const c=C.length;for(let d=0;d"u"&&(g.hashCache1[c]=p=h(l,c))):p=h(l),typeof p>"u"||(typeof d=="number"?(g.hashCache2=g.hashCache2||[],b=g.hashCache2[d],typeof b>"u"&&(g.hashCache2[d]=b=h(f,d))):b=h(f),typeof b>"u")?!1:p===b}const er=function(s){if(!s.leftIsArray)return;const c={objectHash:s.options&&s.options.objectHash,matchByPosition:s.options&&s.options.matchByPosition};let d=0,g=0,l,f,h;const p=s.left,b=s.right,m=p.length,E=b.length;let k;for(m>0&&E>0&&!c.objectHash&&typeof c.matchByPosition!="boolean"&&(c.matchByPosition=!Ys(p,b,m,E));d0){for(let je=0;jes[C]-c[C]}},zt=function(s){if(!s.nested||s.delta._t!=="a")return;let c,d;const g=s.delta,l=s.left;let f=[],h=[];const p=[];for(c in g)if(c!=="_t")if(c[0]==="_")if(g[c][2]===0||g[c][2]===mt)f.push(parseInt(c.slice(1),10));else throw new Error(`only removal or move can be applied at original array indices, invalid diff type: ${g[c][2]}`);else g[c].length===1?h.push({index:parseInt(c,10),value:g[c][0]}):p.push({index:parseInt(c,10),delta:g[c]});for(f=f.sort(wn.numerically),c=f.length-1;c>=0;c--){d=f[c];const k=g[`_${d}`],j=l.splice(d,1)[0];k[2]===mt&&h.push({index:k[1],value:j})}h=h.sort(wn.numericallyBy("index"));const b=h.length;for(c=0;c0)for(c=0;c{if(typeof s=="string"&&s[0]==="_")return parseInt(s.substr(1),10);if(Zr(c)&&c[2]===0)return`_${s}`;let d=+s;for(const g in C){const l=C[g];if(Zr(l))if(l[2]===mt){const f=parseInt(g.substr(1),10),h=l[1];if(h===+s)return f;f<=d&&h>d?d++:f>=d&&h"u"&&(l=Cn(C.delta,c.childName,c.result)),d[l]!==c.result&&(d[l]=c.result)}C.setResult(d).exit()}tr.filterName="arraysCollectChildren";const nr=function(s){s.left instanceof Date?(s.right instanceof Date?s.left.getTime()!==s.right.getTime()?s.setResult([s.left,s.right]):s.setResult(void 0):s.setResult([s.left,s.right]),s.exit()):s.right instanceof Date&&s.setResult([s.left,s.right]).exit()};nr.filterName="dates";function rr(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}var qr={exports:{}};(function(C){var s=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},c=-1,d=1,g=0;s.Diff=function(l,f){return[l,f]},s.prototype.diff_main=function(l,f,h,p){typeof p>"u"&&(this.Diff_Timeout<=0?p=Number.MAX_VALUE:p=new Date().getTime()+this.Diff_Timeout*1e3);var b=p;if(l==null||f==null)throw new Error("Null input. (diff_main)");if(l==f)return l?[new s.Diff(g,l)]:[];typeof h>"u"&&(h=!0);var m=h,E=this.diff_commonPrefix(l,f),k=l.substring(0,E);l=l.substring(E),f=f.substring(E),E=this.diff_commonSuffix(l,f);var j=l.substring(l.length-E);l=l.substring(0,l.length-E),f=f.substring(0,f.length-E);var H=this.diff_compute_(l,f,m,b);return k&&H.unshift(new s.Diff(g,k)),j&&H.push(new s.Diff(g,j)),this.diff_cleanupMerge(H),H},s.prototype.diff_compute_=function(l,f,h,p){var b;if(!l)return[new s.Diff(d,f)];if(!f)return[new s.Diff(c,l)];var m=l.length>f.length?l:f,E=l.length>f.length?f:l,k=m.indexOf(E);if(k!=-1)return b=[new s.Diff(d,m.substring(0,k)),new s.Diff(g,E),new s.Diff(d,m.substring(k+E.length))],l.length>f.length&&(b[0][0]=b[2][0]=c),b;if(E.length==1)return[new s.Diff(c,l),new s.Diff(d,f)];var j=this.diff_halfMatch_(l,f);if(j){var H=j[0],K=j[1],W=j[2],ae=j[3],_e=j[4],Ce=this.diff_main(H,W,h,p),Ae=this.diff_main(K,ae,h,p);return Ce.concat([new s.Diff(g,_e)],Ae)}return h&&l.length>100&&f.length>100?this.diff_lineMode_(l,f,p):this.diff_bisect_(l,f,p)},s.prototype.diff_lineMode_=function(l,f,h){var p=this.diff_linesToChars_(l,f);l=p.chars1,f=p.chars2;var b=p.lineArray,m=this.diff_main(l,f,!1,h);this.diff_charsToLines_(m,b),this.diff_cleanupSemantic(m),m.push(new s.Diff(g,""));for(var E=0,k=0,j=0,H="",K="";E=1&&j>=1){m.splice(E-k-j,k+j),E=E-k-j;for(var W=this.diff_main(H,K,!1,h),ae=W.length-1;ae>=0;ae--)m.splice(E,0,W[ae]);E=E+W.length}j=0,k=0,H="",K="";break}E++}return m.pop(),m},s.prototype.diff_bisect_=function(l,f,h){for(var p=l.length,b=f.length,m=Math.ceil((p+b)/2),E=m,k=2*m,j=new Array(k),H=new Array(k),K=0;Kh);ke++){for(var je=-ke+_e;je<=ke-Ce;je+=2){var xe=E+je,Be;je==-ke||je!=ke&&j[xe-1]p)Ce+=2;else if(Qe>b)_e+=2;else if(ae){var We=E+W-je;if(We>=0&&We=Ue)return this.diff_bisectSplit_(l,f,Be,Qe,h)}}}for(var tt=-ke+Ae;tt<=ke-$e;tt+=2){var We=E+tt,Ue;tt==-ke||tt!=ke&&H[We-1]p)$e+=2;else if(bt>b)Ae+=2;else if(!ae){var xe=E+W-tt;if(xe>=0&&xe=Ue)return this.diff_bisectSplit_(l,f,Be,Qe,h)}}}}return[new s.Diff(c,l),new s.Diff(d,f)]},s.prototype.diff_bisectSplit_=function(l,f,h,p,b){var m=l.substring(0,h),E=f.substring(0,p),k=l.substring(h),j=f.substring(p),H=this.diff_main(m,E,!1,b),K=this.diff_main(k,j,!1,b);return H.concat(K)},s.prototype.diff_linesToChars_=function(l,f){var h=[],p={};h[0]="";function b(j){for(var H="",K=0,W=-1,ae=h.length;Wp?l=l.substring(h-p):hf.length?l:f,p=l.length>f.length?f:l;if(h.length<4||p.length*2=Ce.length?[Be,Qe,We,Ue,xe]:null}var E=m(h,p,Math.ceil(h.length/4)),k=m(h,p,Math.ceil(h.length/2)),j;if(!E&&!k)return null;k?E?j=E[4].length>k[4].length?E:k:j=k:j=E;var H,K,W,ae;l.length>f.length?(H=j[0],K=j[1],W=j[2],ae=j[3]):(W=j[0],ae=j[1],H=j[2],K=j[3]);var _e=j[4];return[H,K,W,ae,_e]},s.prototype.diff_cleanupSemantic=function(l){for(var f=!1,h=[],p=0,b=null,m=0,E=0,k=0,j=0,H=0;m0?h[p-1]:-1,E=0,k=0,j=0,H=0,b=null,f=!0)),m++;for(f&&this.diff_cleanupMerge(l),this.diff_cleanupSemanticLossless(l),m=1;m=_e?(ae>=K.length/2||ae>=W.length/2)&&(l.splice(m,0,new s.Diff(g,W.substring(0,ae))),l[m-1][1]=K.substring(0,K.length-ae),l[m+1][1]=W.substring(ae),m++):(_e>=K.length/2||_e>=W.length/2)&&(l.splice(m,0,new s.Diff(g,K.substring(0,_e))),l[m-1][0]=d,l[m-1][1]=W.substring(0,W.length-_e),l[m+1][0]=c,l[m+1][1]=K.substring(_e),m++),m++}m++}},s.prototype.diff_cleanupSemanticLossless=function(l){function f(_e,Ce){if(!_e||!Ce)return 6;var Ae=_e.charAt(_e.length-1),$e=Ce.charAt(0),ke=Ae.match(s.nonAlphaNumericRegex_),je=$e.match(s.nonAlphaNumericRegex_),xe=ke&&Ae.match(s.whitespaceRegex_),Be=je&&$e.match(s.whitespaceRegex_),Qe=xe&&Ae.match(s.linebreakRegex_),We=Be&&$e.match(s.linebreakRegex_),Ue=Qe&&_e.match(s.blanklineEndRegex_),tt=We&&Ce.match(s.blanklineStartRegex_);return Ue||tt?5:Qe||We?4:ke&&!xe&&Be?3:xe||Be?2:ke||je?1:0}for(var h=1;h=W&&(W=ae,j=p,H=b,K=m)}l[h-1][1]!=j&&(j?l[h-1][1]=j:(l.splice(h-1,1),h--),l[h][1]=H,K?l[h+1][1]=K:(l.splice(h+1,1),h--))}h++}},s.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,s.whitespaceRegex_=/\s/,s.linebreakRegex_=/[\r\n]/,s.blanklineEndRegex_=/\n\r?\n$/,s.blanklineStartRegex_=/^\r?\n\r?\n/,s.prototype.diff_cleanupEfficiency=function(l){for(var f=!1,h=[],p=0,b=null,m=0,E=!1,k=!1,j=!1,H=!1;m0?h[p-1]:-1,j=H=!1),f=!0)),m++;f&&this.diff_cleanupMerge(l)},s.prototype.diff_cleanupMerge=function(l){l.push(new s.Diff(g,""));for(var f=0,h=0,p=0,b="",m="",E;f1?(h!==0&&p!==0&&(E=this.diff_commonPrefix(m,b),E!==0&&(f-h-p>0&&l[f-h-p-1][0]==g?l[f-h-p-1][1]+=m.substring(0,E):(l.splice(0,0,new s.Diff(g,m.substring(0,E))),f++),m=m.substring(E),b=b.substring(E)),E=this.diff_commonSuffix(m,b),E!==0&&(l[f][1]=m.substring(m.length-E)+l[f][1],m=m.substring(0,m.length-E),b=b.substring(0,b.length-E))),f-=h+p,l.splice(f,h+p),b.length&&(l.splice(f,0,new s.Diff(c,b)),f++),m.length&&(l.splice(f,0,new s.Diff(d,m)),f++),f++):f!==0&&l[f-1][0]==g?(l[f-1][1]+=l[f][1],l.splice(f,1)):f++,p=0,h=0,b="",m="";break}l[l.length-1][1]===""&&l.pop();var k=!1;for(f=1;ff));E++)b=h,m=p;return l.length!=E&&l[E][0]===c?m:m+(f-b)},s.prototype.diff_prettyHtml=function(l){for(var f=[],h=/&/g,p=//g,m=/\n/g,E=0;E");switch(k){case d:f[E]=''+H+"";break;case c:f[E]=''+H+"";break;case g:f[E]=""+H+"";break}}return f.join("")},s.prototype.diff_text1=function(l){for(var f=[],h=0;hthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var p=this.match_alphabet_(f),b=this;function m(Be,Qe){var We=Be/f.length,Ue=Math.abs(h-Qe);return b.Match_Distance?We+Ue/b.Match_Distance:Ue?1:We}var E=this.Match_Threshold,k=l.indexOf(f,h);k!=-1&&(E=Math.min(m(0,k),E),k=l.lastIndexOf(f,h+f.length),k!=-1&&(E=Math.min(m(0,k),E)));var j=1<=Ce;ke--){var je=p[l.charAt(ke-1)];if(_e===0?$e[ke]=($e[ke+1]<<1|1)&je:$e[ke]=($e[ke+1]<<1|1)&je|((ae[ke+1]|ae[ke])<<1|1)|ae[ke+1],$e[ke]&j){var xe=m(_e,ke-1);if(xe<=E)if(E=xe,k=ke-1,k>h)Ce=Math.max(1,2*h-k);else break}}if(m(_e+1,h)>E)break;ae=$e}return k},s.prototype.match_alphabet_=function(l){for(var f={},h=0;h"u")p=l,b=this.diff_main(p,f,!0),b.length>2&&(this.diff_cleanupSemantic(b),this.diff_cleanupEfficiency(b));else if(l&&typeof l=="object"&&typeof f>"u"&&typeof h>"u")b=l,p=this.diff_text1(b);else if(typeof l=="string"&&f&&typeof f=="object"&&typeof h>"u")p=l,b=f;else if(typeof l=="string"&&typeof f=="string"&&h&&typeof h=="object")p=l,b=h;else throw new Error("Unknown call format to patch_make.");if(b.length===0)return[];for(var m=[],E=new s.patch_obj,k=0,j=0,H=0,K=p,W=p,ae=0;ae=2*this.Patch_Margin&&k&&(this.patch_addContext_(E,K),m.push(E),E=new s.patch_obj,k=0,K=W,j=H);break}_e!==d&&(j+=Ce.length),_e!==c&&(H+=Ce.length)}return k&&(this.patch_addContext_(E,K),m.push(E)),m},s.prototype.patch_deepCopy=function(l){for(var f=[],h=0;hthis.Match_MaxBits?(j=this.match_main(f,k.substring(0,this.Match_MaxBits),E),j!=-1&&(H=this.match_main(f,k.substring(k.length-this.Match_MaxBits),E+k.length-this.Match_MaxBits),(H==-1||j>=H)&&(j=-1))):j=this.match_main(f,k,E),j==-1)b[m]=!1,p-=l[m].length2-l[m].length1;else{b[m]=!0,p=j-E;var K;if(H==-1?K=f.substring(j,j+k.length):K=f.substring(j,H+this.Match_MaxBits),k==K)f=f.substring(0,j)+this.diff_text2(l[m].diffs)+f.substring(j+k.length);else{var W=this.diff_main(k,K,!1);if(k.length>this.Match_MaxBits&&this.diff_levenshtein(W)/k.length>this.Patch_DeleteThreshold)b[m]=!1;else{this.diff_cleanupSemanticLossless(W);for(var ae=0,_e,Ce=0;Cem[0][1].length){var E=f-m[0][1].length;m[0][1]=h.substring(m[0][1].length)+m[0][1],b.start1-=E,b.start2-=E,b.length1+=E,b.length2+=E}if(b=l[l.length-1],m=b.diffs,m.length==0||m[m.length-1][0]!=g)m.push(new s.Diff(g,h)),b.length1+=f,b.length2+=f;else if(f>m[m.length-1][1].length){var E=f-m[m.length-1][1].length;m[m.length-1][1]+=h.substring(0,E),b.length1+=E,b.length2+=E}return h},s.prototype.patch_splitMax=function(l){for(var f=this.Match_MaxBits,h=0;h2*f?(k.length1+=K.length,b+=K.length,j=!1,k.diffs.push(new s.Diff(H,K)),p.diffs.shift()):(K=K.substring(0,f-k.length1-this.Patch_Margin),k.length1+=K.length,b+=K.length,H===g?(k.length2+=K.length,m+=K.length):j=!1,k.diffs.push(new s.Diff(H,K)),K==p.diffs[0][1]?p.diffs.shift():p.diffs[0][1]=p.diffs[0][1].substring(K.length))}E=this.diff_text2(k.diffs),E=E.substring(E.length-this.Patch_Margin);var W=this.diff_text1(p.diffs).substring(0,this.Patch_Margin);W!==""&&(k.length1+=W.length,k.length2+=W.length,k.diffs.length!==0&&k.diffs[k.diffs.length-1][0]===g?k.diffs[k.diffs.length-1][1]+=W:k.diffs.push(new s.Diff(g,W))),j||l.splice(++h,0,k)}}},s.prototype.patch_toText=function(l){for(var f=[],h=0;hC instanceof Array,uo=typeof Object.keys=="function"?C=>Object.keys(C):C=>{const s=[];for(const c in C)Object.prototype.hasOwnProperty.call(C,c)&&s.push(c);return s},ln=C=>C.substr(0,1)==="_"?C.slice(1):C,Gs=C=>C==="_t"?-1:C.substr(0,1)==="_"?parseInt(C.slice(1),10):parseInt(C,10)+.1,ho=(C,s)=>Gs(C)-Gs(s);class En{format(s,c){const d={};return this.prepareContext(d),this.recurse(d,s,c),this.finalize(d)}prepareContext(s){s.buffer=[],s.out=function(){this.buffer.push(...arguments)}}typeFormattterNotFound(s,c){throw new Error(`cannot format delta type: ${c}`)}typeFormattterErrorFormatter(s,c){return c.toString()}finalize(s){let{buffer:c}=s;if(lr(c))return c.join("")}recurse(s,c,d,g,l,f,h){const b=c&&f?f.value:d;if(typeof c>"u"&&typeof g>"u")return;const m=this.getDeltaType(c,f),E=m==="node"?c._t==="a"?"array":"object":"";typeof g<"u"?this.nodeBegin(s,g,l,m,E,h):this.rootBegin(s,m,E);let k;try{k=this[`format_${m}`]||this.typeFormattterNotFound(s,m),k.call(this,s,c,b,g,l,f)}catch(j){this.typeFormattterErrorFormatter(s,j,c,b,g,l,f),typeof console<"u"&&console.error&&console.error(j.stack)}typeof g<"u"?this.nodeEnd(s,g,l,m,E,h):this.rootEnd(s,m,E)}formatDeltaChildren(s,c,d){const g=this;this.forEachDeltaKey(c,d,(l,f,h,p)=>{g.recurse(s,c[l],d?d[f]:void 0,l,f,h,p)})}forEachDeltaKey(s,c,d){const g=uo(s),l=s._t==="a",f={};let h;if(typeof c<"u")for(h in c)Object.prototype.hasOwnProperty.call(c,h)&&typeof s[h]>"u"&&(!l||typeof s[`_${h}`]>"u")&&g.push(h);for(h in s)if(Object.prototype.hasOwnProperty.call(s,h)){const p=s[h];lr(p)&&p[2]===3&&(f[p[1].toString()]={key:h,value:c&&c[parseInt(h.substr(1))]},this.includeMoveDestinations!==!1&&typeof c>"u"&&typeof s[p[1]]>"u"&&g.push(p[1].toString()))}l?g.sort(ho):g.sort();for(let p=0,b=g.length;p"u")return typeof c<"u"?"movedestination":"unchanged";if(lr(s)){if(s.length===1)return"added";if(s.length===2)return"modified";if(s.length===3&&s[2]===0)return"deleted";if(s.length===3&&s[2]===2)return"textdiff";if(s.length===3&&s[2]===3)return"moved"}else if(typeof s=="object")return"node";return"unknown"}parseTextDiff(s){const c=[],d=s.split(` -@@ `);for(let g=0,l=d.length;g${c}`)}formatValue(s,c){s.out(`
${ti(JSON.stringify(c,null,2))}
`)}formatTextDiffString(s,c){const d=this.parseTextDiff(c);s.out('
    ');for(let g=0,l=d.length;g
    ${f.location.line}${f.location.chr}
    `);const h=f.pieces;for(let p=0,b=h.length;p${ti(decodeURI(m.text))}`)}s.out("
    ")}s.out("
")}rootBegin(s,c,d){const g=`jsondiffpatch-${c}${d?` jsondiffpatch-child-node-type-${d}`:""}`;s.out(`
`)}rootEnd(s){s.out(`
${s.hasArrows?`