From 19a3b3b93908c3fa59c733b7ba0d7e698d5ef68e Mon Sep 17 00:00:00 2001 From: "A. Block" <3756473+zendive@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:07:53 +0200 Subject: [PATCH] v3.0.5 (#22) - Firefox support - Move search invocation into panel page - Toolbar UI changes --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .gitignore | 8 +- .prettierignore | 1 - .vscode/settings.json | 3 +- Makefile | 37 +- README.md | 31 +- bundle/js/jsdiff-console.js | 1 - bundle/js/jsdiff-devtools.js | 1 - bundle/js/jsdiff-panel.js | 29 - bundle/js/jsdiff-proxy.js | 1 - ...design.plantuml => design.chrome.plantuml} | 8 +- doc/design.chrome.png | Bin 0 -> 68254 bytes doc/design.firefox.plantuml | 71 ++ doc/design.firefox.png | Bin 0 -> 107572 bytes doc/design.png | Bin 73596 -> 0 bytes doc/screenshot-00.png | Bin 39852 -> 117652 bytes doc/screenshot-01.png | Bin 40117 -> 119256 bytes doc/screenshot-02.png | Bin 49460 -> 132615 bytes manifest.json => manifest.chrome.json | 2 +- manifest.firefox.json | 34 + package.json | 46 +- pnpm-lock.yaml | 959 +++++++++++------- src/@types/index.d.ts | 23 +- src/api/clone.ts | 72 +- src/api/const.ts | 48 +- src/api/diffApi.ts | 49 + src/api/formatter-dom.ts | 86 -- src/api/onColourSchemeChange.ts | 19 + src/api/proxy.ts | 19 +- src/api/search.ts | 119 --- src/api/toolkit.ts | 4 + src/api/useRuntime.ts | 66 ++ src/firefox/background-script.ts | 34 + src/jsdiff-console.ts | 20 +- src/jsdiff-devtools.ts | 9 +- src/jsdiff-panel.js | 10 + src/jsdiff-proxy.ts | 2 +- src/stores/compare.store.ts | 100 ++ src/stores/search.store.ts | 167 +++ src/view/app.js | 5 - src/view/panel.badge.vue | 40 + src/view/panel.empty.vue | 44 + src/view/panel.header.vue | 141 ++- src/view/panel.search.vue | 133 +++ src/view/panel.timer.vue | 57 ++ src/view/panel.vue | 331 ++---- src/view/svg/arrow-down.svg | 1 + src/view/svg/arrow-up.svg | 1 + src/view/svg/clear.svg | 1 + src/view/svg/copy-to-clipboard.svg | 6 + src/view/svg/filter-filled.svg | 1 + src/view/svg/filter.svg | 1 + tsconfig.json | 28 +- webpack.config.ts | 16 +- 53 files changed, 1807 insertions(+), 1078 deletions(-) delete mode 100644 bundle/js/jsdiff-console.js delete mode 100644 bundle/js/jsdiff-devtools.js delete mode 100644 bundle/js/jsdiff-panel.js delete mode 100644 bundle/js/jsdiff-proxy.js rename doc/{design.plantuml => design.chrome.plantuml} (85%) create mode 100644 doc/design.chrome.png create mode 100644 doc/design.firefox.plantuml create mode 100644 doc/design.firefox.png delete mode 100644 doc/design.png rename manifest.json => manifest.chrome.json (98%) create mode 100644 manifest.firefox.json create mode 100644 src/api/diffApi.ts delete mode 100644 src/api/formatter-dom.ts create mode 100644 src/api/onColourSchemeChange.ts delete mode 100644 src/api/search.ts create mode 100644 src/api/useRuntime.ts create mode 100644 src/firefox/background-script.ts create mode 100644 src/jsdiff-panel.js create mode 100644 src/stores/compare.store.ts create mode 100644 src/stores/search.store.ts delete mode 100644 src/view/app.js create mode 100644 src/view/panel.badge.vue create mode 100644 src/view/panel.empty.vue create mode 100644 src/view/panel.search.vue create mode 100644 src/view/panel.timer.vue create mode 100644 src/view/svg/arrow-down.svg create mode 100644 src/view/svg/arrow-up.svg create mode 100644 src/view/svg/clear.svg create mode 100644 src/view/svg/copy-to-clipboard.svg create mode 100644 src/view/svg/filter-filled.svg create mode 100644 src/view/svg/filter.svg diff --git a/.gitignore b/.gitignore index 9690fd9..d8f663a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,9 @@ node_modules/ # os .DS_Store -# typescript output -.ts-built - -# application files not for git +# application autogenerated files not for git *.js.map *.zip +*.crx +manifest.json +bundle/js diff --git a/.prettierignore b/.prettierignore index a1a895b..137915a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ /bundle/js -.ts-built *.min.js pnpm-lock.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index 40c20a9..46947aa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,6 @@ "fileMatch": ["manifest.json"], "url": "https://json.schemastore.org/chrome-manifest.json" } - ] + ], + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/Makefile b/Makefile index 09b7ab1..25b9bea 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ -ZIP_FILE="extension.zip" +ZIP_CHROME_FILE="extension.chrome.zip" +ZIP_FIREFOX_FILE="extension.firefox.zip" HASH_ALG="sha384" .PHONY: - install clean all lint dev prod zip + install clean all lint dev prod zip_chrome zip_firefox + tune2chrome tune2firefox install: npm i -g pnpm @@ -10,13 +12,14 @@ install: clean: rm -rf ./node_modules - rm -rf $(ZIP_FILE) + rm -rf $(ZIP_CHROME_FILE) $(ZIP_FIREFOX_FILE) rm -rf ./bundle/js/ all: make lint make prod - make zip + make zip_chrome + make zip_firefox lint: npx prettier . --write @@ -27,12 +30,28 @@ dev: npx webpack --progress --watch --mode=development prod: + rm -rf ./bundle/js/ NODE_OPTIONS="--loader=ts-node/esm --no-warnings=ExperimentalWarning" \ NODE_ENV="production" \ npx webpack --mode=production -zip: - rm -rf $(ZIP_FILE) - zip -r $(ZIP_FILE) ./bundle ./manifest.json > /dev/null - FILE_HASH=$$(openssl dgst -$(HASH_ALG) -binary $(ZIP_FILE) | openssl base64 -A); \ - echo "$(ZIP_FILE) $(HASH_ALG):$$FILE_HASH" +zip_chrome: + make tune2chrome + rm -rf $(ZIP_CHROME_FILE) + zip -r $(ZIP_CHROME_FILE) ./bundle ./manifest.json > /dev/null + zip --delete $(ZIP_CHROME_FILE) "bundle/js/firefox/*" + FILE_HASH=$$(openssl dgst -$(HASH_ALG) -binary $(ZIP_CHROME_FILE) | openssl base64 -A); \ + echo "$(ZIP_CHROME_FILE) $(HASH_ALG):$$FILE_HASH" + +zip_firefox: + make tune2firefox + rm -rf $(ZIP_FIREFOX_FILE) + zip -r $(ZIP_FIREFOX_FILE) ./bundle ./manifest.json > /dev/null + FILE_HASH=$$(openssl dgst -$(HASH_ALG) -binary $(ZIP_FIREFOX_FILE) | openssl base64 -A); \ + echo "$(ZIP_FIREFOX_FILE) $(HASH_ALG):$$FILE_HASH" + +tune2chrome: + cp manifest.chrome.json manifest.json + +tune2firefox: + cp manifest.firefox.json manifest.json diff --git a/README.md b/README.md index aa957a7..96fd307 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -### ![](./src/img/panel-icon28.png) console.diff() +### ![](./bundle/img/panel-icon28.png) console.diff() [![console.diff()](https://storage.googleapis.com/web-dev-uploads/image/WlD8wC6g8khYWPJUsQceQkhXSlv1/tbyBjqi7Zu733AAKA5n4.png)](https://chrome.google.com/webstore/detail/jsdiff-devtool/iefeamoljhdcpigpnpggeiiabpnpgonb) Chrome extension to compare objects in memory with console.diff(old, new) devtools function.
- Screenshots + Examples - Comparing two objects ![screenshot](./doc/screenshot-01.png) @@ -13,6 +13,15 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo - Tracking changes in localStorage (unchanged are hidden) ![screenshot](./doc/screenshot-02.png) +
+
+ How it works + +- Chrome mv3 + ![screenshot](./doc/design.chrome.png) +- Firefox + ![screenshot](./doc/design.firefox.png) +
### Based on @@ -35,7 +44,7 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo - JSDiff devtools panel reflects current state of comparison, regardless the tab[s] it was opened from. -- Basic integration with search functionality within devtools: +- Internal search inside comparison results - If search query contains at least one upper-case letter - the search will be case-sensitive. @@ -69,6 +78,8 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo - Compared objects, after being serialized, stored in `chrome.storage.local` wich has 10MB limit (before chrome v114 was 5MB). +- In Firefox the API is under `jsdiff` object for now, cause extension API's not fully compatible. + ### API - **console.diff(left, right)** - compare left and right arguments @@ -113,24 +124,24 @@ Historically, left side represents the old state and right side the new state. - To track changes of the same variable in timed manner you can push it with `diffPush` or `diff` with a single argument, - that will shift objects from right to left, showing differences with previous push state. -### How it works - -![screenshot](./doc/design.png) - ### How to build -- requires npm/nodejs +Requires + +- Linux +- node 20.10 (LTS) ```sh make install # to install dependencies -make all # build for prod and make extension.zip +make all # build for prod and make extension.${browser}.zip +make tune2chrome # or tune2firefox for relevant manifest.json file make dev # local development ``` ### Protection - How to protect your site from this extension: - - Well, tests show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts... + - Well, tests on chrome show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts... - Avoid assigning to `window` or `globalThis` any application object. See also [accidental global variables and memory leaks](https://www.tutorialspoint.com/explain-in-detail-about-memory-leaks-in-javascript). - In general, you can incapacitate console functions: diff --git a/bundle/js/jsdiff-console.js b/bundle/js/jsdiff-console.js deleted file mode 100644 index 515237a..0000000 --- a/bundle/js/jsdiff-console.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var h={};const o={EMPTY:"\u27EAempty\u27EB",UNDEFINED:"\u27EAundefined\u27EB",NULL:"\u27EAnull\u27EB",NATIVE_FUNCTION:"\u0192\u27EAnative\u27EB",EXCEPTION_FALLBACK:"\u2049\uFE0F \u27EAexception\u27EB",EXCEPTION:n=>`\u2049\uFE0F \u27EA${n}\u27EB`,RECURRING_ARRAY:n=>`0x${n}: [\u267B\uFE0F]`,RECURRING_OBJECT:n=>`0x${n}: {\u267B\uFE0F}`,RECURRING_SET:n=>`0x${n}: Set[\u267B\uFE0F]`,RECURRING_MAP:n=>`0x${n}: Map{\u267B\uFE0F}`,UNSERIALIZABLE:n=>`0x${n}: \u27EAunserializable\u27EB`,SYMBOL:(n,e)=>`0x${e}: ${n}`,FUNCTION:(n,e)=>`\u0192${n?` ${n}`:""}\u27EA${e}\u27EB`,NUMERIC:n=>typeof n=="bigint"?`BigInt\u27EA${n}\u27EB`:`Number\u27EA${n}\u27EB`},g={NO_CONNECTION:"Could not establish connection. Receiving end does not exist.",PORT_CLOSED:"The message port closed before a response was received.",QUOTA_EXCEEDED:"QUOTA_BYTES quota exceeded"};function x(n){return n!=null}async function O(n){const e=new TextEncoder().encode(n),t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(s=>s.toString(16).padStart(2,"0").toUpperCase()).join("")}class B{#n;#e=0;constructor(){this.#n=new Map}clear(){this.#n.clear()}#t(e){return e.toString(16).padStart(4,"0")}lookup(e,t){let i=this.#n.get(e);if(!i){++this.#e;const r=this.#t(this.#e);i={name:p(e)?t(e.toString(),r):t(r),seen:!1},this.#n.set(e,i)}return i}}async function f(n,e){try{window.postMessage({source:"jsdiff-console-to-proxy-inprogress",on:!0},"*");for(const t of["push","left","right"])if(Reflect.has(e,t)){const i=e[t];i===void 0?e[t]=o.UNDEFINED:i===null?e[t]=o.NULL:e[t]=await n(i)}window.postMessage({source:"jsdiff-console-to-proxy-compare",payload:e},"*")}catch(t){console.error("console.diff()",t),window.postMessage({source:"jsdiff-console-to-proxy-inprogress",on:!1},"*")}}async function F(n){let e=new Set;const t=JSON.parse(JSON.stringify(n,L.bind(null,e)));return e.clear(),e=null,t}async function l(n){let e=new B;const t=await u(e,n);return e.clear(),e=null,t}async function u(n,e){let t=e;if(R(e)){const{name:i}=n.lookup(e,o.UNSERIALIZABLE);t=i}else if(N(e))t=await m(e);else if(p(e)){const{name:i}=n.lookup(e,o.SYMBOL);t=i}else C(e)?t=await S(n,e,o.RECURRING_ARRAY):y(e)?t=await S(n,e,o.RECURRING_SET):U(e)?t=await T(n,e):d(e)?t=await b(n,e):w(e)?t=o.NUMERIC(e):e===void 0&&(t=o.UNDEFINED);return t}function w(n){return typeof n=="bigint"||Number.isNaN(n)||n===-1/0||n===1/0}async function S(n,e,t){const i=n.lookup(e,t);let r;if(i.seen)r=i.name;else{i.seen=!0;const s=[];for(const c of e)s.push(await u(n,c));r=s}return r}async function T(n,e){const t=n.lookup(e,o.RECURRING_MAP);let i;if(t.seen)i=t.name;else{t.seen=!0;const r={};for(const[s,c]of e){const E=await _(n,s),a=await u(n,c);r[E]=a}i=r}return i}async function _(n,e){let t;if(R(e)){const{name:i}=n.lookup(e,o.UNSERIALIZABLE);t=i}else if(N(e))t=await m(e);else if(p(e)){const{name:i}=n.lookup(e,o.SYMBOL);t=i}else if(C(e)){const{name:i}=n.lookup(e,o.RECURRING_ARRAY);t=i}else if(y(e)){const{name:i}=n.lookup(e,o.RECURRING_SET);t=i}else if(U(e)){const{name:i}=n.lookup(e,o.RECURRING_MAP);t=i}else if(d(e)){const{name:i}=n.lookup(e,o.RECURRING_OBJECT);t=i}else w(e)?t=o.NUMERIC(e):e===void 0?t=o.UNDEFINED:t=String(e);return t}async function b(n,e){const t=n.lookup(e,o.RECURRING_OBJECT);let i;if(t.seen)i=t.name;else if(t.seen=!0,M(e)){const r=D(e);i=await u(n,r)}else{const r={},s=Reflect.ownKeys(e);for(const c of s){let E,a;if(p(c)){const{name:I}=n.lookup(c,o.SYMBOL);E=I}else E=c;try{a=await u(n,e[c])}catch(I){a=A(I)}r[E]=a}i=r}return i}async function m(n){const e=n.toString();if(e.endsWith("{ [native code] }"))return o.NATIVE_FUNCTION;{const t=await O(e);return o.FUNCTION(n.name,t)}}function D(n){let e;try{e=n.toJSON()}catch(t){e=A(t)}return e}function A(n){return typeof n?.toString=="function"?o.EXCEPTION(n.toString()):o.EXCEPTION_FALLBACK}function L(n,e,t){try{if(R(t))return;if(N(t))return t.toString();if(d(t)){if(n.has(t))return;n.add(t)}return t}catch(i){return A(i)}}function C(n){return n instanceof Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Uint16Array||n instanceof Uint32Array||n instanceof BigUint64Array||n instanceof Int8Array||n instanceof Int16Array||n instanceof Int32Array||n instanceof BigInt64Array||n instanceof Float32Array||n instanceof Float64Array}function N(n){return typeof n=="function"&&"toString"in n&&typeof n.toString=="function"}function y(n){return n instanceof Set}function U(n){return n instanceof Map}function M(n){let e;try{e=n!==null&&typeof n=="object"&&"toJSON"in n&&typeof n.toJSON=="function"}catch{e=!1}return e}function R(n){return n instanceof Element||n instanceof Document}function p(n){return typeof n=="symbol"}function d(n){return n!==null&&typeof n=="object"||n instanceof Object}Object.assign(console,{diff:(...n)=>{f(l,n.length===1?{push:n[0],timestamp:Date.now()}:{left:n[0],right:n[1],timestamp:Date.now()})},diffLeft:n=>{f(l,{left:n,timestamp:Date.now()})},diffRight:n=>{f(l,{right:n,timestamp:Date.now()})},diffPush:n=>{f(l,{push:n,timestamp:Date.now()})},diff_:(...n)=>{f(F,n.length===1?{push:n[0],timestamp:Date.now()}:{left:n[0],right:n[1],timestamp:Date.now()})}}),console.debug("\u271A console.diff()")})(); diff --git a/bundle/js/jsdiff-devtools.js b/bundle/js/jsdiff-devtools.js deleted file mode 100644 index 95d1f7b..0000000 --- a/bundle/js/jsdiff-devtools.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var n={};chrome.devtools.inspectedWindow.tabId!==null&&chrome.devtools.panels.create("JSDiff","/bundle/img/panel-icon28.png","/bundle/jsdiff-panel.html",e=>{e.onSearch.addListener(async(s,a)=>{await chrome.runtime.sendMessage({source:"jsdiff-devtools-to-panel-search",params:{cmd:s,query:a}})})})})(); diff --git a/bundle/js/jsdiff-panel.js b/bundle/js/jsdiff-panel.js deleted file mode 100644 index b38339b..0000000 --- a/bundle/js/jsdiff-panel.js +++ /dev/null @@ -1,29 +0,0 @@ -(()=>{var Sa={360:(me,J,te)=>{"use strict";te.d(J,{Z:()=>we});var ie=te(650),fe=te.n(ie),ne=te(196),re=te.n(ne),oe=re()(fe());oe.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 we=oe},509:(me,J,te)=>{"use strict";te.d(J,{Z:()=>we});var ie=te(650),fe=te.n(ie),ne=te(196),re=te.n(ne),oe=re()(fe());oe.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 we=oe},978:(me,J,te)=>{"use strict";te.d(J,{Z:()=>we});var ie=te(650),fe=te.n(ie),ne=te(196),re=te.n(ne),oe=re()(fe());oe.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 we=oe},993:(me,J,te)=>{"use strict";te.d(J,{Z:()=>we});var ie=te(650),fe=te.n(ie),ne=te(196),re=te.n(ne),oe=re()(fe());oe.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 we=oe},196:me=>{"use strict";me.exports=function(J){var te=[];return te.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+=J(fe),re&&(ne+="}"),fe[2]&&(ne+="}"),fe[4]&&(ne+="}"),ne}).join("")},te.i=function(fe,ne,re,oe,we){typeof fe=="string"&&(fe=[[null,fe,void 0]]);var ze={};if(re)for(var Se=0;Se"u"||(Te[1]="@layer".concat(Te[5].length>0?" ".concat(Te[5]):""," {").concat(Te[1],"}")),Te[5]=we),ne&&(Te[2]&&(Te[1]="@media ".concat(Te[2]," {").concat(Te[1],"}")),Te[2]=ne),oe&&(Te[4]?(Te[1]="@supports (".concat(Te[4],") {").concat(Te[1],"}"),Te[4]=oe):Te[4]="".concat(oe)),te.push(Te))}},te}},650:me=>{"use strict";me.exports=function(J){return J[1]}},298:()=>{},301:function(me,J,te){(function(ie,fe){fe(J,te(298))})(this,function(ie,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 m=c||s.pipe||"default",l,f;for(;m;)typeof d.nextAfterChildren<"u"&&(d.next=d.nextAfterChildren,d.nextAfterChildren=null),typeof m=="string"&&(m=this.pipe(m)),m.process(d),f=d,l=m,m=null,d&&d.next&&(d=d.next,m=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,m=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 m=new Error(`${c.name} failed`);throw m.noResult=!0,m}},this}}class oe{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 we=typeof Array.isArray=="function"?Array.isArray:C=>C instanceof Array;function ze(C){const s=/^\/(.*)\/([gimyu]*)$/.exec(C.toString());return new RegExp(s[1],s[2])}function Se(C){if(typeof C!="object")return C;if(C===null)return null;if(we(C))return C.map(Se);if(C instanceof Date)return new Date(C.getTime());if(C instanceof RegExp)return ze(C);const s={};for(const c in C)Object.prototype.hasOwnProperty.call(C,c)&&(s[c]=Se(C[c]));return s}class pe extends oe{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:Se;typeof s[0]=="object"&&(s[0]=c(s[0])),typeof s[1]=="object"&&(s[1]=c(s[1]))}return oe.prototype.setResult.apply(this,arguments)}}class ee extends oe{constructor(s,c){super(),this.left=s,this.delta=c,this.pipe="patch"}}class Te extends oe{constructor(s){super(),this.delta=s,this.pipe="reverse"}}const Xe=typeof Array.isArray=="function"?Array.isArray:function(C){return C instanceof Array},Ct=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=Xe(s.left)),s.rightType==="object"&&(s.rightIsArray=Xe(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())};Ct.filterName="trivial";const Et=function(s){if(typeof s.delta>"u"){s.setResult(s.left).exit();return}if(s.nested=!Xe(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()}};Et.filterName="trivial";const ve=function(s){if(typeof s.delta>"u"){s.setResult(s.delta).exit();return}if(s.nested=!Xe(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()}};ve.filterName="trivial";function Fe(C){if(!C||!C.children)return;const s=C.children.length;let c,d=C.result;for(let m=0;m"u")&&(d=d||{},d[c.childName]=c.result);d&&C.leftIsArray&&(d._t="a"),C.setResult(d).exit()}Fe.filterName="collectChildren";function Dt(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 pe(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 pe(void 0,C.right[s]),C.push(c,s)));if(!C.children||C.children.length===0){C.setResult(void 0).exit();return}C.exit()}Dt.filterName="objects";const Ie=function(s){if(!s.nested||s.delta._t)return;let c,d;for(c in s.delta)d=new ee(s.left[c],s.delta[c]),s.push(d,c);s.exit()};Ie.filterName="objects";const tr=function(s){if(!s||!s.children||s.delta._t)return;const c=s.children.length;let d;for(let m=0;mb?--l:--m}return f};var uo={get:function(C,s,c,d){const m=d||{},l=Jr(C,s,c||Ys,m),f=rr(l,C,s,m);return typeof C=="string"&&typeof s=="string"&&(f.sequence=f.sequence.join("")),f}};const vt=3,Yr=typeof Array.isArray=="function"?Array.isArray:C=>C instanceof Array,Ft=typeof Array.prototype.indexOf=="function"?(C,s)=>C.indexOf(s):(C,s)=>{const c=C.length;for(let d=0;d"u"&&(m.hashCache1[c]=p=h(l,c))):p=h(l),typeof p>"u"||(typeof d=="number"?(m.hashCache2=m.hashCache2||[],b=m.hashCache2[d],typeof b>"u"&&(m.hashCache2[d]=b=h(f,d))):b=h(f),typeof b>"u")?!1:p===b}const ir=function(s){if(!s.leftIsArray)return;const c={objectHash:s.options&&s.options.objectHash,matchByPosition:s.options&&s.options.matchByPosition};let d=0,m=0,l,f,h;const p=s.left,b=s.right,_=p.length,E=b.length;let k;for(_>0&&E>0&&!c.objectHash&&typeof c.matchByPosition!="boolean"&&(c.matchByPosition=!Xs(p,b,_,E));d<_&&d0){for(let Pe=0;Pes[C]-c[C]}},Tt=function(s){if(!s.nested||s.delta._t!=="a")return;let c,d;const m=s.delta,l=s.left;let f=[],h=[];const p=[];for(c in m)if(c!=="_t")if(c[0]==="_")if(m[c][2]===0||m[c][2]===vt)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: ${m[c][2]}`);else m[c].length===1?h.push({index:parseInt(c,10),value:m[c][0]}):p.push({index:parseInt(c,10),delta:m[c]});for(f=f.sort(An.numerically),c=f.length-1;c>=0;c--){d=f[c];const k=m[`_${d}`],P=l.splice(d,1)[0];k[2]===vt&&h.push({index:k[1],value:P})}h=h.sort(An.numericallyBy("index"));const b=h.length;for(c=0;c0)for(c=0;c<_;c++){const k=p[c];E=new ee(s.left[k.index],k.delta),s.push(E,k.index)}if(!s.children){s.setResult(s.left).exit();return}s.exit()};Tt.filterName="arrays";const Nt=function(s){if(!s||!s.children||s.delta._t!=="a")return;const c=s.children.length;let d;for(let m=0;m{if(typeof s=="string"&&s[0]==="_")return parseInt(s.substr(1),10);if(Yr(c)&&c[2]===0)return`_${s}`;let d=+s;for(const m in C){const l=C[m];if(Yr(l))if(l[2]===vt){const f=parseInt(m.substr(1),10),h=l[1];if(h===+s)return f;f<=d&&h>d?d++:f>=d&&h"u"&&(l=Mn(C.delta,c.childName,c.result)),d[l]!==c.result&&(d[l]=c.result)}C.setResult(d).exit()}or.filterName="arraysCollectChildren";const lr=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()};lr.filterName="dates";function ar(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}var Xr={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,m=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(m,l)]:[];typeof h>"u"&&(h=!0);var _=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 P=l.substring(l.length-E);l=l.substring(0,l.length-E),f=f.substring(0,f.length-E);var L=this.diff_compute_(l,f,_,b);return k&&L.unshift(new s.Diff(m,k)),P&&L.push(new s.Diff(m,P)),this.diff_cleanupMerge(L),L},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 _=l.length>f.length?l:f,E=l.length>f.length?f:l,k=_.indexOf(E);if(k!=-1)return b=[new s.Diff(d,_.substring(0,k)),new s.Diff(m,E),new s.Diff(d,_.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 P=this.diff_halfMatch_(l,f);if(P){var L=P[0],K=P[1],W=P[2],le=P[3],_e=P[4],Ee=this.diff_main(L,W,h,p),je=this.diff_main(K,le,h,p);return Ee.concat([new s.Diff(m,_e)],je)}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,_=this.diff_main(l,f,!1,h);this.diff_charsToLines_(_,b),this.diff_cleanupSemantic(_),_.push(new s.Diff(m,""));for(var E=0,k=0,P=0,L="",K="";E<_.length;){switch(_[E][0]){case d:P++,K+=_[E][1];break;case c:k++,L+=_[E][1];break;case m:if(k>=1&&P>=1){_.splice(E-k-P,k+P),E=E-k-P;for(var W=this.diff_main(L,K,!1,h),le=W.length-1;le>=0;le--)_.splice(E,0,W[le]);E=E+W.length}P=0,k=0,L="",K="";break}E++}return _.pop(),_},s.prototype.diff_bisect_=function(l,f,h){for(var p=l.length,b=f.length,_=Math.ceil((p+b)/2),E=_,k=2*_,P=new Array(k),L=new Array(k),K=0;Kh);ke++){for(var Pe=-ke+_e;Pe<=ke-Ee;Pe+=2){var Be=E+Pe,Ne;Pe==-ke||Pe!=ke&&P[Be-1]p)Ee+=2;else if(qe>b)_e+=2;else if(le){var Ve=E+W-Pe;if(Ve>=0&&Ve=He)return this.diff_bisectSplit_(l,f,Ne,qe,h)}}}for(var et=-ke+je;et<=ke-xe;et+=2){var Ve=E+et,He;et==-ke||et!=ke&&L[Ve-1]p)xe+=2;else if(dt>b)je+=2;else if(!le){var Be=E+W-et;if(Be>=0&&Be=He)return this.diff_bisectSplit_(l,f,Ne,qe,h)}}}}return[new s.Diff(c,l),new s.Diff(d,f)]},s.prototype.diff_bisectSplit_=function(l,f,h,p,b){var _=l.substring(0,h),E=f.substring(0,p),k=l.substring(h),P=f.substring(p),L=this.diff_main(_,E,!1,b),K=this.diff_main(k,P,!1,b);return L.concat(K)},s.prototype.diff_linesToChars_=function(l,f){var h=[],p={};h[0]="";function b(P){for(var L="",K=0,W=-1,le=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=Ee.length?[Ne,qe,Ve,He,Be]:null}var E=_(h,p,Math.ceil(h.length/4)),k=_(h,p,Math.ceil(h.length/2)),P;if(!E&&!k)return null;k?E?P=E[4].length>k[4].length?E:k:P=k:P=E;var L,K,W,le;l.length>f.length?(L=P[0],K=P[1],W=P[2],le=P[3]):(W=P[0],le=P[1],L=P[2],K=P[3]);var _e=P[4];return[L,K,W,le,_e]},s.prototype.diff_cleanupSemantic=function(l){for(var f=!1,h=[],p=0,b=null,_=0,E=0,k=0,P=0,L=0;_0?h[p-1]:-1,E=0,k=0,P=0,L=0,b=null,f=!0)),_++;for(f&&this.diff_cleanupMerge(l),this.diff_cleanupSemanticLossless(l),_=1;_=_e?(le>=K.length/2||le>=W.length/2)&&(l.splice(_,0,new s.Diff(m,W.substring(0,le))),l[_-1][1]=K.substring(0,K.length-le),l[_+1][1]=W.substring(le),_++):(_e>=K.length/2||_e>=W.length/2)&&(l.splice(_,0,new s.Diff(m,K.substring(0,_e))),l[_-1][0]=d,l[_-1][1]=W.substring(0,W.length-_e),l[_+1][0]=c,l[_+1][1]=K.substring(_e),_++),_++}_++}},s.prototype.diff_cleanupSemanticLossless=function(l){function f(_e,Ee){if(!_e||!Ee)return 6;var je=_e.charAt(_e.length-1),xe=Ee.charAt(0),ke=je.match(s.nonAlphaNumericRegex_),Pe=xe.match(s.nonAlphaNumericRegex_),Be=ke&&je.match(s.whitespaceRegex_),Ne=Pe&&xe.match(s.whitespaceRegex_),qe=Be&&je.match(s.linebreakRegex_),Ve=Ne&&xe.match(s.linebreakRegex_),He=qe&&_e.match(s.blanklineEndRegex_),et=Ve&&Ee.match(s.blanklineStartRegex_);return He||et?5:qe||Ve?4:ke&&!Be&&Ne?3:Be||Ne?2:ke||Pe?1:0}for(var h=1;h=W&&(W=le,P=p,L=b,K=_)}l[h-1][1]!=P&&(P?l[h-1][1]=P:(l.splice(h-1,1),h--),l[h][1]=L,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,_=0,E=!1,k=!1,P=!1,L=!1;_0?h[p-1]:-1,P=L=!1),f=!0)),_++;f&&this.diff_cleanupMerge(l)},s.prototype.diff_cleanupMerge=function(l){l.push(new s.Diff(m,""));for(var f=0,h=0,p=0,b="",_="",E;f1?(h!==0&&p!==0&&(E=this.diff_commonPrefix(_,b),E!==0&&(f-h-p>0&&l[f-h-p-1][0]==m?l[f-h-p-1][1]+=_.substring(0,E):(l.splice(0,0,new s.Diff(m,_.substring(0,E))),f++),_=_.substring(E),b=b.substring(E)),E=this.diff_commonSuffix(_,b),E!==0&&(l[f][1]=_.substring(_.length-E)+l[f][1],_=_.substring(0,_.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++),_.length&&(l.splice(f,0,new s.Diff(d,_)),f++),f++):f!==0&&l[f-1][0]==m?(l[f-1][1]+=l[f][1],l.splice(f,1)):f++,p=0,h=0,b="",_="";break}l[l.length-1][1]===""&&l.pop();var k=!1;for(f=1;ff));E++)b=h,_=p;return l.length!=E&&l[E][0]===c?_:_+(f-b)},s.prototype.diff_prettyHtml=function(l){for(var f=[],h=/&/g,p=//g,_=/\n/g,E=0;E");switch(k){case d:f[E]=''+L+"";break;case c:f[E]=''+L+"";break;case m:f[E]=""+L+"";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 _(Ne,qe){var Ve=Ne/f.length,He=Math.abs(h-qe);return b.Match_Distance?Ve+He/b.Match_Distance:He?1:Ve}var E=this.Match_Threshold,k=l.indexOf(f,h);k!=-1&&(E=Math.min(_(0,k),E),k=l.lastIndexOf(f,h+f.length),k!=-1&&(E=Math.min(_(0,k),E)));var P=1<=Ee;ke--){var Pe=p[l.charAt(ke-1)];if(_e===0?xe[ke]=(xe[ke+1]<<1|1)&Pe:xe[ke]=(xe[ke+1]<<1|1)&Pe|((le[ke+1]|le[ke])<<1|1)|le[ke+1],xe[ke]&P){var Be=_(_e,ke-1);if(Be<=E)if(E=Be,k=ke-1,k>h)Ee=Math.max(1,2*h-k);else break}}if(_(_e+1,h)>E)break;le=xe}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 _=[],E=new s.patch_obj,k=0,P=0,L=0,K=p,W=p,le=0;le=2*this.Patch_Margin&&k&&(this.patch_addContext_(E,K),_.push(E),E=new s.patch_obj,k=0,K=W,P=L);break}_e!==d&&(P+=Ee.length),_e!==c&&(L+=Ee.length)}return k&&(this.patch_addContext_(E,K),_.push(E)),_},s.prototype.patch_deepCopy=function(l){for(var f=[],h=0;hthis.Match_MaxBits?(P=this.match_main(f,k.substring(0,this.Match_MaxBits),E),P!=-1&&(L=this.match_main(f,k.substring(k.length-this.Match_MaxBits),E+k.length-this.Match_MaxBits),(L==-1||P>=L)&&(P=-1))):P=this.match_main(f,k,E),P==-1)b[_]=!1,p-=l[_].length2-l[_].length1;else{b[_]=!0,p=P-E;var K;if(L==-1?K=f.substring(P,P+k.length):K=f.substring(P,L+this.Match_MaxBits),k==K)f=f.substring(0,P)+this.diff_text2(l[_].diffs)+f.substring(P+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[_]=!1;else{this.diff_cleanupSemanticLossless(W);for(var le=0,_e,Ee=0;Ee_[0][1].length){var E=f-_[0][1].length;_[0][1]=h.substring(_[0][1].length)+_[0][1],b.start1-=E,b.start2-=E,b.length1+=E,b.length2+=E}if(b=l[l.length-1],_=b.diffs,_.length==0||_[_.length-1][0]!=m)_.push(new s.Diff(m,h)),b.length1+=f,b.length2+=f;else if(f>_[_.length-1][1].length){var E=f-_[_.length-1][1].length;_[_.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,P=!1,k.diffs.push(new s.Diff(L,K)),p.diffs.shift()):(K=K.substring(0,f-k.length1-this.Patch_Margin),k.length1+=K.length,b+=K.length,L===m?(k.length2+=K.length,_+=K.length):P=!1,k.diffs.push(new s.Diff(L,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]===m?k.diffs[k.diffs.length-1][1]+=W:k.diffs.push(new s.Diff(m,W))),P||l.splice(++h,0,k)}}},s.prototype.patch_toText=function(l){for(var f=[],h=0;hC instanceof Array,ei=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},go=C=>C.substr(0,1)==="_"?C.slice(1):C,Zt=C=>C==="_t"?-1:C.substr(0,1)==="_"?parseInt(C.slice(1),10):parseInt(C,10)+.1,_o=(C,s)=>Zt(C)-Zt(s);class kn{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(dr(c))return c.join("")}recurse(s,c,d,m,l,f,h){const b=c&&f?f.value:d;if(typeof c>"u"&&typeof m>"u")return;const _=this.getDeltaType(c,f),E=_==="node"?c._t==="a"?"array":"object":"";typeof m<"u"?this.nodeBegin(s,m,l,_,E,h):this.rootBegin(s,_,E);let k;try{k=this[`format_${_}`]||this.typeFormattterNotFound(s,_),k.call(this,s,c,b,m,l,f)}catch(P){this.typeFormattterErrorFormatter(s,P,c,b,m,l,f),typeof console<"u"&&console.error&&console.error(P.stack)}typeof m<"u"?this.nodeEnd(s,m,l,_,E,h):this.rootEnd(s,_,E)}formatDeltaChildren(s,c,d){const m=this;this.forEachDeltaKey(c,d,(l,f,h,p)=>{m.recurse(s,c[l],d?d[f]:void 0,l,f,h,p)})}forEachDeltaKey(s,c,d){const m=ei(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")&&m.push(h);for(h in s)if(Object.prototype.hasOwnProperty.call(s,h)){const p=s[h];dr(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"&&m.push(p[1].toString()))}l?m.sort(_o):m.sort();for(let p=0,b=m.length;p"u")return typeof c<"u"?"movedestination":"unchanged";if(dr(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 m=0,l=d.length;m${c}`)}formatValue(s,c){s.out(`
${ni(JSON.stringify(c,null,2))}
`)}formatTextDiffString(s,c){const d=this.parseTextDiff(c);s.out('
    ');for(let m=0,l=d.length;m
    ${f.location.line}${f.location.chr}
    `);const h=f.pieces;for(let p=0,b=h.length;p${ni(decodeURI(_.text))}`)}s.out("
    ")}s.out("
")}rootBegin(s,c,d){const m=`jsondiffpatch-${c}${d?` jsondiffpatch-child-node-type-${d}`:""}`;s.out(`
`)}rootEnd(s){s.out(`
${s.hasArrows?` + + diff --git a/src/view/panel.empty.vue b/src/view/panel.empty.vue new file mode 100644 index 0000000..370ff08 --- /dev/null +++ b/src/view/panel.empty.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/view/panel.header.vue b/src/view/panel.header.vue index af08c0d..58368be 100644 --- a/src/view/panel.header.vue +++ b/src/view/panel.header.vue @@ -1,82 +1,68 @@ @@ -89,7 +75,6 @@ const stale = { display: flex; align-items: center; height: var(--header-height); - min-width: 512px; user-select: none; @@ -97,9 +82,11 @@ const stale = { display: flex; justify-content: center; align-items: center; - padding-left: 10px; .btn { + display: flex; + align-items: center; + justify-content: center; height: var(--header-height); cursor: pointer; border: none; @@ -107,21 +94,41 @@ const stale = { outline: none; background-color: var(--button-background); color: var(--colour-text); - margin: 0 2px; &:hover { - background-color: var(--button-hackground-hover); + background-color: var(--button-background-hover); } } - .-last-updated { - cursor: default; + .panel-timer { margin-left: 10px; + } + } - .-value { - font-weight: bold; - color: var(--colour-text); - opacity: 0.5; + .icon { + display: inline-block; + width: 20px; + height: 20px; + background-color: var(--colour-text); + -webkit-mask-size: cover; + mask-size: cover; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + + &.-clear { + -webkit-mask-image: url(@/view/svg/clear.svg); + mask-image: url(@/view/svg/clear.svg); + } + &.-copy { + -webkit-mask-image: url(@/view/svg/copy-to-clipboard.svg); + mask-image: url(@/view/svg/copy-to-clipboard.svg); + } + &.-toggle-unchanged { + -webkit-mask-image: url(@/view/svg/filter.svg); + mask-image: url(@/view/svg/filter.svg); + &.-on { + -webkit-mask-image: url(@/view/svg/filter-filled.svg); + mask-image: url(@/view/svg/filter-filled.svg); } } } @@ -133,25 +140,5 @@ const stale = { padding-left: 10px; color: rgb(182, 33, 33); } - - .-badge { - position: fixed; - top: 0; - right: 1rem; - display: flex; - flex-direction: column; - align-items: center; - padding: 4px 4px; - - .-version { - font-family: monospace; - } - - .-icon { - img { - width: 32px; - } - } - } } diff --git a/src/view/panel.search.vue b/src/view/panel.search.vue new file mode 100644 index 0000000..8ded033 --- /dev/null +++ b/src/view/panel.search.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/view/panel.timer.vue b/src/view/panel.timer.vue new file mode 100644 index 0000000..2e732f7 --- /dev/null +++ b/src/view/panel.timer.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/view/panel.vue b/src/view/panel.vue index 80d6263..15d1daf 100644 --- a/src/view/panel.vue +++ b/src/view/panel.vue @@ -1,171 +1,72 @@