(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,389136,(t,e,n)=>{e.exports={prettyPrint:function(t,e){var n,r,i,o,s,l;for(r=(e=e||{}).indent_size||4,i=e.indent_char||" ",s=e.brace_style||"collapse",o=0==e.max_char?1/0:e.max_char||70,l=e.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],(n=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:"\n\r ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(t,e){for(var n=0;n=this.input.length)return e.length?e.join(""):["","TK_EOF"];if(t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(t,this.Utils.whitespace)){e.length&&(n=!0),this.line_char_count--;continue}if(n){if(this.line_char_count>=this.max_char){e.push("\n");for(var r=0;r","igm");n.lastIndex=this.pos;var r=n.exec(this.input),i=r?r.index:this.input.length;return this.pos=this.input.length)return i.length?i.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(r,this.Utils.whitespace)){o=!0,this.line_char_count--;continue}"'"!==r&&'"'!==r||i[1]&&"!"===i[1]||(r+=this.get_unformatted(r),o=!0),"="===r&&(o=!1),i.length&&"="!==i[i.length-1]&&">"!==r&&o&&(this.line_char_count>=this.max_char?(this.print_newline(!1,i),this.line_char_count=0):(i.push(" "),this.line_char_count++),o=!1),"<"===r&&(e=this.pos-1),i.push(r)}while(">"!==r)var s=i.join("");t=-1!=s.indexOf(" ")?s.indexOf(" "):s.indexOf(">");var a=s.substring(1,t).toLowerCase();if("/"===s.charAt(s.length-2)||this.Utils.in_array(a,this.Utils.single_token))this.tag_type="SINGLE";else if("script"===a)this.record_tag(a),this.tag_type="SCRIPT";else if("style"===a)this.record_tag(a),this.tag_type="STYLE";else if(this.Utils.in_array(a,l)){var c=this.get_unformatted("",s);i.push(c),e>0&&this.Utils.in_array(this.input.charAt(e-1),this.Utils.whitespace)&&i.splice(0,0,this.input.charAt(e-1)),n=this.pos-1,this.Utils.in_array(this.input.charAt(n+1),this.Utils.whitespace)&&i.push(this.input.charAt(n+1)),this.tag_type="SINGLE"}else if("!"===a.charAt(0))if(-1!=a.indexOf("[if")){if(-1!=s.indexOf("!IE")){var c=this.get_unformatted("-->",s);i.push(c)}this.tag_type="START"}else if(-1!=a.indexOf("[endif"))this.tag_type="END",this.unindent();else if(-1!=a.indexOf("[cdata[")){var c=this.get_unformatted("]]>",s);i.push(c),this.tag_type="SINGLE"}else{var c=this.get_unformatted("-->",s);i.push(c),this.tag_type="SINGLE"}else"/"===a.charAt(0)?(this.retrieve_tag(a.substring(1)),this.tag_type="END"):(this.record_tag(a),this.tag_type="START"),this.Utils.in_array(a,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return i.join("")},this.get_unformatted=function(t,e){if(e&&-1!=e.toLowerCase().indexOf(t))return"";var n="",r="";do{if(this.pos>=this.input.length)break;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)&&("\n"===n||"\r"===n)){r+="\n",this.line_char_count=0;continue}r+=n,this.line_char_count++}while(-1==r.toLowerCase().indexOf(t))return r},this.get_token=function(){var t;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var e=this.last_token.substr(7);return"string"!=typeof(t=this.get_contents_to(e))?t:[t,"TK_"+e]}return"CONTENT"===this.current_mode?"string"!=typeof(t=this.get_content())?t:[t,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(t=this.get_tag())?t:[t,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(t){return(t=this.indent_level+t||0)<1?"":Array(t+1).join(this.indent_string)},this.printer=function(t,e,n,r,i){this.input=t||"",this.output=[],this.indent_character=e,this.indent_string="",this.indent_size=n,this.brace_style=i,this.indent_level=0,this.max_char=r,this.line_char_count=0;for(var o=0;o0&&this.indent_level--}},this}).printer(t,i,r,o,s);;){var a=n.get_token();if(n.token_text=a[0],n.token_type=a[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent(),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var c=n.token_text.match(/\w+/)[0],u=n.output[n.output.length-1].match(/<\s*(\w+)/);(null===u||u[1]!==c)&&n.print_newline(!0,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z]+)/i);f&&n.Utils.in_array(f[1],l)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_CONTENT":""!==n.token_text&&n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.output.push("\n");var d=n.token_text;if("TK_SCRIPT"==n.token_type)var p="function"==typeof js_beautify&&js_beautify;else if("TK_STYLE"==n.token_type)var p="function"==typeof css_beautify&&css_beautify;if("keep"==e.indent_scripts)var h=0;else if("separate"==e.indent_scripts)var h=-n.indent_level;else var h=1;var g=n.get_full_indent(h);if(p)d=p(d.replace(/^\s*/,g),e);else{var v=d.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,m=n.get_full_indent(h-v);d=d.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+m).replace(/\s*$/,"")}d&&(n.print_token(d),n.print_newline(!0,n.output))}n.current_mode="TAG"}n.last_token=n.token_type,n.last_text=n.token_text}return n.output.join("")}}},992649,t=>{"use strict";let e,n,r;var i,o,s=t.i(308822),l=t.i(389136);function a(){}function c(t,e){for(let n in e)t[n]=e[n];return t}function u(t){return t()}function f(){return Object.create(null)}function d(t){t.forEach(u)}function p(t){return"function"==typeof t}function h(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function g(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;ri.unsubscribe():i}function v(t){let e;return g(t,t=>e=t)(),e}function m(t,e,n){t.$$.on_destroy.push(g(e,n))}function y(t,e,n,r){if(t){let i=b(t,e,n,r);return t[0](i)}}function b(t,e,n,r){return t[1]&&r?c(n.ctx.slice(),t[1](r(e))):n.ctx}function x(t,e,n,r){if(t[2]&&r){let i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){let t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r32){let e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function R(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function I(t,e){e=""+e,t.data!==e&&(t.data=e)}function z(t,e){t.value=null==e?"":e}function L(t,e,n){t.classList.toggle(e,!!n)}"function"==typeof SuppressedError&&SuppressedError;function B(){if(!e)throw Error("Function called outside component initialization");return e}function F(t){B().$$.on_mount.push(t)}function U(){let t=B();return function(e,n){let{cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.$$.callbacks[e];if(i){let o=function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}(e,n,{cancelable:r});return i.slice().forEach(e=>{e.call(t,o)}),!o.defaultPrevented}return!0}}function V(t,e){return B().$$.context.set(t,e),e}function H(t){return B().$$.context.get(t)}function K(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(t=>t.call(this,e))}let G=[],J=[],Y=[],W=[],Q=Promise.resolve(),Z=!1;function X(t){Y.push(t)}let tt=new Set,te=0;function tn(){if(0!==te)return;let t=e;do{try{for(;te{tr.delete(t),i&&(r&&t.d(1),i())}),t.o(e)):i&&i()}function ta(t){return(null==t?void 0:t.length)!==void 0?t:Array.from(t)}function tc(t,e){t.d(1),e.delete(t.key)}function tu(t,e,n,r,i,o,s,l,a,c,u,f){let p=t.length,h=o.length,g=p,v={};for(;g--;)v[t[g].key]=g;let m=[],y=new Map,b=new Map,x=[];for(g=h;g--;){let t=f(i,o,g),r=n(t),l=s.get(r);l?x.push(()=>l.p(t,e)):(l=c(r,t)).c(),y.set(r,m[g]=l),r in v&&b.set(r,Math.abs(g-v[r]))}let $=new Set,w=new Set;function _(t){ts(t,1),t.m(l,u),s.set(t.key,t),u=t.first,h--}for(;p&&h;){let e=m[h-1],n=t[p-1],r=e.key,i=n.key;e===n?(u=e.first,p--,h--):y.has(i)?!s.has(r)||$.has(r)?_(e):w.has(i)?p--:b.get(r)>b.get(i)?(w.add(r),_(e)):($.add(i),p--):(a(n,s),p--)}for(;p--;){let e=t[p];y.has(e.key)||a(e,s)}for(;h;)_(m[h-1]);return d(x),m}function tf(t){t&&t.c()}function td(t,e,n){let{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),X(()=>{let e=t.$$.on_mount.map(u).filter(p);t.$$.on_destroy?t.$$.on_destroy.push(...e):d(e),t.$$.on_mount=[]}),i.forEach(X)}function tp(t,e){let n=t.$$;if(null!==n.fragment){var r;let t,i;r=n.after_update,t=[],i=[],Y.forEach(e=>-1===r.indexOf(e)?t.push(e):i.push(e)),i.forEach(t=>t()),Y=t,d(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[]}}function th(t,n,r,i,o,s){let l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],u=e;e=t;let p=t.$$={fragment:null,ctx:[],props:s,update:a,not_equal:o,bound:f(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:f(),dirty:c,skip_bound:!1,root:n.target||u.$$.root};l&&l(p.root);let h=!1;if(p.ctx=r?r(t,n.props||{},function(e,n){let r=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?void 0:arguments[2]:n;p.ctx&&o(p.ctx[e],p.ctx[e]=r)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](r),h&&(-1===t.$$.dirty[0]&&(G.push(t),Z||(Z=!0,Q.then(tn)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function tv(t){C(t,"svelte-1lt2k10",".floating-btn.svelte-1lt2k10.svelte-1lt2k10{background:#363755;border:0;border-radius:50%;box-shadow:0 0 30px rgba(34, 34, 34, 0.3);cursor:pointer;position:fixed;padding:6px;transition:opacity 0.3s;-webkit-transition:opacity 0.3s;z-index:99999}.floating-btn.bottom-right.svelte-1lt2k10.svelte-1lt2k10{bottom:16px;right:16px}.floating-btn.bottom-left.svelte-1lt2k10.svelte-1lt2k10{bottom:16px;left:16px}.floating-btn.top-right.svelte-1lt2k10.svelte-1lt2k10{top:16px;right:16px}.floating-btn.top-left.svelte-1lt2k10.svelte-1lt2k10{top:16px;left:16px}.floating-btn.svelte-1lt2k10.svelte-1lt2k10:hover{opacity:0.7}.floating-btn.svelte-1lt2k10>svg.svelte-1lt2k10{display:block;width:34px;height:34px;position:relative}")}function tm(t){let e,n,r,i,o,s,l,c,u,f,d,p,h,g,v,m,y,b,x,$,w,_,C,S;return{c(){e=T("button"),n=q("svg"),r=q("title"),i=D("prosemirror"),o=q("desc"),s=D("Created using Figma"),l=q("use"),c=q("use"),u=q("use"),f=q("use"),d=q("use"),p=q("use"),h=q("use"),g=q("defs"),v=q("path"),m=q("path"),y=q("path"),b=q("path"),x=q("path"),$=q("path"),w=q("path"),P(l,"xlink:href","#a"),R(l,"transform","matrix(2 0 0 2 118 116)"),R(l,"fill","#FFF"),P(c,"xlink:href","#b"),R(c,"transform","rotate(16 59.054 420.192) scale(2)"),R(c,"fill","#FFF"),P(u,"xlink:href","#c"),R(u,"transform","matrix(2 0 0 2 154.024 141.58)"),R(u,"fill","#363755"),P(f,"xlink:href","#d"),R(f,"transform","matrix(2 0 0 2 220 334.8)"),R(f,"fill","#FFF"),P(d,"xlink:href","#e"),R(d,"transform","matrix(2 0 0 2 218.826 262.052)"),R(d,"fill","#363755"),P(p,"xlink:href","#f"),R(p,"transform","matrix(2 0 0 2 197.108 184.998)"),R(p,"fill","#FFF"),P(h,"xlink:href","#g"),R(h,"transform","matrix(2 0 0 2 221.8 216)"),R(h,"fill","#363755"),R(v,"id","a"),R(v,"d","M73.5 0C32.859 0 0 32.859 0 73.5S32.859 147 73.5 147 147 114.141 147 73.5 114.069 0 73.5\n 0z"),R(m,"id","b"),R(m,"d","M193.601 107.116c0-13.376 8.238-23.91\n 20.619-31.153-2.244-7.447-5.19-14.6-8.824-21.32-13.886\n 3.633-25.12-1.799-34.568-11.26-9.449-9.437-12.344-20.672-8.709-34.571A111.362 111.362 0 0 0\n 140.799 0c-7.243 12.37-20.339 20.594-33.689 20.594-13.363\n 0-26.446-8.225-33.701-20.594A110.888 110.888 0 0 0 52.1 8.812c3.634 13.9.753 25.134-8.721\n 34.57-9.436 9.462-20.67 14.894-34.569 11.26A112.178 112.178 0 0 0 0 75.963c12.369 7.243\n 20.593 17.777 20.593 31.153 0 13.352-8.224 26.448-20.593 33.704a113.338 113.338 0 0 0 8.811\n 21.321c13.899-3.634 25.133-.752 34.569 8.697 9.448 9.462 12.355 20.696 8.721 34.57a112.653\n 112.653 0 0 0 21.32 8.837c7.243-12.407 20.338-20.619 33.702-20.619 13.35 0 26.446 8.225\n 33.701 20.619a114.22 114.22 0 0 0 21.32-8.837c-3.634-13.874-.752-25.108 8.709-34.57\n 9.449-9.437 20.683-14.869 34.569-11.26a112.343 112.343 0 0 0\n 8.823-21.321c-12.406-7.256-20.644-17.789-20.644-31.141zm-86.491 46.57c-25.732\n 0-46.58-20.849-46.58-46.57 0-25.733 20.86-46.595 46.58-46.595 25.732 0 46.567 20.875 46.567\n 46.595 0 25.734-20.835 46.57-46.567 46.57z"),R(y,"id","c"),R(y,"d","M98.088 49.91c-6.9 83.9 10.8 103.401 10.8 103.401s-55.1\n 5.499-82.7-13.401c-30.5-20.9-26-67.5-25.9-94.6.1-28.4 25.6-45.8 49.9-45.3 29.1.5 50.2 21.6\n 47.9 49.9z"),R(b,"id","d"),R(b,"d","M.1.1c12.2 33.3 22.5 42.7 40 55.2 25.3 18 36.6 17.5 76.3 41C78.1 60.3 30.8 45.7 0 0l.1.1z"),R(x,"id","e"),R(x,"d","M.687 36.474c3 13.3 17.9 29.9 30.4 41.6 24.8 23.2 42 22.4 86\n 54.7-18.2-51.8-18.8-62-43.5-106.1-24.7-44-67.6-20.3-67.6-20.3s-8.4 16.6-5.3 29.9v.2z"),R($,"id","f"),R($,"d","M38.346 11.5s-4-11.6-18-11.5c-30 .2-28.8 52.1 16.9 52 39.6-.1 39.2-49.4\n 16.1-49.6-10.2-.2-15 9.1-15 9.1z"),R(w,"id","g"),R(w,"d","M26.5 15c10.8 0 2 14.9-.6 20.9-1.8-8.4-10.2-20.9.6-20.9zM10.2.1C4.6.1 0 4.6 0 10.3c0 5.6\n 4.5 10.2 10.2 10.2 5.6 0 10.2-4.5 10.2-10.2C20.4 4.7 15.9.1 10.2.1zM40.7 0c-4.8 0-8.8\n 4.5-8.8 10.2 0 5.6 3.9 10.2 8.8 10.2 4.8 0 8.8-4.5 8.8-10.2C49.5 4.6 45.6 0 40.7 0z"),R(n,"width","530"),R(n,"height","530"),R(n,"viewBox","0 0 530 530"),R(n,"xmlns","http://www.w3.org/2000/svg"),R(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),R(n,"class","svelte-1lt2k10"),R(e,"class",_=k("floating-btn ".concat(t[0]))+" svelte-1lt2k10")},m(a,_){O(a,e,_),j(e,n),j(n,r),j(r,i),j(n,o),j(o,s),j(n,l),j(n,c),j(n,u),j(n,f),j(n,d),j(n,p),j(n,h),j(n,g),j(g,v),j(g,m),j(g,y),j(g,b),j(g,x),j(g,$),j(g,w),C||(S=M(e,"click",t[1]),C=!0)},p(t,n){let[r]=n;1&r&&_!==(_=k("floating-btn ".concat(t[0]))+" svelte-1lt2k10")&&R(e,"class",_)},i:a,o:a,d(t){t&&E(e),C=!1,S()}}}function ty(t,e,n){let{buttonPosition:r}=e;return t.$$set=t=>{"buttonPosition"in t&&n(0,r=t.buttonPosition)},[r,function(e){K.call(this,t,e)}]}"u">typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class tb extends tg{constructor(t){super(),th(this,t,ty,tm,h,{buttonPosition:0},tv)}}let tx=[];function t$(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,r=new Set;function i(n){if(h(t,n)&&(t=n,e)){let e=!tx.length;for(let e of r)e[1](),tx.push(e,t);if(e){for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:a,c=[s,l];return r.add(c),1===r.size&&(e=n(i,o)||a),s(t),()=>{r.delete(c),0===r.size&&e&&(e(),e=null)}}}}let tw="__prosemirror-dev-toolkit__snapshots",t_=t$([]),tk=t$(),tj=t$(),tC=!0,tO=null;try{tO=localStorage.getItem(tw)}catch(t){tC=!1}if(tO&&tO.length>0)try{let t=JSON.parse(tO);t_.set(t)}catch(t){console.error("Corrupted snapshots values in localStorage",t)}function tE(t,e){let n=t.state.schema.nodeFromJSON(e),r=t.state.tr;r.replaceWith(0,t.state.doc.nodeSize-2,n.content),t.dispatch(r)}function tS(t,e){let n={name:t,timestamp:Date.now(),doc:e};return t_.update(t=>[n,...t]),n}function tT(t){t_.update(e=>e.map(e=>e.timestamp===t.timestamp?t:e))}function tq(t,e){tE(t,e.doc),tj.set(void 0),tk.set(void 0)}function tD(t){let e=document.createElement("a"),n=new Blob([JSON.stringify(t.doc)],{type:"application/json"});e.href=URL.createObjectURL(n),e.download=`${t.name}.json`,e.click()}function tN(t){t_.update(e=>e.filter(e=>e.timestamp!==t.timestamp));let e=v(tk);(null==e?void 0:e.timestamp)===t.timestamp&&tk.set(void 0)}function tA(t,e){let n=n=>{!t||n.composedPath().includes(t)||n.defaultPrevented||e()};return document.addEventListener("click",n,!0),{destroy(){document.removeEventListener("click",n,!0)}}}function tM(t){C(t,"svelte-19h7j7n",".paste-modal.svelte-19h7j7n.svelte-19h7j7n{font-size:15px;height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.paste-modal.svelte-19h7j7n>form.svelte-19h7j7n{display:flex;height:100%;justify-content:center;padding:64px}.modal-bg.svelte-19h7j7n.svelte-19h7j7n{background:#000;height:100%;left:0;opacity:0.8;position:absolute;top:0;width:100%;z-index:-1}fieldset.svelte-19h7j7n.svelte-19h7j7n{border-color:transparent;width:100%;max-width:800px}.submit-container.svelte-19h7j7n.svelte-19h7j7n{position:relative;width:100%}button.svelte-19h7j7n.svelte-19h7j7n{cursor:pointer;padding:4px 8px;position:absolute;right:-6px;top:-32px}legend.svelte-19h7j7n.svelte-19h7j7n{color:white}textarea.svelte-19h7j7n.svelte-19h7j7n{background:#fefcfc;height:calc(100vh - 128px);width:100%}")}function tR(t){let e,n,r,i,o,s,l,c,u,f,h,g;return{c(){e=T("div"),n=T("div"),r=N(),i=T("form"),o=T("fieldset"),(s=T("div")).innerHTML='',l=N(),(c=T("legend")).textContent="Doc",u=N(),f=T("textarea"),R(n,"class","modal-bg svelte-19h7j7n"),R(s,"class","submit-container svelte-19h7j7n"),R(c,"class","svelte-19h7j7n"),R(f,"class","svelte-19h7j7n"),R(o,"class","svelte-19h7j7n"),R(i,"class","paste-content svelte-19h7j7n"),R(e,"class","paste-modal svelte-19h7j7n"),L(e,"hidden",!t[0])},m(d,v){if(O(d,e,v),j(e,n),j(e,r),j(e,i),j(i,o),j(o,s),j(o,l),j(o,c),j(o,u),j(o,f),z(f,t[1]),!h){var m,y;g=[M(f,"input",t[4]),(m=tA.call(null,o,t[2]))&&p(m.destroy)?m.destroy:a,M(i,"submit",(y=t[3],function(t){return t.preventDefault(),y.call(this,t)}))],h=!0}},p(t,n){let[r]=n;2&r&&z(f,t[1]),1&r&&L(e,"hidden",!t[0])},i:a,o:a,d(t){t&&E(e),h=!1,d(g)}}}function tP(t,e,n){let r,{isOpen:i}=e,o=U();return t.$$set=t=>{"isOpen"in t&&n(0,i=t.isOpen)},[i,r,function(){o("close")},function(){try{o("submit",{doc:JSON.parse(r)})}catch(t){}},function(){n(1,r=this.value)}]}t_.subscribe(t=>{tC&&localStorage.setItem(tw,JSON.stringify(t))});class tI extends tg{constructor(t){super(),th(this,t,tP,tR,h,{isOpen:0},tM)}}function tz(t){C(t,"svelte-10notzq","ul.svelte-10notzq{display:flex;list-style:none;margin:0;overflow-x:scroll;padding:0}button.svelte-10notzq{background:transparent;border:0;border-bottom:2px solid transparent;color:#fff;cursor:pointer;height:100%;font-size:var(--font-medium);font-weight:400;padding:1em}button.svelte-10notzq:hover{background:rgba(255, 255, 255, 0.05)}button.active.svelte-10notzq{border-bottom:2px solid rgb(255, 162, 177)}")}function tL(t){let e,n,r,i,o,s,l,c,u,f,p,h,g,v,m,y,b,x,$,w;return{c(){e=T("ul"),n=T("li"),(r=T("button")).textContent="STATE",i=N(),o=T("li"),(s=T("button")).textContent="HISTORY",l=N(),c=T("li"),(u=T("button")).textContent="PLUGINS",f=N(),p=T("li"),(h=T("button")).textContent="SCHEMA",g=N(),v=T("li"),(m=T("button")).textContent="STRUCTURE",y=N(),b=T("li"),(x=T("button")).textContent="SNAPSHOTS",R(r,"class","svelte-10notzq"),L(r,"active","state"===t[0]),R(s,"class","svelte-10notzq"),L(s,"active","history"===t[0]),R(u,"class","svelte-10notzq"),L(u,"active","plugins"===t[0]),R(h,"class","svelte-10notzq"),L(h,"active","schema"===t[0]),R(m,"class","svelte-10notzq"),L(m,"active","structure"===t[0]),R(x,"class","svelte-10notzq"),L(x,"active","snapshots"===t[0]),R(e,"class","tabs-menu svelte-10notzq")},m(a,d){O(a,e,d),j(e,n),j(n,r),j(e,i),j(e,o),j(o,s),j(e,l),j(e,c),j(c,u),j(e,f),j(e,p),j(p,h),j(e,g),j(e,v),j(v,m),j(e,y),j(e,b),j(b,x),$||(w=[M(r,"click",t[2]),M(s,"click",t[3]),M(u,"click",t[4]),M(h,"click",t[5]),M(m,"click",t[6]),M(x,"click",t[7])],$=!0)},p(t,e){let[n]=e;1&n&&L(r,"active","state"===t[0]),1&n&&L(s,"active","history"===t[0]),1&n&&L(u,"active","plugins"===t[0]),1&n&&L(h,"active","schema"===t[0]),1&n&&L(m,"active","structure"===t[0]),1&n&&L(x,"active","snapshots"===t[0])},i:a,o:a,d(t){t&&E(e),$=!1,d(w)}}}function tB(t,e,n){let{active:r,onClickTab:i}=e;return t.$$set=t=>{"active"in t&&n(0,r=t.active),"onClickTab"in t&&n(1,i=t.onClickTab)},[r,i,()=>i("state"),()=>i("history"),()=>i("plugins"),()=>i("schema"),()=>i("structure"),()=>i("snapshots")]}class tF extends tg{constructor(t){super(),th(this,t,tB,tL,h,{active:0,onClickTab:1},tz)}}var tU={exports:{}};(i=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}).Diff=function(t,e){return[t,e]},i.prototype.diff_main=function(t,e,n,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+1e3*this.Diff_Timeout);var o=r;if(null==t||null==e)throw Error("Null input. (diff_main)");if(t==e)return t?[new i.Diff(0,t)]:[];void 0===n&&(n=!0);var s=n,l=this.diff_commonPrefix(t,e),a=t.substring(0,l);t=t.substring(l),e=e.substring(l),l=this.diff_commonSuffix(t,e);var c=t.substring(t.length-l);t=t.substring(0,t.length-l),e=e.substring(0,e.length-l);var u=this.diff_compute_(t,e,s,o);return a&&u.unshift(new i.Diff(0,a)),c&&u.push(new i.Diff(0,c)),this.diff_cleanupMerge(u),u},i.prototype.diff_compute_=function(t,e,n,r){if(!t)return[new i.Diff(1,e)];if(!e)return[new i.Diff(-1,t)];var o,s=t.length>e.length?t:e,l=t.length>e.length?e:t,a=s.indexOf(l);if(-1!=a)return o=[new i.Diff(1,s.substring(0,a)),new i.Diff(0,l),new i.Diff(1,s.substring(a+l.length))],t.length>e.length&&(o[0][0]=o[2][0]=-1),o;if(1==l.length)return[new i.Diff(-1,t),new i.Diff(1,e)];var c=this.diff_halfMatch_(t,e);if(c){var u=c[0],f=c[1],d=c[2],p=c[3],h=c[4],g=this.diff_main(u,d,n,r),v=this.diff_main(f,p,n,r);return g.concat([new i.Diff(0,h)],v)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},i.prototype.diff_lineMode_=function(t,e,n){var r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;var o=r.lineArray,s=this.diff_main(t,e,!1,n);this.diff_charsToLines_(s,o),this.diff_cleanupSemantic(s),s.push(new i.Diff(0,""));for(var l=0,a=0,c=0,u="",f="";l=1&&c>=1){s.splice(l-a-c,a+c),l=l-a-c;for(var d=this.diff_main(u,f,!1,n),p=d.length-1;p>=0;p--)s.splice(l,0,d[p]);l+=d.length}c=0,a=0,u="",f=""}l++}return s.pop(),s},i.prototype.diff_bisect_=function(t,e,n){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=2*s,a=Array(l),c=Array(l),u=0;un);m++){for(var y=-m+p;y<=m-h;y+=2){for(var b,x=s+y,$=(b=y==-m||y!=m&&a[x-1]r)h+=2;else if($>o)p+=2;else if(d){var w=s+f-y;if(w>=0&&w=_)return this.diff_bisectSplit_(t,e,b,$,n)}}}for(var k=-m+g;k<=m-v;k+=2){for(var _,w=s+k,j=(_=k==-m||k!=m&&c[w-1]r)v+=2;else if(j>o)g+=2;else if(!d){var x=s+f-k;if(x>=0&&x=(_=r-_))return this.diff_bisectSplit_(t,e,b,$,n)}}}}return[new i.Diff(-1,t),new i.Diff(1,e)]},i.prototype.diff_bisectSplit_=function(t,e,n,r,i){var o=t.substring(0,n),s=e.substring(0,r),l=t.substring(n),a=e.substring(r),c=this.diff_main(o,s,!1,i),u=this.diff_main(l,a,!1,i);return c.concat(u)},i.prototype.diff_linesToChars_=function(t,e){var n=[],r={};function i(t){for(var e="",i=0,s=-1,l=n.length;sr?t=t.substring(n-r):ne.length?t:e,a=t.length>e.length?e:t;if(l.length<4||2*a.length=t.length?[r,i,o,s,u]:null}var f=u(l,a,Math.ceil(l.length/4)),d=u(l,a,Math.ceil(l.length/2));return f||d?(n=d?f&&f[4].length>d[4].length?f:d:f,t.length>e.length?(r=n[0],i=n[1],o=n[2],s=n[3]):(o=n[0],s=n[1],r=n[2],i=n[3]),[r,i,o,s,n[4]]):null},i.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],r=0,o=null,s=0,l=0,a=0,c=0,u=0;s0?n[r-1]:-1,l=0,a=0,c=0,u=0,o=null,e=!0)),s++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),s=1;s=h?(p>=f.length/2||p>=d.length/2)&&(t.splice(s,0,new i.Diff(0,d.substring(0,p))),t[s-1][1]=f.substring(0,f.length-p),t[s+1][1]=d.substring(p),s++):(h>=f.length/2||h>=d.length/2)&&(t.splice(s,0,new i.Diff(0,f.substring(0,h))),t[s-1][0]=1,t[s-1][1]=d.substring(0,d.length-h),t[s+1][0]=-1,t[s+1][1]=f.substring(h),s++),s++}s++}},i.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),o=n.match(i.nonAlphaNumericRegex_),s=r.match(i.nonAlphaNumericRegex_),l=o&&n.match(i.whitespaceRegex_),a=s&&r.match(i.whitespaceRegex_),c=l&&n.match(i.linebreakRegex_),u=a&&r.match(i.linebreakRegex_),f=c&&t.match(i.blanklineEndRegex_),d=u&&e.match(i.blanklineStartRegex_);if(f||d)return 5;if(c||u)return 4;if(o&&!l&&a)return 3;if(l||a)return 2;if(o||s)return 1;return 0}for(var n=1;n=d&&(d=p,c=r,u=o,f=s)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,f?t[n+1][1]=f:(t.splice(n+1,1),n--))}n++}},i.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,i.whitespaceRegex_=/\s/,i.linebreakRegex_=/[\r\n]/,i.blanklineEndRegex_=/\n\r?\n$/,i.blanklineStartRegex_=/^\r?\n\r?\n/,i.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],r=0,o=null,s=0,l=!1,a=!1,c=!1,u=!1;s0?n[r-1]:-1,c=u=!1),e=!0)),s++;e&&this.diff_cleanupMerge(t)},i.prototype.diff_cleanupMerge=function(t){t.push(new i.Diff(0,""));for(var e,n=0,r=0,o=0,s="",l="";n1?(0!==r&&0!==o&&(0!==(e=this.diff_commonPrefix(l,s))&&(n-r-o>0&&0==t[n-r-o-1][0]?t[n-r-o-1][1]+=l.substring(0,e):(t.splice(0,0,new i.Diff(0,l.substring(0,e))),n++),l=l.substring(e),s=s.substring(e)),0!==(e=this.diff_commonSuffix(l,s))&&(t[n][1]=l.substring(l.length-e)+t[n][1],l=l.substring(0,l.length-e),s=s.substring(0,s.length-e))),n-=r+o,t.splice(n,r+o),s.length&&(t.splice(n,0,new i.Diff(-1,s)),n++),l.length&&(t.splice(n,0,new i.Diff(1,l)),n++),n++):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,s="",l=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;ne));n++)o=r,s=i;return t.length!=n&&-1===t[n][0]?s:s+(e-o)},i.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,r=//g,o=/\n/g,s=0;s");switch(l){case 1:e[s]=''+a+"";break;case -1:e[s]=''+a+"";break;case 0:e[s]=""+a+""}}return e.join("")},i.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var r,i,o,s=this.match_alphabet_(e),l=this;function a(t,r){var i=t/e.length,o=Math.abs(n-r);return l.Match_Distance?i+o/l.Match_Distance:o?1:i}var c=this.Match_Threshold,u=t.indexOf(e,n);-1!=u&&(c=Math.min(a(0,u),c),-1!=(u=t.lastIndexOf(e,n+e.length))&&(c=Math.min(a(0,u),c)));var f=1<=h;m--){var y=s[t.charAt(m-1)];if(0===p?v[m]=(v[m+1]<<1|1)&y:v[m]=(v[m+1]<<1|1)&y|((o[m+1]|o[m])<<1|1)|o[m+1],v[m]&f){var b=a(p,m-1);if(b<=c)if(c=b,(u=m-1)>n)h=Math.max(1,2*n-u);else break}}if(a(p+1,n)>c)break;o=v}return u},i.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&"object"==typeof t&&void 0===e&&void 0===n)o=t,r=this.diff_text1(o);else if("string"==typeof t&&e&&"object"==typeof e&&void 0===n)r=t,o=e;else if("string"==typeof t&&"string"==typeof e&&n&&"object"==typeof n)r=t,o=n;else throw Error("Unknown call format to patch_make.");if(0===o.length)return[];for(var r,o,s=[],l=new i.patch_obj,a=0,c=0,u=0,f=r,d=r,p=0;p=2*this.Patch_Margin&&a&&(this.patch_addContext_(l,f),s.push(l),l=new i.patch_obj,a=0,f=d,c=u)}1!==h&&(c+=g.length),-1!==h&&(u+=g.length)}return a&&(this.patch_addContext_(l,f),s.push(l)),s},i.prototype.patch_deepCopy=function(t){for(var e=[],n=0;nthis.Match_MaxBits?-1!=(u=this.match_main(e,l.substring(0,this.Match_MaxBits),s))&&(-1==(a=this.match_main(e,l.substring(l.length-this.Match_MaxBits),s+l.length-this.Match_MaxBits))||u>=a)&&(u=-1):u=this.match_main(e,l,s),-1==u)i[o]=!1,r-=t[o].length2-t[o].length1;else if(i[o]=!0,r=u-s,f=-1==a?e.substring(u,u+l.length):e.substring(u,a+this.Match_MaxBits),l==f)e=e.substring(0,u)+this.diff_text2(t[o].diffs)+e.substring(u+l.length);else{var c=this.diff_main(l,f,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(c)/l.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(c);for(var u,f,d,p=0,h=0;hs[0][1].length){var l=e-s[0][1].length;s[0][1]=n.substring(s[0][1].length)+s[0][1],o.start1-=l,o.start2-=l,o.length1+=l,o.length2+=l}if(0==(s=(o=t[t.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new i.Diff(0,n)),o.length1+=e,o.length2+=e;else if(e>s[s.length-1][1].length){var l=e-s[s.length-1][1].length;s[s.length-1][1]+=n.substring(0,l),o.length1+=l,o.length2+=l}return n},i.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,n=0;n2*e?(a.length1+=f.length,o+=f.length,c=!1,a.diffs.push(new i.Diff(u,f)),r.diffs.shift()):(f=f.substring(0,e-a.length1-this.Patch_Margin),a.length1+=f.length,o+=f.length,0===u?(a.length2+=f.length,s+=f.length):c=!1,a.diffs.push(new i.Diff(u,f)),f==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(f.length))}l=(l=this.diff_text2(a.diffs)).substring(l.length-this.Patch_Margin);var d=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==d&&(a.length1+=d.length,a.length2+=d.length,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=d:a.diffs.push(new i.Diff(0,d))),c||t.splice(++n,0,a)}}},i.prototype.patch_toText=function(t){for(var e=[],n=0;nt[i-1][o]?--o:--i;return s},ea=function(t,e,n,r){var i=r||{},o=el(es(t,e,n||eo,i),t,e,i);return"string"==typeof t&&"string"==typeof e&&(o.sequence=o.sequence.join("")),o},ec="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},eu="function"==typeof Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=t.length,r=0;r0&&u>0&&!e.objectHash&&"boolean"!=typeof e.matchByPosition&&(e.matchByPosition=!function(t,e,n,r){for(var i=0;ieu(g.indices1,i-n)&&(d["_"+i]=[l[i],0,0],v.push(i));var m=!0;t.options&&t.options.arrays&&!1===t.options.arrays.detectMove&&(m=!1);var y=!1;t.options&&t.options.arrays&&t.options.arrays.includeValueOnMove&&(y=!0);var b=v.length;for(i=n;i0){for(var w=0;w=0;n--){var c=i["_"+(r=s[n])],u=o.splice(r,1)[0];3===c[2]&&l.push({index:c[1],value:u})}var f=(l=l.sort((e="index",function(t,n){return t[e]-n[e]}))).length;for(n=0;n0)for(n=0;nr?r++:s>=r&&ltypeof diff_match_patch)e="function"==typeof diff_match_patch?new diff_match_patch:new diff_match_patch.diff_match_patch;else if(tV)try{e=tV&&new tV}catch(t){e=null}if(!e){if(!t)return null;var n=Error("text diff_match_patch library not found");throw n.diff_match_patch_not_found=!0,n}ex={diff:function(t,n){return e.patch_toText(e.patch_make(t,n))},patch:function(t,n){for(var r=e.patch_apply(e.patch_fromText(n),t),i=0;itypeof console&&console.error&&console.error(n.stack)}void 0!==r?this.nodeEnd(t,r,i,a,c,s):this.rootEnd(t,a,c)}}},{key:"formatDeltaChildren",value:function(t,e,n){var r=this;this.forEachDeltaKey(e,n,function(i,o,s,l){r.recurse(t,e[i],n?n[o]:void 0,i,o,s,l)})}},{key:"forEachDeltaKey",value:function(t,e,n){var r=eE(t),i="a"===t._t,o={},s=void 0;if(void 0!==e)for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&void 0===t[s]&&(!i||void 0===t["_"+s])&&r.push(s);for(s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var l=t[s];eO(l)&&3===l[2]&&(o[l[1].toString()]={key:s,value:e&&e[parseInt(s.substr(1))]},!1!==this.includeMoveDestinations&&void 0===e&&void 0===t[l[1]]&&r.push(l[1].toString()))}i?r.sort(eT):r.sort();for(var a=0,c=r.length;a/g,">"],[/'/g,"'"],[/"/g,"""]],r=0;r'+e+"")}},{key:"formatValue",value:function(t,e){t.out("
"+eN(JSON.stringify(e,null,2))+"
")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('
    ');for(var r=0,i=n.length;r
    '+(''+o.location.line+'')+o.location.chr+'
    ');for(var s=o.pieces,l=0,a=s.length;l'+eN(decodeURI(c.text))+"")}t.out("
    ")}t.out("
")}},{key:"rootBegin",value:function(t,e,n){t.out('
')}},{key:"rootEnd",value:function(t){t.out("
"+(t.hasArrows?'":""))}},{key:"nodeBegin",value:function(t,e,n,r,i){t.out('
  • '+n+"
    ")}},{key:"nodeEnd",value:function(t){t.out("
  • ")}},{key:"format_unchanged",value:function(t,e,n){void 0!==n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))}},{key:"format_movedestination",value:function(t,e,n){void 0!==n&&(t.out('
    '),this.formatValue(t,n),t.out("
    "))}},{key:"format_node",value:function(t,e,n){var r="a"===e._t?"array":"object";t.out('
      '),this.formatDeltaChildren(t,e,n),t.out("
    ")}},{key:"format_added",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")}},{key:"format_modified",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '),this.formatValue(t,e[1]),t.out("
    ")}},{key:"format_deleted",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out("
    ")}},{key:"format_moved",value:function(t,e){t.out('
    '),this.formatValue(t,e[0]),t.out('
    '+e[1]+"
    "),t.out('
    \n \n \n \n \n \n \n \n \n
    '),t.hasArrows=!0}},{key:"format_textdiff",value:function(t,e){t.out('
    '),this.formatTextDiffString(t,e[0]),t.out("
    ")}}]);var eA=function(t){var e=function(t){var e=t.textContent,n=t.innerText;return e||n},n=function(t,e){for(var n=t.children,r=0,i=n.length;r0?0:f)+"px";var d=f>0?"M30,0 Q-10,"+Math.round(f/2)+" 26,"+(f-4):"M30,"+-f+" Q-10,"+Math.round(-f/2)+" 26,4";l.setAttribute("d",d),s.style.display=""}catch(t){}})},eM=function(t){function e(){tK(this,e);var t=tW(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.includeMoveDestinations=!1,t}return tY(e,t),tG(e,[{key:"prepareContext",value:function(t){tJ(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"prepareContext",this).call(this,t),t.indent=function(t){this.indentLevel=(this.indentLevel||0)+(void 0===t?1:t),this.indentPad=Array(this.indentLevel+1).join("  ")},t.row=function(e,n){t.out('
    '),t.out(t.indentPad),t.out('
    '),t.out(e),t.out('
    '),t.out(n),t.out("
    ")}}},{key:"typeFormattterErrorFormatter",value:function(t,e){t.row("",'
    '+e+"
    ")}},{key:"formatTextDiffString",value:function(t,e){var n=this.parseTextDiff(e);t.out('
      ');for(var r=0,i=n.length;r
      '+(''+o.location.line+'')+o.location.chr+'
      ');for(var s=o.pieces,l=0,a=s.length;l'+c.text+"")}t.out("
      ")}t.out("
    ")}},{key:"rootBegin",value:function(t,e,n){t.out(''),"node"===e&&(t.row("{"),t.indent()),"array"===n&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")}},{key:"rootEnd",value:function(t,e){"node"===e&&(t.indent(-1),t.row("}")),t.out("
    ")}},{key:"nodeBegin",value:function(t,e,n,r,i){t.row("""+e+"": {"),"node"===r&&t.indent(),"array"===i&&t.row('"_t": "a",',"Array delta (member names indicate array indices)")}},{key:"nodeEnd",value:function(t,e,n,r,i,o){"node"===r&&t.indent(-1),t.row("}"+(o?"":","))}},{key:"format_unchanged",value:function(){}},{key:"format_movedestination",value:function(){}},{key:"format_node",value:function(t,e,n){this.formatDeltaChildren(t,e,n)}}]),e}(eq),eR=function(t){return'
    "'+t+""
    "},eP={added:function(t,e,n,r){var i="
    ([newValue])
    ";return void 0===r?"new value"+i:"number"==typeof r?"insert at index "+r+i:"add property "+eR(r)+i},modified:function(t,e,n,r){var i="
    ([previousValue, newValue])
    ";return void 0===r?"modify value"+i:"number"==typeof r?"modify at index "+r+i:"modify property "+eR(r)+i},deleted:function(t,e,n,r){var i="
    ([previousValue, 0, 0])
    ";return void 0===r?"delete value"+i:"number"==typeof r?"remove index "+r+i:"delete property "+eR(r)+i},moved:function(t,e,n,r){return'move from index '+r+' to index '+t[1]+""},textdiff:function(t,e,n,r){return"text diff"+(void 0===r?"":"number"==typeof r?" at index "+r:" at property "+eR(r))+', format is a variation of Unidiff'}},eI=function(t,e){var n=this.getDeltaType(e),r=eP[n],i=r&&r.apply(r,Array.prototype.slice.call(arguments,1)),o=JSON.stringify(e,null,2);"textdiff"===n&&(o=o.split("\\n").join('\\n"+\n "')),t.indent(),t.row(o,i),t.indent(-1)};eM.prototype.format_added=eI,eM.prototype.format_modified=eI,eM.prototype.format_deleted=eI,eM.prototype.format_moved=eI,eM.prototype.format_textdiff=eI;function ez(){tK(this,ez);var t=tW(this,(ez.__proto__||Object.getPrototypeOf(ez)).call(this));return t.includeMoveDestinations=!0,t}function eL(t){return function(){for(var t=arguments.length,e=Array(t),n=0;n "),t.pushColor(eB.added),this.formatValue(t,e[1]),t.popColor()}},{key:"format_deleted",value:function(t,e){this.formatValue(t,e[0])}},{key:"format_moved",value:function(t,e){t.out("==> "+e[1])}},{key:"format_textdiff",value:function(t,e){this.formatTextDiffString(t,e[0])}}]);let eU=new eC({arrays:{detectMove:!1,includeValueOnMove:!1},textDiff:{minLength:1}}),eV=["docChanged","isGeneric","scrolledIntoView","selectionSet","storedMarksSet"];function eH(t){return{type:t.type,empty:t.empty,anchor:t.anchor,head:t.head,from:t.from,to:t.to}}function eK(t){return("00"+t).slice(-2)}let eG=/(<\/?[\w\d\s="']+>)/gim,eJ=t$(new Map),eY=t$([]),eW=t$(void 0),eQ=t$(0);function eZ(){eJ.set(new Map),eY.set([]),eW.set(void 0)}let eX=["jsonID","empty","anchor","from","head","to"],e1=["$anchor","$head","$cursor","$to","$from"],e0=["nodeAfter","nodeBefore","textOffset"];function e2(t){return eX.reduce((e,n)=>(e[n]=t[n],e),{})}function e3(t){return eX.concat(e1).reduce((e,n)=>{let r=t[n];if(r&&e1.includes(n)){let t={};e0.forEach(e=>{t[e]=r[e]}),r=Object.assign(Object.assign({},r),t)}return e[n]=r,e},{})}function e5(t,e,n,r,i){let o=i?[...i.path,t]:[];return{id:"[".concat(o.join(","),"]"),index:t,key:e,value:n,depth:r,collapsed:!0,type:e6(n),path:o,parentId:i?i.id:null,circularOfId:null,children:[]}}function e6(t){if(Array.isArray(t))return"array";if(t instanceof Map)return"map";if(t instanceof Set)return"set";if(t instanceof Date)return"date";if(null===t)return"null";else return typeof t}function e9(t,e,n,r,i,o,s,l,a,c,u){var f;if((null==(f=u.omitKeys)?void 0:f.includes(e))||u.maxDepth&&r>u.maxDepth)return null;let d=e5(t,e,n,r,o),p=l.get(d.id);if(i?d.collapsed=!1:p&&!c?d.collapsed=p.collapsed:u.shouldExpandNode&&(d.collapsed=!u.shouldExpandNode(d)),s.set(d.id,d),function(t,e,n,r){if(e){if(t.collapsed&&(null==e?void 0:e.collapsed))return!1;else if(r.stopCircularRecursion){if(r.isCircularNode)return r.isCircularNode(t,n);else if("object"===t.type||"array"===t.type){let e=n.get(t.value);if(e&&t.id!==e.id)return t.circularOfId=e.id,!1;n.set(t.value,t)}}}return!0}(d,o,a,u)){let t=u.mapChildren&&u.mapChildren(n,e6(n),d);d.children=(null!=t?t:function(t,e){switch(e){case"array":return t.map((t,e)=>[e.toString(),t]);case"map":return Array.from(t.entries()).map((t,e)=>{let[n,r]=t;return["[map entry ".concat(e,"]"),{"[key]":n,"[value]":r}]});case"set":return Array.from(t.values()).map((t,e)=>["[set entry ".concat(e,"]"),t]);case"object":return Object.entries(t);default:return[]}}(n,e6(n))).map((t,e)=>{let[n,i]=t;return e9(e,n,i,r+1,!1,d,s,l,a,c,u)}).filter(t=>null!==t)}return d}function e4(t){C(t,"svelte-ngcjq5","ul.svelte-ngcjq5.svelte-ngcjq5{display:flex;flex-direction:column;height:max-content;list-style:none;padding:0;padding-left:var(--tree-view-left-indent);margin:0;width:100%}li.svelte-ngcjq5.svelte-ngcjq5{align-items:baseline;display:flex;height:max-content;line-height:var(--tree-view-line-height);list-style:none;width:100%}li.svelte-ngcjq5+li.svelte-ngcjq5{margin-top:0.25em}.empty-block.svelte-ngcjq5.svelte-ngcjq5{visibility:hidden}.node-key.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base0D);margin-right:var(--tree-view-key-margin-right)}.node-key.has-children.svelte-ngcjq5.svelte-ngcjq5{cursor:pointer}.node-key.p-left.svelte-ngcjq5.svelte-ngcjq5{padding-left:1.1em}.node-value.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base0B);margin-right:0.5em;word-break:break-all}.node-value[data-type=number].svelte-ngcjq5.svelte-ngcjq5,.node-value[data-type=boolean].svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base09)}.node-value[data-type=null].svelte-ngcjq5.svelte-ngcjq5,.node-value[data-type=undefined].svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base08)}.node-value.expanded.svelte-ngcjq5.svelte-ngcjq5{color:var(--tree-view-base03)}.node-value.has-children.svelte-ngcjq5.svelte-ngcjq5{cursor:pointer}.arrow-btn.svelte-ngcjq5.svelte-ngcjq5{background:transparent;border:0;color:var(--tree-view-base0D);cursor:pointer;margin-right:0.7em;padding:0;transition:all 150ms ease 0s;transform:rotateZ(90deg);transform-origin:47% 43%;position:relative;line-height:1.1em;font-size:0.75em}.arrow-btn.collapsed.svelte-ngcjq5.svelte-ngcjq5{transform:rotateZ(0deg)}.buttons.svelte-ngcjq5.svelte-ngcjq5{display:flex;flex-wrap:wrap}.log-copy-button.svelte-ngcjq5.svelte-ngcjq5{background:transparent;border:0;color:var(--tree-view-base0D);cursor:pointer;margin:0;padding:0 0.5em}.log-copy-button.svelte-ngcjq5.svelte-ngcjq5:hover{background:rgba(255, 162, 177, 0.4);border-radius:2px;color:var(--tree-view-base07)}")}function e7(t,e,n){let r=t.slice();return r[14]=e[n],r}function e8(t){let e,n,r,i,o;return{c(){e=T("button"),n=D("▶"),R(e,"class",r=k("arrow-btn ".concat(t[0].collapsed?"collapsed":""))+" svelte-ngcjq5")},m(r,s){O(r,e,s),j(e,n),i||(o=M(e,"click",t[9]),i=!0)},p(t,n){1&n&&r!==(r=k("arrow-btn ".concat(t[0].collapsed?"collapsed":""))+" svelte-ngcjq5")&&R(e,"class",r)},d(t){t&&E(e),i=!1,o()}}}function nt(t){let e,n=t[5].formatValue(t[0].value,t[0])+"";return{c(){e=D(n)},m(t,n){O(t,e,n)},p(t,r){1&r&&n!==(n=t[5].formatValue(t[0].value,t[0])+"")&&I(e,n)},i:a,o:a,d(t){t&&E(e)}}}function ne(t){let e,n,r;var i=t[3];function o(t,e){return{props:{value:t[0].value,node:t[0],defaultFormatter:t[10]}}}return i&&(e=new i(o(t))),{c(){e&&tf(e.$$.fragment),n=A()},m(t,i){e&&td(e,t,i),O(t,n,i),r=!0},p(t,r){if(8&r&&i!==(i=t[3])){if(e){ti();let t=e;tl(t.$$.fragment,1,0,()=>{tp(t,1)}),to()}i?(tf((e=new i(o(t))).$$.fragment),ts(e.$$.fragment,1),td(e,n.parentNode,n)):e=null}else if(i){let n={};1&r&&(n.value=t[0].value),1&r&&(n.node=t[0]),e.$set(n)}},i(t){r||(e&&ts(e.$$.fragment,t),r=!0)},o(t){e&&tl(e.$$.fragment,t),r=!1},d(t){t&&E(n),e&&tp(e,t)}}}function nn(t){let e,n,r;return{c(){(e=T("button")).textContent="log",R(e,"class","log-copy-button svelte-ngcjq5")},m(i,o){O(i,e,o),n||(r=M(e,"click",t[7]),n=!0)},p:a,d(t){t&&E(e),n=!1,r()}}}function nr(t){let e,n,r;return{c(){(e=T("button")).textContent="copy",R(e,"class","log-copy-button svelte-ngcjq5")},m(i,o){O(i,e,o),n||(r=M(e,"click",t[8]),n=!0)},p:a,d(t){t&&E(e),n=!1,r()}}}function ni(t){let e,n,r,i=ta(t[0].children),o=[];for(let e=0;etl(o[t],1,1,()=>{o[t]=null});return{c(){e=T("li"),n=T("ul");for(let t=0;t{k[f]=null}),to(),(c=k[a])?c.p(t,s):(c=k[a]=_[a](t)).c(),ts(c,1),c.m(l,null)),(!y||1&s&&u!==(u=t[0].type))&&R(l,"data-type",u),(!y||5&s)&&L(l,"expanded",!t[0].collapsed&&t[2]),(!y||4&s)&&L(l,"has-children",t[2]),t[1].showLogButton?C?C.p(t,s):((C=nn(t)).c(),C.m(p,h)):C&&(C.d(1),C=null),t[1].showCopyButton?S?S.p(t,s):((S=nr(t)).c(),S.m(p,null)):S&&(S.d(1),S=null),(!y||1&s&&g!==(g=t[0].id))&&R(e,"data-tree-id",g),(!y||5&s)&&L(e,"collapsed",t[0].collapsed&&t[2]),!t[0].collapsed&&t[2]?q?(q.p(t,s),5&s&&ts(q,1)):((q=ni(t)).c(),ts(q,1),q.m(m.parentNode,m)):q&&(ti(),tl(q,1,1,()=>{q=null}),to())},i(t){y||(ts(c),ts(q),y=!0)},o(t){tl(c),tl(q),y=!1},d(t){t&&(E(e),E(v),E(m)),w&&w.d(),k[a].d(),C&&C.d(),S&&S.d(),q&&q.d(t),b=!1,d(x)}}}function nl(t,e,n){let r,i,o,s,l,c,u=a;t.$$.on_destroy.push(()=>u());let{id:f}=e,{treeStore:d,propsStore:p,rootElementStore:h}=H("svelte-tree-view");return m(t,h,t=>n(12,s=t)),d.treeMap.subscribe(t=>{let e=t.get(f);e&&l!==e&&n(0,l=e)}),t.$$set=t=>{"id"in t&&n(11,f=t.id)},t.$$.update=()=>{if(2048&t.$$.dirty){let t=d.getNode(f);if(!t)throw Error("[svelte-tree-view] TreeViewNode.svelte received undefined node from treeMapStore whereas it should be already unmounted!");n(0,l=t)}1&t.$$.dirty&&n(2,r=l&&l.children.length>0),2&t.$$.dirty&&n(3,o=c.valueComponent)},n(4,i=p.props),u(),u=g(i,t=>n(1,c=t)),[l,c,r,o,i,p,h,function(){console.info("%c [svelte-tree-view]: Property added to window._node","color: #b8e248"),console.log(l.value);try{"u">typeof window&&(window._node=l.value)}catch(t){console.error("Failed to set _node, window was undefined")}},function(){try{navigator.clipboard.writeText(JSON.stringify(l.value))}catch(t){console.error("Copying node to clipboard failed: ",t)}},function(){var t;r?d.toggleCollapse(l.id):l.circularOfId&&(d.expandAllNodesToNode(l.circularOfId),null==(t=null==s?void 0:s.querySelector('li[data-tree-id="'.concat(l.circularOfId,'"]')))||t.scrollIntoView())},function(t){return p.formatValue(t,l)},f]}class na extends tg{constructor(t){super(),th(this,t,nl,ns,h,{id:11},e4)}}function nc(t){C(t,"svelte-167awo5",":root{--tree-view-font-family:'Helvetica Neue', 'Calibri Light', Roboto, sans-serif;--tree-view-font-size:13px;--tree-view-left-indent:0.875em;--tree-view-line-height:1.1;--tree-view-key-margin-right:0.5em}ul.svelte-167awo5{background:var(--tree-view-base00);font-family:var(--tree-view-font-family);font-size:var(--tree-view-font-size);height:max-content;list-style:none;margin:0;padding:0;width:max-content}")}function nu(t,e,n){let r=t.slice();return r[18]=e[n],r}function nf(t){let e,n;return e=new na({props:{id:t[18].id}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.id=t[18].id),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function nd(t){let e,n,r,i=ta(t[2].children),o=[];for(let e=0;etl(o[t],1,1,()=>{o[t]=null});return{c(){e=T("ul");for(let t=0;tb());let{data:x,theme:$,showLogButton:w=!1,showCopyButton:k=!1,valueComponent:j,recursionOpts:C={},valueFormatter:O}=e,E=null,S={maxDepth:16,omitKeys:[],stopCircularRecursion:!1,shouldExpandNode:()=>!1},T={showLogButton:w,showCopyButton:k,valueComponent:j,recursionOpts:{...S,...C},valueFormatter:O},q=(o=function(t,e,n){let r=!Array.isArray(t),i=r?[t]:t;if(!i.every(Boolean))throw Error("derived() expects stores as input, got a falsy value");let o=e.length<2;return{subscribe:t$(void 0,(t,n)=>{let s=!1,l=[],c=0,u=a,f=()=>{if(c)return;u();let i=e(r?l[0]:l,t,n);o?t(i):u=p(i)?i:a},h=i.map((t,e)=>g(t,t=>{l[e]=t,c&=~(1<{c|=1<t.recursionOpts),{props:i,recursionOpts:o,setProps(t){i.set(t)},formatValue(t,e){let{valueFormatter:n}=v(i),r=n?n(t,e):void 0;if(r)return r;switch(e.type){case"array":return"".concat(e.circularOfId?"circular":""," [] ").concat(t.length," items");case"object":return"".concat(e.circularOfId?"circular":""," {} ").concat(Object.keys(t).length," keys");case"map":case"set":return"".concat(e.circularOfId?"circular":""," () ").concat(t.size," entries");case"date":return"".concat(t.toISOString());case"string":return'"'.concat(t,'"');case"boolean":return t?"true":"false";case"symbol":return String(t);default:return t}}}),D={set:(s=t$(null)).set,subscribe:s.subscribe},N=(u=t$(l=e5(0,"root",[],0,null)),f=t$(new Map),h=t$(new Map),{tree:u,treeMap:f,defaultRootNode:l,init(t,e,n){t?u.set(t):u.set(l),f.set(e),h.set(n)},getNode:t=>v(f).get(t),toggleCollapse(t){let e=v(f).get(t);if(!e)return void console.warn("Attempted to collapse non-existent node: ".concat(t));let n=Object.assign(Object.assign({},e),{collapsed:!e.collapsed});f.update(t=>new Map(t.set(e.id,n)));let r=v(q.recursionOpts);r&&this.expandNodeChildren(n,r)},expandNodeChildren(t,e){let n=this.getNode((null==t?void 0:t.parentId)||"")||null;if(!n)throw Error("No parent in expandNodeChildren for node: "+t);let r=new Map(v(f)),i=v(f),o=v(h),s=e9(t.index,t.key,t.value,t.depth,!t.collapsed,n,r,i,o,!1,e);s&&(n.children=n.children.map(t=>t.id===s.id?s:t),r.set(s.id,s),r.set(n.id,n),f.set(r),h.set(o))},expandAllNodesToNode(t){let e=new Map(v(f));!function t(e,n){n&&(e.set(n.id,Object.assign(Object.assign({},n),{collapsed:!1})),n.parentId&&t(e,e.get(n.parentId)))}(e,e.get(t)),f.set(e)}});return V("svelte-tree-view",{propsStore:q,rootElementStore:D,treeStore:N}),F(()=>{D.set(E)}),t.$$set=t=>{n(3,e=c(c({},e),_(t))),"data"in t&&n(4,x=t.data),"theme"in t&&n(5,$=t.theme),"showLogButton"in t&&n(6,w=t.showLogButton),"showCopyButton"in t&&n(7,k=t.showCopyButton),"valueComponent"in t&&n(8,j=t.valueComponent),"recursionOpts"in t&&n(9,C=t.recursionOpts),"valueFormatter"in t&&n(10,O=t.valueFormatter)},t.$$.update=()=>{if(5568&t.$$.dirty&&n(12,T={showLogButton:w,showCopyButton:k,valueComponent:j,valueFormatter:O,recursionOpts:T.recursionOpts}),6672&t.$$.dirty){var e;let t,i,o,s={...S,...C},l=(null===n(11,r=null==T?void 0:T.recursionOpts)||void 0===r?void 0:r.shouldExpandNode)!==s.shouldExpandNode,a=v(N.treeMap),{treeMap:c,tree:u,iteratedValues:f}=(e=x,t=new Map,o=e9(-1,"root",e,0,!0,null,t,a,i=new Map,l,s),{treeMap:t,tree:o,iteratedValues:i});N.init(u,c,f),n(12,T.recursionOpts=s,T),q.setProps(T)}if(33&t.$$.dirty&&$&&E){let t;for(t in $){let e=$[t];E&&t.includes("base")&&e&&E.style.setProperty("--tree-view-".concat(t),e)}}},n(1,m=N.tree),b(),b=g(m,t=>n(2,y=t)),e=_(e),[E,m,y,e,x,$,w,k,j,C,O,r,T,function(t){J[t?"unshift":"push"](()=>{n(0,E=t)})}]}class nh extends tg{constructor(t){super(),th(this,t,np,nd,h,{data:4,theme:5,showLogButton:6,showCopyButton:7,valueComponent:8,recursionOpts:9,valueFormatter:10},nc)}}function ng(t){C(t,"svelte-fdudio",".split-view.svelte-fdudio{border-top:1px solid rgba(255, 162, 177, 0.2);color:#fff;display:flex;height:calc(100% - var(--height-tabs-menu));width:100%}.split-view h2{color:rgb(187, 145, 163);font-family:var(--font-sans);font-size:var(--font-medium);font-weight:400;letter-spacing:1px;margin:0;text-transform:uppercase}.split-view > .left-panel{display:flex;flex-direction:column;flex-grow:1;overflow:scroll;padding:1em}.split-view > .right-panel{border-left:1px solid rgba(255, 162, 177, 0.2);display:flex;flex-direction:column;flex-grow:1;overflow:scroll;padding:1em}.split-view .hidden{visibility:hidden}")}let nv=t=>({}),nm=t=>({class:"right-panel"}),ny=t=>({}),nb=t=>({class:"left-panel"});function nx(t){let e,n,r,i=t[1].left,o=y(i,t,t[0],nb),s=t[1].right,l=y(s,t,t[0],nm);return{c(){e=T("section"),o&&o.c(),n=N(),l&&l.c(),R(e,"class","split-view svelte-fdudio")},m(t,i){O(t,e,i),o&&o.m(e,null),j(e,n),l&&l.m(e,null),r=!0},p(t,e){let[n]=e;o&&o.p&&(!r||1&n)&&$(o,i,t,t[0],r?x(i,t[0],n,ny):w(t[0]),nb),l&&l.p&&(!r||1&n)&&$(l,s,t,t[0],r?x(s,t[0],n,nv):w(t[0]),nm)},i(t){r||(ts(o,t),ts(l,t),r=!0)},o(t){tl(o,t),tl(l,t),r=!1},d(t){t&&E(e),o&&o.d(t),l&&l.d(t)}}}function n$(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=t=>{"$$scope"in t&&n(0,i=t.$$scope)},[i,r]}class nw extends tg{constructor(t){super(),th(this,t,n$,nx,h,{},ng)}}function n_(t){C(t,"svelte-it3v6s","button.svelte-it3v6s{background:transparent;border:0;border-radius:2px;color:#d3d3d9;cursor:pointer;font-family:var(--font-family);font-size:var(--font-small);font-weight:400;padding:6px 10px;text-transform:uppercase}button.svelte-it3v6s:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-it3v6s{background:rgba(255, 162, 177, 0.4)}")}function nk(t){let e,n,r,i,o,s=t[3].default,l=y(s,t,t[2],null);return{c(){e=T("button"),l&&l.c(),R(e,"class",n=k("".concat(t[1].class||""))+" svelte-it3v6s"),L(e,"selected",t[0])},m(n,s){O(n,e,s),l&&l.m(e,null),r=!0,i||(o=[M(e,"click",t[4]),M(e,"mouseover",t[5]),M(e,"mouseenter",t[6]),M(e,"mouseleave",t[7]),M(e,"focus",t[8])],i=!0)},p(t,i){let[o]=i;l&&l.p&&(!r||4&o)&&$(l,s,t,t[2],r?x(s,t[2],o,null):w(t[2]),null),(!r||2&o&&n!==(n=k("".concat(t[1].class||""))+" svelte-it3v6s"))&&R(e,"class",n),(!r||3&o)&&L(e,"selected",t[0])},i(t){r||(ts(l,t),r=!0)},o(t){tl(l,t),r=!1},d(t){t&&E(e),l&&l.d(t),i=!1,d(o)}}}function nj(t,e,n){let{$$slots:r={},$$scope:i}=e,{selected:o=!1}=e;return t.$$set=t=>{n(1,e=c(c({},e),_(t))),"selected"in t&&n(0,o=t.selected),"$$scope"in t&&n(2,i=t.$$scope)},e=_(e),[o,e,i,r,function(e){K.call(this,t,e)},function(e){K.call(this,t,e)},function(e){K.call(this,t,e)},function(e){K.call(this,t,e)},function(e){K.call(this,t,e)}]}class nC extends tg{constructor(t){super(),th(this,t,nj,nk,h,{selected:0},n_)}}function nO(t){C(t,"svelte-8c7oqn",'@charset "UTF-8";.top-row.svelte-8c7oqn{align-items:center;display:flex;justify-content:space-between}.left-panel[slot=left].svelte-8c7oqn{overflow:scroll}.right-panel[slot=right].svelte-8c7oqn{border-left:1px solid rgba(255, 162, 177, 0.2);flex-grow:0;min-width:200px;width:200px}.split-view .selection-btn{height:24px;width:35px}.caret-icon.svelte-8c7oqn::before{content:"▶"}.caret-icon.expanded.svelte-8c7oqn::before{content:"▼"}.no-marks.svelte-8c7oqn{color:#85d9ef;margin:0.5em 0 1.25em 1em}.split-view .tree-view{margin:0.5em 0 1.25em 0}')}function nE(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function nS(t){let e,n,r,i,o,s,l,a;return(o=new nC({props:{$$slots:{default:[nE]},$$scope:{ctx:t}}})).$on("click",t[6]),l=new nh({props:{class:"tree-view",data:t[0],showLogButton:!0,showCopyButton:!0,valueFormatter:nM}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Current doc",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","top-row svelte-8c7oqn"),R(e,"slot","left"),R(e,"class","left-panel svelte-8c7oqn")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};1024&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};1&e&&(r.data=t[0]),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function nT(t){let e;return{c(){R(e=T("span"),"class","caret-icon svelte-8c7oqn"),L(e,"expanded",t[5])},m(t,n){O(t,e,n)},p(t,n){32&n&&L(e,"expanded",t[5])},d(t){t&&E(e)}}}function nq(t){let e,n;return e=new nh({props:{class:"tree-view",data:t[2]}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.data=t[2]),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function nD(t){let e;return{c(){(e=T("div")).textContent="No active marks",R(e,"class","no-marks svelte-8c7oqn")},m(t,n){O(t,e,n)},p:a,i:a,o:a,d(t){t&&E(e)}}}function nN(t){let e,n,r,i,o,s,l,a,c,u,f,d,p,h,g,v,m,y,b;(o=new nC({props:{class:"selection-btn",$$slots:{default:[nT]},$$scope:{ctx:t}}})).$on("click",t[7]),l=new nh({props:{class:"tree-view",data:t[1]}});let x=[nD,nq],$=[];function w(t,e){return+(0!==t[2].length)}return p=$[d=w(t)]=x[d](t),y=new nh({props:{class:"tree-view",data:{nodeSize:t[3],childCount:t[4]}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Selection",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),a=N(),c=T("div"),(u=T("h2")).textContent="Active marks",f=N(),p.c(),h=N(),g=T("div"),(v=T("h2")).textContent="Document stats",m=N(),tf(y.$$.fragment),R(n,"class","top-row svelte-8c7oqn"),R(e,"slot","right"),R(e,"class","right-panel svelte-8c7oqn")},m(t,p){O(t,e,p),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),j(e,a),j(e,c),j(c,u),j(c,f),$[d].m(c,null),j(e,h),j(e,g),j(g,v),j(g,m),td(y,g,null),b=!0},p(t,e){let n={};1056&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};2&e&&(r.data=t[1]),l.$set(r);let i=d;(d=w(t))===i?$[d].p(t,e):(ti(),tl($[i],1,1,()=>{$[i]=null}),to(),(p=$[d])?p.p(t,e):(p=$[d]=x[d](t)).c(),ts(p,1),p.m(c,null));let s={};24&e&&(s.data={nodeSize:t[3],childCount:t[4]}),y.$set(s)},i(t){b||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),ts(p),ts(y.$$.fragment,t),b=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),tl(p),tl(y.$$.fragment,t),b=!1},d(t){t&&E(e),tp(o),tp(l),$[d].d(),tp(y)}}}function nA(t){let e,n;return e=new nw({props:{$$slots:{right:[nN],left:[nS]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};1087&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function nM(t,e){if("object"===e.type&&t.type)return"{} ".concat(t.type)}function nR(t,e,n){let{view:r}=H("editor-view"),i=r.state.doc.toJSON(),o=e2(r.state.selection),s=r.state,l=[],a=r.state.doc.nodeSize,c=r.state.doc.childCount,u=!1;return eW.subscribe(t=>{if(!t)return;let{state:e}=t;s=e,n(0,i=e.doc.toJSON()),n(1,o=u?e3(e.selection):e2(e.selection)),n(2,l=function(t){if(t.selection.empty){let e=t.selection.$from,n=t.storedMarks;return n?n.map(t=>t.type.name):e.marks().map(t=>t.type.name)}{let e=t.selection.$head,n=t.selection.$anchor,r=new Set;return e.marks().forEach(t=>r.add(t.type.name)),n.marks().forEach(t=>r.add(t.type.name)),Array.from(r)}}(e)),n(3,a=e.doc.nodeSize),n(4,c=e.doc.childCount)}),[i,o,l,a,c,u,function(){console.log(i),window._doc=i},function(){n(5,u=!u),u?n(1,o=e3(s.selection)):n(1,o=e2(s.selection))}]}class nP extends tg{constructor(t){super(),th(this,t,nR,nA,h,{},nO)}}function nI(t,e,n){if("array"===e)return[]}function nz(t,e){if("array"===e&&0===t[1]&&0===t[2]||"array"===e&&"string"==typeof t[0]&&0===t[1]&&2===t[2]||"array"===e&&1===t.length&&"object"==typeof t[0])return[];if("object"!==e||"a"!==t._t)return;let n=[];for(let e in t)"_t"!==e&&("_"===e.charAt(0)?n.push([e.substr(1),t[e]]):n.push([e,t[e]]));return n}function nL(t){C(t,"svelte-vbjxb8",'@charset "UTF-8";ul.svelte-vbjxb8.svelte-vbjxb8{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-vbjxb8.svelte-vbjxb8{transition:background 0.7s ease}li.svelte-vbjxb8.svelte-vbjxb8:hover{background:rgba(255, 162, 177, 0.4);color:#fff}li.selected.svelte-vbjxb8.svelte-vbjxb8{background:rgba(255, 162, 177, 0.4)}li.svelte-vbjxb8+li.svelte-vbjxb8{border-top:1px solid rgb(96, 76, 104)}button.svelte-vbjxb8.svelte-vbjxb8{background:transparent;border:0;color:#d3d3d9;cursor:pointer;display:flex;font-family:monospace;font-size:var(--font-medium);justify-content:space-between;padding:6px 18px;text-transform:uppercase;width:100%}button.p-left.svelte-vbjxb8.svelte-vbjxb8{margin-left:1em}.caret-icon.svelte-vbjxb8.svelte-vbjxb8::before{content:"▶"}.caret-icon.expanded.svelte-vbjxb8.svelte-vbjxb8::before{content:"▼"}')}function nB(t,e,n){let r=t.slice();return r[6]=e[n],r[8]=n,r}function nF(t,e,n){let r=t.slice();return r[9]=e[n],r}function nU(t){let e,n,r,i=t[6].entries.length+"";return{c(){e=D("["),n=D(i),r=D("]")},m(t,i){O(t,e,i),O(t,n,i),O(t,r,i)},p(t,e){1&e&&i!==(i=t[6].entries.length+"")&&I(n,i)},d(t){t&&(E(e),E(n),E(r))}}}function nV(t){let e,n,r=t[6].topEntry.trs.length-1+"";return{c(){e=D("+"),n=D(r)},m(t,r){O(t,e,r),O(t,n,r)},p(t,e){1&e&&r!==(r=t[6].topEntry.trs.length-1+"")&&I(n,r)},d(t){t&&(E(e),E(n))}}}function nH(t){let e;return{c(){R(e=T("span"),"class","caret-icon svelte-vbjxb8"),L(e,"expanded",t[6].expanded)},m(t,n){O(t,e,n)},p(t,n){1&n&&L(e,"expanded",t[6].expanded)},d(t){t&&E(e)}}}function nK(t){let e,n=[],r=new Map,i=ta(t[6].entries),o=t=>{var e;return null==(e=t[9])?void 0:e.id};for(let e=0;e1&&nV(e),y=e[6].isGroup&&e[6].entries.length>1&&nH(e);function b(){return e[3](e[6],e[8])}function x(){return e[4](e[6])}let $=e[6].isGroup&&e[6].expanded&&nK(e);return{key:t,first:null,c(){var t;r=T("li"),i=T("button"),o=T("span"),s=D(g),l=N(),v&&v.c(),a=N(),m&&m.c(),c=N(),y&&y.c(),u=N(),$&&$.c(),f=A(),R(i,"class","svelte-vbjxb8"),L(i,"is-group",e[6].isGroup),R(r,"class","svelte-vbjxb8"),L(r,"selected",!e[6].expanded&&e[1]===(null==(t=e[6])||null==(t=t.topEntry)?void 0:t.id)),this.first=r},m(t,e){O(t,r,e),j(r,i),j(i,o),j(o,s),j(o,l),v&&v.m(o,null),j(o,a),m&&m.m(o,null),j(i,c),y&&y.m(i,null),O(t,u,e),$&&$.m(t,e),O(t,f,e),p||(h=[M(i,"click",b),M(i,"dblclick",x)],p=!0)},p(t,n){var l,c;e=t,1&n&&g!==(g=(null==(l=e[6])||null==(l=l.topEntry)?void 0:l.timeStr)+"")&&I(s,g),e[6].isGroup?v?v.p(e,n):((v=nU(e)).c(),v.m(o,a)):v&&(v.d(1),v=null),e[6].topEntry&&e[6].topEntry.trs.length>1?m?m.p(e,n):((m=nV(e)).c(),m.m(o,null)):m&&(m.d(1),m=null),e[6].isGroup&&e[6].entries.length>1?y?y.p(e,n):((y=nH(e)).c(),y.m(i,null)):y&&(y.d(1),y=null),1&n&&L(i,"is-group",e[6].isGroup),3&n&&L(r,"selected",!e[6].expanded&&e[1]===(null==(c=e[6])||null==(c=c.topEntry)?void 0:c.id)),e[6].isGroup&&e[6].expanded?$?$.p(e,n):(($=nK(e)).c(),$.m(f.parentNode,f)):$&&($.d(1),$=null)},d(t){t&&(E(r),E(u),E(f)),v&&v.d(),m&&m.d(),y&&y.d(),$&&$.d(t),p=!1,d(h)}}}function nY(t){let e,n=[],r=new Map,i=ta(t[0]),o=t=>t[6].id;for(let e=0;e{"listItems"in t&&n(0,r=t.listItems),"selectedId"in t&&n(1,i=t.selectedId)},[r,i,o,(t,e)=>{var n;return o("click-item",{id:null==t||null==(n=t.topEntry)?void 0:n.id,groupIdx:e,wasTopNode:!0})},t=>{var e;return o("dblclick-item",{id:null==t||null==(e=t.topEntry)?void 0:e.id})},(t,e)=>o("click-item",{id:null==t?void 0:t.id,groupIdx:e,wasTopNode:!1})]}class nQ extends tg{constructor(t){super(),th(this,t,nW,nY,h,{listItems:0,selectedId:1},nL)}}function nZ(t){C(t,"svelte-1a1oqej",".added.svelte-1a1oqej.svelte-1a1oqej{display:inline-block;background:#87cc86;border-radius:1px;color:green;padding:1px 2px;text-indent:0;min-height:1ex}.deleted.svelte-1a1oqej.svelte-1a1oqej{display:inline-block;background:#d66363;border-radius:1px;color:#222;padding:1px 2px;text-decoration:line-through;text-indent:0;min-height:1ex}.updated.svelte-1a1oqej.svelte-1a1oqej{word-break:break-all}.updated.svelte-1a1oqej .added.svelte-1a1oqej{background:#eaea37}.arrow.svelte-1a1oqej.svelte-1a1oqej{color:#87cc86}")}function nX(t,e,n){let r=t.slice();return r[3]=e[n],r}function n1(t){let e,n=t[0](t[1])+"";return{c(){e=D(n)},m(t,n){O(t,e,n)},p(t,r){3&r&&n!==(n=t[0](t[1])+"")&&I(e,n)},d(t){t&&E(e)}}}function n0(t){let e;function n(t,e){return 1===t[1].length?n6:2===t[1].length?n5:3===t[1].length&&0===t[1][1]&&0===t[1][2]?n3:3===t[1].length&&2===t[1][2]?n2:void 0}let r=n(t),i=r&&r(t);return{c(){i&&i.c(),e=A()},m(t,n){i&&i.m(t,n),O(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i&&i.d(1),(i=r&&r(t))&&(i.c(),i.m(e.parentNode,e)))},d(t){t&&E(e),i&&i.d(t)}}}function n2(t){let e,n=ta(re(t[1][0])),r=[];for(let e=0;e",s=N(),l=T("span"),a=D(u),R(n,"class","deleted svelte-1a1oqej"),R(o,"class","arrow svelte-1a1oqej"),R(l,"class","added svelte-1a1oqej"),R(e,"class","updated svelte-1a1oqej")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(e,i),j(e,o),j(e,s),j(e,l),j(l,a)},p(t,e){2&e&&c!==(c=rn(t[1][0])+"")&&I(r,c),2&e&&u!==(u=rn(t[1][1])+"")&&I(a,u)},d(t){t&&E(e)}}}function n6(t){let e,n,r=rn(t[1][0])+"";return{c(){e=T("span"),n=D(r),R(e,"class","added svelte-1a1oqej")},m(t,r){O(t,e,r),j(e,n)},p(t,e){2&e&&r!==(r=rn(t[1][0])+"")&&I(n,r)},d(t){t&&E(e)}}}function n9(t){let e,n,r=t[3].raw+"";return{c(){e=T("span"),n=D(r)},m(t,r){O(t,e,r),j(e,n)},p(t,e){2&e&&r!==(r=t[3].raw+"")&&I(n,r)},d(t){t&&E(e)}}}function n4(t){let e,n,r=t[3].add+"";return{c(){e=T("span"),n=D(r),R(e,"class","added svelte-1a1oqej")},m(t,r){O(t,e,r),j(e,n)},p(t,e){2&e&&r!==(r=t[3].add+"")&&I(n,r)},d(t){t&&E(e)}}}function n7(t){let e,n,r=t[3].delete+"";return{c(){e=T("span"),n=D(r),R(e,"class","deleted svelte-1a1oqej")},m(t,r){O(t,e,r),j(e,n)},p(t,e){2&e&&r!==(r=t[3].delete+"")&&I(n,r)},d(t){t&&E(e)}}}function n8(t){let e;function n(t,e){return t[3].delete?n7:t[3].add?n4:n9}let r=n(t),i=r(t);return{c(){i.c(),e=A()},m(t,n){i.m(t,n),O(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),(i=r(t)).c(),i.m(e.parentNode,e))},d(t){t&&E(e),i.d(t)}}}function rt(t){let e,n;function r(t,n){return(2&n&&(e=null),null==e&&(e=!!Array.isArray(t[1])),e)?n0:n1}let i=r(t,-1),o=i(t);return{c(){o.c(),n=A()},m(t,e){o.m(t,e),O(t,n,e)},p(t,e){let[s]=e;i===(i=r(t,s))&&o?o.p(t,s):(o.d(1),(o=i(t)).c(),o.m(n.parentNode,n))},i:a,o:a,d(t){t&&E(n),o.d(t)}}}function re(t){return t.split(/\n/gm).slice(1).map(t=>({[t.startsWith("-")?"delete":t.startsWith("+")?"add":"raw"]:t.slice(1).replace(/\s/gm," ")}))}function rn(t){if("string"==typeof t)return t;if(null===t)return"null";let e=JSON.stringify(t);return void 0===e?"undefined":e.length>22?"".concat(e.slice(0,15),"…").concat(e.slice(-5)):e}function rr(t,e,n){let r,{node:i,defaultFormatter:o}=e;return t.$$set=t=>{"node"in t&&n(2,i=t.node),"defaultFormatter"in t&&n(0,o=t.defaultFormatter)},t.$$.update=()=>{4&t.$$.dirty&&n(1,r=i.value)},[o,r,i]}class ri extends tg{constructor(t){super(),th(this,t,rr,rt,h,{node:2,defaultFormatter:0},nZ)}}function ro(t){C(t,"svelte-r7zw98",".left-panel.svelte-r7zw98.svelte-r7zw98{flex-grow:0;padding:0;min-width:190px;width:190px}.title-container.svelte-r7zw98.svelte-r7zw98{align-items:center;display:flex}.transaction-buttons.svelte-r7zw98.svelte-r7zw98{margin-left:2rem}.entry-row.svelte-r7zw98+.entry-row.svelte-r7zw98{margin-top:1em}.selection-html.svelte-r7zw98.svelte-r7zw98{font-weight:100;margin:0.5em 0 0 0;padding:0}.equal-diff.svelte-r7zw98.svelte-r7zw98{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function rs(t,e,n){let r=t.slice();return r[13]=e[n],r}function rl(t){var e;let n,r,i;return(r=new nQ({props:{listItems:t[4],selectedId:(null==(e=t[0])?void 0:e.id)||""}})).$on("click-item",t[7]),r.$on("dblclick-item",t[8]),{c(){n=T("div"),tf(r.$$.fragment),R(n,"slot","left"),R(n,"class","left-panel svelte-r7zw98")},m(t,e){O(t,n,e),td(r,n,null),i=!0},p(t,e){var n;let i={};16&e&&(i.listItems=t[4]),1&e&&(i.selectedId=(null==(n=t[0])?void 0:n.id)||""),r.$set(i)},i(t){i||(ts(r.$$.fragment,t),i=!0)},o(t){tl(r.$$.fragment,t),i=!1},d(t){t&&E(n),tp(r)}}}function ra(t){let e;return{c(){(e=T("div")).textContent="Docs are equal.",R(e,"class","equal-diff svelte-r7zw98")},m(t,n){O(t,e,n)},p:a,i:a,o:a,d(t){t&&E(e)}}}function rc(t){let e,n,r,i,o,s,l,a,c,u,f,d,p,h=t[0].contentDiff&&ru(t),g=t[0].selectionDiff&&rd(t),v=t[0].selectionHtml.length>0&&rh(t),m=t[1]&&rv(t);(f=new nC({props:{$$slots:{default:[rb]},$$scope:{ctx:t}}})).$on("click",t[5]);let y=t[1]&&rx(t);return{c(){e=T("div"),h&&h.c(),n=N(),g&&g.c(),r=N(),v&&v.c(),i=N(),o=T("div"),s=T("div"),(l=T("h2")).textContent="Transactions",a=N(),c=T("div"),m&&m.c(),u=N(),tf(f.$$.fragment),d=N(),y&&y.c(),R(c,"class","transaction-buttons svelte-r7zw98"),R(s,"class","title-container svelte-r7zw98"),R(o,"class","entry-row svelte-r7zw98")},m(t,b){O(t,e,b),h&&h.m(e,null),j(e,n),g&&g.m(e,null),j(e,r),v&&v.m(e,null),j(e,i),j(e,o),j(o,s),j(s,l),j(s,a),j(s,c),m&&m.m(c,null),j(c,u),td(f,c,null),j(o,d),y&&y.m(o,null),p=!0},p(t,s){t[0].contentDiff?h?(h.p(t,s),1&s&&ts(h,1)):((h=ru(t)).c(),ts(h,1),h.m(e,n)):h&&(ti(),tl(h,1,1,()=>{h=null}),to()),t[0].selectionDiff?g?(g.p(t,s),1&s&&ts(g,1)):((g=rd(t)).c(),ts(g,1),g.m(e,r)):g&&(ti(),tl(g,1,1,()=>{g=null}),to()),t[0].selectionHtml.length>0?v?(v.p(t,s),1&s&&ts(v,1)):((v=rh(t)).c(),ts(v,1),v.m(e,i)):v&&(ti(),tl(v,1,1,()=>{v=null}),to()),t[1]?m?(m.p(t,s),2&s&&ts(m,1)):((m=rv(t)).c(),ts(m,1),m.m(c,u)):m&&(ti(),tl(m,1,1,()=>{m=null}),to());let l={};65538&s&&(l.$$scope={dirty:s,ctx:t}),f.$set(l),t[1]?y?(y.p(t,s),2&s&&ts(y,1)):((y=rx(t)).c(),ts(y,1),y.m(o,null)):y&&(ti(),tl(y,1,1,()=>{y=null}),to())},i(t){p||(ts(h),ts(g),ts(v),ts(m),ts(f.$$.fragment,t),ts(y),p=!0)},o(t){tl(h),tl(g),tl(v),tl(m),tl(f.$$.fragment,t),tl(y),p=!1},d(t){t&&E(e),h&&h.d(),g&&g.d(),v&&v.d(),m&&m.d(),tp(f),y&&y.d()}}}function ru(t){let e,n,r,i,o,s,l,a;return o=new nC({props:{class:"hidden",$$slots:{default:[rf]},$$scope:{ctx:t}}}),l=new nh({props:{class:"tree-view",data:t[0].contentDiff,showLogButton:!0,showCopyButton:!0,valueComponent:ri,recursionOpts:{maxDepth:12,mapChildren:nz,shouldExpandNode:rk}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Doc diff",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","title-container svelte-r7zw98"),R(e,"class","entry-row svelte-r7zw98")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};1&e&&(r.data=t[0].contentDiff),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function rf(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rd(t){let e,n,r,i,o,s,l,a;return o=new nC({props:{class:"hidden",$$slots:{default:[rp]},$$scope:{ctx:t}}}),l=new nh({props:{class:"tree-view",data:t[0].selectionDiff,valueComponent:ri,recursionOpts:{mapChildren:nI,shouldExpandNode:rj}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Selection diff",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","title-container svelte-r7zw98"),R(e,"class","entry-row svelte-r7zw98")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};1&e&&(r.data=t[0].selectionDiff),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function rp(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rh(t){let e,n,r,i,o,s,l,a,c,u=t[0].selectionHtml+"";return o=new nC({props:{class:"hidden",$$slots:{default:[rg]},$$scope:{ctx:t}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Selection content",i=N(),tf(o.$$.fragment),s=N(),l=T("pre"),a=T("code"),R(n,"class","title-container svelte-r7zw98"),R(l,"class","selection-html svelte-r7zw98"),R(e,"class","entry-row svelte-r7zw98")},m(t,f){O(t,e,f),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),j(e,l),j(l,a),a.innerHTML=u,c=!0},p(t,e){let n={};65536&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n),(!c||1&e)&&u!==(u=t[0].selectionHtml+"")&&(a.innerHTML=u)},i(t){c||(ts(o.$$.fragment,t),c=!0)},o(t){tl(o.$$.fragment,t),c=!1},d(t){t&&E(e),tp(o)}}}function rg(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rv(t){let e,n,r,i;return(e=new nC({props:{$$slots:{default:[rm]},$$scope:{ctx:t}}})).$on("click",t[9]),(r=new nC({props:{$$slots:{default:[ry]},$$scope:{ctx:t}}})).$on("click",t[6]),{c(){tf(e.$$.fragment),n=N(),tf(r.$$.fragment)},m(t,o){td(e,t,o),O(t,n,o),td(r,t,o),i=!0},p(t,n){let i={};65540&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);let o={};65536&n&&(o.$$scope={dirty:n,ctx:t}),r.$set(o)},i(t){i||(ts(e.$$.fragment,t),ts(r.$$.fragment,t),i=!0)},o(t){tl(e.$$.fragment,t),tl(r.$$.fragment,t),i=!1},d(t){t&&E(n),tp(e,t),tp(r,t)}}}function rm(t){let e,n=t[2]?"collapse":"expand";return{c(){e=D(n)},m(t,n){O(t,e,n)},p(t,r){4&r&&n!==(n=t[2]?"collapse":"expand")&&I(e,n)},d(t){t&&E(e)}}}function ry(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rb(t){let e,n=t[1]?"hide":"show";return{c(){e=D(n)},m(t,n){O(t,e,n)},p(t,r){2&r&&n!==(n=t[1]?"hide":"show")&&I(e,n)},d(t){t&&E(e)}}}function rx(t){let e,n,r=ta(t[0].trs),i=[];for(let e=0;etl(i[t],1,1,()=>{i[t]=null});return{c(){for(let t=0;t{s[l]=null}),to(),(r=s[n])?r.p(t,i):(r=s[n]=o[n](t)).c(),ts(r,1),r.m(e,null))},i(t){i||(ts(r),i=!0)},o(t){tl(r),i=!1},d(t){t&&E(e),s[n].d()}}}function r_(t){let e,n;return e=new nw({props:{$$slots:{right:[rw],left:[rl]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};65567&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}let rk=()=>!0,rj=()=>!0;function rC(t,e,n){let r,i,o;m(t,eJ,t=>n(10,i=t)),m(t,eY,t=>n(11,o=t));let s,l=!1,{replaceEditorContent:a}=H("editor-view"),c=!1,u={maxDepth:24,stopCircularRecursion:!0,omitKeys:["schema"],shouldExpandNode:()=>c};return eW.subscribe(t=>{t&&n(0,s=t)}),t.$$.update=()=>{3072&t.$$.dirty&&n(4,r=o.map(t=>({id:t.id,isGroup:t.isGroup,topEntry:i.get(t.topEntryId),entries:t.entryIds.map(t=>i.get(t)),expanded:t.expanded})))},[s,l,c,u,r,function(){n(1,l=!l)},function(){console.info("%c [prosemirror-dev-toolkit]: Property added to window._trs","color: #b8e248"),console.log(null==s?void 0:s.trs),window._trs=null==s?void 0:s.trs},function(t){let{id:e="",groupIdx:o,wasTopNode:l}=t.detail;if(n(0,s=i.get(e)),!s)return;let a=r[o];a.isGroup&&a.entries.length>1&&l&&eY.update(t=>t.map((t,e)=>e!==o?t:Object.assign(Object.assign({},t),{expanded:!t.expanded})))},function(t){n(0,s=i.get(t.detail.id||"")),s&&a(s.state)},function(){n(2,c=!c),n(3,u=Object.assign(Object.assign({},u),{shouldExpandNode:()=>c}))},i,o]}class rO extends tg{constructor(t){super(),th(this,t,rC,r_,h,{},ro)}}function rE(t){C(t,"svelte-1fq2hhi","ul.svelte-1fq2hhi.svelte-1fq2hhi{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-1fq2hhi+li.svelte-1fq2hhi{border-top:1px solid rgb(96, 76, 104)}button.svelte-1fq2hhi.svelte-1fq2hhi{background:transparent;border:0;color:#d3d3d9;cursor:pointer;display:flex;font-family:monospace;font-size:var(--font-medium);font-weight:100;padding:6px 18px;text-transform:uppercase;width:100%}button.svelte-1fq2hhi.svelte-1fq2hhi:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button:hover.empty.svelte-1fq2hhi.svelte-1fq2hhi{background:rgb(80, 68, 93)}button.selected.svelte-1fq2hhi.svelte-1fq2hhi{background:rgba(255, 162, 177, 0.4)}button.selected.empty.svelte-1fq2hhi.svelte-1fq2hhi{background:rgb(80, 68, 93)}button.empty.svelte-1fq2hhi.svelte-1fq2hhi{color:#727288}")}function rS(t,e,n){let r=t.slice();return r[4]=e[n],r}function rT(t){let e,n,r,i,o,s,l=t[4].value+"";function a(){return t[3](t[4])}return{c(){e=T("li"),n=T("button"),r=D(l),i=N(),R(n,"class","svelte-1fq2hhi"),L(n,"selected",t[1]===t[4].key),L(n,"empty",t[4].empty),R(e,"class","svelte-1fq2hhi")},m(t,l){O(t,e,l),j(e,n),j(n,r),j(e,i),o||(s=M(n,"click",a),o=!0)},p(e,i){t=e,1&i&&l!==(l=t[4].value+"")&&I(r,l),3&i&&L(n,"selected",t[1]===t[4].key),1&i&&L(n,"empty",t[4].empty)},d(t){t&&E(e),o=!1,s()}}}function rq(t){let e,n=ta(t[0]),r=[];for(let e=0;e{"listItems"in t&&n(0,r=t.listItems),"selectedKey"in t&&n(1,i=t.selectedKey),"onSelect"in t&&n(2,o=t.onSelect)},[r,i,o,t=>o(t)]}class rN extends tg{constructor(t){super(),th(this,t,rD,rq,h,{listItems:0,selectedKey:1,onSelect:2},rE)}}function rA(t){C(t,"svelte-9l897d",".top-row.svelte-9l897d{align-items:center;display:flex;justify-content:space-between;margin-bottom:0.5em}.left-panel[slot=left].svelte-9l897d{flex-grow:0;overflow:scroll;padding:0;min-width:190px;width:190px}.right-panel[slot=right].svelte-9l897d{border-left:1px solid rgba(255, 162, 177, 0.2)}.empty-state.svelte-9l897d{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function rM(t){var e;let n,r,i;return r=new rN({props:{listItems:t[4],selectedKey:null==(e=t[0])?void 0:e.key,onSelect:t[5]}}),{c(){n=T("div"),tf(r.$$.fragment),R(n,"slot","left"),R(n,"class","left-panel svelte-9l897d")},m(t,e){O(t,n,e),td(r,n,null),i=!0},p(t,e){var n;let i={};16&e&&(i.listItems=t[4]),1&e&&(i.selectedKey=null==(n=t[0])?void 0:n.key),r.$set(i)},i(t){i||(ts(r.$$.fragment,t),i=!0)},o(t){tl(r.$$.fragment,t),i=!1},d(t){t&&E(n),tp(r)}}}function rR(t){let e,n,r,i,o,s,l,a;return(o=new nC({props:{$$slots:{default:[rP]},$$scope:{ctx:t}}})).$on("click",t[6]),(l=new nC({props:{$$slots:{default:[rI]},$$scope:{ctx:t}}})).$on("click",t[7]),{c(){e=T("div"),(n=T("h2")).textContent="Plugin state",r=N(),i=T("div"),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(e,"class","top-row svelte-9l897d")},m(t,c){O(t,e,c),j(e,n),j(e,r),j(e,i),td(o,i,null),j(i,s),td(l,i,null),a=!0},p(t,e){let n={};2050&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};2048&e&&(r.$$scope={dirty:e,ctx:t}),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function rP(t){let e,n=t[1]?"collapse":"expand";return{c(){e=D(n)},m(t,n){O(t,e,n)},p(t,r){2&r&&n!==(n=t[1]?"collapse":"expand")&&I(e,n)},d(t){t&&E(e)}}}function rI(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rz(t){let e;return{c(){(e=T("div")).textContent="Plugin has no state",R(e,"class","empty-state svelte-9l897d")},m(t,n){O(t,e,n)},p:a,i:a,o:a,d(t){t&&E(e)}}}function rL(t){let e,n;return e=new nh({props:{data:t[3],showLogButton:!0,showCopyButton:!0,recursionOpts:t[2]}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};8&n&&(r.data=t[3]),4&n&&(r.recursionOpts=t[2]),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function rB(t){let e,n,r,i,o,s=t[3]&&rR(t),l=[rL,rz],a=[];return i=a[r=+!t[3]]=l[r](t),{c(){e=T("div"),s&&s.c(),n=N(),i.c(),R(e,"slot","right"),R(e,"class","right-panel svelte-9l897d")},m(t,i){O(t,e,i),s&&s.m(e,null),j(e,n),a[r].m(e,null),o=!0},p(t,o){t[3]?s?(s.p(t,o),8&o&&ts(s,1)):((s=rR(t)).c(),ts(s,1),s.m(e,n)):s&&(ti(),tl(s,1,1,()=>{s=null}),to());let c=r;(r=+!t[3])===c?a[r].p(t,o):(ti(),tl(a[c],1,1,()=>{a[c]=null}),to(),(i=a[r])?i.p(t,o):(i=a[r]=l[r](t)).c(),ts(i,1),i.m(e,null))},i(t){o||(ts(s),ts(i),o=!0)},o(t){tl(s),tl(i),o=!1},d(t){t&&E(e),s&&s.d(),a[r].d()}}}function rF(t){let e,n;return e=new nw({props:{$$slots:{right:[rB],left:[rM]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};2079&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function rU(t,e,n){let r,i,{view:o}=H("editor-view"),s=!1,l={maxDepth:10,stopCircularRecursion:!0,shouldExpandNode:()=>s},a=o.state,c=a.plugins,u=c[0];return eW.subscribe(t=>{t&&(n(8,a=t.state),n(9,c=a.plugins),n(0,u=c.find(t=>t.key===(null==u?void 0:u.key))))}),t.$$.update=()=>{257&t.$$.dirty&&n(3,r=(null==u?void 0:u.getState)?u.getState(a):void 0),768&t.$$.dirty&&n(4,i=c.map(t=>({key:t.key,value:t.key.toUpperCase(),empty:!(t.getState&&t.getState(a))})))},[u,s,l,r,i,function(t){n(0,u=c.find(e=>e.key===t.key))},function(){n(1,s=!s),n(2,l=Object.assign(Object.assign({},l),{shouldExpandNode:()=>s}))},function(){window._plugin=[u,r],console.info("%c [prosemirror-dev-toolkit]: Property added to window._plugin","color: #b8e248"),console.log(u),console.log(r)},a,c]}class rV extends tg{constructor(t){super(),th(this,t,rU,rF,h,{},rA)}}function rH(t){C(t,"svelte-1u2reu1",".top-row.svelte-1u2reu1{align-items:center;display:flex;justify-content:space-between}.left-panel[slot=left].svelte-1u2reu1{overflow:scroll;padding:1em}.right-panel[slot=right].svelte-1u2reu1{border-left:1px solid rgba(255, 162, 177, 0.2);overflow:scroll;padding:1em}")}function rK(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rG(t){let e,n,r,i,o,s,l,a;return o=new nC({props:{class:"hidden",$$slots:{default:[rK]},$$scope:{ctx:t}}}),l=new nh({props:{class:"tree-view",data:t[0],showLogButton:!0,showCopyButton:!0,recursionOpts:{stopCircularRecursion:!0}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Nodes",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","top-row svelte-1u2reu1"),R(e,"slot","left"),R(e,"class","left-panel svelte-1u2reu1")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};8&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function rJ(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function rY(t){let e,n,r,i,o,s,l,a;return o=new nC({props:{class:"hidden",$$slots:{default:[rJ]},$$scope:{ctx:t}}}),l=new nh({props:{class:"tree-view",data:t[1],showLogButton:!0,showCopyButton:!0,recursionOpts:{stopCircularRecursion:!0}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Marks",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","top-row svelte-1u2reu1"),R(e,"slot","right"),R(e,"class","right-panel svelte-1u2reu1")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};8&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function rW(t){let e,n;return e=new nw({props:{$$slots:{right:[rY],left:[rG]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};8&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function rQ(t){let{view:e}=H("editor-view");return[e.state.schema.nodes,e.state.schema.marks]}class rZ extends tg{constructor(t){super(),th(this,t,rQ,rW,h,{},rH)}}function rX(t){C(t,"svelte-1un819s",".doc-node.svelte-1un819s{border-left:1px solid #363755;border-right:1px solid #363755;display:flex;flex-direction:column;padding:0 12px}.doc-node.root.svelte-1un819s{border:0;padding:0}.doc-node-body.svelte-1un819s{background:#363755;color:#222;display:flex;font-size:13px;margin-top:3px}.number-box.svelte-1un819s{padding:3px 6px;background:rgba(255, 255, 255, 0.3)}.node-name.svelte-1un819s{width:100%}button.svelte-1un819s{align-items:center;background:transparent;border:0;color:#222;cursor:pointer;display:flex;height:100%;white-space:pre;width:100%}button.svelte-1un819s:hover{background:rgba(255, 162, 177, 0.4);color:#fff}button.selected.svelte-1un819s{background:rgba(255, 162, 177, 0.4)}ul.svelte-1un819s{list-style:none;margin:0;padding:0}ul.show-borders.svelte-1un819s{border-left:1px solid rgb(96, 76, 104);border-right:1px solid rgb(96, 76, 104)}.inline-children.svelte-1un819s{border-left:1px solid rgb(96, 76, 104);border-right:1px solid rgb(96, 76, 104);display:flex;flex-wrap:wrap;padding:0 12px}.inline-children.svelte-1un819s>.doc-node{flex-grow:1;padding:0}")}function r1(t,e,n){let r=t.slice();return r[15]=e[n],r[17]=n,r}function r0(t){let e,n;return e=new r5({props:{node:t[15],startPos:t[5][t[17]],depth:t[1]+1}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};4&n&&(r.node=t[15]),32&n&&(r.startPos=t[5][t[17]]),2&n&&(r.depth=t[1]+1),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function r2(t){let e,n,r,i,o,s,l,a,c,u,f,p,h,g,v,m,y,b,x=ta(t[2].content),$=[];for(let e=0;etl($[t],1,1,()=>{$[t]=null});return{c(){e=T("li"),n=T("div"),r=T("div"),i=D(t[0]),o=N(),s=T("div"),l=T("button"),a=D(t[6]),c=N(),u=T("div"),f=D(t[4]),h=N(),g=T("ul");for(let t=0;t<$.length;t+=1)$[t].c();R(r,"class","number-box svelte-1un819s"),R(l,"aria-label","Show node info button"),R(l,"class","svelte-1un819s"),L(l,"selected",!1),R(s,"class","node-name svelte-1un819s"),R(u,"class","number-box svelte-1un819s"),R(n,"class","doc-node-body svelte-1un819s"),R(n,"style",p="background: ".concat(t[7])),R(g,"class","svelte-1un819s"),L(g,"inline-children",t[3]),L(g,"show-borders",t[1]>=1),R(e,"class",v=k("".concat(t[11].class||""," doc-node"))+" svelte-1un819s"),L(e,"root",t[8])},m(d,p){O(d,e,p),j(e,n),j(n,r),j(r,i),j(n,o),j(n,s),j(s,l),j(l,a),j(n,c),j(n,u),j(u,f),j(e,h),j(e,g);for(let t=0;t<$.length;t+=1)$[t]&&$[t].m(g,null);m=!0,y||(b=[M(l,"click",t[9]),M(l,"dblclick",t[10])],y=!0)},p(t,r){let[o]=r;if((!m||1&o)&&I(i,t[0]),(!m||64&o)&&I(a,t[6]),(!m||16&o)&&I(f,t[4]),(!m||128&o&&p!==(p="background: ".concat(t[7])))&&R(n,"style",p),38&o){let e;for(e=0,x=ta(t[2].content);e=1),(!m||2048&o&&v!==(v=k("".concat(t[11].class||""," doc-node"))+" svelte-1un819s"))&&R(e,"class",v),(!m||2304&o)&&L(e,"root",t[8])},i(t){if(!m){for(let t=0;t{n(11,e=c(c({},e),_(t))),"node"in t&&n(12,d=t.node),"startPos"in t&&n(0,p=t.startPos),"depth"in t&&n(1,h=t.depth)},t.$$.update=()=>{4096&t.$$.dirty&&n(2,r=d.content),4096&t.$$.dirty&&n(7,i=u[d.type.name]),4096&t.$$.dirty&&n(6,o=d.isText&&d.marks.length>0?"".concat(d.type.name," - [").concat(d.marks.map(t=>t.type.name).join(", "),"]"):d.type.name),4097&t.$$.dirty&&n(5,s=Array(d.childCount).fill(void 0).reduce((t,e,n)=>{if(0===n)return[g?0:p+1];let r=t[n-1];return[...t,r+d.child(n-1).nodeSize]},[])),4097&t.$$.dirty&&n(4,l=p+d.nodeSize),4&t.$$.dirty&&n(3,a=r.content.every(t=>t.isInline))},e=_(e),[p,h,r,a,l,s,o,i,g,function(){f(d,p)},function(){f(d,p,!0)},e,d]}class r5 extends tg{constructor(t){super(),th(this,t,r3,r2,h,{node:12,startPos:0,depth:1},rX)}}let r6=["#EA7C7F","#67B0C6","#94BB7F","#CA9EDB","#DCDC5D","#B9CC7C","#DD97D8","#FFB761","#4D8FD1","#F36E98","#E45F44","#A6A4AE","#FCC047","#FFC129","#D3929C","#4CBCD4","#8D7BC0"];function r9(t){C(t,"svelte-is7zuw","ul.svelte-is7zuw{list-style:none;margin:0;padding:0}")}function r4(t){let e,n,r;return n=new r5({props:{class:t[1].class,node:t[0],startPos:0,depth:0}}),{c(){e=T("ul"),tf(n.$$.fragment),R(e,"class","svelte-is7zuw")},m(t,i){O(t,e,i),td(n,e,null),r=!0},p(t,e){let[r]=e,i={};2&r&&(i.class=t[1].class),1&r&&(i.node=t[0]),n.$set(i)},i(t){r||(ts(n.$$.fragment,t),r=!0)},o(t){tl(n.$$.fragment,t),r=!1},d(t){t&&E(e),tp(n)}}}function r7(t,e,n){let{doc:r,schema:i,selected:o={type:"",start:0,end:0},handleNodeSelect:s}=e;return V("doc-view",{selected:o,colors:Object.keys(i.nodes).reduce((t,e,n)=>{var r;let i,o=n>=r6.length?(i=n/(r=r6.length),Math.round(r*(i-Math.floor(i)))):n;return t[e]=r6[o],t},{}),handleNodeClick:s}),t.$$set=t=>{n(1,e=c(c({},e),_(t))),"doc"in t&&n(0,r=t.doc),"schema"in t&&n(2,i=t.schema),"selected"in t&&n(3,o=t.selected),"handleNodeSelect"in t&&n(4,s=t.handleNodeSelect)},e=_(e),[r,e,i,o,s]}class r8 extends tg{constructor(t){super(),th(this,t,r7,r4,h,{doc:0,schema:2,selected:3,handleNodeSelect:4},r9)}}function it(t){C(t,"svelte-15i66m0",".top-row.svelte-15i66m0{align-items:center;display:flex;justify-content:space-between}.right-panel[slot=right].svelte-15i66m0{border-left:1px solid rgba(255, 162, 177, 0.2);flex-grow:0;min-width:220px;width:220px}.split-view .m-top{margin-top:0.75em}")}function ie(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function ir(t){let e,n,r,i,o,s,l,a;return o=new nC({props:{class:"hidden",$$slots:{default:[ie]},$$scope:{ctx:t}}}),l=new r8({props:{class:"m-top",doc:t[0],schema:t[2],handleNodeSelect:t[3]}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Current doc",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","top-row svelte-15i66m0"),R(e,"slot","left"),R(e,"class","left-panel")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};256&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};1&e&&(r.doc=t[0]),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function ii(t){let e;return{c(){e=D("log")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function io(t){let e,n,r,i,o,s,l,a;return(o=new nC({props:{$$slots:{default:[ii]},$$scope:{ctx:t}}})).$on("click",t[4]),l=new nh({props:{class:"m-top",data:t[1],recursionOpts:{shouldExpandNode:il}}}),{c(){e=T("div"),n=T("div"),(r=T("h2")).textContent="Node info",i=N(),tf(o.$$.fragment),s=N(),tf(l.$$.fragment),R(n,"class","top-row svelte-15i66m0"),R(e,"slot","right"),R(e,"class","right-panel svelte-15i66m0")},m(t,c){O(t,e,c),j(e,n),j(n,r),j(n,i),td(o,n,null),j(e,s),td(l,e,null),a=!0},p(t,e){let n={};256&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);let r={};2&e&&(r.data=t[1]),l.$set(r)},i(t){a||(ts(o.$$.fragment,t),ts(l.$$.fragment,t),a=!0)},o(t){tl(o.$$.fragment,t),tl(l.$$.fragment,t),a=!1},d(t){t&&E(e),tp(o),tp(l)}}}function is(t){let e,n;return e=new nw({props:{$$slots:{right:[io],left:[ir]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};259&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}let il=t=>"array"!==t.type||t.value.length<=50;function ia(t,e,n){let r,i,{view:o}=H("editor-view"),s=o.state.doc,l={node:o.state.doc,pos:0},a=o.state.schema;return eW.subscribe(t=>{t&&(t.trs.forEach(t=>{n(5,l.pos=t.mapping.map(l.pos),l)}),clearTimeout(i),i=setTimeout(()=>{n(0,s=t.state.doc);let e=l.pos;try{let t=s.nodeAt(e);n(5,l={node:t||s,pos:t?e:0})}catch(t){}},100))}),t.$$.update=()=>{32&t.$$.dirty&&n(1,r=l.node.toJSON())},[s,r,a,function(t,e){var r;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n(5,l={node:t,pos:e}),!i)return;let s=o.nodeDOM(e);for(;s&&!(s instanceof HTMLElement);)s=s.parentElement;if(!s||"none"===getComputedStyle(s).display)return;let a=function t(e){return e&&e!==document.body?e.scrollHeight!==e.clientHeight?e:t(e.parentElement):void 0}(o.dom);if(a){let t=a.scrollTop,e=a.offsetTop-window.scrollY,n=a.getBoundingClientRect().top-e,r=s.getBoundingClientRect().top-e,i=a.clientHeight/2;a.scroll(0,t+n+r-i)}let c=o.coordsAtPos(e).top,u=(null==(r=document.querySelector(".floating-dock"))?void 0:r.clientHeight)||0;window.scroll(0,c-u+s.clientHeight+window.scrollY)},function(){console.log(l),window._node=l,console.info("%c [prosemirror-dev-toolkit]: Property added to window._node","color: #b8e248")},l]}class ic extends tg{constructor(t){super(),th(this,t,ia,is,h,{},it)}}function iu(t){C(t,"svelte-969ox4","ul.svelte-969ox4.svelte-969ox4{color:#fff;list-style:none;margin:0;padding:0;height:100%;width:100%}li.svelte-969ox4+li.svelte-969ox4{border-top:1px solid rgb(96, 76, 104)}li.svelte-969ox4.svelte-969ox4{align-items:center;display:flex;font-family:monospace;padding:6px 18px}input.svelte-969ox4.svelte-969ox4{background:transparent;border:0;color:#fff;height:100%;margin:0;padding:2px;width:100%}.unstyled-btn.svelte-969ox4.svelte-969ox4{background:transparent;border:0;color:#fff;cursor:pointer;display:block;font-family:monospace;margin:0;padding:0;text-align:start;width:100%}.snapshot-btn.svelte-969ox4.svelte-969ox4{background:transparent;border:0;border-radius:3px;color:#d3d3d9;cursor:pointer;display:flex;font-size:11px;padding:6px 18px;text-transform:uppercase}.snapshot-btn.svelte-969ox4.svelte-969ox4:hover{background:rgba(255, 162, 177, 0.4);color:#fff}.ml-2.svelte-969ox4.svelte-969ox4{margin-left:1rem}")}function id(t,e,n){let r=t.slice();return r[23]=e[n],r}function ip(t){let e,n,r,i,o=t[23].name+"";function s(){return t[16](t[23])}return{c(){e=T("button"),n=D(o),R(e,"class","unstyled-btn svelte-969ox4"),R(e,"aria-label","Edit snapshot name button")},m(t,o){O(t,e,o),j(e,n),r||(i=M(e,"dblclick",s),r=!0)},p(e,r){t=e,1&r&&o!==(o=t[23].name+"")&&I(n,o)},d(t){t&&E(e),r=!1,i()}}}function ih(t){let e,n,r,i;return{c(){(e=T("input")).value=n=t[2].name,R(e,"class","svelte-969ox4")},m(n,o){O(n,e,o),r||(i=[M(e,"input",t[5]),M(e,"keypress",t[6])],r=!0)},p(t,r){4&r&&n!==(n=t[2].name)&&e.value!==n&&(e.value=n)},d(t){t&&E(e),r=!1,d(i)}}}function ig(t){let e;return{c(){e=D("Show")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function iv(t){let e;return{c(){e=D("Hide")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function im(t){let e;return{c(){e=D("Delete")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function iy(t){let e;return{c(){e=D("Confirm Delete")},m(t,n){O(t,e,n)},d(t){t&&E(e)}}}function ib(t){let e,n,r,i,o,s,l,a,c,u,f,p;function h(t,e){return t[2]&&t[2].timestamp===t[23].timestamp?ih:ip}let g=h(t),v=g(t);function m(t,e){var n;return(null==(n=t[1])?void 0:n.timestamp)===t[23].timestamp?iv:ig}let y=m(t),b=y(t);function x(){return t[17](t[23])}function $(){return t[18](t[23])}function w(){return t[19](t[23])}function _(t,e){var n;return(null==(n=t[3])?void 0:n.timestamp)===t[23].timestamp?iy:im}let k=_(t),C=k(t);function S(){return t[20](t[23])}return{c(){e=T("li"),v.c(),n=N(),r=T("button"),b.c(),i=N(),(o=T("button")).textContent="Restore",s=N(),(l=T("button")).textContent="Export",a=N(),c=T("button"),C.c(),u=N(),R(r,"class","snapshot-btn ml-2 svelte-969ox4"),R(o,"class","snapshot-btn svelte-969ox4"),R(l,"class","snapshot-btn svelte-969ox4"),R(c,"class","snapshot-btn svelte-969ox4"),R(e,"class","svelte-969ox4")},m(t,d){O(t,e,d),v.m(e,null),j(e,n),j(e,r),b.m(r,null),j(e,i),j(e,o),j(e,s),j(e,l),j(e,a),j(e,c),C.m(c,null),j(e,u),f||(p=[M(r,"click",x),M(o,"click",$),M(l,"click",w),M(c,"click",S)],f=!0)},p(i,o){g===(g=h(t=i))&&v?v.p(t,o):(v.d(1),(v=g(t)).c(),v.m(e,n)),y!==(y=m(t))&&(b.d(1),(b=y(t)).c(),b.m(r,null)),k!==(k=_(t))&&(C.d(1),(C=k(t)).c(),C.m(c,null))},d(t){t&&E(e),v.d(),b.d(),C.d(),f=!1,d(p)}}}function ix(t){let e,n=ta(t[0]),r=[];for(let e=0;e{"snapshots"in t&&n(0,s=t.snapshots),"selectedSnapshot"in t&&n(1,l=t.selectedSnapshot),"onUpdate"in t&&n(11,a=t.onUpdate),"onView"in t&&n(12,c=t.onView),"onRestore"in t&&n(13,u=t.onRestore),"onExport"in t&&n(14,f=t.onExport),"onDelete"in t&&n(15,d=t.onDelete)},[s,l,r,i,p,function(t){r&&(n(2,r.name=t.currentTarget.value,r),clearTimeout(o),o=setTimeout(()=>{a(r)},150))},function(t){"Enter"===t.key&&r&&(a(r),clearTimeout(o),n(2,r=void 0),n(3,i=void 0))},h,g,v,m,a,c,u,f,d,t=>p(t),t=>h(t),t=>g(t),t=>v(t),t=>m(t)]}class iw extends tg{constructor(t){super(),th(this,t,i$,ix,h,{snapshots:0,selectedSnapshot:1,onUpdate:11,onView:12,onRestore:13,onExport:14,onDelete:15},iu)}}function i_(t){C(t,"svelte-3jdj5c",".right-panel[slot=right].svelte-3jdj5c{padding:0}.no-snapshots.svelte-3jdj5c{align-items:center;color:rgb(255, 162, 177);display:flex;font-size:14px;height:100%;justify-content:center;width:100%}")}function ik(t){let e,n;return e=new iw({props:{snapshots:t[0],selectedSnapshot:t[1],onUpdate:tT,onView:t[4],onRestore:t[3],onExport:tD,onDelete:tN}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};1&n&&(r.snapshots=t[0]),2&n&&(r.selectedSnapshot=t[1]),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function ij(t){let e;return{c(){(e=T("div")).textContent='Save snapshots by clicking "Save" button.',R(e,"class","no-snapshots svelte-3jdj5c")},m(t,n){O(t,e,n)},p:a,i:a,o:a,d(t){t&&E(e)}}}function iC(t){let e,n,r,i,o=[ij,ik],s=[];function l(t,e){return+(0!==t[0].length)}return r=s[n=l(t)]=o[n](t),{c(){e=T("div"),r.c(),R(e,"slot","right"),R(e,"class","right-panel svelte-3jdj5c")},m(t,r){O(t,e,r),s[n].m(e,null),i=!0},p(t,i){let a=n;(n=l(t))===a?s[n].p(t,i):(ti(),tl(s[a],1,1,()=>{s[a]=null}),to(),(r=s[n])?r.p(t,i):(r=s[n]=o[n](t)).c(),ts(r,1),r.m(e,null))},i(t){i||(ts(r),i=!0)},o(t){tl(r),i=!1},d(t){t&&E(e),s[n].d()}}}function iO(t){let e,n;return e=new nw({props:{$$slots:{right:[iC]},$$scope:{ctx:t}}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let[r]=n,i={};35&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iE(t,e,n){let r,i;m(t,t_,t=>n(0,r=t)),m(t,tk,t=>n(1,i=t));let{view:o}=H("editor-view");return[r,i,o,function(t){tq(o,t),eZ()},t=>(function(t,e){if(e)v(tj)||tj.set(t.state),tE(t,e.doc);else{let e=v(tj);e?t.updateState(e):console.error("No previous state to restore!"),tj.set(void 0)}tk.set(e)})(o,t)]}class iS extends tg{constructor(t){super(),th(this,t,iE,iO,h,{},i_)}}function iT(t){C(t,"svelte-1quf800",".floating-dock-wrapper.svelte-1quf800{position:fixed;width:0px;height:0px;top:0px;left:0px;z-index:99999999}.floating-dock.svelte-1quf800{background-color:#363755;position:fixed;z-index:1;box-shadow:rgba(34, 34, 34, 0.3) 0px 0px 4px 0px;left:0px;top:50%;width:100%;height:50%}.resizing-div.svelte-1quf800{position:absolute;z-index:2;opacity:0;top:-5px;height:10px;left:0px;width:100%;cursor:row-resize}.floating-dock-body.svelte-1quf800{height:100%}button.svelte-1quf800{background:rgba(255, 162, 177, 0.6);border:0;border-radius:3px;color:#fff;cursor:pointer;font-size:12px;height:24px;line-height:25px;padding:0 6px;position:absolute}button.svelte-1quf800:hover{background:rgba(255, 162, 177, 0.8)}.copy-btn.svelte-1quf800{right:173px;top:-28px}.save-btn.svelte-1quf800{right:129px;top:-28px}.import-btn.svelte-1quf800{right:79px;top:-28px}.paste-btn.svelte-1quf800{right:32px;top:-28px}.close-btn.svelte-1quf800{font-size:var(--font-medium);right:4px;top:-28px;width:24px}")}function iq(t){let e;return{c(){(e=T("p")).textContent="nuting here"},m(t,n){O(t,e,n)},i:a,o:a,d(t){t&&E(e)}}}function iD(t){let e,n;return e=new iS({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iN(t){let e,n;return e=new ic({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iA(t){let e,n;return e=new rZ({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iM(t){let e,n;return e=new rV({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iR(t){let e,n;return e=new rO({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iP(t){let e,n;return e=new nP({}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iI(t){let e,n,r,i,o,s,l,a,c,u,f,h,g,v,m,y,b,x,$,w,_,k,C,S,q,D,A,P;(n=new tI({props:{isOpen:t[5]}})).$on("submit",t[12]),n.$on("close",t[11]),_=new tF({props:{onClickTab:t[14],active:t[1]}});let I=[iP,iR,iM,iA,iN,iD,iq],z=[];function L(t,e){return"state"===t[1]?0:"history"===t[1]?1:"plugins"===t[1]?2:"schema"===t[1]?3:"structure"===t[1]?4:"snapshots"===t[1]?5:6}return S=z[C=L(t)]=I[C](t),{c(){e=T("div"),tf(n.$$.fragment),r=N(),i=T("div"),o=T("div"),s=N(),l=T("div"),a=T("div"),(c=T("button")).textContent="Copy",u=N(),(f=T("button")).textContent="Save",h=N(),(g=T("button")).textContent="Import",v=N(),(m=T("button")).textContent="Paste",y=N(),(b=T("button")).textContent="X",x=N(),$=T("input"),w=N(),tf(_.$$.fragment),k=N(),S.c(),R(o,"class","resizing-div svelte-1quf800"),R(o,"role","button"),R(o,"tabindex","-1"),R(c,"class","copy-btn svelte-1quf800"),R(f,"class","save-btn svelte-1quf800"),R(g,"class","import-btn svelte-1quf800"),R(m,"class","paste-btn svelte-1quf800"),R(b,"class","close-btn svelte-1quf800"),R(b,"aria-label","Close dev-toolkit"),$.style.setProperty("display","none",""),R($,"type","file"),R($,"accept",".json"),$.multiple=!0,R(l,"class","floating-dock-body svelte-1quf800"),R(i,"class","floating-dock svelte-1quf800"),R(i,"style",q="top: ".concat(t[2],"%; height: ").concat(t[3],"%;")),R(e,"class","floating-dock-wrapper svelte-1quf800")},m(d,E){O(d,e,E),td(n,e,null),j(e,r),j(e,i),j(i,o),j(i,s),j(i,l),j(l,a),j(a,c),j(a,u),j(a,f),j(a,h),j(a,g),j(a,v),j(a,m),j(a,y),j(a,b),j(l,x),j(l,$),t[15]($),j(l,w),td(_,l,null),j(l,k),z[C].m(l,null),D=!0,A||(P=[M(o,"mousedown",t[6]),M(c,"click",t[7]),M(f,"click",t[8]),M(g,"click",t[9]),M(m,"click",t[10]),M(b,"click",function(){p(t[0])&&t[0].apply(this,arguments)}),M($,"change",t[13])],A=!0)},p(e,r){let[o]=r;t=e;let s={};32&o&&(s.isOpen=t[5]),n.$set(s);let a={};2&o&&(a.active=t[1]),_.$set(a);let c=C;(C=L(t))!==c&&(ti(),tl(z[c],1,1,()=>{z[c]=null}),to(),(S=z[C])||(S=z[C]=I[C](t)).c(),ts(S,1),S.m(l,null)),(!D||12&o&&q!==(q="top: ".concat(t[2],"%; height: ").concat(t[3],"%;")))&&R(i,"style",q)},i(t){D||(ts(n.$$.fragment,t),ts(_.$$.fragment,t),ts(S),D=!0)},o(t){tl(n.$$.fragment,t),tl(_.$$.fragment,t),tl(S),D=!1},d(r){r&&E(e),tp(n),t[15](null),tp(_),z[C].d(),A=!1,d(P)}}}function iz(t,e,n){let{onClose:r}=e,{view:i}=H("editor-view"),o="state",s=50,l=50,a,c=!1;function u(t){t.preventDefault(),n(2,s=100*t.clientY/window.innerHeight),n(3,l=100*(1-t.clientY/window.innerHeight))}function f(t){t.preventDefault(),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)}return B().$$.on_destroy.push(()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)}),t.$$set=t=>{"onClose"in t&&n(0,r=t.onClose)},[r,o,s,l,a,c,function(){document.addEventListener("mousemove",u),document.addEventListener("mouseup",f)},function(){navigator.clipboard.writeText(JSON.stringify(i.state.doc.toJSON()))},function(){let t=prompt("Enter snapshot name",new Date().toLocaleString("sv"));t&&tS(t,i.state.doc.toJSON())},function(){a.click()},function(){n(5,c=!c)},function(){n(5,c=!1)},function(t){tq(i,tS(new Date().toLocaleString("sv"),t.detail.doc)),n(5,c=!1)},function(t){Array.from(t.currentTarget.files||[]).forEach(t=>{let e=new FileReader;e.readAsText(t),e.onload=e=>{var n,r,o;let s="string"==typeof(null==(n=e.target)?void 0:n.result)?null==(r=e.target)?void 0:r.result:"";try{let e,n,r=JSON.parse(s);if(!r||"object"!=typeof r)throw Error("Imported snapshot was not a JSON object"+r);o=t.name.slice(0,t.name.lastIndexOf(".")),e=i.state.schema.nodeFromJSON(r),n={name:o,timestamp:Date.now(),doc:e.toJSON()},t_.update(t=>[n,...t])}catch(t){console.error("Failed to import snapshot: "+t)}}})},function(t){n(1,o=t)},function(t){J[t?"unshift":"push"](()=>{n(4,a=t)})}]}class iL extends tg{constructor(t){super(),th(this,t,iz,iI,h,{onClose:0},iT)}}function iB(t){C(t,"svelte-pr6kw9",'.dev-tools.svelte-pr6kw9{font-family:var(--font-sans);font-size:var(--font-medium);font-weight:400;--font-sans:Helvetica Neue, Calibri Light, Roboto, sans-serif;--font-small:11px;--font-medium:13px;--font-large:16px;--height-tabs-menu:48px;--tree-view-font-family:"Helvetica Neue", "Calibri Light", Roboto, sans-serif;--tree-view-font-size:13px;--tree-view-left-indent:0.875em;--tree-view-line-height:1.1;--tree-view-key-margin-right:0.5em;--tree-view-base00:#363755;--tree-view-base01:#604d49;--tree-view-base02:#6d5a55;--tree-view-base03:#d1929b;--tree-view-base04:#b79f8d;--tree-view-base05:#f9f8f2;--tree-view-base06:#f7f4f1;--tree-view-base07:#faf8f5;--tree-view-base08:#fa3e7e;--tree-view-base09:#fd993c;--tree-view-base0A:#f6bf81;--tree-view-base0B:#b8e248;--tree-view-base0C:#b4efe4;--tree-view-base0D:#85d9ef;--tree-view-base0E:#be87ff;--tree-view-base0F:#d6724c}.dev-tools.svelte-pr6kw9 .svelte-tree-view *{box-sizing:border-box}.dev-tools.svelte-pr6kw9 .hidden{opacity:0;visibility:hidden}')}function iF(t){let e,n;return(e=new tb({props:{buttonPosition:t[1]}})).$on("click",t[2]),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p(t,n){let r={};2&n&&(r.buttonPosition=t[1]),e.$set(r)},i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iU(t){let e,n;return e=new iL({props:{onClose:t[3]}}),{c(){tf(e.$$.fragment)},m(t,r){td(e,t,r),n=!0},p:a,i(t){n||(ts(e.$$.fragment,t),n=!0)},o(t){tl(e.$$.fragment,t),n=!1},d(t){tp(e,t)}}}function iV(t){let e,n,r,i,o=[iU,iF],s=[];return r=s[n=+!t[0]]=o[n](t),{c(){e=T("section"),r.c(),R(e,"class","dev-tools svelte-pr6kw9")},m(t,r){O(t,e,r),s[n].m(e,null),i=!0},p(t,i){let[l]=i,a=n;(n=+!t[0])===a?s[n].p(t,l):(ti(),tl(s[a],1,1,()=>{s[a]=null}),to(),(r=s[n])?r.p(t,l):(r=s[n]=o[n](t)).c(),ts(r,1),r.m(e,null))},i(t){i||(ts(r),i=!0)},o(t){tl(r),i=!1},d(t){t&&E(e),s[n].d()}}}function iH(t,e,n){let{view:r,devToolsExpanded:i=!1,buttonPosition:o="bottom-right"}=e;return V("editor-view",{view:r,execCmd(t){t(r.state,r.dispatch)},replaceEditorContent(t){let e=r.state.tr;e.replaceWith(0,r.state.doc.nodeSize-2,t.doc.content),r.dispatch(e)}}),F(()=>{let t=document&&document.querySelector("html");i&&t&&(t.style.paddingBottom="341px")}),t.$$set=t=>{"view"in t&&n(4,r=t.view),"devToolsExpanded"in t&&n(0,i=t.devToolsExpanded),"buttonPosition"in t&&n(1,o=t.buttonPosition)},[i,o,function(){n(0,i=!0);let t=document&&document.querySelector("html");t&&(t.style.paddingBottom="341px")},function(){n(0,i=!1);let t=document&&document.querySelector("html");t&&(t.style.paddingBottom="")},r]}class iK extends tg{constructor(t){super(),th(this,t,iH,iV,h,{view:4,devToolsExpanded:0,buttonPosition:1},iB)}}let iG=!1,iJ,iY="__prosemirror-dev-toolkit__";class iW extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"});this.addEventListener("init-dev-toolkit",e=>{let{detail:{view:n,opts:r}}=e;this.component=new iK({target:t,props:Object.assign({view:n},r)})})}disconnectedCallback(){var t;null==(t=this.component)||t.$destroy()}}function iQ(t,e={}){var n;let i,o,a,c=((o=document.querySelector(`.${iY}`))||((o=document.createElement("div")).className=iY,document.body.appendChild(o)),o);if(iZ(),t.isDestroyed)return;let{disableWebComponent:u}=e,f=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);ie.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}(e,["disableWebComponent"]);if(u)i=new iK({target:c,props:Object.assign({view:t},f)});else{let e=document.createElement("prosemirror-dev-toolkit");e.dispatchEvent(new CustomEvent("init-dev-toolkit",{detail:{view:t,opts:f}})),c.appendChild(e)}"u">typeof window&&(window.editorView=t,window.pmCmd=e=>e(t.state,t.dispatch,t));let d=t.destroy.bind(t);t.destroy=()=>{iZ(),d()},iG=!0,a=null==(n=(t.props||t._props).dispatchTransaction)?void 0:n.bind(t),t.setProps({dispatchTransaction:e=>{let n=t.state,r=t.state.applyTransaction(e);if(a){let n=t.state.applyTransaction.bind(t.state);t.state.applyTransaction=function(i){return i!==e?(t.state.applyTransaction=n,Reflect.apply(n,t.state,arguments)):r},a(e)}else t.updateState(r.state);iG&&r.transactions.length>0&&function(t,e,n){let r=v(eJ),i=v(eY)[0],o=function(t,e,n,r){var i,o,a,c;let u,f=s.DOMSerializer.fromSchema(e.schema),d=e.selection,p=f.serializeFragment(d.content().content),h=[];if(p){let t=p.firstChild;for(;t;)h.push(t.outerHTML),t=t.nextSibling}let g=r?r.state:n,v=(i=g.doc.toJSON(),o=e.doc.toJSON(),eU.diff(i,o)),m=(a=eH(g.selection),c=eH(e.selection),eU.diff(a,c));return{id:Math.random().toString()+Math.random().toString(),state:e,trs:t.map(t=>Object.keys(t).concat(eV).reduce((e,n)=>(e[n]=t[n],e),{})),timestamp:t[0].time,timeStr:[eK((u=new Date(t[0].time)).getHours()),eK(u.getMinutes()),eK(u.getSeconds()),("000"+u.getMilliseconds()).slice(-3)].join(":"),contentDiff:v,selectionDiff:m,selectionHtml:(0,l.prettyPrint)(h.join("\n"),{max_char:60,indent_size:2}).replace(//g,">").replace(eG,"$&")}}(t,e,n,r.get((null==i?void 0:i.topEntryId)||""));eJ.update(t=>new Map(t.set(o.id,o))),eW.set(o);let a=!o.contentDiff;if((null==i?void 0:i.isGroup)&&a){let t={id:i.id,isGroup:a,entryIds:[o.id,...i.entryIds],topEntryId:o.id,expanded:i.expanded};eY.update(e=>[t,...e.slice(1)])}else{let t=v(eQ)+1,e={id:t,isGroup:a,entryIds:[o.id],topEntryId:o.id,expanded:!1};eY.update(t=>[e,...t]),eQ.set(t)}}(r.transactions,t.state,n)}}),iJ=()=>t.setProps({dispatchTransaction:a}),r=()=>{eZ(),iG=!1,iJ&&iJ(),iJ=void 0,null==i||i.$destroy();let t=c.firstChild;t&&c.removeChild(t)}}function iZ(){r&&r(),r=void 0}customElements.get("prosemirror-dev-toolkit")||customElements.define("prosemirror-dev-toolkit",iW),"u">typeof window&&(window.applyDevTools=iQ),t.s(["applyDevTools",()=>iQ,"removeDevTools",()=>iZ],992649)}]); //# sourceMappingURL=048e64fb45e8bd41.js.map