diff --git a/_app/immutable/assets/_page-3d9cf6f0.css b/_app/immutable/assets/_page-3d9cf6f0.css new file mode 100644 index 00000000..a4bb7a52 --- /dev/null +++ b/_app/immutable/assets/_page-3d9cf6f0.css @@ -0,0 +1 @@ +#menu-toggle.svelte-1a0ole0:checked+#menu.svelte-1a0ole0{display:block}.navbar.svelte-1a0ole0.svelte-1a0ole0{z-index:10000}img.svelte-1a0ole0.svelte-1a0ole0{height:1.5rem;width:1.5rem}.icon.svelte-1qkpo3v{transition-duration:.5s}.isOpen.svelte-1qkpo3v{transform:rotate(90deg)}#resizeHandler.svelte-1fge7im{cursor:col-resize;padding:0 2px}#resizeHandler.svelte-1fge7im:after{background-color:hsla(var(--b3));content:"";height:100%;margin-left:-1px;position:absolute;top:0;transition-duration:.2s;width:2px}#resizeHandler.svelte-1fge7im:hover:after{background-color:hsla(var(--p));margin-left:-2px;width:4px} diff --git a/_app/immutable/chunks/0-ad31fce8.js b/_app/immutable/chunks/0-ad31fce8.js new file mode 100644 index 00000000..095c7676 --- /dev/null +++ b/_app/immutable/chunks/0-ad31fce8.js @@ -0,0 +1 @@ +import{_ as r}from"./_layout-1224cfc9.js";import{default as t}from"../components/pages/_layout.svelte-dd1ecc06.js";export{t as component,r as universal}; diff --git a/_app/immutable/chunks/1-d5c935f1.js b/_app/immutable/chunks/1-d5c935f1.js new file mode 100644 index 00000000..7ebb8910 --- /dev/null +++ b/_app/immutable/chunks/1-d5c935f1.js @@ -0,0 +1 @@ +import{default as t}from"../components/error.svelte-dc092e54.js";export{t as component}; diff --git a/_app/immutable/chunks/2-22b06e9c.js b/_app/immutable/chunks/2-22b06e9c.js new file mode 100644 index 00000000..ba4b0aec --- /dev/null +++ b/_app/immutable/chunks/2-22b06e9c.js @@ -0,0 +1 @@ +import{default as t}from"../components/pages/_page.svelte-a70c02e6.js";export{t as component}; diff --git a/_app/immutable/chunks/3-484f0d31.js b/_app/immutable/chunks/3-484f0d31.js new file mode 100644 index 00000000..66f12df0 --- /dev/null +++ b/_app/immutable/chunks/3-484f0d31.js @@ -0,0 +1 @@ +import{default as t}from"../components/pages/edit/_page.svelte-a983d7e7.js";export{t as component}; diff --git a/_app/immutable/chunks/4-dacf120e.js b/_app/immutable/chunks/4-dacf120e.js new file mode 100644 index 00000000..4d2350b0 --- /dev/null +++ b/_app/immutable/chunks/4-dacf120e.js @@ -0,0 +1 @@ +import{default as t}from"../components/pages/view/_page.svelte-606950c2.js";export{t as component}; diff --git a/_app/immutable/chunks/View-c7762dc8.js b/_app/immutable/chunks/View-c7762dc8.js new file mode 100644 index 00000000..10e2ea0f --- /dev/null +++ b/_app/immutable/chunks/View-c7762dc8.js @@ -0,0 +1,3 @@ +import{S as st,i as rt,s as at,a as lt,k as T,c as ut,l as _,m as k,h as b,n as C,P as N,b as E,I as q,L as W,H,o as ht,a3 as ct,v as X,q as D,r as I,a4 as pt,e as F,a5 as ft}from"./index-e871a861.js";import{s as j,j as Y,z as mt,y as K,x as dt,b as vt}from"./state-96b4af81.js";import{c as J}from"./_commonjsHelpers-35101cd5.js";var gt=function(){var t="",e,o,i,s=[],n={passive:!0};window.addEventListener?(e="addEventListener",o="removeEventListener"):(e="attachEvent",o="detachEvent",t="on"),i="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";function r(m,u){var g=function(v){!v&&(v=window.event);var y={originalEvent:v,target:v.target||v.srcElement,type:"wheel",deltaMode:v.type=="MozMousePixelScroll"?0:1,deltaX:0,delatZ:0,preventDefault:function(){v.preventDefault?v.preventDefault():v.returnValue=!1}};return i=="mousewheel"?(y.deltaY=-.025*v.wheelDelta,v.wheelDeltaX&&(y.deltaX=-.025*v.wheelDeltaX)):y.deltaY=v.detail,u(y)};return s.push({element:m,fn:g}),g}function a(m){for(var u=0;ue?(clearTimeout(a),a=null,p=l,r=t.apply(s,n),a||(s=n=null)):!a&&o.trailing!==!1&&(a=setTimeout(w,f)),r}},createRequestAnimationFrame:function(t){var e=null;return t!=="auto"&&t<60&&t>1&&(e=Math.floor(1e3/t)),e===null?window.requestAnimationFrame||Q(33):Q(e)}};function Q(t){return function(e){window.setTimeout(e,t)}}var O=U,tt="unknown";document.documentMode&&(tt="ie");var G={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var o=null;if(O.isElement(e)?o=e:o=t.querySelector(e),!o){var i=Array.prototype.slice.call(t.childNodes||t.children).filter(function(p){return p.nodeName!=="defs"&&p.nodeName!=="#text"});i.length===1&&i[0].nodeName==="g"&&i[0].getAttribute("transform")===null&&(o=i[0])}if(!o){var s="viewport-"+new Date().toISOString().replace(/\D/g,"");o=document.createElementNS(this.svgNS,"g"),o.setAttribute("id",s);var n=t.childNodes||t.children;if(n&&n.length>0)for(var r=n.length;r>0;r--)n[n.length-r].nodeName!=="defs"&&o.appendChild(n[n.length-r]);t.appendChild(o)}var a=[];return o.getAttribute("class")&&(a=o.getAttribute("class").split(" ")),~a.indexOf("svg-pan-zoom_viewport")||(a.push("svg-pan-zoom_viewport"),o.setAttribute("class",a.join(" "))),o},setupSvgAttributes:function(t){if(t.setAttribute("xmlns",this.svgNS),t.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),t.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),t.parentNode!==null){var e=t.getAttribute("style")||"";e.toLowerCase().indexOf("overflow")===-1&&t.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:O.throttle(function(){for(var t=document.querySelectorAll("defs"),e=t.length,o=0;o=0;i--)this.eventListeners.hasOwnProperty(o[i])&&delete this.eventListeners[o[i]]}for(var s in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(s,this.eventListeners[s],this.options.preventMouseEventsDefault?!1:ot);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())};c.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var t=this;this.wheelListener=function(o){return t.handleMouseWheel(o)};var e=!this.options.preventMouseEventsDefault;et.on(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!0}};c.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var t=!this.options.preventMouseEventsDefault;et.off(this.options.eventsListenerElement||this.svg,this.wheelListener,t),this.options.mouseWheelZoomEnabled=!1}};c.prototype.handleMouseWheel=function(t){if(!(!this.options.zoomEnabled||this.state!=="none")){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1);var e=t.deltaY||1,o=Date.now()-this.lastMouseWheelEventTime,i=3+Math.max(0,30-o);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in t&&t.deltaMode===0&&t.wheelDelta&&(e=t.deltaY===0?0:Math.abs(t.wheelDelta)/t.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/i;var s=this.svg.getScreenCTM().inverse(),n=M.getEventPoint(t,this.svg).matrixTransform(s),r=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(r,n)}};c.prototype.zoomAtPoint=function(t,e,o){var i=this.viewport.getOriginalState();o?(t=Math.max(this.options.minZoom*i.zoom,Math.min(this.options.maxZoom*i.zoom,t)),t=t/this.getZoom()):this.getZoom()*tthis.options.maxZoom*i.zoom&&(t=this.options.maxZoom*i.zoom/this.getZoom());var s=this.viewport.getCTM(),n=e.matrixTransform(s.inverse()),r=this.svg.createSVGMatrix().translate(n.x,n.y).scale(t).translate(-n.x,-n.y),a=s.multiply(r);a.a!==s.a&&this.viewport.setCTM(a)};c.prototype.zoom=function(t,e){this.zoomAtPoint(t,M.getSvgCenterPoint(this.svg,this.width,this.height),e)};c.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)};c.prototype.publicZoomAtPoint=function(t,e,o){if(o&&(t=this.computeFromRelativeZoom(t)),x.getType(e)!=="SVGPoint")if("x"in e&&"y"in e)e=M.createSVGPoint(this.svg,e.x,e.y);else throw new Error("Given point is invalid");this.zoomAtPoint(t,e,o)};c.prototype.getZoom=function(){return this.viewport.getZoom()};c.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()};c.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom};c.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)};c.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())};c.prototype.reset=function(){this.resetZoom(),this.resetPan()};c.prototype.handleDblClick=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled){var e=t.target.getAttribute("class")||"";if(e.indexOf("svg-pan-zoom-control")>-1)return!1}var o;t.shiftKey?o=1/((1+this.options.zoomScaleSensitivity)*2):o=(1+this.options.zoomScaleSensitivity)*2;var i=M.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(o,i)};c.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),x.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&x.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=M.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))};c.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.state==="pan"&&this.options.panEnabled){var e=M.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),o=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(o)}};c.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.state==="pan"&&(this.state="none")};c.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)};c.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)};c.prototype.center=function(){var t=this.viewport.getViewBox(),e=(this.width-(t.width+t.x*2)*this.getZoom())*.5,o=(this.height-(t.height+t.y*2)*this.getZoom())*.5;this.getPublicInstance().pan({x:e,y:o})};c.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()};c.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)};c.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)};c.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}};c.prototype.resize=function(){var t=M.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())};c.prototype.destroy=function(){var t=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,this.options.customEventsHandler!=null&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var e in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],this.options.preventMouseEventsDefault?!1:ot);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),z=z.filter(function(o){return o.svg!==t.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}};c.prototype.getPublicInstance=function(){var t=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return t.options.panEnabled=!0,t.pi},disablePan:function(){return t.options.panEnabled=!1,t.pi},isPanEnabled:function(){return!!t.options.panEnabled},pan:function(e){return t.pan(e),t.pi},panBy:function(e){return t.panBy(e),t.pi},getPan:function(){return t.getPan()},setBeforePan:function(e){return t.options.beforePan=e===null?null:x.proxy(e,t.publicInstance),t.pi},setOnPan:function(e){return t.options.onPan=e===null?null:x.proxy(e,t.publicInstance),t.pi},enableZoom:function(){return t.options.zoomEnabled=!0,t.pi},disableZoom:function(){return t.options.zoomEnabled=!1,t.pi},isZoomEnabled:function(){return!!t.options.zoomEnabled},enableControlIcons:function(){return t.options.controlIconsEnabled||(t.options.controlIconsEnabled=!0,R.enable(t)),t.pi},disableControlIcons:function(){return t.options.controlIconsEnabled&&(t.options.controlIconsEnabled=!1,R.disable(t)),t.pi},isControlIconsEnabled:function(){return!!t.options.controlIconsEnabled},enableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!0,t.pi},disableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!1,t.pi},isDblClickZoomEnabled:function(){return!!t.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return t.enableMouseWheelZoom(),t.pi},disableMouseWheelZoom:function(){return t.disableMouseWheelZoom(),t.pi},isMouseWheelZoomEnabled:function(){return!!t.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return t.options.zoomScaleSensitivity=e,t.pi},setMinZoom:function(e){return t.options.minZoom=e,t.pi},setMaxZoom:function(e){return t.options.maxZoom=e,t.pi},setBeforeZoom:function(e){return t.options.beforeZoom=e===null?null:x.proxy(e,t.publicInstance),t.pi},setOnZoom:function(e){return t.options.onZoom=e===null?null:x.proxy(e,t.publicInstance),t.pi},zoom:function(e){return t.publicZoom(e,!0),t.pi},zoomBy:function(e){return t.publicZoom(e,!1),t.pi},zoomAtPoint:function(e,o){return t.publicZoomAtPoint(e,o,!0),t.pi},zoomAtPointBy:function(e,o){return t.publicZoomAtPoint(e,o,!1),t.pi},zoomIn:function(){return this.zoomBy(1+t.options.zoomScaleSensitivity),t.pi},zoomOut:function(){return this.zoomBy(1/(1+t.options.zoomScaleSensitivity)),t.pi},getZoom:function(){return t.getRelativeZoom()},setOnUpdatedCTM:function(e){return t.options.onUpdatedCTM=e===null?null:x.proxy(e,t.publicInstance),t.pi},resetZoom:function(){return t.resetZoom(),t.pi},resetPan:function(){return t.resetPan(),t.pi},reset:function(){return t.reset(),t.pi},fit:function(){return t.fit(),t.pi},contain:function(){return t.contain(),t.pi},center:function(){return t.center(),t.pi},updateBBox:function(){return t.updateBBox(),t.pi},resize:function(){return t.resize(),t.pi},getSizes:function(){return{width:t.width,height:t.height,realZoom:t.getZoom(),viewBox:t.viewport.getViewBox()}},destroy:function(){return t.destroy(),t.pi}}),this.publicInstance};var z=[],xt=function(t,e){var o=x.getSvg(t);if(o===null)return null;for(var i=z.length-1;i>=0;i--)if(z[i].svg===o)return z[i].instance.getPublicInstance();return z.push({svg:o,instance:new c(o,e)}),z[z.length-1].instance.getPublicInstance()},Mt=xt;function $(t){let e,o;function i(r,a){return r[2]?zt:Zt}let s=i(t),n=s(t);return{c(){e=T("div"),n.c(),this.h()},l(r){e=_(r,"DIV",{class:!0,id:!0});var a=k(e);n.l(a),a.forEach(b),this.h()},h(){C(e,"class",o="absolute w-full p-2 z-10 font-mono "+(t[2]?"text-red-600":"text-yellow-600")+" bg-base-100 bg-opacity-80 text-center"),C(e,"id","errorContainer")},m(r,a){E(r,e,a),n.m(e,null)},p(r,a){s===(s=i(r))&&n?n.p(r,a):(n.d(1),n=s(r),n&&(n.c(),n.m(e,null))),a&4&&o!==(o="absolute w-full p-2 z-10 font-mono "+(r[2]?"text-red-600":"text-yellow-600")+" bg-base-100 bg-opacity-80 text-center")&&C(e,"class",o)},d(r){r&&b(e),n.d()}}}function Zt(t){let e,o,i,s,n,r,a,p,w;return{c(){e=D("Diagram out of sync. "),o=T("br"),i=D(` + Press `),s=T("i"),n=D(" (Sync button) or "),r=T("kbd"),a=D(K),p=D(" + Enter"),w=D(" to sync."),this.h()},l(l){e=I(l,"Diagram out of sync. "),o=_(l,"BR",{}),i=I(l,` + Press `),s=_(l,"I",{class:!0}),k(s).forEach(b),n=I(l," (Sync button) or "),r=_(l,"KBD",{});var f=k(r);a=I(f,K),p=I(f," + Enter"),f.forEach(b),w=I(l," to sync."),this.h()},h(){C(s,"class","fas fa-sync")},m(l,f){E(l,e,f),E(l,o,f),E(l,i,f),E(l,s,f),E(l,n,f),E(l,r,f),q(r,a),q(r,p),E(l,w,f)},p:W,d(l){l&&b(e),l&&b(o),l&&b(i),l&&b(s),l&&b(n),l&&b(r),l&&b(w)}}}function zt(t){var s;let e,o=((s=t[5].error)==null?void 0:s.toString().replace(/\n/g,"
"))+"",i;return{c(){e=new pt(!1),i=F(),this.h()},l(n){e=ft(n,!1),i=F(),this.h()},h(){e.a=i},m(n,r){e.m(o,n,r),E(n,i,r)},p(n,r){var a;r&32&&o!==(o=((a=n[5].error)==null?void 0:a.toString().replace(/\n/g,"
"))+"")&&e.p(o)},d(n){n&&b(i),n&&e.d()}}}function Ct(t){let e,o,i,s=(t[2]&&t[5].error instanceof Error||t[3])&&$(t);return{c(){s&&s.c(),e=lt(),o=T("div"),i=T("div"),this.h()},l(n){s&&s.l(n),e=ut(n),o=_(n,"DIV",{id:!0,class:!0});var r=k(o);i=_(r,"DIV",{id:!0,class:!0}),k(i).forEach(b),r.forEach(b),this.h()},h(){C(i,"id","container"),C(i,"class","h-full overflow-auto svelte-1ewr4tw"),N(i,"hide",t[4]),C(o,"id","view"),C(o,"class","p-2 h-full svelte-1ewr4tw"),N(o,"error",t[2]),N(o,"outOfSync",t[3])},m(n,r){s&&s.m(n,r),E(n,e,r),E(n,o,r),q(o,i),t[6](i),t[7](o)},p(n,[r]){n[2]&&n[5].error instanceof Error||n[3]?s?s.p(n,r):(s=$(n),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),r&16&&N(i,"hide",n[4]),r&4&&N(o,"error",n[2]),r&8&&N(o,"outOfSync",n[3])},i:W,o:W,d(n){s&&s.d(n),n&&b(e),n&&b(o),t[6](null),t[7](null)}}}function Pt(t,e,o){let i,s;H(t,j,h=>o(5,i=h)),H(t,Y,h=>o(13,s=h));let n="",r="",a,p,w=!1,l=!1,f=!1,V=!0,m=i.panZoom,u;const g=()=>{if(!u)return;const h=u.getPan(),Z=u.getZoom();dt({pan:h,zoom:Z}),vt("panZoom")},v=h=>{h.panZoom&&(o(4,f=!0),u==null||u.destroy(),u=void 0,Promise.resolve().then(()=>{const Z=document.getElementById("graph-div");if(!Z)return;u=Mt(Z,{onPan:g,onZoom:g,controlIconsEnabled:!0,fit:!0,center:!0});const{pan:A,zoom:B}=h;A!==void 0&&B!==void 0&&Number.isFinite(B)&&(u.zoom(B),u.pan(A)),o(4,f=!1)}))},y=async h=>{if(h.error!==void 0){o(2,w=!0);return}o(2,w=!1);try{if(a&&h&&(h.updateDiagram||h.autoSync)){if(h.autoSync||ct(Y,s.updateDiagram=!1,s),o(3,l=!1),V=!0,n===h.code&&r===h.mermaid&&m===h.panZoom)return;n=h.code,r=h.mermaid,m=h.panZoom;const Z=p.parentElement.scrollTop;delete a.dataset.processed;const{svg:A,bindFunctions:B}=await mt(Object.assign({},JSON.parse(h.mermaid)),n,"graph-div");if(A.length>0){v(h),o(0,a.innerHTML=A,a),console.log({svg:A});const L=document.getElementById("graph-div");if(!L)throw new Error("graph-div not found");L.setAttribute("height","100%"),L.style.maxWidth="100%",B&&B(L)}o(1,p.parentElement.scrollTop=Z,p),o(2,w=!1)}else V?V=!1:(n!==h.code||r!==h.mermaid)&&o(3,l=!0)}catch(Z){console.error("view fail",Z),o(2,w=!0)}};ht(()=>{j.subscribe(h=>{y(h)}),window.addEventListener("resize",()=>{i.panZoom&&u&&u.resize()})});function it(h){X[h?"unshift":"push"](()=>{a=h,o(0,a)})}function nt(h){X[h?"unshift":"push"](()=>{p=h,o(1,p)})}return[a,p,w,l,f,i,it,nt]}class Dt extends st{constructor(e){super(),rt(this,e,Pt,Ct,at,{})}}export{Dt as V}; diff --git a/_app/immutable/chunks/index-e871a861.js b/_app/immutable/chunks/index-e871a861.js new file mode 100644 index 00000000..0e6556e7 --- /dev/null +++ b/_app/immutable/chunks/index-e871a861.js @@ -0,0 +1,4 @@ +function p(){}const ht=t=>t;function mt(t,e){for(const n in e)t[n]=e[n];return t}function tt(t){return t()}function U(){return Object.create(null)}function b(t){t.forEach(tt)}function q(t){return typeof t=="function"}function pt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let C;function Jt(t,e){return C||(C=document.createElement("a")),C.href=e,t===C.href}function gt(t){return Object.keys(t).length===0}function I(t,...e){if(t==null)return p;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Kt(t){let e;return I(t,n=>e=n)(),e}function Qt(t,e,n){t.$$.on_destroy.push(I(e,n))}function Ut(t,e,n,i){if(t){const r=et(t,e,n,i);return t[0](r)}}function et(t,e,n,i){return t[1]&&i?mt(n.ctx.slice(),t[1](i(e))):n.ctx}function Vt(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const u=[],c=Math.max(e.dirty.length,r.length);for(let s=0;s32){const e=[],n=t.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),W=nt?t=>requestAnimationFrame(t):p;const E=new Set;function it(t){E.forEach(e=>{e.c(t)||(E.delete(e),e.f())}),E.size!==0&&W(it)}function bt(t){let e;return E.size===0&&W(it),{promise:new Promise(n=>{E.add(e={c:t,f:n})}),abort(){E.delete(e)}}}let D=!1;function $t(){D=!0}function xt(){D=!1}function wt(t,e,n,i){for(;t>1);n(r)<=i?t=r+1:e=r}return t}function vt(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const o=[];for(let l=0;l0&&e[n[r]].claim_order<=l?r+1:wt(1,r,h=>e[n[h]].claim_order,l))-1;i[o]=n[_]+1;const f=_+1;n[f]=o,r=Math.max(f,r)}const u=[],c=[];let s=e.length-1;for(let o=n[r]+1;o!=0;o=i[o-1]){for(u.push(e[o-1]);s>=o;s--)c.push(e[s]);s--}for(;s>=0;s--)c.push(e[s]);u.reverse(),c.sort((o,l)=>o.claim_order-l.claim_order);for(let o=0,l=0;o=u[l].claim_order;)l++;const _=lt.removeEventListener(e,n,i)}function se(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function ce(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function le(t){return t===""?null:+t}function Ct(t){return Array.from(t.childNodes)}function ct(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function lt(t,e,n,i,r=!1){ct(t);const u=(()=>{for(let c=t.claim_info.last_index;c=0;c--){const s=t[c];if(e(s)){const o=n(s);return o===void 0?t.splice(c,1):t[c]=o,r?o===void 0&&t.claim_info.last_index--:t.claim_info.last_index=c,s}}return i()})();return u.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,u}function ot(t,e,n,i){return lt(t,r=>r.nodeName===e,r=>{const u=[];for(let c=0;cr.removeAttribute(c))},()=>i(e))}function oe(t,e,n){return ot(t,e,n,J)}function ue(t,e,n){return ot(t,e,n,st)}function Mt(t,e){return lt(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>K(e),!0)}function ae(t){return Mt(t," ")}function V(t,e,n){for(let i=n;i>>0}function Lt(t,e){const n={stylesheet:Nt(e),rules:{}};return H.set(t,n),n}function Y(t,e,n,i,r,u,c,s=0){const o=16.666/i;let l=`{ +`;for(let y=0;y<=1;y+=o){const $=e+(n-e)*u(y);l+=y*100+`%{${c($,1-$)}} +`}const _=l+`100% {${c(n,1-n)}} +}`,f=`__svelte_${Ht(_)}_${s}`,h=rt(t),{stylesheet:a,rules:d}=H.get(h)||Lt(h,t);d[f]||(d[f]=!0,a.insertRule(`@keyframes ${f} ${_}`,a.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${f} ${i}ms linear ${r}ms 1 both`,L+=1,f}function Pt(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?u=>u.indexOf(e)<0:u=>u.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),L-=r,L||qt())}function qt(){W(()=>{L||(H.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&T(e)}),H.clear())})}let S;function A(t){S=t}function Q(){if(!S)throw new Error("Function called outside component initialization");return S}function ge(t){Q().$$.on_mount.push(t)}function ye(t){Q().$$.after_update.push(t)}function be(){const t=Q();return(e,n,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[e];if(r){const u=ut(e,n,{cancelable:i});return r.slice().forEach(c=>{c.call(t,u)}),!u.defaultPrevented}return!0}}function $e(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const v=[],Z=[],M=[],F=[],at=Promise.resolve();let G=!1;function ft(){G||(G=!0,at.then(_t))}function xe(){return ft(),at}function P(t){M.push(t)}function we(t){F.push(t)}const R=new Set;let x=0;function _t(){if(x!==0)return;const t=S;do{try{for(;x{N=null})),N}function B(t,e,n){t.dispatchEvent(ut(`${e?"intro":"outro"}${n}`))}const j=new Set;let g;function ve(){g={r:0,c:[],p:g}}function Ee(){g.r||b(g.c),g=g.p}function Ot(t,e){t&&t.i&&(j.delete(t),t.i(e))}function Ne(t,e,n,i){if(t&&t.o){if(j.has(t))return;j.add(t),g.c.push(()=>{j.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const Rt={duration:0};function Ae(t,e,n,i){const r={direction:"both"};let u=e(t,n,r),c=i?0:1,s=null,o=null,l=null;function _(){l&&Pt(t,l)}function f(a,d){const m=a.b-c;return d*=Math.abs(m),{a:c,b:a.b,d:m,duration:d,start:a.start,end:a.start+d,group:a.group}}function h(a){const{delay:d=0,duration:m=300,easing:y=ht,tick:$=p,css:z}=u||Rt,O={start:yt()+d,b:a};a||(O.group=g,g.r+=1),s||o?o=O:(z&&(_(),l=Y(t,c,a,m,d,y,z)),a&&$(0,1),s=f(O,m),P(()=>B(t,a,"start")),bt(k=>{if(o&&k>o.start&&(s=f(o,m),o=null,B(t,s.b,"start"),z&&(_(),l=Y(t,c,s.b,s.duration,0,y,u.css))),s){if(k>=s.end)$(c=s.b,1-c),B(t,s.b,"end"),o||(s.b?_():--s.group.r||b(s.group.c)),s=null;else if(k>=s.start){const dt=k-s.start;c=s.a+s.d*y(dt/s.duration),$(c,1-c)}}return!!(s||o)}))}return{run(a){q(u)?zt().then(()=>{u=u(r),h(a)}):h(a)},end(){_(),s=o=null}}}function Te(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Se(t){t&&t.c()}function ke(t,e){t&&t.l(e)}function Bt(t,e,n,i){const{fragment:r,after_update:u}=t.$$;r&&r.m(e,n),i||P(()=>{const c=t.$$.on_mount.map(tt).filter(q);t.$$.on_destroy?t.$$.on_destroy.push(...c):b(c),t.$$.on_mount=[]}),u.forEach(P)}function Ft(t,e){const n=t.$$;n.fragment!==null&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Gt(t,e){t.$$.dirty[0]===-1&&(v.push(t),ft(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const d=a.length?a[0]:h;return l.ctx&&r(l.ctx[f],l.ctx[f]=d)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](d),_&&Gt(t,f)),h}):[],l.update(),_=!0,b(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){$t();const f=Ct(e.target);l.fragment&&l.fragment.l(f),f.forEach(T)}else l.fragment&&l.fragment.c();e.intro&&Ot(t.$$.fragment),Bt(t,e.target,e.anchor,e.customElement),xt(),_t()}A(o)}class Me{$destroy(){Ft(this,1),this.$destroy=p}$on(e,n){if(!q(n))return p;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!gt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const w=[];function It(t,e){return{subscribe:Wt(t,e).subscribe}}function Wt(t,e=p){let n;const i=new Set;function r(s){if(pt(t,s)&&(t=s,n)){const o=!w.length;for(const l of i)l[1](),w.push(l,t);if(o){for(let l=0;l{i.delete(l),i.size===0&&(n(),n=null)}}return{set:r,update:u,subscribe:c}}function je(t,e,n){const i=!Array.isArray(t),r=i?[t]:t,u=e.length<2;return It(n,c=>{let s=!1;const o=[];let l=0,_=p;const f=()=>{if(l)return;_();const a=e(i?o[0]:o,c);u?c(a):_=q(a)?a:p},h=r.map((a,d)=>I(a,m=>{o[d]=m,l&=~(1<{l|=1<r)}function o(r){n=!1,t.set(r)}function s(r){let i;return t.subscribe(c=>{(i===void 0||n&&c!==i)&&r(i=c)})}return{notify:a,set:o,subscribe:s}}function b(){const{set:e,subscribe:t}=u(!1);let n;async function a(){clearTimeout(n);const o=await fetch(`${g}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(o.ok){const r=(await o.json()).version!==h;return r&&(e(!0),clearTimeout(n)),r}else throw new Error(`Version check failed: ${o.status}`)}return{subscribe:t,check:a}}function v(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let m;function U(e){m=e.client}const L={url:p({}),page:p({}),navigating:u(null),updated:b()};export{I,f as P,R as S,A as a,x as b,O as c,y as d,U as e,T as f,S as g,w as h,v as i,m as j,L as s}; diff --git a/_app/immutable/chunks/state-96b4af81.js b/_app/immutable/chunks/state-96b4af81.js new file mode 100644 index 00000000..7af2d33b --- /dev/null +++ b/_app/immutable/chunks/state-96b4af81.js @@ -0,0 +1,24 @@ +import{C as writable,J as derived,K as get_store_value}from"./index-e871a861.js";import{g as getDefaultExportFromCjs,c as commonjsGlobal}from"./_commonjsHelpers-35101cd5.js";import{_ as __vitePreload}from"./preload-helper-41c905a7.js";import{l as log}from"./transform-12111574.js";import{i as isDetailedError,u as utils,r as registerLazyLoadedDiagrams,l as loadRegisteredDiagrams}from"./utils-3cbdbddf-b0df7f51.js";import{m as mermaidAPI}from"./mermaidAPI-a1a81019-23aa79a7.js";import{u as unsafeStringify}from"./stringify-ec884b6d.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(e,r)=>{loadingStateStore.set({loading:!0,message:e});const t=await r;return loadingStateStore.set({loading:!1}),t};var bundle={};(function(exports){(()=>{var __webpack_modules__={607:(module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});var serializer_1=__webpack_require__(810),deserializer_1=__webpack_require__(496),Module;typeof process<"u"&&process.release&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function e(){}return e.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},e.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),e.originRequire=Module.prototype.require,Module.prototype.require=function(){var r=e.originRequire.apply(this,arguments),t=r.name;return e.requiredClasses[t]||(e.requiredClasses[t]=r),r})},e.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=e.originRequire,this.isRequireIntercepted=!1},e.isInterceptingRequire=function(){return this.isRequireIntercepted},e.getRequiredClasses=function(){return this.requiredClasses},e.clearRequiredClasses=function(){this.requiredClasses={}},e.registerClass=function(r){this.registeredClasses.push(r)},e.registerClasses=function(r){this.registeredClasses=this.registeredClasses.concat(r)},e.clearRegisteredClasses=function(){this.registeredClasses=[]},e.serialize=function(r,t){return t===void 0&&(t={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(r,t))},e.deserialize=function(r,t,a){return t===void 0&&(t=[]),a===void 0&&(a={}),deserializer_1.deserializeFromParsedObj(JSON.parse(r),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(t),a)},e.originRequire=null,e.isRequireIntercepted=!1,e.requiredClasses={},e.registeredClasses=[],e}();module.exports=ESSerializer},917:function(e,r){var t=this&&this.__spreadArrays||function(){for(var B=0,k=0,M=arguments.length;k{Object.defineProperty(r,"__esModule",{value:!0}),r.isClass=r.notObject=r.getValueFromToStringResult=void 0,r.notObject=function(t){return t===null||typeof t!="object"},r.getValueFromToStringResult=function(t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},r.isClass=function(t){if(function(a){return[Date].indexOf(a)>=0}(t))return!0;try{Reflect.construct(String,[],t)}catch{return!1}return!0}},810:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getSerializeValueWithClassName=void 0;var a=t(917),n=t(821);function o(s,f){f===void 0&&(f={});var l=function(g){var _,w,L;return g===void 0?((_={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_UNDEFINED,_):typeof g!="number"||isFinite(g)?typeof g=="bigint"?((L={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_BIG_INT,L[a.TO_STRING_FIELD]=g.toString(),L):n.notObject(g)?g:a.ESSERIALIZER_NULL:((w={})[a.CLASS_NAME_FIELD]=a.BUILTIN_TYPE_NOT_FINITE,w[a.TO_STRING_FIELD]=g.toString(),w)}(s);if(l!==a.ESSERIALIZER_NULL)return l;if(Array.isArray(s))return c(s);var d={};if(!function(g){var _=g.__proto__.constructor.name;return a.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(_)}(s)){if(f.ignoreProperties&&f.ignoreProperties.forEach(function(g){delete s[g]}),f.interceptProperties)for(var A in f.interceptProperties)s[A]=f.interceptProperties[A].call(s,s[A]);(function(g,_){for(var w in g)typeof g[w]!="function"&&(_[w]=o(g[w]))})(s,d)}return function(g,_){var w=g.__proto__.constructor.name;return w==="Object"&&(w=g.constructor.name),w!=="Object"&&(_[a.CLASS_NAME_FIELD]=w,w===a.BUILTIN_CLASS_ARRAYBUFFER||w===a.BUILTIN_CLASS_SHAREDARRAYBUFFER?_[a.ARRAY_FIELD]=c(Array.from(new Uint8Array(g))):w===a.BUILTIN_CLASS_BOOLEAN?_[a.BOOLEAN_FIELD]=g.valueOf():w===a.BUILTIN_CLASS_DATAVIEW?_[a.ARRAY_FIELD]=c(Array.from(new Uint8Array(g.buffer))):w===a.BUILTIN_CLASS_DATE?_[a.TIMESTAMP_FIELD]=g.getTime():w===a.BUILTIN_CLASS_INTL_LOCALE||w===a.BUILTIN_CLASS_REGEXP?_[a.TO_STRING_FIELD]=g.toString():w===a.BUILTIN_CLASS_SET?_[a.ARRAY_FIELD]=c(Array.from(g)):w===a.BUILTIN_CLASS_STRING?_[a.TO_STRING_FIELD]=g.toString():a.ALL_BUILTIN_ARRAYS.includes(w)?_[a.ARRAY_FIELD]=c(Array.from(g)):a.ALL_BUILTIN_ERRORS.includes(w)?function(L,R,h){L.name!=="Error"&&(R.name=L.name),L.message&&(R.message=L.message),L.stack&&(R.stack=L.stack),h===a.BUILTIN_CLASS_AGGREGATE_ERROR&&(R.errors=o(L.errors))}(g,_,w):a.ALL_BUILTIN_INTLS.includes(w)&&(_[a.OPTIONS_FIELD]=g.resolvedOptions())),_}(s,d)}function c(s){return s.map(function(f){return o(f)})}r.getSerializeValueWithClassName=o}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(r!==void 0)return r.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}var __webpack_exports__=__webpack_require__(607),__webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})()})(bundle);const ESSerializer=getDefaultExportFromCjs(bundle),alreadyWarnFor=[],warnStorageNotFound=e=>{const r=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(e)&&!r){let t=`Unable to find the ${e}. No data will be persisted.`;typeof window>"u"&&(t+=` +Are you running on a server? Most of storages are not available while running on a server.`),console.warn(t),alreadyWarnFor.push(e)}},serialize=e=>ESSerializer.serialize(e),deserialize=e=>{if(e!=="undefined"){if(e!=null){try{return ESSerializer.deserialize(e)}catch{}try{return JSON.parse(e)}catch{}}return e}};function persist(e,r,t){const a=r.getValue(t);return a!==null&&e.set(a),"addListener"in r&&r.addListener(t,n=>{e.set(n)}),e.subscribe(n=>{r.setValue(t,n)}),{...e,delete(){r.deleteValue(t)}}}function getBrowserStorage(e,r=!1){const t=[],a=c=>{const s=c.key;if(c.storageArea===e)for(const{listener:f}of t.filter(({key:l})=>l===s))f(deserialize(c.newValue))},n=()=>{r&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",a)},o=()=>{r&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",a)};return{addListener(c,s){t.push({key:c,listener:s}),t.length===1&&n()},removeListener(c,s){const f=t.indexOf({key:c,listener:s});f!==-1&&t.splice(f,1),t.length===0&&o()},getValue(c){const s=e.getItem(c);return deserialize(s)},deleteValue(c){e.removeItem(c)},setValue(c,s){e.setItem(c,serialize(s))}}}function localStorage(e=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,e):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}let analytics;const initAnalytics=async()=>{if(!analytics)try{const[{Analytics:e},{default:r}]=await Promise.all([__vitePreload(()=>import("./analytics.browser.es-34f06abc.js"),[],import.meta.url),__vitePreload(()=>import("./plausible-c08e2f58.js").then(t=>t.p),["./plausible-c08e2f58.js","./_commonjsHelpers-35101cd5.js"],import.meta.url)]);analytics=e({app:"mermaid-live-editor",plugins:[r({domain:"mermaid.live",hashMode:!1,trackLocalhost:!1,apiHost:"https://plausible.io"})]})}catch(e){console.log(e),console.info("Analytics blocked ;)")}},detectType=e=>{const r=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram"],t=e.replace(/^\s*%%.*\n/g,` +`).trimStart().split(" ")[0].toLowerCase();return r.find(n=>t.includes(n.toLowerCase()))},countLines=e=>{var r;return(((r=e.match(/\n/g))==null?void 0:r.length)??0)+1},saveStatistics=e=>{const r=detectType(e);if(!r)return;const t=countLines(e);logEvent("render",{graphType:r,length:t})},minutesToMilliSeconds=e=>e*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay},timeouts=new Map,logEvent=(e,r)=>{if(!analytics)return;const t=r?JSON.stringify({name:e,data:r}):e;timeouts.has(t)?clearTimeout(timeouts.get(t)):analytics.track(e,r),timeouts.set(t,window.setTimeout(()=>timeouts.delete(t),delaysPerEvent[e]))};const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(e){let r=e.length;for(;--r>=0;)e[r]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(e,r,t,a,n){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=a,this.max_length=n,this.has_stree=e&&e.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const d_code=e=>e<256?_dist_code[e]:_dist_code[256+(e>>>7)],put_short=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},send_bits=(e,r,t)=>{e.bi_valid>Buf_size-t?(e.bi_buf|=r<>Buf_size-e.bi_valid,e.bi_valid+=t-Buf_size):(e.bi_buf|=r<{send_bits(e,t[r*2],t[r*2+1])},bi_reverse=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},bi_flush=e=>{e.bi_valid===16?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},gen_bitlen=(e,r)=>{const t=r.dyn_tree,a=r.max_code,n=r.stat_desc.static_tree,o=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,f=r.stat_desc.max_length;let l,d,A,g,_,w,L=0;for(g=0;g<=MAX_BITS$1;g++)e.bl_count[g]=0;for(t[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lf&&(g=f,L++),t[d*2+1]=g,!(d>a)&&(e.bl_count[g]++,_=0,d>=s&&(_=c[d-s]),w=t[d*2],e.opt_len+=w*(g+_),o&&(e.static_len+=w*(n[d*2+1]+_)));if(L!==0){do{for(g=f-1;e.bl_count[g]===0;)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[f]--,L-=2}while(L>0);for(g=f;g!==0;g--)for(d=e.bl_count[g];d!==0;)A=e.heap[--l],!(A>a)&&(t[A*2+1]!==g&&(e.opt_len+=(g-t[A*2+1])*t[A*2],t[A*2+1]=g),d--)}},gen_codes=(e,r,t)=>{const a=new Array(MAX_BITS$1+1);let n=0,o,c;for(o=1;o<=MAX_BITS$1;o++)n=n+t[o-1]<<1,a[o]=n;for(c=0;c<=r;c++){let s=e[c*2+1];s!==0&&(e[c*2]=bi_reverse(a[s]++,s))}},tr_static_init=()=>{let e,r,t,a,n;const o=new Array(MAX_BITS$1+1);for(t=0,a=0;a>=7;a{let r;for(r=0;r{e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},smaller=(e,r,t,a)=>{const n=r*2,o=t*2;return e[n]{const a=e.heap[t];let n=t<<1;for(;n<=e.heap_len&&(n{let a,n,o=0,c,s;if(e.sym_next!==0)do a=e.pending_buf[e.sym_buf+o++]&255,a+=(e.pending_buf[e.sym_buf+o++]&255)<<8,n=e.pending_buf[e.sym_buf+o++],a===0?send_code(e,n,r):(c=_length_code[n],send_code(e,c+LITERALS$1+1,r),s=extra_lbits[c],s!==0&&(n-=base_length[c],send_bits(e,n,s)),a--,c=d_code(a),send_code(e,c,t),s=extra_dbits[c],s!==0&&(a-=base_dist[c],send_bits(e,a,s)));while(o{const t=r.dyn_tree,a=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.elems;let c,s,f=-1,l;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,c=0;c>1;c>=1;c--)pqdownheap(e,t,c);l=o;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=s,t[l*2]=t[c*2]+t[s*2],e.depth[l]=(e.depth[c]>=e.depth[s]?e.depth[c]:e.depth[s])+1,t[c*2+1]=t[s*2+1]=l,e.heap[1]=l++,pqdownheap(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,r),gen_codes(t,f,e.bl_count)},scan_tree=(e,r,t)=>{let a,n=-1,o,c=r[0*2+1],s=0,f=7,l=4;for(c===0&&(f=138,l=3),r[(t+1)*2+1]=65535,a=0;a<=t;a++)o=c,c=r[(a+1)*2+1],!(++s{let a,n=-1,o,c=r[0*2+1],s=0,f=7,l=4;for(c===0&&(f=138,l=3),a=0;a<=t;a++)if(o=c,c=r[(a+1)*2+1],!(++s{let r;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),r=BL_CODES$1-1;r>=3&&e.bl_tree[bl_order[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},send_all_trees=(e,r,t,a)=>{let n;for(send_bits(e,r-257,5),send_bits(e,t-1,5),send_bits(e,a-4,4),n=0;n{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return Z_BINARY;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Z_TEXT;for(t=32;t{static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)},_tr_stored_block$1=(e,r,t,a)=>{send_bits(e,(STORED_BLOCK<<1)+(a?1:0),3),bi_windup(e),put_short(e,t),put_short(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},_tr_align$1=e=>{send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)},_tr_flush_block$1=(e,r,t,a)=>{let n,o,c=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),c=build_bl_tree(e),n=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=n&&(n=o)):n=o=t+5,t+4<=n&&r!==-1?_tr_stored_block$1(e,r,t,a):e.strategy===Z_FIXED$1||o===n?(send_bits(e,(STATIC_TREES<<1)+(a?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(a?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),a&&bi_windup(e)},_tr_tally$1=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(_length_code[t]+LITERALS$1+1)*2]++,e.dyn_dtree[d_code(r)*2]++),e.sym_next===e.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(e,r,t,a)=>{let n=e&65535|0,o=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do n=n+r[a++]|0,o=o+n|0;while(--c);n%=65521,o%=65521}return n|o<<16|0};var adler32_1=adler32;const makeTable=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var a=0;a<8;a++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},crcTable=new Uint32Array(makeTable()),crc32=(e,r,t,a)=>{const n=crcTable,o=a+t;e^=-1;for(let c=a;c>>8^n[(e^r[c])&255];return e^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(e,r)=>(e.msg=messages[r],r),rank=e=>e*2-(e>4?9:0),zero=e=>{let r=e.length;for(;--r>=0;)e[r]=0},slide_hash=e=>{let r,t,a,n=e.w_size;r=e.hash_size,a=r;do t=e.head[--a],e.head[a]=t>=n?t-n:0;while(--r);r=n,a=r;do t=e.prev[--a],e.prev[a]=t>=n?t-n:0;while(--r)};let HASH_ZLIB=(e,r,t)=>(r<{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},flush_block_only=(e,r)=>{_tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,flush_pending(e.strm)},put_byte=(e,r)=>{e.pending_buf[e.pending++]=r},putShortMSB=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},read_buf=(e,r,t,a)=>{let n=e.avail_in;return n>a&&(n=a),n===0?0:(e.avail_in-=n,r.set(e.input.subarray(e.next_in,e.next_in+n),t),e.state.wrap===1?e.adler=adler32_1(e.adler,r,n,t):e.state.wrap===2&&(e.adler=crc32_1(e.adler,r,n,t)),e.next_in+=n,e.total_in+=n,n)},longest_match=(e,r)=>{let t=e.max_chain_length,a=e.strstart,n,o,c=e.prev_length,s=e.nice_match;const f=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,l=e.window,d=e.w_mask,A=e.prev,g=e.strstart+MAX_MATCH;let _=l[a+c-1],w=l[a+c];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=r,!(l[n+c]!==w||l[n+c-1]!==_||l[n]!==l[a]||l[++n]!==l[a+1])){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac){if(e.match_start=r,c=o,o>=s)break;_=l[a+c-1],w=l[a+c]}}while((r=A[r&d])>f&&--t!==0);return c<=e.lookahead?c:e.lookahead},fill_window=e=>{const r=e.w_size;let t,a,n;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-MIN_LOOKAHEAD)&&(e.window.set(e.window.subarray(r,r+r-a),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),slide_hash(e),a+=r),e.strm.avail_in===0)break;if(t=read_buf(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=t,e.lookahead+e.insert>=MIN_MATCH)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=HASH(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=HASH(e,e.ins_h,e.window[n+MIN_MATCH-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a,n,o,c=0,s=e.strm.avail_in;do{if(a=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(a=n+e.strm.avail_in),a>o&&(a=o),a>8,e.pending_buf[e.pending-2]=~a,e.pending_buf[e.pending-1]=~a>>8,flush_pending(e.strm),n&&(n>a&&(n=a),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,a-=n),a&&(read_buf(e.strm,e.strm.output,e.strm.next_out,a),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a)}while(c===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(read_buf(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,t=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=t||(n||r===Z_FINISH$3)&&r!==Z_NO_FLUSH$2&&e.strm.avail_in===0&&n<=o)&&(a=n>o?o:n,c=r===Z_FINISH$3&&e.strm.avail_in===0&&a===n?1:0,_tr_stored_block(e,e.block_start,a,c),e.block_start+=a,flush_pending(e.strm)),c?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(e,r)=>{let t,a;for(;;){if(e.lookahead=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,t)),e.match_length>=MIN_MATCH)if(a=_tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do e.strstart++,e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+1]);else a=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=e.strstart{let t,a,n;for(;;){if(e.lookahead=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,t!==0&&e.prev_length4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-MIN_MATCH,a=_tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,a&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}else if(e.match_available){if(a=_tr_tally(e,0,e.window[e.strstart-1]),a&&flush_block_only(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=_tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let t,a,n,o;const c=e.window;for(;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&r===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(n=e.strstart-1,a=c[n],a===c[++n]&&a===c[++n]&&a===c[++n])){o=e.strstart+MAX_MATCH;do;while(a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&a===c[++n]&&ne.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(t=_tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(fill_window(e),e.lookahead===0)){if(r===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(e.match_length=0,t=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,r===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(e,r,t,a,n){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=a,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=e=>{e.window_size=2*e.w_size,zero(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==INIT_STATE&&r.status!==GZIP_STATE&&r.status!==EXTRA_STATE&&r.status!==NAME_STATE&&r.status!==COMMENT_STATE&&r.status!==HCRC_STATE&&r.status!==BUSY_STATE&&r.status!==FINISH_STATE?1:0},deflateResetKeep=e=>{if(deflateStateCheck(e))return err(e,Z_STREAM_ERROR$2);e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?GZIP_STATE:r.wrap?INIT_STATE:BUSY_STATE,e.adler=r.wrap===2?0:1,r.last_flush=-2,_tr_init(r),Z_OK$3},deflateReset=e=>{const r=deflateResetKeep(e);return r===Z_OK$3&&lm_init(e.state),r},deflateSetHeader=(e,r)=>deflateStateCheck(e)||e.state.wrap!==2?Z_STREAM_ERROR$2:(e.state.gzhead=r,Z_OK$3),deflateInit2=(e,r,t,a,n,o)=>{if(!e)return Z_STREAM_ERROR$2;let c=1;if(r===Z_DEFAULT_COMPRESSION$1&&(r=6),a<0?(c=0,a=-a):a>15&&(c=2,a-=16),n<1||n>MAX_MEM_LEVEL||t!==Z_DEFLATED$2||a<8||a>15||r<0||r>9||o<0||o>Z_FIXED||a===8&&c!==1)return err(e,Z_STREAM_ERROR$2);a===8&&(a=9);const s=new DeflateState;return e.state=s,s.strm=e,s.status=INIT_STATE,s.wrap=c,s.gzhead=null,s.w_bits=a,s.w_size=1<deflateInit2(e,r,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(e,r)=>{if(deflateStateCheck(e)||r>Z_BLOCK$1||r<0)return e?err(e,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===FINISH_STATE&&r!==Z_FINISH$3)return err(e,e.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const a=t.last_flush;if(t.last_flush=r,t.pending!==0){if(flush_pending(e),e.avail_out===0)return t.last_flush=-1,Z_OK$3}else if(e.avail_in===0&&rank(r)<=rank(a)&&r!==Z_FINISH$3)return err(e,Z_BUF_ERROR$1);if(t.status===FINISH_STATE&&e.avail_in!==0)return err(e,Z_BUF_ERROR$1);if(t.status===INIT_STATE&&t.wrap===0&&(t.status=BUSY_STATE),t.status===INIT_STATE){let n=Z_DEFLATED$2+(t.w_bits-8<<4)<<8,o=-1;if(t.strategy>=Z_HUFFMAN_ONLY||t.level<2?o=0:t.level<6?o=1:t.level===6?o=2:o=3,n|=o<<6,t.strstart!==0&&(n|=PRESET_DICT),n+=31-n%31,putShortMSB(t,n),t.strstart!==0&&(putShortMSB(t,e.adler>>>16),putShortMSB(t,e.adler&65535)),e.adler=1,t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(t.status===GZIP_STATE){if(e.adler=0,put_byte(t,31),put_byte(t,139),put_byte(t,8),t.gzhead)put_byte(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),put_byte(t,t.gzhead.time&255),put_byte(t,t.gzhead.time>>8&255),put_byte(t,t.gzhead.time>>16&255),put_byte(t,t.gzhead.time>>24&255),put_byte(t,t.level===9?2:t.strategy>=Z_HUFFMAN_ONLY||t.level<2?4:0),put_byte(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(put_byte(t,t.gzhead.extra.length&255),put_byte(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=EXTRA_STATE;else if(put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,0),put_byte(t,t.level===9?2:t.strategy>=Z_HUFFMAN_ONLY||t.level<2?4:0),put_byte(t,OS_CODE),t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(t.status===EXTRA_STATE){if(t.gzhead.extra){let n=t.pending,o=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+o>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex+=s,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0,o-=s}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+o),t.pending),t.pending+=o,t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=NAME_STATE}if(t.status===NAME_STATE){if(t.gzhead.name){let n=t.pending,o;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0}t.gzindexn&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),t.gzindex=0}t.status=COMMENT_STATE}if(t.status===COMMENT_STATE){if(t.gzhead.comment){let n=t.pending,o;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>n&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n)),flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3;n=0}t.gzindexn&&(e.adler=crc32_1(e.adler,t.pending_buf,t.pending-n,n))}t.status=HCRC_STATE}if(t.status===HCRC_STATE){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(flush_pending(e),t.pending!==0))return t.last_flush=-1,Z_OK$3;put_byte(t,e.adler&255),put_byte(t,e.adler>>8&255),e.adler=0}if(t.status=BUSY_STATE,flush_pending(e),t.pending!==0)return t.last_flush=-1,Z_OK$3}if(e.avail_in!==0||t.lookahead!==0||r!==Z_NO_FLUSH$2&&t.status!==FINISH_STATE){let n=t.level===0?deflate_stored(t,r):t.strategy===Z_HUFFMAN_ONLY?deflate_huff(t,r):t.strategy===Z_RLE?deflate_rle(t,r):configuration_table[t.level].func(t,r);if((n===BS_FINISH_STARTED||n===BS_FINISH_DONE)&&(t.status=FINISH_STATE),n===BS_NEED_MORE||n===BS_FINISH_STARTED)return e.avail_out===0&&(t.last_flush=-1),Z_OK$3;if(n===BS_BLOCK_DONE&&(r===Z_PARTIAL_FLUSH?_tr_align(t):r!==Z_BLOCK$1&&(_tr_stored_block(t,0,0,!1),r===Z_FULL_FLUSH$1&&(zero(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),flush_pending(e),e.avail_out===0))return t.last_flush=-1,Z_OK$3}return r!==Z_FINISH$3?Z_OK$3:t.wrap<=0?Z_STREAM_END$3:(t.wrap===2?(put_byte(t,e.adler&255),put_byte(t,e.adler>>8&255),put_byte(t,e.adler>>16&255),put_byte(t,e.adler>>24&255),put_byte(t,e.total_in&255),put_byte(t,e.total_in>>8&255),put_byte(t,e.total_in>>16&255),put_byte(t,e.total_in>>24&255)):(putShortMSB(t,e.adler>>>16),putShortMSB(t,e.adler&65535)),flush_pending(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=e=>{if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const r=e.state.status;return e.state=null,r===BUSY_STATE?err(e,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(e,r)=>{let t=r.length;if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const a=e.state,n=a.wrap;if(n===2||n===1&&a.status!==INIT_STATE||a.lookahead)return Z_STREAM_ERROR$2;if(n===1&&(e.adler=adler32_1(e.adler,r,t,0)),a.wrap=0,t>=a.w_size){n===0&&(zero(a.head),a.strstart=0,a.block_start=0,a.insert=0);let f=new Uint8Array(a.w_size);f.set(r.subarray(t-a.w_size,t),0),r=f,t=a.w_size}const o=e.avail_in,c=e.next_in,s=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,fill_window(a);a.lookahead>=MIN_MATCH;){let f=a.strstart,l=a.lookahead-(MIN_MATCH-1);do a.ins_h=HASH(a,a.ins_h,a.window[f+MIN_MATCH-1]),a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++;while(--l);a.strstart=f,a.lookahead=MIN_MATCH-1,fill_window(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=MIN_MATCH-1,a.match_available=0,e.next_in=c,e.input=s,e.avail_in=o,a.wrap=n,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const a in t)_has(t,a)&&(e[a]=t[a])}}return e},flattenChunks=e=>{let r=0;for(let a=0,n=e.length;a=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,a,n,o,c=e.length,s=0;for(n=0;n>>6,r[o++]=128|t&63):t<65536?(r[o++]=224|t>>>12,r[o++]=128|t>>>6&63,r[o++]=128|t&63):(r[o++]=240|t>>>18,r[o++]=128|t>>>12&63,r[o++]=128|t>>>6&63,r[o++]=128|t&63);return r};const buf2binstring=(e,r)=>{if(r<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let a=0;a{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let a,n;const o=new Array(t*2);for(n=0,a=0;a4){o[n++]=65533,a+=s-1;continue}for(c&=s===2?31:s===3?15:7;s>1&&a1){o[n++]=65533;continue}c<65536?o[n++]=c:(c-=65536,o[n++]=55296|c>>10&1023,o[n++]=56320|c&1023)}return buf2binstring(o,n)},utf8border=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+_utf8len[e[t]]>r?t:r},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(e){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let t=deflate_1$2.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Z_OK$2)throw new Error(messages[t]);if(r.header&&deflate_1$2.deflateSetHeader(this.strm,r.header),r.dictionary){let a;if(typeof r.dictionary=="string"?a=strings.string2buf(r.dictionary):toString$1.call(r.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(r.dictionary):a=r.dictionary,t=deflate_1$2.deflateSetDictionary(this.strm,a),t!==Z_OK$2)throw new Error(messages[t]);this._dict_set=!0}}Deflate$1.prototype.push=function(e,r){const t=this.strm,a=this.options.chunkSize;let n,o;if(this.ended)return!1;for(r===~~r?o=r:o=r===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof e=="string"?t.input=strings.string2buf(e):toString$1.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(a),t.next_out=0,t.avail_out=a),(o===Z_SYNC_FLUSH||o===Z_FULL_FLUSH)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(n=deflate_1$2.deflate(t,o),n===Z_STREAM_END$2)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(t.avail_out===0){this.onData(t.output);continue}if(o>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(e){this.chunks.push(e)};Deflate$1.prototype.onEnd=function(e){e===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function deflate$1(e,r){const t=new Deflate$1(r);if(t.push(e,!0),t.err)throw t.msg||messages[t.err];return t.result}function deflateRaw$1(e,r){return r=r||{},r.raw=!0,deflate$1(e,r)}function gzip$1(e,r){return r=r||{},r.gzip=!0,deflate$1(e,r)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function e(r,t){let a,n,o,c,s,f,l,d,A,g,_,w,L,R,h,E,S,u,T,v,m,y,p,b;const I=r.state;a=r.next_in,p=r.input,n=a+(r.avail_in-5),o=r.next_out,b=r.output,c=o-(t-r.avail_out),s=o+(r.avail_out-257),f=I.dmax,l=I.wsize,d=I.whave,A=I.wnext,g=I.window,_=I.hold,w=I.bits,L=I.lencode,R=I.distcode,h=(1<>>24,_>>>=u,w-=u,u=S>>>16&255,u===0)b[o++]=S&65535;else if(u&16){T=S&65535,u&=15,u&&(w>>=u,w-=u),w<15&&(_+=p[a++]<>>24,_>>>=u,w-=u,u=S>>>16&255,u&16){if(v=S&65535,u&=15,wf){r.msg="invalid distance too far back",I.mode=BAD$1;break e}if(_>>>=u,w-=u,u=o-c,v>u){if(u=v-u,u>d&&I.sane){r.msg="invalid distance too far back",I.mode=BAD$1;break e}if(m=0,y=g,A===0){if(m+=l-u,u2;)b[o++]=y[m++],b[o++]=y[m++],b[o++]=y[m++],T-=3;T&&(b[o++]=y[m++],T>1&&(b[o++]=y[m++]))}else{m=o-v;do b[o++]=b[m++],b[o++]=b[m++],b[o++]=b[m++],T-=3;while(T>2);T&&(b[o++]=b[m++],T>1&&(b[o++]=b[m++]))}}else if(u&64){r.msg="invalid distance code",I.mode=BAD$1;break e}else{S=R[(S&65535)+(_&(1<>3,a-=T,w-=T<<3,_&=(1<{const f=s.bits;let l=0,d=0,A=0,g=0,_=0,w=0,L=0,R=0,h=0,E=0,S,u,T,v,m,y=null,p;const b=new Uint16Array(MAXBITS+1),I=new Uint16Array(MAXBITS+1);let N=null,C,D,O;for(l=0;l<=MAXBITS;l++)b[l]=0;for(d=0;d=1&&b[g]===0;g--);if(_>g&&(_=g),g===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,s.bits=1,0;for(A=1;A0&&(e===CODES$1||g!==1))return-1;for(I[1]=0,l=1;lENOUGH_LENS$1||e===DISTS$1&&h>ENOUGH_DISTS$1)return 1;for(;;){C=l-L,c[d]+1=p?(D=N[c[d]-p],O=y[c[d]-p]):(D=32+64,O=0),S=1<>L)+u]=C<<24|D<<16|O|0;while(u!==0);for(S=1<>=1;if(S!==0?(E&=S-1,E+=S):E=0,d++,--b[l]===0){if(l===g)break;l=r[t+c[d]]}if(l>_&&(E&v)!==T){for(L===0&&(L=_),m+=A,w=l-L,R=1<ENOUGH_LENS$1||e===DISTS$1&&h>ENOUGH_DISTS$1)return 1;T=E&v,n[T]=_<<24|w<<16|m-o|0}}return E!==0&&(n[m+E]=l-L<<24|64<<16|0),s.bits=_,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.modeSYNC?1:0},inflateResetKeep=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=HEAD,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(ENOUGH_LENS),r.distcode=r.distdyn=new Int32Array(ENOUGH_DISTS),r.sane=1,r.back=-1,Z_OK$1},inflateReset=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,inflateResetKeep(e)},inflateReset2=(e,r)=>{let t;if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const a=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Z_STREAM_ERROR$1:(a.window!==null&&a.wbits!==r&&(a.window=null),a.wrap=t,a.wbits=r,inflateReset(e))},inflateInit2=(e,r)=>{if(!e)return Z_STREAM_ERROR$1;const t=new InflateState;e.state=t,t.strm=e,t.window=null,t.mode=HEAD;const a=inflateReset2(e,r);return a!==Z_OK$1&&(e.state=null),a},inflateInit=e=>inflateInit2(e,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=e=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=(e,r,t,a)=>{let n;const o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(r.subarray(t-o.wsize,t),0),o.wnext=0,o.whave=o.wsize):(n=o.wsize-o.wnext,n>a&&(n=a),o.window.set(r.subarray(t-a,t-a+n),o.wnext),a-=n,a?(o.window.set(r.subarray(t-a,t),0),o.wnext=a,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave{let t,a,n,o,c,s,f,l,d,A,g,_,w,L,R=0,h,E,S,u,T,v,m,y;const p=new Uint8Array(4);let b,I;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0)return Z_STREAM_ERROR$1;t=e.state,t.mode===TYPE&&(t.mode=TYPEDO),c=e.next_out,n=e.output,f=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,l=t.hold,d=t.bits,A=s,g=f,y=Z_OK$1;e:for(;;)switch(t.mode){case HEAD:if(t.wrap===0){t.mode=TYPEDO;break}for(;d<16;){if(s===0)break e;s--,l+=a[o++]<>>8&255,t.check=crc32_1(t.check,p,2,0),l=0,d=0,t.mode=FLAGS;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",t.mode=BAD;break}if((l&15)!==Z_DEFLATED){e.msg="unknown compression method",t.mode=BAD;break}if(l>>>=4,d-=4,m=(l&15)+8,t.wbits===0&&(t.wbits=m),m>15||m>t.wbits){e.msg="invalid window size",t.mode=BAD;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0,t.mode=TIME;case TIME:for(;d<32;){if(s===0)break e;s--,l+=a[o++]<>>8&255,p[2]=l>>>16&255,p[3]=l>>>24&255,t.check=crc32_1(t.check,p,4,0)),l=0,d=0,t.mode=OS;case OS:for(;d<16;){if(s===0)break e;s--,l+=a[o++]<>8),t.flags&512&&t.wrap&4&&(p[0]=l&255,p[1]=l>>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0,t.mode=EXLEN;case EXLEN:if(t.flags&1024){for(;d<16;){if(s===0)break e;s--,l+=a[o++]<>>8&255,t.check=crc32_1(t.check,p,2,0)),l=0,d=0}else t.head&&(t.head.extra=null);t.mode=EXTRA;case EXTRA:if(t.flags&1024&&(_=t.length,_>s&&(_=s),_&&(t.head&&(m=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(a.subarray(o,o+_),m)),t.flags&512&&t.wrap&4&&(t.check=crc32_1(t.check,a,_,o)),s-=_,o+=_,t.length-=_),t.length))break e;t.length=0,t.mode=NAME;case NAME:if(t.flags&2048){if(s===0)break e;_=0;do m=a[o+_++],t.head&&m&&t.length<65536&&(t.head.name+=String.fromCharCode(m));while(m&&_>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=TYPE;break;case DICTID:for(;d<32;){if(s===0)break e;s--,l+=a[o++]<>>=d&7,d-=d&7,t.mode=CHECK;break}for(;d<3;){if(s===0)break e;s--,l+=a[o++]<>>=1,d-=1,l&3){case 0:t.mode=STORED;break;case 1:if(fixedtables(t),t.mode=LEN_,r===Z_TREES){l>>>=2,d-=2;break e}break;case 2:t.mode=TABLE;break;case 3:e.msg="invalid block type",t.mode=BAD}l>>>=2,d-=2;break;case STORED:for(l>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,l+=a[o++]<>>16^65535)){e.msg="invalid stored block lengths",t.mode=BAD;break}if(t.length=l&65535,l=0,d=0,t.mode=COPY_,r===Z_TREES)break e;case COPY_:t.mode=COPY;case COPY:if(_=t.length,_){if(_>s&&(_=s),_>f&&(_=f),_===0)break e;n.set(a.subarray(o,o+_),c),s-=_,o+=_,f-=_,c+=_,t.length-=_;break}t.mode=TYPE;break;case TABLE:for(;d<14;){if(s===0)break e;s--,l+=a[o++]<>>=5,d-=5,t.ndist=(l&31)+1,l>>>=5,d-=5,t.ncode=(l&15)+4,l>>>=4,d-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=BAD;break}t.have=0,t.mode=LENLENS;case LENLENS:for(;t.have>>=3,d-=3}for(;t.have<19;)t.lens[N[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,b={bits:t.lenbits},y=inftrees(CODES,t.lens,0,19,t.lencode,0,t.work,b),t.lenbits=b.bits,y){e.msg="invalid code lengths set",t.mode=BAD;break}t.have=0,t.mode=CODELENS;case CODELENS:for(;t.have>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<>>=h,d-=h,t.lens[t.have++]=S;else{if(S===16){for(I=h+2;d>>=h,d-=h,t.have===0){e.msg="invalid bit length repeat",t.mode=BAD;break}m=t.lens[t.have-1],_=3+(l&3),l>>>=2,d-=2}else if(S===17){for(I=h+3;d>>=h,d-=h,m=0,_=3+(l&7),l>>>=3,d-=3}else{for(I=h+7;d>>=h,d-=h,m=0,_=11+(l&127),l>>>=7,d-=7}if(t.have+_>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=BAD;break}for(;_--;)t.lens[t.have++]=m}}if(t.mode===BAD)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=BAD;break}if(t.lenbits=9,b={bits:t.lenbits},y=inftrees(LENS,t.lens,0,t.nlen,t.lencode,0,t.work,b),t.lenbits=b.bits,y){e.msg="invalid literal/lengths set",t.mode=BAD;break}if(t.distbits=6,t.distcode=t.distdyn,b={bits:t.distbits},y=inftrees(DISTS,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,b),t.distbits=b.bits,y){e.msg="invalid distances set",t.mode=BAD;break}if(t.mode=LEN_,r===Z_TREES)break e;case LEN_:t.mode=LEN;case LEN:if(s>=6&&f>=258){e.next_out=c,e.avail_out=f,e.next_in=o,e.avail_in=s,t.hold=l,t.bits=d,inffast(e,g),c=e.next_out,n=e.output,f=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,l=t.hold,d=t.bits,t.mode===TYPE&&(t.back=-1);break}for(t.back=0;R=t.lencode[l&(1<>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<>u)],h=R>>>24,E=R>>>16&255,S=R&65535,!(u+h<=d);){if(s===0)break e;s--,l+=a[o++]<>>=u,d-=u,t.back+=u}if(l>>>=h,d-=h,t.back+=h,t.length=S,E===0){t.mode=LIT;break}if(E&32){t.back=-1,t.mode=TYPE;break}if(E&64){e.msg="invalid literal/length code",t.mode=BAD;break}t.extra=E&15,t.mode=LENEXT;case LENEXT:if(t.extra){for(I=t.extra;d>>=t.extra,d-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=DIST;case DIST:for(;R=t.distcode[l&(1<>>24,E=R>>>16&255,S=R&65535,!(h<=d);){if(s===0)break e;s--,l+=a[o++]<>u)],h=R>>>24,E=R>>>16&255,S=R&65535,!(u+h<=d);){if(s===0)break e;s--,l+=a[o++]<>>=u,d-=u,t.back+=u}if(l>>>=h,d-=h,t.back+=h,E&64){e.msg="invalid distance code",t.mode=BAD;break}t.offset=S,t.extra=E&15,t.mode=DISTEXT;case DISTEXT:if(t.extra){for(I=t.extra;d>>=t.extra,d-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=BAD;break}t.mode=MATCH;case MATCH:if(f===0)break e;if(_=g-f,t.offset>_){if(_=t.offset-_,_>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=BAD;break}_>t.wnext?(_-=t.wnext,w=t.wsize-_):w=t.wnext-_,_>t.length&&(_=t.length),L=t.window}else L=n,w=c-t.offset,_=t.length;_>f&&(_=f),f-=_,t.length-=_;do n[c++]=L[w++];while(--_);t.length===0&&(t.mode=LEN);break;case LIT:if(f===0)break e;n[c++]=t.length,f--,t.mode=LEN;break;case CHECK:if(t.wrap){for(;d<32;){if(s===0)break e;s--,l|=a[o++]<{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;let r=e.state;return r.window&&(r.window=null),e.state=null,Z_OK$1},inflateGetHeader=(e,r)=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(e,r)=>{const t=r.length;let a,n,o;return inflateStateCheck(e)||(a=e.state,a.wrap!==0&&a.mode!==DICT)?Z_STREAM_ERROR$1:a.mode===DICT&&(n=1,n=adler32_1(n,r,t,0),n!==a.check)?Z_DATA_ERROR$1:(o=updatewindow(e,r,t,t),o?(a.mode=MEM,Z_MEM_ERROR$1):(a.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(e){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let t=inflate_1$2.inflateInit2(this.strm,r.windowBits);if(t!==Z_OK)throw new Error(messages[t]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=strings.string2buf(r.dictionary):toString.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=inflate_1$2.inflateSetDictionary(this.strm,r.dictionary),t!==Z_OK)))throw new Error(messages[t])}Inflate$1.prototype.push=function(e,r){const t=this.strm,a=this.options.chunkSize,n=this.options.dictionary;let o,c,s;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?Z_FINISH:Z_NO_FLUSH,toString.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(a),t.next_out=0,t.avail_out=a),o=inflate_1$2.inflate(t,c),o===Z_NEED_DICT&&n&&(o=inflate_1$2.inflateSetDictionary(t,n),o===Z_OK?o=inflate_1$2.inflate(t,c):o===Z_DATA_ERROR&&(o=Z_NEED_DICT));t.avail_in>0&&o===Z_STREAM_END&&t.state.wrap>0&&e[t.next_in]!==0;)inflate_1$2.inflateReset(t),o=inflate_1$2.inflate(t,c);switch(o){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(o),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||o===Z_STREAM_END))if(this.options.to==="string"){let f=strings.utf8border(t.output,t.next_out),l=t.next_out-f,d=strings.buf2string(t.output,f);t.next_out=l,t.avail_out=a-l,l&&t.output.set(t.output.subarray(f,f+l),0),this.onData(d)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(o===Z_OK&&s===0)){if(o===Z_STREAM_END)return o=inflate_1$2.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(e){this.chunks.push(e)};Inflate$1.prototype.onEnd=function(e){e===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function inflate$1(e,r){const t=new Inflate$1(r);if(t.push(e),t.err)throw t.msg||messages[t.err];return t.result}function inflateRaw$1(e,r){return r=r||{},r.raw=!0,inflate$1(e,r)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(e=>{let r={};return e.forEach((t,a)=>r[t]=a),r})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(e,r=t=>t)=>new Uint8Array(Array.prototype.slice.call(e,0).map(r)),_mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,r=>r=="+"?"-":"_"),_tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=e=>{let r,t,a,n,o="";const c=e.length%3;for(let s=0;s255||(a=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");r=t<<16|a<<8|n,o+=b64chs[r>>18&63]+b64chs[r>>12&63]+b64chs[r>>6&63]+b64chs[r&63]}return c?o.slice(0,c-3)+"===".substring(c):o},_btoa=_hasbtoa?e=>btoa(e):_hasBuffer?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let a=0,n=e.length;ar?_mkUriSafe(_fromUint8Array(e)):_fromUint8Array(e),cb_utob=e=>{if(e.length<2){var r=e.charCodeAt(0);return r<128?e:r<2048?_fromCC(192|r>>>6)+_fromCC(128|r&63):_fromCC(224|r>>>12&15)+_fromCC(128|r>>>6&63)+_fromCC(128|r&63)}else{var r=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return _fromCC(240|r>>>18&7)+_fromCC(128|r>>>12&63)+_fromCC(128|r>>>6&63)+_fromCC(128|r&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=e=>e.replace(re_utob,cb_utob),_encode=_hasBuffer?e=>Buffer.from(e,"utf8").toString("base64"):_TE?e=>_fromUint8Array(_TE.encode(e)):e=>_btoa(utob(e)),encode=(e,r=!1)=>r?_mkUriSafe(_encode(e)):_encode(e),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=e=>{switch(e.length){case 4:var r=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),t=r-65536;return _fromCC((t>>>10)+55296)+_fromCC((t&1023)+56320);case 3:return _fromCC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _fromCC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=e=>e.replace(re_btou,cb_btou),atobPolyfill=e=>{if(e=e.replace(/\s+/g,""),!b64re.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let r,t="",a,n;for(let o=0;o>16&255):n===64?_fromCC(r>>16&255,r>>8&255):_fromCC(r>>16&255,r>>8&255,r&255);return t},_atob=_hasatob?e=>atob(_tidyB64(e)):_hasBuffer?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?e=>_U8Afrom(Buffer.from(e,"base64")):e=>_U8Afrom(_atob(e),r=>r.charCodeAt(0)),toUint8Array=e=>_toUint8Array(_unURI(e)),_decode=_hasBuffer?e=>Buffer.from(e,"base64").toString("utf8"):_TD?e=>_TD.decode(_toUint8Array(e)):e=>btou(_atob(e)),_unURI=e=>_tidyB64(e.replace(/[-_]/g,r=>r=="-"?"+":"/")),decode=e=>_decode(_unURI(e)),base64Serde={serialize:e=>encode(e,!0),deserialize:e=>decode(e)},pakoSerde={serialize:e=>{const r=new TextEncoder().encode(e),t=deflate_1(r,{level:9});return fromUint8Array(t,!0)},deserialize:e=>{const r=toUint8Array(e);return inflate_1(r,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(e,r="pako")=>{if(!(r in serdes))throw new Error(`Unknown serde type: ${r}`);const t=JSON.stringify(e),a=serdes[r].serialize(t);return`${r}:${a}`},deserializeState=e=>{let r,t;if(e.includes(":")){let n;if([n,t]=e.split(":"),n in serdes)r=n;else throw new Error(`Unknown serde type: ${n}`)}else r="base64",t=e;const a=serdes[r].deserialize(t);return JSON.parse(a)};var dist={},words={};(function(e){var r=commonjsGlobal&&commonjsGlobal.__values||function(a){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&a[n],c=0;if(o)return o.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.getWordsByCategory=e.wordList=void 0,e.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"ability",categories:["thing"]},{word:"accident",categories:["thing"]},{word:"account",categories:["thing"]},{word:"action",categories:["thing"]},{word:"activity",categories:["thing"]},{word:"actor",categories:["profession"]},{word:"ad",categories:["media"]},{word:"addition",categories:["thing"]},{word:"address",categories:["thing"]},{word:"adult",categories:["people"]},{word:"advantage",categories:["thing"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"agency",categories:["thing"]},{word:"agent",categories:["people"]},{word:"air",categories:["thing"]},{word:"airline",categories:["transportation"]},{word:"airplane",categories:["transportation"]},{word:"airport",categories:["transportation","place"]},{word:"alarm",categories:["thing"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"analyst",categories:["profession"]},{word:"angle",categories:["thing"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apartment",categories:["place"]},{word:"apple",categories:["food"]},{word:"application",categories:["thing"]},{word:"appointment",categories:["thing"]},{word:"architect",categories:["profession"]},{word:"argument",categories:["thing"]},{word:"area",categories:["thing"]},{word:"arm",categories:["thing"]},{word:"army",categories:["thing"]},{word:"art",categories:["thing"]},{word:"article",categories:["thing"]},{word:"artist",categories:["profession"]},{word:"australia",categories:["place"]},{word:"author",categories:["profession"]},{word:"autumn",categories:["time"]},{word:"baby",categories:["people","family"]},{word:"baker",categories:["profession"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"barista",categories:["profession"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"bear",categories:["animals"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"bird",categories:["animals"]},{word:"bit",categories:["thing","technology"]},{word:"book",categories:["thing","education"]},{word:"boots",categories:["thing"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"businessperson",categories:["people","business"]},{word:"butcher",categories:["profession"]},{word:"byte",categories:["thing","technology"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpenter",categories:["profession"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"cat",categories:["animals"]},{word:"chef",categories:["profession"]},{word:"child",categories:["people","family"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"city",categories:["place"]},{word:"coat",categories:["thing"]},{word:"coffeeshop",categories:["place"]},{word:"computer",categories:["thing","technology"]},{word:"continent",categories:["place"]},{word:"controller",categories:["thing","technology"]},{word:"country",categories:["place"]},{word:"cpu",categories:["thing","technology"]},{word:"crayon",categories:["thing"]},{word:"cricket",categories:["animals"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"dawn",categories:["time"]},{word:"daybreak",categories:["time"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"dentist",categories:["profession"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"dusk",categories:["time"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"electrician",categories:["profession"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"engineer",categories:["profession"]},{word:"england",categories:["place"]},{word:"eve",categories:["time"]},{word:"evening",categories:["time"]},{word:"eventide",categories:["time"]},{word:"exabyte",categories:["thing","technology"]},{word:"eye",categories:["thing"]},{word:"fall",categories:["time"]},{word:"family",categories:["family"]},{word:"farmer",categories:["profession"]},{word:"father",categories:["people","family"]},{word:"finland",categories:["place"]},{word:"fireman",categories:["profession"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"florist",categories:["profession"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"ghost",categories:["thing"]},{word:"gigabyte",categories:["thing","technology"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]},{word:"gold",categories:["thing"]},{word:"gpu",categories:["thing","technology"]},{word:"grandmother",categories:["people","family"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hairdresser",categories:["profession"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"intern",categories:["profession"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"journalist",categories:["profession"]},{word:"joystick",categories:["thing","technology"]},{word:"judge",categories:["profession"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"keyboard",categories:["thing","technology"]},{word:"kilobyte",categories:["thing","technology"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"laptop",categories:["thing","technology"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"librarian",categories:["profession"]},{word:"library",categories:["place"]},{word:"lifeguard",categories:["profession"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"man",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"mechanic",categories:["profession"]},{word:"megabyte",categories:["thing","technology"]},{word:"memory",categories:["thing","technology"]},{word:"microphone",categories:["thing"]},{word:"midnight",categories:["time"]},{word:"minister",categories:["people","religion"]},{word:"monitor",categories:["thing","technology"]},{word:"monkey",categories:["animals"]},{word:"morn",categories:["time"]},{word:"morning",categories:["time"]},{word:"mother",categories:["people","family"]},{word:"motherboard",categories:["thing","technology"]},{word:"motorcycle",categories:["transportation"]},{word:"mouse",categories:["thing","technology","animals"]},{word:"musician",categories:["profession"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["time"]},{word:"nightfall",categories:["time"]},{word:"noon",categories:["time"]},{word:"notebook",categories:["thing"]},{word:"nurse",categories:["profession"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"optician",categories:["profession"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"pager",categories:["thing","technology"]},{word:"painter",categories:["profession"]},{word:"painting",categories:["media"]},{word:"park",categories:["place"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing","education"]},{word:"petabyte",categories:["thing","technology"]},{word:"pharmacist",categories:["profession"]},{word:"photographer",categories:["profession"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pilot",categories:["profession"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"plumber",categories:["profession"]},{word:"policeman",categories:["profession"]},{word:"portugal",categories:["place"]},{word:"postman",categories:["profession"]},{word:"potato",categories:["food"]},{word:"printer",categories:["thing","technology"]},{word:"processor",categories:["thing","technology"]},{word:"psychiatrist",categories:["profession"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"ram",categories:["thing","technology"]},{word:"receptionist",categories:["profession"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"salesclerk",categories:["people","business"]},{word:"salesmen",categories:["profession"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scientist",categories:["profession"]},{word:"scooter",categories:["transportation"]},{word:"secretary",categories:["profession"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"smartphone",categories:["thing","technology"]},{word:"soccer",categories:["sports"]},{word:"solstice",categories:["time"]},{word:"spoon",categories:["thing"]},{word:"spring",categories:["time"]},{word:"state",categories:["place"]},{word:"stone",categories:["thing"]},{word:"student",categories:["people","education"]},{word:"sugar",categories:["food"]},{word:"summer",categories:["time"]},{word:"sundown",categories:["time"]},{word:"sunset",categories:["time"]},{word:"sweden",categories:["place"]},{word:"table",categories:["thing"]},{word:"tailor",categories:["profession"]},{word:"teacher",categories:["people","education","profession"]},{word:"teenager",categories:["people","family"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"terabyte",categories:["thing","technology"]},{word:"thailand",categories:["place"]},{word:"tiger",categories:["animals"]},{word:"toddler",categories:["people","family"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"translator",categories:["profession"]},{word:"truck",categories:["thing","transportation"]},{word:"twilight",categories:["time"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vr",categories:["thing","technology"]},{word:"vulture",categories:["animals"]},{word:"waiter",categories:["profession"]},{word:"waitress",categories:["profession"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"winter",categories:["time"]},{word:"wire",categories:["thing"]},{word:"wolf",categories:["animals"]},{word:"woman",categories:["people"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"yottabyte",categories:["thing","technology"]},{word:"zebra",categories:["animals"]},{word:"zettabyte",categories:["thing","technology"]},{word:"zoo",categories:["animals"]}],adjective:[{word:"abandoned",categories:["condition"]},{word:"abiding",categories:["personality"]},{word:"able",categories:["condition"]},{word:"abrasive",categories:["condition","personality"]},{word:"abnormal",categories:["condition"]},{word:"absurd",categories:["condition"]},{word:"abundant",categories:["quantity"]},{word:"acceptable",categories:["condition"]},{word:"acidic",categories:["taste"]},{word:"acoustic",categories:["sounds"]},{word:"acrid",categories:["condition"]},{word:"adamant",categories:["personality"]},{word:"adorable",categories:["personality"]},{word:"adventurous",categories:["personality"]},{word:"aggressive",categories:["personality"]},{word:"agitated",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alert",categories:["condition"]},{word:"alive",categories:["condition"]},{word:"aloof",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"annoyed",categories:["personality"]},{word:"antsy",categories:["personality"]},{word:"anxious",categories:["personality"]},{word:"appalling",categories:["personality"]},{word:"appetizing",categories:["taste"]},{word:"apprehensive",categories:["personality"]},{word:"arrogant",categories:["personality"]},{word:"ashamed",categories:["personality"]},{word:"astonishing",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"average",categories:["appearance"]},{word:"bad",categories:["condition"]},{word:"bald",categories:["appearance"]},{word:"bashful",categories:["personality"]},{word:"beautiful",categories:["appearance"]},{word:"beefy",categories:["appearance"]},{word:"belligerent",categories:["personality"]},{word:"bent",categories:["condition"]},{word:"better",categories:["condition"]},{word:"best",categories:["condition"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"billowy",categories:["appearance"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"bland",categories:["taste"]},{word:"blue",categories:["color"]},{word:"blushing",categories:["appearance"]},{word:"bored",categories:["personality"]},{word:"boring",categories:["personality"]},{word:"boundless",categories:["personality"]},{word:"brainy",categories:["personality"]},{word:"brash",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"bright",categories:["appearance"]},{word:"broad",categories:["shapes"]},{word:"broken",categories:["condition"]},{word:"brown",categories:["color"]},{word:"bulky",categories:["appearance"]},{word:"bumpy",categories:["touch"]},{word:"burly",categories:["appearance"]},{word:"busy",categories:["personality"]},{word:"cagey",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"callous",categories:["personality"]},{word:"careful",categories:["condition"]},{word:"chilly",categories:["touch"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"clever",categories:["condition"]},{word:"clumsy",categories:["personality"]},{word:"cold",categories:["touch"]},{word:"colossal",categories:["size"]},{word:"cool",categories:["touch"]},{word:"crashing",categories:["sounds"]},{word:"creamy",categories:["taste"]},{word:"crooked",categories:["shapes"]},{word:"cuddly",categories:["touch"]},{word:"curved",categories:["shapes"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dazzling",categories:["appearance"]},{word:"dead",categories:["condition"]},{word:"deafening",categories:["sounds"]},{word:"deep",categories:["shapes"]},{word:"defeated",categories:["personality"]},{word:"delicious",categories:["taste"]},{word:"delightful",categories:["personality"]},{word:"dirty",categories:["touch"]},{word:"disgusting",categories:["taste"]},{word:"drab",categories:["appearance"]},{word:"dry",categories:["touch"]},{word:"eager",categories:["personality"]},{word:"early",categories:["time"]},{word:"easy",categories:["condition"]},{word:"echoing",categories:["sounds"]},{word:"elegant",categories:["appearance"]},{word:"embarrassed",categories:["personality"]},{word:"enough",categories:["quantity"]},{word:"faint",categories:["sounds"]},{word:"faithful",categories:["personality"]},{word:"famous",categories:["condition"]},{word:"fancy",categories:["appearance"]},{word:"fast",categories:["time"]},{word:"fat",categories:["size"]},{word:"few",categories:["quantity"]},{word:"fierce",categories:["personality"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"flaky",categories:["touch"]},{word:"flat",categories:["shapes"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"fresh",categories:["taste"]},{word:"full",categories:["quantity"]},{word:"future",categories:["time"]},{word:"gentle",categories:["personality"]},{word:"gifted",categories:["condition"]},{word:"gigantic",categories:["size"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"gray",categories:["color"]},{word:"greasy",categories:["touch","taste"]},{word:"great",categories:["size"]},{word:"green",categories:["color"]},{word:"grumpy",categories:["personality"]},{word:"hallowed",categories:["condition"]},{word:"handsome",categories:["appearance"]},{word:"happy",categories:["personality"]},{word:"harsh",categories:["sounds"]},{word:"helpful",categories:["condition"]},{word:"helpless",categories:["personality"]},{word:"high",categories:["shapes"]},{word:"hissing",categories:["sounds"]},{word:"hollow",categories:["shapes"]},{word:"hot",categories:["touch","taste"]},{word:"howling",categories:["sounds"]},{word:"huge",categories:["size"]},{word:"hundreds",categories:["quantity"]},{word:"icy",categories:["touch"]},{word:"immense",categories:["size"]},{word:"important",categories:["condition"]},{word:"incalculable",categories:["quantity"]},{word:"inexpensive",categories:["condition"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"juicy",categories:["taste"]},{word:"kind",categories:["personality"]},{word:"large",categories:["size"]},{word:"late",categories:["time"]},{word:"lazy",categories:["personality"]},{word:"lemon",categories:["color"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["size","quantity"]},{word:"lively",categories:["personality"]},{word:"long",categories:["time","appearance"]},{word:"loose",categories:["touch"]},{word:"loud",categories:["sounds"]},{word:"low",categories:["shapes"]},{word:"magnificent",categories:["appearance"]},{word:"mammoth",categories:["size"]},{word:"mango",categories:["color"]},{word:"many",categories:["quantity"]},{word:"massive",categories:["size"]},{word:"mealy",categories:["condition"]},{word:"melodic",categories:["sounds"]},{word:"melted",categories:["touch"]},{word:"microscopic",categories:["size"]},{word:"millions",categories:["quantity"]},{word:"miniature",categories:["size"]},{word:"modern",categories:["time"]},{word:"moldy",categories:["taste"]},{word:"most",categories:["quantity"]},{word:"muscular",categories:["appearance"]},{word:"mushy",categories:["condition"]},{word:"mysterious",categories:["personality"]},{word:"narrow",categories:["shapes"]},{word:"nervous",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"noisy",categories:["sounds"]},{word:"numerous",categories:["quantity"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"obedient",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"odd",categories:["condition"]},{word:"old",categories:["time"]},{word:"orange",categories:["color"]},{word:"panicky",categories:["personality"]},{word:"petite",categories:["size"]},{word:"pitiful",categories:["personality"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"polite",categories:["personality"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"prehistoric",categories:["time"]},{word:"prickly",categories:["touch"]},{word:"proud",categories:["personality"]},{word:"puny",categories:["size"]},{word:"purple",categories:["color"]},{word:"purring",categories:["sounds"]},{word:"putrid",categories:["taste"]},{word:"quaint",categories:["appearance"]},{word:"quick",categories:["time"]},{word:"quiet",categories:["sounds"]},{word:"rancid",categories:["taste"]},{word:"rapid",categories:["time"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"red",categories:["color"]},{word:"refined",categories:["shapes"]},{word:"repulsive",categories:["personality"]},{word:"rhythmic",categories:["sounds"]},{word:"rich",categories:["condition"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"rough",categories:["touch"]},{word:"round",categories:["shapes"]},{word:"salmon",categories:["color"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"scarce",categories:["quantity"]},{word:"scary",categories:["personality"]},{word:"scrawny",categories:["size"]},{word:"screeching",categories:["sounds"]},{word:"scruffy",categories:["appearance"]},{word:"shaggy",categories:["touch"]},{word:"shallow",categories:["shapes"]},{word:"shapely",categories:["appearance"]},{word:"sharp",categories:["touch"]},{word:"short",categories:["size","appearance","time"]},{word:"shrilling",categories:["sounds"]},{word:"shy",categories:["condition"]},{word:"silly",categories:["personality"]},{word:"skinny",categories:["appearance","shapes"]},{word:"slimy",categories:["touch"]},{word:"slow",categories:["time"]},{word:"small",categories:["size"]},{word:"some",categories:["quantity"]},{word:"sour",categories:["taste"]},{word:"sparse",categories:["quantity"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"square",categories:["shapes"]},{word:"squeaking",categories:["sounds"]},{word:"stale",categories:["taste"]},{word:"steep",categories:["shapes"]},{word:"sticky",categories:["touch"]},{word:"stocky",categories:["appearance"]},{word:"straight",categories:["shapes"]},{word:"strong",categories:["touch"]},{word:"substantial",categories:["quantity"]},{word:"sweet",categories:["taste"]},{word:"swift",categories:["time"]},{word:"tall",categories:["size"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"teeny",categories:["size"]},{word:"tender",categories:["condition"]},{word:"thankful",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"thousands",categories:["quantity"]},{word:"thundering",categories:["sounds"]},{word:"tight",categories:["touch"]},{word:"tinkling",categories:["sounds"]},{word:"tiny",categories:["size"]},{word:"ugly",categories:["appearance"]},{word:"uneven",categories:["touch"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"uptight",categories:["personality"]},{word:"vast",categories:["condition"]},{word:"victorious",categories:["personality"]},{word:"wailing",categories:["sounds"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"white",categories:["color"]},{word:"wide",categories:["shapes"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"wooden",categories:["touch"]},{word:"worried",categories:["personality"]},{word:"wrong",categories:["condition"]},{word:"yellow",categories:["color"]},{word:"young",categories:["time"]},{word:"yummy",categories:["taste"]},{word:"zealous",categories:["personality"]}]};function t(a,n){var o,c;n===void 0&&(n=[]);var s=new Set(n),f=[];try{for(var l=r(e.wordList[a]),d=l.next();!d.done;d=l.next()){var A=d.value;(n.length===0||A.categories.some(function(g){return s.has(g)}))&&f.push(A.word)}}catch(g){o={error:g}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return f}e.getWordsByCategory=t})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(e){for(var r,t=1,a=arguments.length;t{switch(e){case"auto":{n(r);break}case"manual":{n(t);break}case"loader":{n(a);break}default:n(r)}}),addHistoryEntry=e=>{const r={...e,id:v4()};if(r.type==="loader"){loaderHistoryStore.update(t=>[r,...t]);return}r.name||(r.name=generateSlug_1(2)),r.type==="auto"?autoHistoryStore.update(t=>(t.length>=MAX_AUTO_HISTORY_LENGTH&&(t=t.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[r,...t])):r.type==="manual"&&(manualHistoryStore.update(t=>[r,...t]),logEvent("history",{action:"save"}))},clearHistoryData=e=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(r=>(get_store_value(historyModeStore)!=="loader"&&(r=r.filter(({id:t})=>e&&t!=e),logEvent("history",{action:"clear",type:e?"single":"all"})),r))},getPreviousState=e=>{const r=get_store_value(e?autoHistoryStore:manualHistoryStore);return r.length>0?JSON.stringify(r[0].state):""},restoreHistory=e=>{const r=e.filter(a=>validateEntry(a)),t=e.length-r.length;if(t>0&&(console.error(`${t} invalid history entries were removed.`),console.error(e)),r.length>0){let a=0;(r[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(n=>{const o=new Set(n.map(({id:f})=>f)),c=r.filter(({id:f})=>!o.has(f));a=c.length;const s=[...n,...c];return s.sort((f,l)=>l.time-f.time),s}),alert(`${a} entries restored. ${t} invalid, ${r.length-a} duplicates.`),logEvent("history",{action:"restore",success:a,invalid:t,duplicates:r.length-a})}else alert("No valid entries found.")},setIDs=e=>{for(const r of e)r.id||(r.id=v4());return e},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=e=>e.type&&e.state&&e.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=e=>codeFileName in e,getFileContent=async e=>e.truncated?await fetchText(e.raw_url):e.content,getGistData=async e=>{const r=e.split("github.com").pop();if(!r)throw new Error("Invalid GitHub URL"+e);const[t,a,n,o]=r.split("/"),{html_url:c,files:s,history:f}=await fetchJSON(`https://api.github.com/gists/${n}${o?"/"+o:""}`);if(isValidGist(s)){const l=await getFileContent(s[codeFileName]);let d="{}";configFileName in s&&(d=await getFileContent(s[configFileName]));const A=f[0];return{url:`${c}/${A.version}`,code:l,config:d,author:A.user.login,time:new Date(A.committed_at).getTime(),version:A.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(e,r=e.url)=>{const t={...defaultState,code:e.code,loader:{type:"gist",config:{url:r}}};return e.config&&(t.mermaid=e.config),t},loadGistData=async e=>{const r=e.split("github.com").pop();if(!r)throw new Error("Invalid GitHub URL"+e);const[t,a,n,o]=r.split("/"),{history:c}=await fetchJSON(`https://api.github.com/gists/${n}${o?"/"+o:""}`),s=[];for(const d of c){const A=await getGistData(d.url).catch();A&&s.push(A)}if(s.length===0)throw new Error("Invalid gist provided");s.reverse();const f=s.slice(-1).pop();if(!f)throw new Error("Invalid gist provided");const l=getStateFromGist(f,e);for(const d of s)addHistoryEntry({state:getStateFromGist(d),time:d.time,type:"loader",url:d.url,name:`${d.author} v${d.version}`});return l},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const e=new URLSearchParams(window.location.search);let r=defaultState,t=!1;const a=e.get("code")??void 0,n=e.get("config")??void 0;let o;const c=n?await fetchText(n):defaultState.mermaid;if(a&&(o=await fetchText(a),t=!0),o){if(!a)throw new Error("Code URL is not defined");r={code:o,mermaid:c,loader:{type:"files",config:{codeURL:a,configURL:n}}}}else for(const[s,f]of e.entries())if(s in loaders)try{r=await loaders[s](f),t=!0;break}catch(l){console.error(l)}t&&updateCodeStore({...r,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:e}=get_store_value(migrationStore),r=Object.entries(migrations);if(e!==r.length-1){console.log(`Current migration version: v${e}. Migrating to v${r.length-1}.`);for(let t=e+1;t{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),await(analytics==null?void 0:analytics.page())},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(e=100)=>{if(count+=1,count>e){console.log(count,e);debugger}},formatJSON=e=>JSON.stringify(e,void 0,2),fetchJSON=async e=>(await fetch(e)).json(),fetchText=async e=>(await fetch(e)).text();function dedent(e){for(var r=[],t=1;t{log.warn(e),isDetailedError(e)?(t&&t(e.str,e.hash),r.push({...e,message:e.str,error:e})):(t&&t(e),e instanceof Error&&r.push({str:e.message,message:e.message,hash:e.name,error:e}))},run=async function(e={querySelector:".mermaid"}){try{await runThrowsErrors(e)}catch(r){if(isDetailedError(r)&&log.error(r.str),mermaid.parseError&&mermaid.parseError(r),!e.suppressErrors)throw log.error("Use the suppressErrors option to suppress these errors"),r}},runThrowsErrors=async function({postRenderCallback:e,querySelector:r,nodes:t}={querySelector:".mermaid"}){const a=mermaidAPI.getConfig();log.debug(`${e?"":"No "}Callback function found`);let n;if(t)n=t;else if(r)n=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");log.debug(`Found ${n.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(log.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const o=new utils.initIdGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const s=[];for(const f of Array.from(n)){log.info("Rendering diagram: "+f.id);if(f.getAttribute("data-processed"))continue;f.setAttribute("data-processed","true");const l=`mermaid-${o.next()}`;c=f.innerHTML,c=dedent(utils.entityDecode(c)).trim().replace(//gi,"
");const d=utils.detectInit(c);d&&log.debug("Detected early reinit: ",d);try{const{svg:A,bindFunctions:g}=await mermaidAPI.render(l,c,f);f.innerHTML=A,e&&await e(l),g&&g(f)}catch(A){handleError(A,s,mermaid.parseError)}}if(s.length>0)throw s[0]},initialize=function(e){mermaidAPI.initialize(e)},init=async function(e,r,t){log.warn("mermaid.init is deprecated. Please use run instead."),e&&initialize(e);const a={postRenderCallback:t,querySelector:".mermaid"};typeof r=="string"?a.querySelector=r:r&&(r instanceof HTMLElement?a.nodes=[r]:a.nodes=r),await run(a)},registerExternalDiagrams=async(e,{lazyLoad:r=!0}={})=>{registerLazyLoadedDiagrams(...e),r===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:e}=mermaidAPI.getConfig();e&&mermaid.run().catch(r=>log.error("Mermaid failed to initialize",r))}};if(typeof document<"u"){window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(e){mermaid.parseError=e},executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const e=executionQueue.shift();if(e)try{await e()}catch(r){log.error("Error executing queue",r)}}executionQueueRunning=!1}},parse$1=async(e,r)=>new Promise((t,a)=>{const n=()=>new Promise((o,c)=>{mermaidAPI.parse(e,r).then(s=>{o(s),t(s)},s=>{var f;log.error("Error parsing",s),(f=mermaid.parseError)==null||f.call(mermaid,s),c(s),a(s)})});executionQueue.push(n),executeQueue().catch(a)}),render$1=(e,r,t)=>new Promise((a,n)=>{const o=()=>new Promise((c,s)=>{mermaidAPI.render(e,r,t).then(f=>{c(f),a(f)},f=>{var l;log.error("Error parsing",f),(l=mermaid.parseError)==null||l.call(mermaid,f),s(f),n(f)})});executionQueue.push(o),executeQueue().catch(n)}),mermaid={startOnLoad:!0,mermaidAPI,parse:parse$1,render:render$1,init,run,registerExternalDiagrams,initialize,parseError:void 0,contentLoaded,setParseErrorHandler},render=async(e,r,t)=>(mermaid.initialize(e),await mermaid.render(t,r)),parse=async e=>await mermaid.parse(e),defaultState={code:`flowchart TD + A[Christmas] -->|Get money| B(Go shopping) + B --> C{Let me think} + C -->|One| D[Laptop] + C -->|Two| E[iPhone] + C -->|Three| F[fa:fa-car Car] + `,mermaid:formatJSON({theme:"default"}),autoSync:!0,updateDiagram:!0},urlParseFailedState=`flowchart TD + A[Loading URL failed. We can try to figure out why.] -->|Decode JSON| B(Please check the console to see the JSON and error details.) + B --> C{Is the JSON correct?} + C -->|Yes| D(Please Click here to Raise an issue in github.
Including the broken link in the issue
will speed up the fix.) + C -->|No| E{Did someone
send you this link?} + E -->|Yes| F[Ask them to send
you the complete link] + E -->|No| G{Did you copy
the complete URL?} + G --> |Yes| D + G --> |"No :("| H(Try using the Timeline tab in History
from same browser you used to create the diagram.) + click D href "https://github.com/mermaid-js/mermaid-live-editor/issues/new?assignees=&labels=bug&template=bug_report.md&title=Broken%20link" "Raise issue"`,inputStateStore=persist(writable(defaultState),localStorage(),"codeStore"),currentState=(()=>{const e=get_store_value(inputStateStore);return{...e,serialized:serializeState(e),errorMarkers:[],error:void 0,editorMode:e.editorMode??"code"}})(),processState=async e=>{const r={...e,serialized:"",errorMarkers:[],error:void 0,editorMode:e.editorMode??"code"};try{r.serialized=serializeState(e),await parse(e.code),JSON.parse(e.mermaid)}catch(t){if(r.error=t,errorDebug(),console.error(t),"hash"in t)try{const{loc:{first_line:a,last_line:n,first_column:o,last_column:c}}=t.hash,s={severity:8,startLineNumber:a,startColumn:o,endLineNumber:n,endColumn:c+1,message:t.str};r.errorMarkers=[s]}catch(a){console.error("Error without line helper",a)}}return r},stateStore=derived([inputStateStore],([e],r)=>{processState(e).then(r)},currentState),loadState=e=>{let r;console.log(`Loading '${e}'`);try{r=deserializeState(e);const t=typeof r.mermaid=="string"?JSON.parse(r.mermaid):r.mermaid;t.securityLevel&&t.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${t.securityLevel}" from the config for safety. +Click Cancel if you trust the source of this Diagram.`)&&delete t.securityLevel,r.mermaid=formatJSON(t)}catch(t){r=get_store_value(inputStateStore),e&&(console.error("Init error",t),r.code=urlParseFailedState,r.mermaid=defaultState.mermaid)}updateCodeStore(r)},updateCodeStore=e=>{inputStateStore.update(r=>({...r,...e}))};let prompted=!1;const updateCode=(e,{updateDiagram:r=!1,resetPanZoom:t=!1}={})=>{const a=countLines(e);if(saveStatistics(e),errorDebug(),a>50&&!prompted&&get_store_value(stateStore).autoSync){const n=confirm(`Long diagram detected. Turn off Auto Sync? Use ${cmdKey} + Enter or click the sync logo to manually sync.`);prompted=!0,n&&updateCodeStore({autoSync:!1})}inputStateStore.update(n=>(t&&(n.pan=void 0,n.zoom=void 0),{...n,code:e,updateDiagram:r}))},updateConfig=e=>{inputStateStore.update(r=>({...r,mermaid:e}))},toggleDarkTheme=e=>{inputStateStore.update(r=>{const t=JSON.parse(r.mermaid);return(!t.theme||["dark","default"].includes(t.theme))&&(t.theme=e?"dark":"default"),{...r,mermaid:formatJSON(t)}})};let urlDebounce;const initURLSubscription=()=>{stateStore.subscribe(({serialized:e})=>{clearTimeout(urlDebounce),urlDebounce=window.setTimeout(()=>{history.replaceState(void 0,"",`#${e}`)},250)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{localStorage as a,logEvent as b,syncDiagram as c,updateConfig as d,errorDebug as e,analytics as f,pakoSerde as g,encode as h,initHandler as i,inputStateStore as j,historyStore as k,loadingStateStore as l,historyModeStore as m,loaderHistoryStore as n,getStateString as o,persist as p,getPreviousState as q,restoreHistory as r,stateStore as s,toggleDarkTheme as t,updateCode as u,addHistoryEntry as v,clearHistoryData as w,updateCodeStore as x,cmdKey as y,render as z}; diff --git a/_app/immutable/chunks/theme-5d4099fd.js b/_app/immutable/chunks/theme-5d4099fd.js new file mode 100644 index 00000000..97601380 --- /dev/null +++ b/_app/immutable/chunks/theme-5d4099fd.js @@ -0,0 +1 @@ +import{C as t}from"./index-e871a861.js";import{p as e,a as o,b as r}from"./state-96b4af81.js";const l=e(t({isDark:!1}),o(),"themeStore"),n=new Set(["dark","synthwave","halloween","aqua","forest","luxury","black","dracula"]),p=s=>{s.includes(" ")&&(s=s.split(" ")[1].trim());const a=n.has(s);console.log("Setting theme",s),l.set({theme:s,isDark:a}),r("themeChange",{theme:s,isDark:a})};export{p as s,l as t}; diff --git a/_app/immutable/components/error.svelte-dc092e54.js b/_app/immutable/components/error.svelte-dc092e54.js new file mode 100644 index 00000000..b4b2a4ae --- /dev/null +++ b/_app/immutable/components/error.svelte-dc092e54.js @@ -0,0 +1 @@ +import{S,i as q,s as x,k as f,q as _,a as H,l as d,m as g,r as h,h as u,c as k,b as m,I as v,u as $,L as E,H as y}from"../chunks/index-e871a861.js";import{s as C}from"../chunks/singletons-1f15a4a1.js";const I=()=>{const s=C;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},L={subscribe(s){return I().page.subscribe(s)}};function P(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",l;return{c(){t=f("h1"),o=_(r),n=H(),i=f("p"),l=_(c)},l(e){t=d(e,"H1",{});var a=g(t);o=h(a,r),a.forEach(u),n=k(e),i=d(e,"P",{});var p=g(i);l=h(p,c),p.forEach(u)},m(e,a){m(e,t,a),v(t,o),m(e,n,a),m(e,i,a),v(i,l)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&$(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&$(l,c)},i:E,o:E,d(e){e&&u(t),e&&u(n),e&&u(i)}}}function j(s,t,r){let o;return y(s,L,n=>r(0,o=n)),[o]}let A=class extends S{constructor(t){super(),q(this,t,j,P,x,{})}};export{A as default}; diff --git a/_app/immutable/components/pages/_layout.svelte-dd1ecc06.js b/_app/immutable/components/pages/_layout.svelte-dd1ecc06.js new file mode 100644 index 00000000..f8e9734c --- /dev/null +++ b/_app/immutable/components/pages/_layout.svelte-dd1ecc06.js @@ -0,0 +1 @@ +import{S as I,i as M,s as V,D as $,k as m,a as w,e as b,l as u,m as _,h as f,c as D,n as p,b as v,E as q,F as N,G as T,f as j,t as A,H as k,o as H,q as L,r as W,I as d,u as z}from"../../chunks/index-e871a861.js";import{b as y}from"../../chunks/paths-b72ece5c.js";import{i as B,t as C,l as F}from"../../chunks/state-96b4af81.js";import{s as G,t as S}from"../../chunks/theme-5d4099fd.js";function E(n){let i,o,l,r,c,s=n[0].message+"",t;return{c(){i=m("div"),o=m("div"),l=m("div"),r=w(),c=m("div"),t=L(s),this.h()},l(e){i=u(e,"DIV",{class:!0});var a=_(i);o=u(a,"DIV",{class:!0});var h=_(o);l=u(h,"DIV",{class:!0}),_(l).forEach(f),r=D(h),c=u(h,"DIV",{});var g=_(c);t=W(g,s),g.forEach(f),h.forEach(f),a.forEach(f),this.h()},h(){p(l,"class","loader mx-auto svelte-6pksaq"),p(o,"class","text-indigo-100 text-4xl font-bold my-auto"),p(i,"class","w-screen h-screen z-50 absolute left-0 top-0 bg-gray-600 opacity-50 flex align-middle justify-center")},m(e,a){v(e,i,a),d(i,o),d(o,l),d(o,r),d(o,c),d(c,t)},p(e,a){a&1&&s!==(s=e[0].message+"")&&z(t,s)},d(e){e&&f(i)}}}function R(n){let i,o,l,r;const c=n[2].default,s=$(c,n,n[1],null);let t=n[0].loading&&E(n);return{c(){i=m("main"),s&&s.c(),o=w(),t&&t.c(),l=b(),this.h()},l(e){i=u(e,"MAIN",{class:!0});var a=_(i);s&&s.l(a),a.forEach(f),o=D(e),t&&t.l(e),l=b(),this.h()},h(){p(i,"class","h-screen text-primary-content")},m(e,a){v(e,i,a),s&&s.m(i,null),v(e,o,a),t&&t.m(e,a),v(e,l,a),r=!0},p(e,[a]){s&&s.p&&(!r||a&2)&&q(s,c,e,e[1],r?T(c,e[1],a,null):N(e[1]),null),e[0].loading?t?t.p(e,a):(t=E(e),t.c(),t.m(l.parentNode,l)):t&&(t.d(1),t=null)},i(e){r||(j(s,e),r=!0)},o(e){A(s,e),r=!1},d(e){e&&f(i),s&&s.d(e),e&&f(o),t&&t.d(e),e&&f(l)}}}function x(n,i,o){let l,r;k(n,S,t=>o(3,l=t)),k(n,F,t=>o(0,r=t));let{$$slots:c={},$$scope:s}=i;return H(()=>{window.addEventListener("hashchange",()=>{B()}),"serviceWorker"in navigator&&navigator.serviceWorker.register(`${y}/service-worker.js`,{scope:`${y}/`}).then(function(e){console.log("Registration successful, scope is:",e.scope)}).catch(function(e){console.log("Service worker registration failed, error:",e)});const t=window.matchMedia("(prefers-color-scheme: dark)").matches;l.theme===void 0&&G(t?"dark":"light"),S.subscribe(({theme:e,isDark:a})=>{e&&(document.getElementsByTagName("html")[0].setAttribute("data-theme",e),C(a))})}),n.$$set=t=>{"$$scope"in t&&o(1,s=t.$$scope)},[r,s,c]}class Q extends I{constructor(i){super(),M(this,i,x,R,V,{})}}export{Q as default}; diff --git a/_app/immutable/components/pages/_page.svelte-a70c02e6.js b/_app/immutable/components/pages/_page.svelte-a70c02e6.js new file mode 100644 index 00000000..5d611c61 --- /dev/null +++ b/_app/immutable/components/pages/_page.svelte-a70c02e6.js @@ -0,0 +1 @@ +import{S as n,i as s,s as i,o as l}from"../../chunks/index-e871a861.js";import{j as a}from"../../chunks/singletons-1f15a4a1.js";import{b as r}from"../../chunks/paths-b72ece5c.js";a.disable_scroll_handling;const c=a.goto;a.invalidate;a.invalidateAll;a.preload_data;a.preload_code;a.before_navigate;a.after_navigate;function d(o){return l(async()=>{const t=window.location.hash.split("/");let e="edit";t.length>2&&(e=`${t[1]}#${t[2]}`),await c(`${r}/${e}`,{replaceState:!0})}),[]}class _ extends n{constructor(t){super(),s(this,t,d,null,i,{})}}export{_ as default}; diff --git a/_app/immutable/components/pages/edit/_page.svelte-a983d7e7.js b/_app/immutable/components/pages/edit/_page.svelte-a983d7e7.js new file mode 100644 index 00000000..43354106 --- /dev/null +++ b/_app/immutable/components/pages/edit/_page.svelte-a983d7e7.js @@ -0,0 +1,113 @@ +import{S as ve,i as ye,s as we,k as _,l as v,m as y,h as d,n as o,b as F,L as le,H as Se,o as at,v as it,M as Ce,a as P,q as z,N as Re,c as V,r as Z,I as c,O as Ne,P as Ve,Q as J,R as Oe,x as ue,y as de,z as fe,f as te,t as ne,A as he,T as sn,U as an,V as on,W as Ee,u as Be,g as Gt,d as Ht,X as ln,Y as qt,Z as Ge,_ as zt,D as Zt,$ as Yt,E as Ft,F as Wt,G as Jt,a0 as cn,a1 as He,a2 as Qt,K as un,e as pt,p as dn}from"../../../chunks/index-e871a861.js";import{s as Ae,e as fn,c as Xt,b as De,u as en,d as hn,f as mn,g as pn,h as gn,j as Ke,k as gt,m as xe,n as bn,r as _n,o as vn,q as yn,v as wn,w as kn,i as $n,x as Dn,y as Sn}from"../../../chunks/state-96b4af81.js";import{t as rt,s as bt}from"../../../chunks/theme-5d4099fd.js";import{c as tn}from"../../../chunks/_commonjsHelpers-35101cd5.js";import{V as En}from"../../../chunks/View-c7762dc8.js";import{b as _t}from"../../../chunks/paths-b72ece5c.js";const In=r=>{r.languages.register({id:"mermaid"});const e=["requirement","functionalRequirement","interfaceRequirement","performanceRequirement","physicalRequirement","designConstraint"],t={flowchart:{typeKeywords:["flowchart","flowchart-v2","graph"],blockKeywords:["subgraph","end"],keywords:["TB","TD","BT","RL","LR","click","call","href","_self","_blank","_parent","_top","linkStyle","style","classDef","class","direction","interpolate"]},sequenceDiagram:{typeKeywords:["sequenceDiagram"],blockKeywords:["alt","par","and","loop","else","end","rect","opt","alt","rect"],keywords:["participant","as","Note","note","right of","left of","over","activate","deactivate","autonumber","title","actor","accDescription","link","links"]},classDiagram:{typeKeywords:["classDiagram","classDiagram-v2"],blockKeywords:["class"],keywords:["link","click","callback","call","href","cssClass","direction","TB","BT","RL","LR","title","accDescription","order"]},stateDiagram:{typeKeywords:["stateDiagram","stateDiagram-v2"],blockKeywords:["state","note","end"],keywords:["state","as","hide empty description","direction","TB","BT","RL","LR"]},erDiagram:{typeKeywords:["erDiagram"],blockKeywords:[],keywords:["title","accDescription"]},journey:{typeKeywords:["journey"],blockKeywords:["section"],keywords:["title"]},info:{typeKeywords:["info"],blockKeywords:[],keywords:["showInfo"]},gantt:{typeKeywords:["gantt"],blockKeywords:[],keywords:["title","dateFormat","axisFormat","todayMarker","section","excludes","inclusiveEndDates"]},requirementDiagram:{typeKeywords:["requirement","requirementDiagram"],blockKeywords:e.concat("element"),keywords:[]},gitGraph:{typeKeywords:["gitGraph"],blockKeywords:[],keywords:["accTitle","accDescr","commit","cherry-pick","branch","merge","reset","checkout","LR","BT","id","msg","type","tag","NORMAL","REVERSE","HIGHLIGHT"]},pie:{typeKeywords:["pie"],blockKeywords:[],keywords:["title","showData","title","accDescription"]},c4Diagram:{typeKeywords:["C4Context","C4Container","C4Component","C4Dynamic","C4Deployment"],blockKeywords:["Boundary","Enterprise_Boundary","System_Boundary","Container_Boundary","Node","Node_L","Node_R"],keywords:["title","accDescription","direction","TB","BT","RL","LR","Person_Ext","Person","SystemQueue_Ext","SystemDb_Ext","System_Ext","SystemQueue","SystemDb","System","ContainerQueue_Ext","ContainerDb_Ext","Container_Ext","ContainerQueue","ContainerDb","Container","ComponentQueue_Ext","ComponentDb_Ext","Component_Ext","ComponentQueue","ComponentDb","Component","Deployment_Node","Rel","BiRel","Rel_Up","Rel_U","Rel_Down","Rel_D","Rel_Left","Rel_L","Rel_Right","Rel_R","Rel_Back","RelIndex"]}},n=[/^\s*%%(?={)/,{token:"string",next:"@configDirective",nextEmbedded:"javascript"}];r.languages.setMonarchTokensProvider("mermaid",Object.assign(Object.assign({},Object.entries(t).map(s=>Object.fromEntries(Object.entries(s[1]).map(i=>[s[0]+i[0][0].toUpperCase()+i[0].slice(1),i[1]]))).reduce((s,i)=>Object.assign(Object.assign({},s),i),{})),{tokenizer:{root:[[/^\s*gitGraph/m,"typeKeyword","gitGraph"],[/^\s*info/m,"typeKeyword","info"],[/^\s*pie/m,"typeKeyword","pie"],[/^\s*(flowchart|flowchart-v2|graph)/m,"typeKeyword","flowchart"],[/^\s*sequenceDiagram/,"typeKeyword","sequenceDiagram"],[/^\s*classDiagram(-v2)?/,"typeKeyword","classDiagram"],[/^\s*journey/,"typeKeyword","journey"],[/^\s*gantt/,"typeKeyword","gantt"],[/^\s*stateDiagram(-v2)?/,"typeKeyword","stateDiagram"],[/^\s*er(Diagram)?/,"typeKeyword","erDiagram"],[/^\s*requirement(Diagram)?/,"typeKeyword","requirementDiagram"],[/^\s*(C4Context|C4Container|C4Component|C4Dynamic|C4Deployment)/m,"typeKeyword","c4Diagram"],n,[/%%[^${].*$/,"comment"]],configDirective:[[/%%$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],gitGraph:[n,[/option(?=s)/,{token:"typeKeyword",next:"optionsGitGraph"}],[/(accTitle|accDescr)(\s*:)(\s*[^\r\n]+$)/,["keyword","delimiter.bracket","string"]],[/(^\s*branch)(.*?)(\s+order)(:\s*)(\d+\s*$)/,["keyword","variable","keyword","delimiter.bracket","number"]],[/".*?"/,"string"],[/(^\s*)(branch|reset|merge|checkout)(\s*\S+)/m,["delimiter.bracket","keyword","variable"]],[/[a-zA-Z][\w$]*/,{cases:{"@gitGraphBlockKeywords":"typeKeyword","@gitGraphKeywords":"keyword"}}],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/\^/,"delimiter.bracket"]],optionsGitGraph:[[/s$/,{token:"typeKeyword",nextEmbedded:"json"}],["end",{token:"typeKeyword",next:"@pop",nextEmbedded:"@pop"}]],info:[[/[a-zA-Z][\w$]*/,{cases:{"@infoBlockKeywords":"typeKeyword","@infoKeywords":"keyword"}}]],pie:[n,[/(title|accDescription)(.*$)/,["keyword","string"]],[/[a-zA-Z][\w$]*/,{cases:{"@pieBlockKeywords":"typeKeyword","@pieKeywords":"keyword"}}],[/".*?"/,"string"],[/\s*\d+/,"number"],[/:/,"delimiter.bracket"],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"]],flowchart:[n,[/[ox]?(--+|==+)[ox]/,"transition"],[/[a-zA-Z][\w$]*/,{cases:{"@flowchartBlockKeywords":"typeKeyword","@flowchartKeywords":"keyword","@default":"variable"}}],[/\|+.+?\|+/,"string"],[/\[+(\\.+?[\\/]|\/.+?[/\\])\]+/,"string"],[/[[>]+[^\]|[]+?\]+/,"string"],[/{+.+?}+/,"string"],[/\(+.+?\)+/,"string"],[/-\.+->?/,"transition"],[/(-[-.])([^->][^-]+?)(-{3,}|-{2,}>|\.-+>)/,["transition","string","transition"]],[/(==+)([^=]+?)(={3,}|={2,}>)/,["transition","string","transition"]],[/|===+|---+/,"transition"],[/:::/,"transition"],[/[;&]/,"delimiter.bracket"],[/".*?"/,"string"],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"]],sequenceDiagram:[n,[/(title:?|accDescription)([^\r\n;]*$)/,["keyword","string"]],[/(autonumber)([^\r\n\S]+off[^\r\n\S]*$)/,["keyword","keyword"]],[/(autonumber)([^\r\n\S]+\d+[^\r\n\S]+\d+[^\r\n\S]*$)/,["keyword","number"]],[/(autonumber)([^\r\n\S]+\d+[^\r\n\S]*$)/,["keyword","number"]],[/(link\s+)(.*?)(:)(\s*.*?)(\s*@)(\s*[^\r\n;]+)/,["keyword","variable","delimiter.bracket","string","delimiter.bracket","string"]],[/((?:links|properties)\s+)([^\r\n:]*?)(:\s+)/,[{token:"keyword"},{token:"variable"},{token:"delimiter.bracket",nextEmbedded:"javascript",next:"@sequenceDiagramLinksProps"}]],[/[a-zA-Z][\w$]*/,{cases:{"@sequenceDiagramBlockKeywords":"typeKeyword","@sequenceDiagramKeywords":"keyword","@default":"variable"}}],[/(--?>?>|--?[)x])[+-]?/,"transition"],[/(:)([^:\n]*?$)/,["delimiter.bracket","string"]],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"]],sequenceDiagramLinksProps:[[/$|;/,{nextEmbedded:"@pop",next:"@pop",token:"delimiter.bracket"}]],classDiagram:[n,[/(^\s*(?:title|accDescription))(\s+.*$)/,["keyword","string"]],[/(\*|<\|?|o|)(--|\.\.)(\*|\|?>|o|)([ \t]*[a-zA-Z]+[ \t]*)(:)(.*?$)/,["transition","transition","transition","variable","delimiter.bracket","string"]],[/(?!class\s)([a-zA-Z]+)(\s+[a-zA-Z]+)/,["type","variable"]],[/(\*|<\|?|o)?(--|\.\.)(\*|\|?>|o)?/,"transition"],[/^\s*class\s(?!.*\{)/,"keyword"],[/[a-zA-Z][\w$]*/,{cases:{"@classDiagramBlockKeywords":"typeKeyword","@classDiagramKeywords":"keyword","@default":"variable"}}],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/(<<)(.+?)(>>)/,["delimiter.bracket","annotation","delimiter.bracket"]],[/".*?"/,"string"],[/:::/,"transition"],[/:|\+|-|#|~|\*\s*$|\$\s*$|\(|\)|{|}/,"delimiter.bracket"]],journey:[n,[/(title)(.*)/,["keyword","string"]],[/(section)(.*)/,["typeKeyword","string"]],[/[a-zA-Z][\w$]*/,{cases:{"@journeyBlockKeywords":"typeKeyword","@journeyKeywords":"keyword","@default":"variable"}}],[/(^\s*.+?)(:)(.*?)(:)(.*?)([,$])/,["string","delimiter.bracket","number","delimiter.bracket","variable","delimiter.bracket"]],[/,/,"delimiter.bracket"],[/(^\s*.+?)(:)([^:]*?)$/,["string","delimiter.bracket","variable"]],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"]],gantt:[n,[/(title)(.*)/,["keyword","string"]],[/(section)(.*)/,["typeKeyword","string"]],[/^\s*([^:\n]*?)(:)/,["string","delimiter.bracket"]],[/[a-zA-Z][\w$]*/,{cases:{"@ganttBlockKeywords":"typeKeyword","@ganttKeywords":"keyword"}}],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/:/,"delimiter.bracket"]],stateDiagram:[n,[/note[^:]*$/,{token:"typeKeyword",next:"stateDiagramNote"}],["hide empty description","keyword"],[/^\s*state\s(?!.*\{)/,"keyword"],[/(<<)(fork|join|choice)(>>)/,"annotation"],[/(\[\[)(fork|join|choice)(]])/,["delimiter.bracket","annotation","delimiter.bracket"]],[/[a-zA-Z][\w$]*/,{cases:{"@stateDiagramBlockKeywords":"typeKeyword","@stateDiagramKeywords":"keyword","@default":"variable"}}],[/".*?"/,"string"],[/(:)([^:\n]*?$)/,["delimiter.bracket","string"]],[/{|}/,"delimiter.bracket"],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/-->/,"transition"],[/\[.*?]/,"string"]],stateDiagramNote:[[/^\s*end note$/,{token:"typeKeyword",next:"@pop"}],[/.*/,"string"]],erDiagram:[n,[/(title|accDescription)(.*$)/,["keyword","string"]],[/[}|][o|](--|\.\.)[o|][{|]/,"transition"],[/".*?"/,"string"],[/(:)(.*?$)/,["delimiter.bracket","string"]],[/:|{|}/,"delimiter.bracket"],[/([a-zA-Z]+)(\s+[a-zA-Z]+)/,["type","variable"]],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/[a-zA-Z_-][\w$]*/,"variable"]],requirementDiagram:[n,[/->|<-|-/,"transition"],[/(\d+\.)*\d+/,"number"],[/[a-zA-Z_-][\w$]*/,{cases:{"@requirementDiagramBlockKeywords":"typeKeyword","@default":"variable"}}],[/:|{|}|\//,"delimiter.bracket"],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"],[/".*?"/,"string"]],c4Diagram:[n,[/(title|accDescription)(.*$)/,["keyword","string"]],[/\(/,{token:"delimiter.bracket",next:"c4DiagramParenthesis"}],[/[a-zA-Z_-][\w$]*/,{cases:{"@c4DiagramBlockKeywords":"typeKeyword","@c4DiagramKeywords":"keyword","@default":"variable"}}],[/%%[^$]([^%]*(?!%%$)%?)*$/,"comment"]],c4DiagramParenthesis:[[/,/,"delimiter.bracket"],[/\)/,{next:"@pop",token:"delimiter.bracket"}],[/[^,)]/,"string"]]}})),r.editor.defineTheme("mermaid-dark",{base:"vs-dark",inherit:!0,colors:{},rules:[{token:"typeKeyword",foreground:"9650c8",fontStyle:"bold"},{token:"transition",foreground:"008800",fontStyle:"bold"},{token:"identifier",foreground:"9cdcfe"}]}),r.editor.defineTheme("mermaid",{base:"vs",inherit:!0,colors:{},rules:[{token:"typeKeyword",foreground:"9650c8",fontStyle:"bold"},{token:"keyword",foreground:"649696"},{token:"custom-error",foreground:"ff0000",fontStyle:"bold"},{token:"string",foreground:"AA8500"},{token:"transition",foreground:"008800",fontStyle:"bold"},{token:"delimiter.bracket",foreground:"000000",fontStyle:"bold"},{token:"annotation",foreground:"4b4b96"},{token:"number",foreground:"4b4b96"},{token:"comment",foreground:"888c89"},{token:"variable",foreground:"A22889"},{token:"type",foreground:"2BDEA8"},{token:"identifier",foreground:"9cdcfe"}]}),r.languages.registerCompletionItemProvider("mermaid",{provideCompletionItems:(s,i)=>{const a=s.getWordUntilPosition(i),l={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn};return{suggestions:[{label:"loop",kind:r.languages.CompletionItemKind.Snippet,insertText:["loop ${1:Loop text}"," $0","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Sequence Diagram Loops"},{label:"alt",kind:r.languages.CompletionItemKind.Snippet,insertText:["alt ${1:Describing text}"," $0","else"," ","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Alternative Path"},{label:"opt",kind:r.languages.CompletionItemKind.Snippet,insertText:["opt ${1:Describing text}"," $0","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Optional Path"},{label:"par",kind:r.languages.CompletionItemKind.Snippet,insertText:["par ${1:[Action 1]}"," $0","and ${2:[Action 2]}"," ","and ${3:[Action 3]}"," ","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Parallel Actions"},{label:"rect",kind:r.languages.CompletionItemKind.Snippet,insertText:["rect ${1:rgb(0, 255, 0)}"," $0","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Background Color"},{label:"subgraph",kind:r.languages.CompletionItemKind.Snippet,insertText:["subgraph ${1:title}"," $0","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Subgraph"},{label:"class",kind:r.languages.CompletionItemKind.Snippet,insertText:["class ${1:className} {"," $0","}"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Class"},{label:"state",kind:r.languages.CompletionItemKind.Snippet,insertText:["state ${1:stateName} {"," $0","}"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"State"},{label:"note",kind:r.languages.CompletionItemKind.Snippet,insertText:["note ${1:right of State1}"," $0","end note"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"State"},{label:"section",kind:r.languages.CompletionItemKind.Snippet,insertText:["section ${1:Go to work}"," $0"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"User-journey Section"},{label:"element",kind:r.languages.CompletionItemKind.Snippet,insertText:["element ${1:test_entity} {"," $0","}"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Requirement Diagram Element"},{label:"options",kind:r.languages.CompletionItemKind.Snippet,insertText:["options","{"," $0","}","end"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"Git Graph Options"},...t.c4Diagram.blockKeywords.map(u=>({label:u,kind:r.languages.CompletionItemKind.Snippet,insertText:[u+' (${1:boundary_id}, "New Boundary") {'," $0","}"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"C4 Diagram "+u+" Boundary"})),...e.map(u=>({label:u,kind:r.languages.CompletionItemKind.Snippet,insertText:[u+" ${1:test_req} {"," id: 1"," text: the test text."," risk: high"," verifyMethod: test","}"].join(` +`),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:u.split(/(?=[A-Z])/).map(p=>p[0].toUpperCase()+p.slice(1)).join(" ")})),...[...new Set(Object.values(t).map(u=>Object.entries(u).filter(p=>p[0]!=="annotations").map(p=>p[1])).flat(2))].map(u=>({label:u,kind:r.languages.CompletionItemKind.Keyword,insertText:u}))].map(u=>Object.assign(Object.assign({},u),{range:l}))}}}),r.languages.setLanguageConfiguration("mermaid",{autoClosingPairs:[{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"}],brackets:[["(",")"],["{","}"],["[","]"]],comments:{lineComment:"%%"}})};function Tn(r){let e;return{c(){e=_("div"),this.h()},l(t){e=v(t,"DIV",{id:!0,class:!0}),y(e).forEach(d),this.h()},h(){o(e,"id","editor"),o(e,"class","overflow-hidden")},m(t,n){F(t,e,n),r[1](e)},p:le,i:le,o:le,d(t){t&&d(e),r[1](null)}}}function Cn(r,e,t){let n,s;Se(r,rt,m=>t(5,n=m)),Se(r,Ae,m=>t(6,s=m));let i,a,l,f={minimap:{enabled:!1},theme:"mermaid",overviewRulerLanes:0},u="";Ae.subscribe(({errorMarkers:m,editorMode:b,code:$,mermaid:A})=>{if(!a||!l)return;const C=b==="code"?$:A;C!==u&&(a.setValue(C),u=C);const k=b==="code"?"mermaid":"json",S=a.getModel();if(!S){console.error("editor model doesn't exist");return}S.getLanguageId()!==k&&l.editor.setModelLanguage(S,k),l.editor.setModelMarkers(S,"mermaid",m)}),rt.subscribe(({isDark:m})=>{a&&(l==null||l.editor.setTheme(m?"mermaid-dark":"mermaid"))});const p=(m,b)=>{b==="code"?en(m):hn(m)},h=async()=>{console.log("Loading Monaco...");let m=0;for(;m++<500;){if(l=window.monaco,l!==void 0)return;await new Promise(b=>setTimeout(b,100))}alert("Loading Monaco Editor failed. Please try refreshing the page.")};at(async()=>{if(await h(),!l)throw new Error("Monaco failed to load");if(!i)throw new Error("divEl is undefined");In(l),fn(100),a=l.editor.create(i,f),a.onDidChangeModelContent(({isFlush:b,changes:$})=>{const A=a==null?void 0:a.getValue();!A||u===A||b||(u=A,p(u,s.editorMode))}),a.addAction({id:"mermaid-render-diagram",label:"Render Diagram",keybindings:[l.KeyMod.CtrlCmd|l.KeyCode.Enter],run(){Xt(),De("renderDiagram",{method:"keyboadShortcut"})}}),l.editor.setTheme(n.isDark?"mermaid-dark":"mermaid");const m=new ResizeObserver(b=>{a.layout({height:b[0].contentRect.height,width:b[0].contentRect.width})});return i.parentElement&&m.observe(i.parentElement),()=>{a==null||a.dispose()}});function g(m){it[m?"unshift":"push"](()=>{i=m,t(0,i)})}return[i,g]}class Rn extends ve{constructor(e){super(),ye(this,e,Cn,Tn,we,{})}}const st="10.0.0";function vt(r,e,t){const n=r.slice();return n[4]=e[t],n}function yt(r){let e,t,n=r[4]+"",s,i,a,l;function f(){return r[2](r[4])}function u(){return r[3](r[4])}return{c(){e=_("li"),t=_("span"),s=z(n),i=P(),this.h()},l(p){e=v(p,"LI",{});var h=y(e);t=v(h,"SPAN",{class:!0});var g=y(t);s=Z(g,n),g.forEach(d),i=V(h),h.forEach(d),this.h()},h(){o(t,"class","btn btn-ghost justify-start"),Ve(e,"bordered",r[0].theme!==void 0&&r[4].includes(r[0].theme))},m(p,h){F(p,e,h),c(e,t),c(t,s),c(e,i),a||(l=[J(t,"click",f),J(t,"keypress",u)],a=!0)},p(p,h){r=p,h&3&&Ve(e,"bordered",r[0].theme!==void 0&&r[4].includes(r[0].theme))},d(p){p&&d(e),a=!1,Oe(l)}}}function Mn(r){let e,t,n,s,i,a,l,f,u,p,h,g,m,b=r[1],$=[];for(let A=0;At(0,n=l)),[n,["🌝 light","🌚 dark","🧁 cupcake","🐝 bumblebee","✳️ emerald","🏢 corporate","🌃 synthwave","👴 retro","🤖 cyberpunk","🌸 valentine","🎃 halloween","🌷 garden","🌲 forest","🐟 aqua","👓 lofi","🖍 pastel","🧚‍♀️ fantasy","📝 wireframe","🏴 black","💎 luxury","🧛‍♂️ dracula"],l=>bt(l),l=>bt(l)]}class On extends ve{constructor(e){super(),ye(this,e,An,Mn,we,{})}}function wt(r,e,t){const n=r.slice();return n[1]=e[t].title,n[2]=e[t].href,n[3]=e[t].icon,n[4]=e[t].img,n}function Kn(r){let e,t;return{c(){e=_("img"),this.h()},l(n){e=v(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){sn(e.src,t=r[4])||o(e,"src",t),o(e,"alt",r[1]),o(e,"class","svelte-1a0ole0")},m(n,s){F(n,e,s)},p:le,d(n){n&&d(e)}}}function Ln(r){let e;return{c(){e=_("i"),this.h()},l(t){e=v(t,"I",{class:!0}),y(e).forEach(d),this.h()},h(){o(e,"class",an(r[3])+" svelte-1a0ole0")},m(t,n){F(t,e,n)},p:le,d(t){t&&d(e)}}}function Nn(r){let e=r[1]+"",t;return{c(){t=z(e)},l(n){t=Z(n,e)},m(n,s){F(n,t,s)},p:le,d(n){n&&d(t)}}}function kt(r){let e,t,n,s;function i(u,p){if(u[3])return Ln;if(u[4])return Kn}let a=i(r),l=a&&a(r),f=r[1]&&Nn(r);return{c(){e=_("li"),t=_("a"),l&&l.c(),n=P(),f&&f.c(),s=P(),this.h()},l(u){e=v(u,"LI",{});var p=y(e);t=v(p,"A",{class:!0,target:!0,rel:!0,href:!0});var h=y(t);l&&l.l(h),n=V(h),f&&f.l(h),h.forEach(d),s=V(p),p.forEach(d),this.h()},h(){o(t,"class","btn btn-ghost"),o(t,"target","_blank"),o(t,"rel","noreferrer"),o(t,"href",r[2])},m(u,p){F(u,e,p),c(e,t),l&&l.m(t,null),c(t,n),f&&f.m(t,null),c(e,s)},p(u,p){l&&l.p(u,p),u[1]&&f.p(u,p)},d(u){u&&d(e),l&&l.d(),f&&f.d()}}}function Bn(r){let e,t,n,s,i,a,l,f,u,p,h,g,m,b,$,A,C,k,S,O,j,w,R;S=new On({});let N=r[0],K=[];for(let L=0;L`opacity: ${i*s}`}}function Dt(r,{delay:e=0,duration:t=400,easing:n=xn}={}){const s=getComputedStyle(r),i=+s.opacity,a=parseFloat(s.height),l=parseFloat(s.paddingTop),f=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),p=parseFloat(s.marginBottom),h=parseFloat(s.borderTopWidth),g=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:n,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*i};height: ${m*a}px;padding-top: ${m*l}px;padding-bottom: ${m*f}px;margin-top: ${m*u}px;margin-bottom: ${m*p}px;border-top-width: ${m*h}px;border-bottom-width: ${m*g}px;`}}function St(r,e,t){const n=r.slice();return n[11]=e[t],n}function Et(r){let e;return{c(){e=_("i"),this.h()},l(t){e=v(t,"I",{class:!0}),y(e).forEach(d),this.h()},h(){o(e,"class","fas fa-chevron-right icon svelte-1qkpo3v"),Ve(e,"isOpen",r[0])},m(t,n){F(t,e,n)},p(t,n){n&1&&Ve(e,"isOpen",t[0])},d(t){t&&d(e)}}}function It(r){let e,t,n,s=r[3],i=[];for(let a=0;a{t||(t=Ge(e,$t,{},!0)),t.run(1)}),n=!0)},o(a){t||(t=Ge(e,$t,{},!1)),t.run(0),n=!1},d(a){a&&d(e),Ne(i,a),a&&t&&t.end()}}}function Tt(r){let e,t,n,s,i=r[11].title+"",a,l,f,u,p;function h(){return r[8](r[11])}function g(){return r[9](r[11])}return{c(){e=_("div"),t=_("i"),s=P(),a=z(i),l=P(),this.h()},l(m){e=v(m,"DIV",{class:!0});var b=y(e);t=v(b,"I",{class:!0}),y(t).forEach(d),s=V(b),a=Z(b,i),l=V(b),b.forEach(d),this.h()},h(){o(t,"class",n="mr-1 "+r[11].icon+" svelte-1qkpo3v"),o(e,"class",f="tab tab-lifted "+(r[1]===r[11].id?"tab-active":"text-primary-content"))},m(m,b){F(m,e,b),c(e,t),c(e,s),c(e,a),c(e,l),u||(p=[J(e,"click",Ee(h)),J(e,"keypress",Ee(g))],u=!0)},p(m,b){r=m,b&8&&n!==(n="mr-1 "+r[11].icon+" svelte-1qkpo3v")&&o(t,"class",n),b&8&&i!==(i=r[11].title+"")&&Be(a,i),b&10&&f!==(f="tab tab-lifted "+(r[1]===r[11].id?"tab-active":"text-primary-content"))&&o(e,"class",f)},d(m){m&&d(e),u=!1,Oe(p)}}}function Pn(r){let e,t,n,s,i,a,l,f,u=r[2]&&Et(r),p=r[0]&&r[3]&&It(r);return{c(){e=_("div"),t=_("span"),u&&u.c(),n=P(),s=z(r[4]),i=P(),p&&p.c(),this.h()},l(h){e=v(h,"DIV",{class:!0});var g=y(e);t=v(g,"SPAN",{class:!0});var m=y(t);u&&u.l(m),n=V(m),s=Z(m,r[4]),m.forEach(d),i=V(g),p&&p.l(g),g.forEach(d),this.h()},h(){o(t,"class","mr-2 font-semibold"),o(e,"class","flex cursor-default")},m(h,g){F(h,e,g),c(e,t),u&&u.m(t,null),c(t,n),c(t,s),c(e,i),p&&p.m(e,null),a=!0,l||(f=[J(t,"click",Ee(r[6])),J(t,"keypress",Ee(r[7]))],l=!0)},p(h,[g]){h[2]?u?u.p(h,g):(u=Et(h),u.c(),u.m(t,n)):u&&(u.d(1),u=null),(!a||g&16)&&Be(s,h[4]),h[0]&&h[3]?p?(p.p(h,g),g&9&&te(p,1)):(p=It(h),p.c(),te(p,1),p.m(e,null)):p&&(Gt(),ne(p,1,1,()=>{p=null}),Ht())},i(h){a||(te(p),a=!0)},o(h){ne(p),a=!1},d(h){h&&d(e),u&&u.d(),p&&p.d(),l=!1,Oe(f)}}}function Vn(r,e,t){let{isCloseable:n=!0}=e,{tabs:s}=e,{title:i}=e,{isOpen:a=!1}=e,{activeTabID:l}=e;!l&&s.length>0&&(l=s[0].id);const f=ln(),u=b=>{t(1,l=b.id),f("select",b)},p=()=>t(0,a=!a),h=()=>t(0,a=!a),g=b=>u(b),m=b=>u(b);return r.$$set=b=>{"isCloseable"in b&&t(2,n=b.isCloseable),"tabs"in b&&t(3,s=b.tabs),"title"in b&&t(4,i=b.title),"isOpen"in b&&t(0,a=b.isOpen),"activeTabID"in b&&t(1,l=b.activeTabID)},[a,l,n,s,i,u,p,h,g,m]}class Gn extends ve{constructor(e){super(),ye(this,e,Vn,Pn,we,{isCloseable:2,tabs:3,title:4,isOpen:0,activeTabID:1})}}const Hn=r=>({}),Ct=r=>({});function Rt(r){let e,t,n;const s=r[7].default,i=Zt(s,r,r[6],null);return{c(){e=_("div"),i&&i.c(),this.h()},l(a){e=v(a,"DIV",{class:!0});var l=y(e);i&&i.l(l),l.forEach(d),this.h()},h(){o(e,"class","card-body p-0 flex-grow overflow-auto text-base-content")},m(a,l){F(a,e,l),i&&i.m(e,null),n=!0},p(a,l){i&&i.p&&(!n||l&64)&&Ft(i,s,a,a[6],n?Jt(s,a[6],l,null):Wt(a[6]),null)},i(a){n||(te(i,a),qt(()=>{t||(t=Ge(e,Dt,{},!0)),t.run(1)}),n=!0)},o(a){ne(i,a),t||(t=Ge(e,Dt,{},!1)),t.run(0),n=!1},d(a){a&&d(e),i&&i.d(a),a&&t&&t.end()}}}function qn(r){let e,t,n,s,i,a,l,f,u,p,h,g,m;function b(S){r[8](S)}let $={tabs:r[2],title:r[4],isCloseable:r[1],activeTabID:r[3]};r[0]!==void 0&&($.isOpen=r[0]),s=new Gn({props:$}),it.push(()=>zt(s,"isOpen",b)),s.$on("select",r[9]);const A=r[7].actions,C=Zt(A,r,r[6],Ct);let k=r[0]&&Rt(r);return{c(){e=_("div"),t=_("div"),n=_("div"),ue(s.$$.fragment),a=P(),l=_("div"),C&&C.c(),p=P(),k&&k.c(),this.h()},l(S){e=v(S,"DIV",{class:!0});var O=y(e);t=v(O,"DIV",{class:!0});var j=y(t);n=v(j,"DIV",{class:!0});var w=y(n);de(s.$$.fragment,w),a=V(w),l=v(w,"DIV",{class:!0});var R=y(l);C&&C.l(R),R.forEach(d),w.forEach(d),j.forEach(d),p=V(O),k&&k.l(O),O.forEach(d),this.h()},h(){o(l,"class",f="flex gap-x-4 items-center "+(r[5]?"-mt-2":"")),o(n,"class","flex justify-between"),o(t,"class",u="bg-primary p-2 "+(r[5]?"pb-0":"")+" flex-none cursor-pointer"),o(e,"class","card rounded overflow-hidden m-2 flex-grow flex flex-col shadow-2xl")},m(S,O){F(S,e,O),c(e,t),c(t,n),fe(s,n,null),c(n,a),c(n,l),C&&C.m(l,null),c(e,p),k&&k.m(e,null),h=!0,g||(m=[J(t,"click",r[10]),J(t,"keypress",r[11])],g=!0)},p(S,[O]){const j={};O&4&&(j.tabs=S[2]),O&16&&(j.title=S[4]),O&2&&(j.isCloseable=S[1]),O&8&&(j.activeTabID=S[3]),!i&&O&1&&(i=!0,j.isOpen=S[0],Yt(()=>i=!1)),s.$set(j),C&&C.p&&(!h||O&64)&&Ft(C,A,S,S[6],h?Jt(A,S[6],O,Hn):Wt(S[6]),Ct),(!h||O&32&&f!==(f="flex gap-x-4 items-center "+(S[5]?"-mt-2":"")))&&o(l,"class",f),(!h||O&32&&u!==(u="bg-primary p-2 "+(S[5]?"pb-0":"")+" flex-none cursor-pointer"))&&o(t,"class",u),S[0]?k?(k.p(S,O),O&1&&te(k,1)):(k=Rt(S),k.c(),te(k,1),k.m(e,null)):k&&(Gt(),ne(k,1,1,()=>{k=null}),Ht())},i(S){h||(te(s.$$.fragment,S),te(C,S),te(k),h=!0)},o(S){ne(s.$$.fragment,S),ne(C,S),ne(k),h=!1},d(S){S&&d(e),he(s),C&&C.d(S),k&&k.d(),g=!1,Oe(m)}}}function zn(r,e,t){let n,{$$slots:s={},$$scope:i}=e,{isCloseable:a=!0}=e,{isOpen:l=!0}=e,{tabs:f=[]}=e,{activeTabID:u=""}=e,{title:p}=e;function h($){l=$,t(0,l),t(1,a)}function g($){cn.call(this,r,$)}const m=()=>t(0,l=!l),b=()=>t(0,l=!l);return r.$$set=$=>{"isCloseable"in $&&t(1,a=$.isCloseable),"isOpen"in $&&t(0,l=$.isOpen),"tabs"in $&&t(2,f=$.tabs),"activeTabID"in $&&t(3,u=$.activeTabID),"title"in $&&t(4,p=$.title),"$$scope"in $&&t(6,i=$.$$scope)},r.$$.update=()=>{r.$$.dirty&3&&t(0,l=a?l:!0),r.$$.dirty&5&&t(5,n=l&&f.length>0)},[l,a,f,u,p,n,i,s,h,g,m,b]}class Le extends ve{constructor(e){super(),ye(this,e,zn,qn,we,{isCloseable:1,isOpen:0,tabs:2,activeTabID:3,title:4})}}function Mt(r,e,t){const n=r.slice();return n[5]=e[t],n}function Zn(r){let e;return{c(){e=_("span"),this.h()},l(t){e=v(t,"SPAN",{class:!0}),y(e).forEach(d),this.h()},h(){o(e,"class","ml-2 fa fa-heart")},m(t,n){F(t,e,n)},d(t){t&&d(e)}}}function At(r){let e,t=r[5]+"",n,s,i=r[1].includes(r[5]),a,l,f,u=i&&Zn();function p(){return r[3](r[5])}return{c(){e=_("button"),n=z(t),s=P(),u&&u.c(),a=P(),this.h()},l(h){e=v(h,"BUTTON",{class:!0});var g=y(e);n=Z(g,t),s=V(g),u&&u.l(g),a=V(g),g.forEach(d),this.h()},h(){o(e,"class","btn btn-sm btn-primary w-28 normal-case flex-grow")},m(h,g){F(h,e,g),c(e,n),c(e,s),u&&u.m(e,null),c(e,a),l||(f=J(e,"click",p),l=!0)},p(h,g){r=h},d(h){h&&d(e),u&&u.d(),l=!1,f()}}}function Yn(r){let e,t=r[2],n=[];for(let s=0;s|Get money| B(Go shopping) + B --> C{Let me think} + C -->|One| D[Laptop] + C -->|Two| E[iPhone] + C -->|Three| F[fa:fa-car Car]`,Sequence:`sequenceDiagram + Alice->>+John: Hello John, how are you? + Alice->>+John: John, can you hear me? + John-->>-Alice: Hi Alice, I can hear you! + John-->>-Alice: I feel great!`,Class:`classDiagram + Animal <|-- Duck + Animal <|-- Fish + Animal <|-- Zebra + Animal : +int age + Animal : +String gender + Animal: +isMammal() + Animal: +mate() + class Duck{ + +String beakColor + +swim() + +quack() + } + class Fish{ + -int sizeInFeet + -canEat() + } + class Zebra{ + +bool is_wild + +run() + }`,State:`stateDiagram-v2 + [*] --> Still + Still --> [*] + Still --> Moving + Moving --> Still + Moving --> Crash + Crash --> [*]`,Gantt:`gantt + title A Gantt Diagram + dateFormat YYYY-MM-DD + section Section + A task :a1, 2014-01-01, 30d + Another task :after a1 , 20d + section Another + Task in sec :2014-01-12 , 12d + another task : 24d`,Pie:`pie title Pets adopted by volunteers + "Dogs" : 386 + "Cats" : 85 + "Rats" : 15`,ER:`erDiagram + CUSTOMER }|..|{ DELIVERY-ADDRESS : has + CUSTOMER ||--o{ ORDER : places + CUSTOMER ||--o{ INVOICE : "liable for" + DELIVERY-ADDRESS ||--o{ ORDER : receives + INVOICE ||--|{ ORDER : covers + ORDER ||--|{ ORDER-ITEM : includes + PRODUCT-CATEGORY ||--|{ PRODUCT : contains + PRODUCT ||--o{ ORDER-ITEM : "ordered in"`,"User Journey":`journey + title My working day + section Go to work + Make tea: 5: Me + Go upstairs: 3: Me + Do work: 1: Me, Cat + section Go home + Go downstairs: 5: Me + Sit down: 3: Me`,Git:`gitGraph + commit + commit + branch develop + checkout develop + commit + commit + checkout main + merge develop + commit + commit`,Mindmap:`mindmap + root((mindmap)) + Origins + Long history + ::icon(fa fa-book) + Popularisation + British popular psychology author Tony Buzan + Research + On effectivness
and features + On Automatic creation + Uses + Creative techniques + Strategic planning + Argument mapping + Tools + Pen and paper + Mermaid`},t=a=>{en(e[a],{updateDiagram:!0,resetPanZoom:!0}),De("loadSampleDiagram",{diagramType:a})};return[t,["Mindmap"],["Sequence","Flow","Class","State","ER","Gantt","User Journey","Git","Pie","Mindmap"],a=>t(a)]}class Jn extends ve{constructor(e){super(),ye(this,e,Wn,Fn,we,{})}}const Qn={rendererUrl:{}.MERMAID_RENDERER_URL??"https://mermaid.ink",krokiRendererUrl:{}.MERMAID_KROKI_RENDERER_URL??"https://kroki.io",mermaidCDNUrl:{}.MERMAID_CDN_URL??"https://unpkg.com/@mermaid-js",mermaidBaseURL:{}.MERMAID_BASE_URL??"http://localhost:9000",useLocalMermaid:{}.MERMAID_LOCAL??!1,isDev:!1,baseURL:"./"};var nn={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(tn,function(){var t=1e3,n=6e4,s=36e5,i="millisecond",a="second",l="minute",f="hour",u="day",p="week",h="month",g="quarter",m="year",b="date",$="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var E=["th","st","nd","rd"],M=B%100;return"["+B+(E[(M-20)%10]||E[M]||E[0])+"]"}},S=function(B,E,M){var I=String(B);return!I||I.length>=E?B:""+Array(E+1-I.length).join(M)+B},O={s:S,z:function(B){var E=-B.utcOffset(),M=Math.abs(E),I=Math.floor(M/60),D=M%60;return(E<=0?"+":"-")+S(I,2,"0")+":"+S(D,2,"0")},m:function B(E,M){if(E.date()1)return B(U[0])}else{var G=E.name;w[G]=E,D=G}return!I&&D&&(j=D),D||!I&&j},K=function(B,E){if(R(B))return B.clone();var M=typeof E=="object"?E:{};return M.date=B,M.args=arguments,new x(M)},L=O;L.l=N,L.i=R,L.w=function(B,E){return K(B,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var x=function(){function B(M){this.$L=N(M.locale,null,!0),this.parse(M)}var E=B.prototype;return E.parse=function(M){this.$d=function(I){var D=I.date,T=I.utc;if(D===null)return new Date(NaN);if(L.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(A);if(U){var G=U[2]-1||0,q=(U[7]||"0").substring(0,3);return T?new Date(Date.UTC(U[1],G,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)):new Date(U[1],G,U[3]||1,U[4]||0,U[5]||0,U[6]||0,q)}}return new Date(D)}(M),this.$x=M.x||{},this.init()},E.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},E.$utils=function(){return L},E.isValid=function(){return this.$d.toString()!==$},E.isSame=function(M,I){var D=K(M);return this.startOf(I)<=D&&D<=this.endOf(I)},E.isAfter=function(M,I){return K(M)`mermaid-diagram-${Pe().format("YYYY-MM-DD-HHmmss")}.${I}`,a=(I,D,T)=>{T&&(I==null||I.setAttribute("height",`${T}px`)),D&&(I==null||I.setAttribute("width",`${D}px`)),I||(I=f());const U=I.outerHTML.replaceAll("
","
").replaceAll(/]*)>/g,(G,q)=>``);return gn(U)},l=(I,D)=>{const T=document.createElement("canvas"),U=document.querySelector("#container svg");if(!U)throw new Error("svg not found");const G=U.getBoundingClientRect();if(T.width=G.width,T.height=G.height,R==="width"){const Q=G.height/G.width;T.width=N,T.height=N*Q}else if(R==="height"){const Q=G.width/G.height;T.width=N*Q,T.height=N}const q=T.getContext("2d");if(!q)throw new Error("context not found");q.fillStyle="white",q.fillRect(0,0,T.width,T.height);const H=new Image;H.onload=D(q,H),H.src=`data:image/svg+xml;base64,${a(U,T.width,T.height)}`,I.stopPropagation(),I.preventDefault()},f=()=>{const I=document.querySelector("#container svg").cloneNode(!0);I.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");const D=Array.from(document.head.getElementsByTagName("link")).map(U=>U.href).find(U=>U.includes("font-awesome"));if(D==null)return I;const T=document.createElement("style");return T.innerText=`@import url("${D}");'`,I.prepend(T),I},u=(I,D)=>{const T=document.createElement("a");T.download=I,T.href=D,T.click(),T.remove()},p=(I,D)=>()=>{const{canvas:T}=I;I.drawImage(D,0,0,T.width,T.height),u(i("png"),T.toDataURL("image/png").replace("image/png","image/octet-stream"))},h=()=>Object.prototype.hasOwnProperty.call(window,"ClipboardItem"),g=(I,D)=>()=>{const{canvas:T}=I;I.drawImage(D,0,0,T.width,T.height),T.toBlob(U=>{try{if(!U)throw new Error("blob is empty");navigator.clipboard.write([new ClipboardItem({[U.type]:U})])}catch(G){console.error(G)}})},m=I=>{l(I,g),De("copyClipboard")},b=I=>{l(I,p),De("download",{type:"png"})},$=()=>{u(i("svg"),`data:image/svg+xml;base64,${a()}`),De("download",{type:"svg"})},A=()=>{document.getElementById("markdown").select(),document.execCommand("Copy"),De("copyMarkdown")};let C="";Ae.subscribe(({loader:I})=>{(I==null?void 0:I.type)==="gist"&&t(0,C=I.config.url)});const k=()=>{C||alert("Please enter a Gist URL first"),window.location.href=`${window.location.pathname}?gist=${C}`,De("loadGist")};let S,O,j,w,R="auto",N=1080,K=!1;["mermaid.live","netlify"].some(I=>window.location.host.includes(I))&&(K=!0),Ae.subscribe(({code:I,serialized:D})=>{t(1,S=`${s}/img/${D}?type=png`),t(2,O=`${s}/svg/${D}`),t(3,j=`${n}/mermaid/svg/${pn.serialize(I)}`),t(4,w=`[![](${S})](${window.location.protocol}//${window.location.host}${window.location.pathname}#${D})`)});const L=[[]];function x(){R=this.__value,t(5,R)}function Y(){R=this.__value,t(5,R)}function B(){R=this.__value,t(5,R)}function E(){N=Qt(this.value),t(6,N)}function M(){C=this.value,t(0,C)}return[C,S,O,j,w,R,N,K,h,m,b,$,A,k,x,L,Y,B,E,M]}class rr extends ve{constructor(e){super(),ye(this,e,nr,tr,we,{})}}const sr=r=>{alert(r)},ar=r=>confirm(r);var rn={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(tn,function(){return function(t,n,s){t=t||{};var i=n.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(u,p,h,g){return i.fromToBase(u,p,h,g)}s.en.relativeTime=a,i.fromToBase=function(u,p,h,g,m){for(var b,$,A,C=h.$locale().relativeTime||a,k=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],S=k.length,O=0;O0,w<=j.r||!j.r){w<=1&&O>0&&(j=k[O-1]);var R=C[j.l];m&&(w=m(""+w)),$=typeof R=="string"?R.replace("%d",w):R(w,p,j.l,A);break}}if(p)return $;var N=A?C.future:C.past;return typeof N=="function"?N($):N.replace("%s",$)},i.to=function(u,p){return l(u,p,this,!0)},i.from=function(u,p){return l(u,p,this)};var f=function(u){return u.$u?s.utc():s()};i.toNow=function(u){return this.to(f(this),u)},i.fromNow=function(u){return this.from(f(this),u)}}})})(rn);const ir=rn.exports;function Lt(r,e,t){const n=r.slice();return n[19]=e[t].id,n[20]=e[t].state,n[21]=e[t].time,n[22]=e[t].name,n[23]=e[t].url,n[24]=e[t].type,n}function or(r){let e,t,n,s,i,a;return{c(){e=_("div"),t=z("No items in History"),n=_("br"),s=z(` + Click the Save button to save current state and restore it later.`),i=_("br"),a=z(` + Timeline will automatically be saved every minute.`),this.h()},l(l){e=v(l,"DIV",{class:!0});var f=y(e);t=Z(f,"No items in History"),n=v(f,"BR",{}),s=Z(f,` + Click the Save button to save current state and restore it later.`),i=v(f,"BR",{}),a=Z(f,` + Timeline will automatically be saved every minute.`),f.forEach(d),this.h()},h(){o(e,"class","m-2")},m(l,f){F(l,e,f),c(e,t),c(e,n),c(e,s),c(e,i),c(e,a)},p:le,d(l){l&&d(e)}}}function lr(r){let e,t=r[2],n=[];for(let s=0;s0?lr:or}let n=t(r),s=n(r);return{c(){e=_("ul"),s.c(),this.h()},l(i){e=v(i,"UL",{class:!0,id:!0});var a=y(e);s.l(a),a.forEach(d),this.h()},h(){o(e,"class","p-2 space-y-2 overflow-auto h-56"),o(e,"id","historyList")},m(i,a){F(i,e,a),s.m(e,null)},p(i,a){n===(n=t(i))&&s?s.p(i,a):(s.d(1),s=n(i),s&&(s.c(),s.m(e,null)))},d(i){i&&d(e),s.d()}}}function Ut(r){let e,t,n,s;return{c(){e=_("button"),t=_("i"),this.h()},l(i){e=v(i,"BUTTON",{id:!0,class:!0,title:!0});var a=y(e);t=v(a,"I",{class:!0}),y(t).forEach(d),a.forEach(d),this.h()},h(){o(t,"class","fa fa-download"),o(e,"id","downloadHistory"),o(e,"class","btn btn-xs btn-secondary w-12"),o(e,"title","Download history")},m(i,a){F(i,e,a),c(e,t),n||(s=J(e,"click",Ee(r[12])),n=!0)},p:le,d(i){i&&d(e),n=!1,s()}}}function jt(r){let e,t,n,s;return{c(){e=_("button"),t=_("i"),this.h()},l(i){e=v(i,"BUTTON",{id:!0,class:!0,title:!0});var a=y(e);t=v(a,"I",{class:!0}),y(t).forEach(d),a.forEach(d),this.h()},h(){o(t,"class","fas fa-trash-alt"),o(e,"id","clearHistory"),o(e,"class","btn btn-xs btn-error w-12"),o(e,"title","Delete all saved states")},m(i,a){F(i,e,a),c(e,t),n||(s=J(e,"click",Ee(r[14])),n=!0)},p:le,d(i){i&&d(e),n=!1,s()}}}function fr(r){let e,t,n,s,i,a,l,f,u,p,h=r[2].length>0&&Ut(r),g=r[3]!=="loader"&&jt(r);return{c(){e=_("div"),t=_("button"),n=_("i"),s=P(),h&&h.c(),i=z(` + | + `),a=_("button"),l=_("i"),f=P(),g&&g.c(),this.h()},l(m){e=v(m,"DIV",{slot:!0});var b=y(e);t=v(b,"BUTTON",{id:!0,class:!0,title:!0});var $=y(t);n=v($,"I",{class:!0}),y(n).forEach(d),$.forEach(d),s=V(b),h&&h.l(b),i=Z(b,` + | + `),a=v(b,"BUTTON",{id:!0,class:!0,title:!0});var A=y(a);l=v(A,"I",{class:!0}),y(l).forEach(d),A.forEach(d),f=V(b),g&&g.l(b),b.forEach(d),this.h()},h(){o(n,"class","fa fa-upload"),o(t,"id","uploadHistory"),o(t,"class","btn btn-xs btn-secondary w-12"),o(t,"title","Upload history"),o(l,"class","far fa-save"),o(a,"id","saveHistory"),o(a,"class","btn btn-xs btn-success w-12"),o(a,"title","Save current state"),o(e,"slot","actions")},m(m,b){F(m,e,b),c(e,t),c(t,n),c(e,s),h&&h.m(e,null),c(e,i),c(e,a),c(a,l),c(e,f),g&&g.m(e,null),u||(p=[J(t,"click",Ee(r[11])),J(a,"click",Ee(r[13]))],u=!0)},p(m,b){m[2].length>0?h?h.p(m,b):(h=Ut(m),h.c(),h.m(e,i)):h&&(h.d(1),h=null),m[3]!=="loader"?g?g.p(m,b):(g=jt(m),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},d(m){m&&d(e),h&&h.d(),g&&g.d(),u=!1,Oe(p)}}}function hr(r){let e,t,n;function s(a){r[17](a)}let i={tabs:r[0],title:"History",$$slots:{actions:[fr],default:[dr]},$$scope:{ctx:r}};return r[1]!==void 0&&(i.isOpen=r[1]),e=new Le({props:i}),it.push(()=>zt(e,"isOpen",s)),e.$on("select",r[4]),{c(){ue(e.$$.fragment)},l(a){de(e.$$.fragment,a)},m(a,l){fe(e,a,l),n=!0},p(a,[l]){const f={};l&1&&(f.tabs=a[0]),l&134217740&&(f.$$scope={dirty:l,ctx:a}),!t&&l&2&&(t=!0,f.isOpen=a[1],Yt(()=>t=!1)),e.$set(f)},i(a){n||(te(e.$$.fragment,a),n=!0)},o(a){ne(e.$$.fragment,a),n=!1},d(a){he(e,a)}}}const mr=6e4;function pr(r,e,t){let n,s,i;Se(r,Ke,w=>t(18,n=w)),Se(r,gt,w=>t(2,s=w)),Se(r,xe,w=>t(3,i=w)),Pe.extend(ir);const a=w=>{xe.set(w.detail.id)};let l=[{id:"manual",title:"Saved",icon:"far fa-bookmark"},{id:"auto",title:"Timeline",icon:"fas fa-history"}];const f=()=>{const w=un(gt),R=new Blob([JSON.stringify(w)],{type:"application/json"}),N=URL.createObjectURL(R),K=document.createElement("a");K.href=N,K.download=`mermaid-history-${Pe().format("YYYY-MM-DD-HHmmss")}.json`,K.click(),URL.revokeObjectURL(N),De("history",{action:"download"})},u=()=>{const w=document.createElement("input");w.type="file",w.accept="application/json",w.addEventListener("change",({target:R})=>{const N=R.files[0];if(!N)return;const K=new FileReader;K.onload=L=>{const x=JSON.parse(L.target.result);_n(x)},K.readAsText(N)}),w.click()},p=(w=!1)=>{const R=vn();yn(w)!==R?wn({state:n,time:Date.now(),type:w?"auto":"manual"}):w||sr("State already saved.")},h=w=>{!w&&!ar("Clear all saved items?")||kn(w)},g=w=>{Ke.set({...w,updateDiagram:!0})},m=w=>{const R=new Date(w);return`${new Date(R).toLocaleString()} (${Pe(R).fromNow()})`};at(()=>{xe.set("manual"),setInterval(()=>{p(!0)},mr)}),bn.subscribe(w=>{w.length>0&&l.length===2&&(t(0,l=[{id:"loader",title:"Revisions",icon:"fab fa-git-alt"},...l]),xe.set("loader"))});let b=!1;const $=()=>u(),A=()=>f(),C=()=>p(),k=()=>h(),S=w=>g(w),O=w=>h(w);function j(w){b=w,t(1,b)}return[l,b,s,i,a,f,u,p,h,g,m,$,A,C,k,S,O,j]}class gr extends ve{constructor(e){super(),ye(this,e,pr,hr,we,{})}}function br(r){let e,t;return e=new Rn({}),{c(){ue(e.$$.fragment)},l(n){de(e.$$.fragment,n)},m(n,s){fe(e,n,s),t=!0},i(n){t||(te(e.$$.fragment,n),t=!0)},o(n){ne(e.$$.fragment,n),t=!1},d(n){he(e,n)}}}function xt(r){let e,t,n,s;return{c(){e=_("button"),t=_("i"),this.h()},l(i){e=v(i,"BUTTON",{class:!0,title:!0,"data-cy":!0});var a=y(e);t=v(a,"I",{class:!0}),y(t).forEach(d),a.forEach(d),this.h()},h(){o(t,"class","fas fa-sync"),o(e,"class","btn btn-secondary btn-xs mr-1"),o(e,"title","Sync Diagram ("+Sn+" + Enter)"),o(e,"data-cy","sync")},m(i,a){F(i,e,a),c(e,t),n||(s=J(e,"click",Xt),n=!0)},p:le,d(i){i&&d(e),n=!1,s()}}}function _r(r){let e,t,n,s,i,a,l,f,u,p,h,g,m,b,$,A,C,k=!r[3].autoSync&&xt();return{c(){e=_("div"),t=_("div"),n=_("label"),s=_("span"),i=z("Auto sync"),a=P(),l=_("input"),u=P(),k&&k.c(),p=P(),h=_("button"),g=_("a"),m=_("i"),b=z("Docs"),this.h()},l(S){e=v(S,"DIV",{slot:!0,class:!0});var O=y(e);t=v(O,"DIV",{class:!0});var j=y(t);n=v(j,"LABEL",{class:!0,for:!0});var w=y(n);s=v(w,"SPAN",{});var R=y(s);i=Z(R,"Auto sync"),R.forEach(d),a=V(w),l=v(w,"INPUT",{type:!0,class:!0,id:!0}),w.forEach(d),j.forEach(d),u=V(O),k&&k.l(O),p=V(O),h=v(O,"BUTTON",{class:!0,title:!0});var N=y(h);g=v(N,"A",{target:!0,rel:!0,href:!0,"data-cy":!0});var K=y(g);m=v(K,"I",{class:!0}),y(m).forEach(d),b=Z(K,"Docs"),K.forEach(d),N.forEach(d),O.forEach(d),this.h()},h(){o(l,"type","checkbox"),o(l,"class",f="toggle "+(r[3].autoSync?"btn-secondary":"toggle-primary")+" ml-1"),o(l,"id","autoSync"),o(n,"class","cursor-pointer label"),o(n,"for","autoSync"),o(t,"class","form-control flex-row items-center"),o(m,"class","fas fa-book mr-1"),o(g,"target","_blank"),o(g,"rel","noreferrer"),o(g,"href",r[0]),o(g,"data-cy","docs"),o(h,"class","btn btn-secondary btn-xs"),o(h,"title",$="View documentation for "+r[2].replace("Diagram","")+" diagram"),o(e,"slot","actions"),o(e,"class","flex flex-row items-center")},m(S,O){F(S,e,O),c(e,t),c(t,n),c(n,s),c(s,i),c(n,a),c(n,l),l.checked=r[4].autoSync,c(e,u),k&&k.m(e,null),c(e,p),c(e,h),c(h,g),c(g,m),c(g,b),A||(C=J(l,"change",r[7]),A=!0)},p(S,O){O&8&&f!==(f="toggle "+(S[3].autoSync?"btn-secondary":"toggle-primary")+" ml-1")&&o(l,"class",f),O&16&&(l.checked=S[4].autoSync),S[3].autoSync?k&&(k.d(1),k=null):k?k.p(S,O):(k=xt(),k.c(),k.m(e,p)),O&1&&o(g,"href",S[0]),O&4&&$!==($="View documentation for "+S[2].replace("Diagram","")+" diagram")&&o(h,"title",$)},d(S){S&&d(e),k&&k.d(),A=!1,C()}}}function vr(r){let e,t,n;return t=new En({}),{c(){e=_("div"),ue(t.$$.fragment),this.h()},l(s){e=v(s,"DIV",{class:!0});var i=y(e);de(t.$$.fragment,i),i.forEach(d),this.h()},h(){o(e,"class","flex-1 overflow-auto")},m(s,i){F(s,e,i),fe(t,e,null),n=!0},p:le,i(s){n||(te(t.$$.fragment,s),n=!0)},o(s){ne(t.$$.fragment,s),n=!1},d(s){s&&d(e),he(t)}}}function yr(r){let e,t,n,s,i,a,l,f,u,p,h,g,m,b;return{c(){e=_("div"),t=_("label"),n=_("span"),s=z("Pan & Zoom"),i=P(),a=_("input"),f=P(),u=_("a"),p=_("i"),h=z("Full screen"),this.h()},l($){e=v($,"DIV",{slot:!0,class:!0});var A=y(e);t=v(A,"LABEL",{class:!0,for:!0});var C=y(t);n=v(C,"SPAN",{});var k=y(n);s=Z(k,"Pan & Zoom"),k.forEach(d),i=V(C),a=v(C,"INPUT",{type:!0,class:!0,id:!0}),C.forEach(d),f=V(A),u=v(A,"A",{href:!0,target:!0,rel:!0,class:!0,title:!0});var S=y(u);p=v(S,"I",{class:!0}),y(p).forEach(d),h=Z(S,"Full screen"),S.forEach(d),A.forEach(d),this.h()},h(){o(a,"type","checkbox"),o(a,"class",l="toggle "+(r[3].panZoom?"btn-secondary":"toggle-primary")+" ml-1"),o(a,"id","panZoom"),o(t,"class","cursor-pointer label py-0"),o(t,"for","panZoom"),o(p,"class","fas fa-external-link-alt mr-1"),o(u,"href",g=`${_t}/view#${r[3].serialized}`),o(u,"target","_blank"),o(u,"rel","noreferrer"),o(u,"class","btn btn-secondary btn-xs"),o(u,"title","View diagram in new page"),o(e,"slot","actions"),o(e,"class","flex flex-row items-center")},m($,A){F($,e,A),c(e,t),c(t,n),c(n,s),c(t,i),c(t,a),a.checked=r[4].panZoom,c(e,f),c(e,u),c(u,p),c(u,h),m||(b=J(a,"change",r[8]),m=!0)},p($,A){A&8&&l!==(l="toggle "+($[3].panZoom?"btn-secondary":"toggle-primary")+" ml-1")&&o(a,"class",l),A&16&&(a.checked=$[4].panZoom),A&8&&g!==(g=`${_t}/view#${$[3].serialized}`)&&o(u,"href",g)},d($){$&&d(e),m=!1,b()}}}function wr(r){let e,t,n,s,i,a,l,f,u,p,h,g,m,b,$,A,C,k,S,O,j,w;return t=new jn({}),a=new Le({props:{tabs:r[6],isCloseable:!1,activeTabID:r[1],title:"Mermaid",$$slots:{actions:[_r],default:[br]},$$scope:{ctx:r}}}),a.$on("select",r[5]),u=new Jn({}),h=new gr({}),m=new rr({}),k=new Le({props:{title:"Diagram",isCloseable:!1,$$slots:{actions:[yr],default:[vr]},$$scope:{ctx:r}}}),{c(){e=_("div"),ue(t.$$.fragment),n=P(),s=_("div"),i=_("div"),ue(a.$$.fragment),l=P(),f=_("div"),ue(u.$$.fragment),p=P(),ue(h.$$.fragment),g=P(),ue(m.$$.fragment),b=P(),$=_("div"),A=P(),C=_("div"),ue(k.$$.fragment),S=P(),O=_("div"),j=z("Code editing not supported on mobile. Please use a desktop browser."),this.h()},l(R){e=v(R,"DIV",{class:!0});var N=y(e);de(t.$$.fragment,N),n=V(N),s=v(N,"DIV",{class:!0});var K=y(s);i=v(K,"DIV",{class:!0,id:!0,style:!0});var L=y(i);de(a.$$.fragment,L),l=V(L),f=v(L,"DIV",{class:!0});var x=y(f);de(u.$$.fragment,x),p=V(x),de(h.$$.fragment,x),g=V(x),de(m.$$.fragment,x),x.forEach(d),L.forEach(d),b=V(K),$=v(K,"DIV",{id:!0,class:!0}),y($).forEach(d),A=V(K),C=v(K,"DIV",{class:!0});var Y=y(C);de(k.$$.fragment,Y),S=V(Y),O=v(Y,"DIV",{class:!0});var B=y(O);j=Z(B,"Code editing not supported on mobile. Please use a desktop browser."),B.forEach(d),Y.forEach(d),K.forEach(d),N.forEach(d),this.h()},h(){o(f,"class","-mt-2"),o(i,"class","hidden md:flex flex-col"),o(i,"id","editorPane"),dn(i,"width","40%"),o($,"id","resizeHandler"),o($,"class","hidden md:block svelte-1fge7im"),o(O,"class","md:hidden rounded shadow p-2 mx-2"),o(C,"class","flex-1 flex flex-col overflow-hidden"),o(s,"class","flex-1 flex overflow-hidden"),o(e,"class","h-full flex flex-col overflow-hidden")},m(R,N){F(R,e,N),fe(t,e,null),c(e,n),c(e,s),c(s,i),fe(a,i,null),c(i,l),c(i,f),fe(u,f,null),c(f,p),fe(h,f,null),c(f,g),fe(m,f,null),c(s,b),c(s,$),c(s,A),c(s,C),fe(k,C,null),c(C,S),c(C,O),c(O,j),w=!0},p(R,[N]){const K={};N&2&&(K.activeTabID=R[1]),N&1053&&(K.$$scope={dirty:N,ctx:R}),a.$set(K);const L={};N&1048&&(L.$$scope={dirty:N,ctx:R}),k.$set(L)},i(R){w||(te(t.$$.fragment,R),te(a.$$.fragment,R),te(u.$$.fragment,R),te(h.$$.fragment,R),te(m.$$.fragment,R),te(k.$$.fragment,R),w=!0)},o(R){ne(t.$$.fragment,R),ne(a.$$.fragment,R),ne(u.$$.fragment,R),ne(h.$$.fragment,R),ne(m.$$.fragment,R),ne(k.$$.fragment,R),w=!1},d(R){R&&d(e),he(t),he(a),he(u),he(h),he(m),he(k)}}}const Pt="https://mermaid-js.github.io/mermaid";function kr(r,e,t){let n,s;Se(r,Ae,m=>t(3,n=m)),Se(r,Ke,m=>t(4,s=m));const i={graph:{code:"/#/flowchart",config:"/#/flowchart?id=configuration"},flowchart:{code:"/#/flowchart",config:"/#/flowchart?id=configuration"},sequenceDiagram:{code:"/#/sequenceDiagram",config:"/#/sequenceDiagram?id=configuration"},classDiagram:{code:"/#/classDiagram",config:"/#/classDiagram?id=configuration"},"stateDiagram-v2":{code:"/#/stateDiagram"},gantt:{code:"/#/gantt",config:"/#/gantt?id=configuration"},pie:{code:"/#/pie"},erDiagram:{code:"/#/entityRelationshipDiagram",config:"/#/entityRelationshipDiagram?id=styling"},journey:{code:"/#/user-journey"},gitGraph:{code:"/#/gitgraph",config:"/#/gitgraph?id=gitgraph-specific-configuration-options"}};let a=Pt,l="code",f="";Ae.subscribe(({code:m,editorMode:b})=>{t(1,l=b);const $=/([\S]+)[\s\n]/.exec(m);if($&&$.length>1){t(2,f=$[1]);const A=i[f]??{code:""};t(0,a=Pt+(A[b]??A.code??""))}});const u=m=>{const b=m.detail.id==="code"?"code":"config";Dn({editorMode:b})},p=[{id:"code",title:"Code",icon:"fas fa-code"},{id:"config",title:"Config",icon:"fas fa-cogs"}];at(async()=>{await $n();const m=document.getElementById("resizeHandler"),b=document.getElementById("editorPane");if(!m||!b){console.debug("Failed to find resize handler or editor pane",{resizer:m,element:b});return}const $=C=>{const k=C.pageX-b.getBoundingClientRect().left;k>50&&(b.style.width=`${k}px`)},A=()=>{window.removeEventListener("mousemove",$)};m.addEventListener("mousedown",C=>{C.preventDefault(),window.addEventListener("mousemove",$),window.addEventListener("mouseup",A)})});function h(){s.autoSync=this.checked,Ke.set(s)}function g(){s.panZoom=this.checked,Ke.set(s)}return[a,l,f,n,s,u,p,h,g]}class Cr extends ve{constructor(e){super(),ye(this,e,kr,wr,we,{})}}export{Cr as default}; diff --git a/_app/immutable/components/pages/view/_page.svelte-606950c2.js b/_app/immutable/components/pages/view/_page.svelte-606950c2.js new file mode 100644 index 00000000..fbc3d5ae --- /dev/null +++ b/_app/immutable/components/pages/view/_page.svelte-606950c2.js @@ -0,0 +1 @@ +import{S as r,i as s,s as i,x as m,y as c,z as f,L as u,f as p,t as l,A as $,o as _}from"../../../chunks/index-e871a861.js";import{V as g}from"../../../chunks/View-c7762dc8.js";import{i as d}from"../../../chunks/state-96b4af81.js";function x(o){let t,e;return t=new g({}),{c(){m(t.$$.fragment)},l(n){c(t.$$.fragment,n)},m(n,a){f(t,n,a),e=!0},p:u,i(n){e||(p(t.$$.fragment,n),e=!0)},o(n){l(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function w(o){return _(d),[]}class V extends r{constructor(t){super(),s(this,t,w,x,i,{})}}export{V as default}; diff --git a/_app/immutable/start-f4d312cc.js b/_app/immutable/start-f4d312cc.js new file mode 100644 index 00000000..f8a83edc --- /dev/null +++ b/_app/immutable/start-f4d312cc.js @@ -0,0 +1 @@ +import{S as pt,i as ht,s as mt,a as _t,e as $,c as gt,b as W,g as ge,t as B,d as we,f as K,h as G,j as wt,o as je,k as yt,l as bt,m as vt,n as Ie,p as H,q as Et,r as kt,u as St,v as Le,w as Z,x as Q,y as De,z as x,A as ee,B as me}from"./chunks/index-e871a861.js";import{S as it,a as lt,I as F,g as Qe,f as xe,b as Ae,c as _e,s as M,i as et,d as se,P as tt,e as Rt,h as It}from"./chunks/singletons-1f15a4a1.js";import{_ as ae}from"./chunks/preload-helper-41c905a7.js";import{b as X,s as Lt}from"./chunks/paths-b72ece5c.js";function At(a,e){return a==="/"||e==="ignore"?a:e==="never"?a.endsWith("/")?a.slice(0,-1):a:e==="always"&&!a.endsWith("/")?a+"/":a}function Ot(a){return a.split("%25").map(decodeURI).join("%25")}function Pt(a){for(const e in a)a[e]=decodeURIComponent(a[e]);return a}const Nt=["href","pathname","search","searchParams","toString","toJSON"];function Ut(a,e){const n=new URL(a);for(const i of Nt){let s=n[i];Object.defineProperty(n,i,{get(){return e(),s},enumerable:!0,configurable:!0})}return jt(n),n}function jt(a){Object.defineProperty(a,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const Tt="/__data.json";function Dt(a){return a.replace(/\/$/,"")+Tt}function ct(a){try{return JSON.parse(sessionStorage[a])}catch{}}function nt(a,e){const n=JSON.stringify(e);try{sessionStorage[a]=n}catch{}}function Vt(...a){let e=5381;for(const n of a)if(typeof n=="string"){let i=n.length;for(;i;)e=e*33^n.charCodeAt(--i)}else if(ArrayBuffer.isView(n)){const i=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let s=i.length;for(;s;)e=e*33^i[--s]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const ye=window.fetch;window.fetch=(a,e)=>((a instanceof Request?a.method:(e==null?void 0:e.method)||"GET")!=="GET"&&ie.delete(Ve(a)),ye(a,e));const ie=new Map;function Ct(a,e){const n=Ve(a,e),i=document.querySelector(n);if(i!=null&&i.textContent){const{body:s,...p}=JSON.parse(i.textContent),t=i.getAttribute("data-ttl");return t&&ie.set(n,{body:s,init:p,ttl:1e3*Number(t)}),Promise.resolve(new Response(s,p))}return ye(a,e)}function qt(a,e,n){if(ie.size>0){const i=Ve(a,n),s=ie.get(i);if(s){if(performance.now(){const s=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(s)return e.push({name:s[1],matcher:s[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const p=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(p)return e.push({name:p[1],matcher:p[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const t=i.split(/\[(.+?)\](?!\])/);return"/"+t.map((h,_)=>{if(_%2){if(h.startsWith("x+"))return Oe(String.fromCharCode(parseInt(h.slice(2),16)));if(h.startsWith("u+"))return Oe(String.fromCharCode(...h.slice(2).split("-").map(I=>parseInt(I,16))));const y=Ft.exec(h);if(!y)throw new Error(`Invalid param: ${h}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,E,U,D,V]=y;return e.push({name:D,matcher:V,optional:!!E,rest:!!U,chained:U?_===1&&t[0]==="":!1}),U?"(.*?)":E?"([^/]*)?":"([^/]+?)"}return Oe(h)}).join("")}).join("")}/?$`),params:e}}function Mt(a){return!/^\([^)]+\)$/.test(a)}function $t(a){return a.slice(1).split("/").filter(Mt)}function Bt(a,e,n){const i={},s=a.slice(1);let p=0;for(let t=0;t_).join("/"),p=0;continue}if(h===void 0){u.rest&&(i[u.name]="");continue}if(!u.matcher||n[u.matcher](h)){i[u.name]=h;continue}if(u.optional&&u.chained){p++;continue}return}if(!p)return i}function Oe(a){return a.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Kt(a,e,n,i){const s=new Set(e);return Object.entries(n).map(([u,[h,_,y]])=>{const{pattern:E,params:U}=Ht(u),D={id:u,exec:V=>{const I=E.exec(V);if(I)return Bt(I,U,i)},errors:[1,...y||[]].map(V=>a[V]),layouts:[0,..._||[]].map(t),leaf:p(h)};return D.errors.length=D.layouts.length=Math.max(D.errors.length,D.layouts.length),D});function p(u){const h=u<0;return h&&(u=~u),[h,a[u]]}function t(u){return u===void 0?u:[s.has(u),a[u]]}}function Gt(a){let e,n,i;var s=a[1][0];function p(t){return{props:{data:t[3],form:t[2]}}}return s&&(e=Z(s,p(a)),a[12](e)),{c(){e&&Q(e.$$.fragment),n=$()},l(t){e&&De(e.$$.fragment,t),n=$()},m(t,u){e&&x(e,t,u),W(t,n,u),i=!0},p(t,u){const h={};if(u&8&&(h.data=t[3]),u&4&&(h.form=t[2]),s!==(s=t[1][0])){if(e){ge();const _=e;B(_.$$.fragment,1,0,()=>{ee(_,1)}),we()}s?(e=Z(s,p(t)),t[12](e),Q(e.$$.fragment),K(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else s&&e.$set(h)},i(t){i||(e&&K(e.$$.fragment,t),i=!0)},o(t){e&&B(e.$$.fragment,t),i=!1},d(t){a[12](null),t&&G(n),e&&ee(e,t)}}}function Jt(a){let e,n,i;var s=a[1][0];function p(t){return{props:{data:t[3],$$slots:{default:[zt]},$$scope:{ctx:t}}}}return s&&(e=Z(s,p(a)),a[11](e)),{c(){e&&Q(e.$$.fragment),n=$()},l(t){e&&De(e.$$.fragment,t),n=$()},m(t,u){e&&x(e,t,u),W(t,n,u),i=!0},p(t,u){const h={};if(u&8&&(h.data=t[3]),u&8215&&(h.$$scope={dirty:u,ctx:t}),s!==(s=t[1][0])){if(e){ge();const _=e;B(_.$$.fragment,1,0,()=>{ee(_,1)}),we()}s?(e=Z(s,p(t)),t[11](e),Q(e.$$.fragment),K(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else s&&e.$set(h)},i(t){i||(e&&K(e.$$.fragment,t),i=!0)},o(t){e&&B(e.$$.fragment,t),i=!1},d(t){a[11](null),t&&G(n),e&&ee(e,t)}}}function zt(a){let e,n,i;var s=a[1][1];function p(t){return{props:{data:t[4],form:t[2]}}}return s&&(e=Z(s,p(a)),a[10](e)),{c(){e&&Q(e.$$.fragment),n=$()},l(t){e&&De(e.$$.fragment,t),n=$()},m(t,u){e&&x(e,t,u),W(t,n,u),i=!0},p(t,u){const h={};if(u&16&&(h.data=t[4]),u&4&&(h.form=t[2]),s!==(s=t[1][1])){if(e){ge();const _=e;B(_.$$.fragment,1,0,()=>{ee(_,1)}),we()}s?(e=Z(s,p(t)),t[10](e),Q(e.$$.fragment),K(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else s&&e.$set(h)},i(t){i||(e&&K(e.$$.fragment,t),i=!0)},o(t){e&&B(e.$$.fragment,t),i=!1},d(t){a[10](null),t&&G(n),e&&ee(e,t)}}}function at(a){let e,n=a[6]&&rt(a);return{c(){e=yt("div"),n&&n.c(),this.h()},l(i){e=bt(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=vt(e);n&&n.l(s),s.forEach(G),this.h()},h(){Ie(e,"id","svelte-announcer"),Ie(e,"aria-live","assertive"),Ie(e,"aria-atomic","true"),H(e,"position","absolute"),H(e,"left","0"),H(e,"top","0"),H(e,"clip","rect(0 0 0 0)"),H(e,"clip-path","inset(50%)"),H(e,"overflow","hidden"),H(e,"white-space","nowrap"),H(e,"width","1px"),H(e,"height","1px")},m(i,s){W(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=rt(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&G(e),n&&n.d()}}}function rt(a){let e;return{c(){e=Et(a[7])},l(n){e=kt(n,a[7])},m(n,i){W(n,e,i)},p(n,i){i&128&&St(e,n[7])},d(n){n&&G(e)}}}function Yt(a){let e,n,i,s,p;const t=[Jt,Gt],u=[];function h(y,E){return y[1][1]?0:1}e=h(a),n=u[e]=t[e](a);let _=a[5]&&at(a);return{c(){n.c(),i=_t(),_&&_.c(),s=$()},l(y){n.l(y),i=gt(y),_&&_.l(y),s=$()},m(y,E){u[e].m(y,E),W(y,i,E),_&&_.m(y,E),W(y,s,E),p=!0},p(y,[E]){let U=e;e=h(y),e===U?u[e].p(y,E):(ge(),B(u[U],1,1,()=>{u[U]=null}),we(),n=u[e],n?n.p(y,E):(n=u[e]=t[e](y),n.c()),K(n,1),n.m(i.parentNode,i)),y[5]?_?_.p(y,E):(_=at(y),_.c(),_.m(s.parentNode,s)):_&&(_.d(1),_=null)},i(y){p||(K(n),p=!0)},o(y){B(n),p=!1},d(y){u[e].d(y),y&&G(i),_&&_.d(y),y&&G(s)}}}function Wt(a,e,n){let{stores:i}=e,{page:s}=e,{constructors:p}=e,{components:t=[]}=e,{form:u}=e,{data_0:h=null}=e,{data_1:_=null}=e;wt(i.page.notify);let y=!1,E=!1,U=null;je(()=>{const S=i.page.subscribe(()=>{y&&(n(6,E=!0),n(7,U=document.title||"untitled page"))});return n(5,y=!0),S});function D(S){Le[S?"unshift":"push"](()=>{t[1]=S,n(0,t)})}function V(S){Le[S?"unshift":"push"](()=>{t[0]=S,n(0,t)})}function I(S){Le[S?"unshift":"push"](()=>{t[0]=S,n(0,t)})}return a.$$set=S=>{"stores"in S&&n(8,i=S.stores),"page"in S&&n(9,s=S.page),"constructors"in S&&n(1,p=S.constructors),"components"in S&&n(0,t=S.components),"form"in S&&n(2,u=S.form),"data_0"in S&&n(3,h=S.data_0),"data_1"in S&&n(4,_=S.data_1)},a.$$.update=()=>{a.$$.dirty&768&&i.page.set(s)},[t,p,u,h,_,y,E,U,i,s,D,V,I]}class Xt extends pt{constructor(e){super(),ht(this,e,Wt,Yt,mt,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const Zt={},be=[()=>ae(()=>import("./chunks/0-ad31fce8.js"),["./chunks/0-ad31fce8.js","./chunks/_layout-1224cfc9.js","./components/pages/_layout.svelte-dd1ecc06.js","./chunks/index-e871a861.js","./chunks/paths-b72ece5c.js","./chunks/state-96b4af81.js","./chunks/_commonjsHelpers-35101cd5.js","./chunks/preload-helper-41c905a7.js","./chunks/transform-12111574.js","./chunks/utils-3cbdbddf-b0df7f51.js","./chunks/setupGraphViewbox-e1099da8-c59d788d.js","./chunks/commonDb-7528607a-bad803a2.js","./chunks/mermaidAPI-a1a81019-23aa79a7.js","./chunks/errorRenderer-11917bdc-277af2cf.js","./chunks/stringify-ec884b6d.js","./chunks/theme-5d4099fd.js","./assets/_layout-4675f026.css"],import.meta.url),()=>ae(()=>import("./chunks/1-d5c935f1.js"),["./chunks/1-d5c935f1.js","./components/error.svelte-dc092e54.js","./chunks/index-e871a861.js","./chunks/singletons-1f15a4a1.js","./chunks/paths-b72ece5c.js"],import.meta.url),()=>ae(()=>import("./chunks/2-22b06e9c.js"),["./chunks/2-22b06e9c.js","./components/pages/_page.svelte-a70c02e6.js","./chunks/index-e871a861.js","./chunks/singletons-1f15a4a1.js","./chunks/paths-b72ece5c.js"],import.meta.url),()=>ae(()=>import("./chunks/3-484f0d31.js"),["./chunks/3-484f0d31.js","./components/pages/edit/_page.svelte-a983d7e7.js","./chunks/index-e871a861.js","./chunks/state-96b4af81.js","./chunks/_commonjsHelpers-35101cd5.js","./chunks/preload-helper-41c905a7.js","./chunks/transform-12111574.js","./chunks/utils-3cbdbddf-b0df7f51.js","./chunks/setupGraphViewbox-e1099da8-c59d788d.js","./chunks/commonDb-7528607a-bad803a2.js","./chunks/mermaidAPI-a1a81019-23aa79a7.js","./chunks/errorRenderer-11917bdc-277af2cf.js","./chunks/stringify-ec884b6d.js","./chunks/theme-5d4099fd.js","./chunks/View-c7762dc8.js","./assets/View-0c536ccf.css","./chunks/paths-b72ece5c.js","./assets/_page-3d9cf6f0.css"],import.meta.url),()=>ae(()=>import("./chunks/4-dacf120e.js"),["./chunks/4-dacf120e.js","./components/pages/view/_page.svelte-606950c2.js","./chunks/index-e871a861.js","./chunks/View-c7762dc8.js","./chunks/state-96b4af81.js","./chunks/_commonjsHelpers-35101cd5.js","./chunks/preload-helper-41c905a7.js","./chunks/transform-12111574.js","./chunks/utils-3cbdbddf-b0df7f51.js","./chunks/setupGraphViewbox-e1099da8-c59d788d.js","./chunks/commonDb-7528607a-bad803a2.js","./chunks/mermaidAPI-a1a81019-23aa79a7.js","./chunks/errorRenderer-11917bdc-277af2cf.js","./chunks/stringify-ec884b6d.js","./assets/View-0c536ccf.css"],import.meta.url)],ft=[],Qt={"/":[2],"/edit":[3],"/view":[4]},xt={handleError:({error:a})=>{console.error(a)}};let le=class{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},ot=class{constructor(e,n){this.status=e,this.location=n}};async function en(a){var e;for(const n in a)if(typeof((e=a[n])==null?void 0:e.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(a).map(async([i,s])=>[i,await s])));return a}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");const tn=-1,nn=-2,an=-3,rn=-4,on=-5,sn=-6;function ln(a){if(typeof a=="number")return i(a,!0);if(!Array.isArray(a)||a.length===0)throw new Error("Invalid input");const e=a,n=Array(e.length);function i(s,p=!1){if(s===tn)return;if(s===an)return NaN;if(s===rn)return 1/0;if(s===on)return-1/0;if(s===sn)return-0;if(p)throw new Error("Invalid input");if(s in n)return n[s];const t=e[s];if(!t||typeof t!="object")n[s]=t;else if(Array.isArray(t))if(typeof t[0]=="string")switch(t[0]){case"Date":n[s]=new Date(t[1]);break;case"Set":const h=new Set;n[s]=h;for(let E=1;Ee!=null)}const Pe=Kt(be,ft,Qt,Zt),ut=be[0],Te=be[1];ut();Te();const Y=ct(it)??{},re=ct(lt)??{};function Ne(a){Y[a]=se()}function fn({target:a}){var We;const e=document.documentElement,n=[],i=[];let s=null;const p={before_navigate:[],after_navigate:[]};let t={branch:[],error:null,url:null},u=!1,h=!1,_=!0,y=!1,E=!1,U=!1,D=!1,V,I=(We=history.state)==null?void 0:We[F];I||(I=Date.now(),history.replaceState({...history.state,[F]:I},"",location.href));const S=Y[I];S&&(history.scrollRestoration="manual",scrollTo(S.x,S.y));let J,Ce,ce;async function qe(){ce=ce||Promise.resolve(),await ce,ce=null;const r=new URL(location.href),o=de(r,!0);s=null,await $e(o,r,[])}function Fe(r){i.some(o=>o==null?void 0:o.snapshot)&&(re[r]=i.map(o=>{var c;return(c=o==null?void 0:o.snapshot)==null?void 0:c.capture()}))}function He(r){var o;(o=re[r])==null||o.forEach((c,l)=>{var d,f;(f=(d=i[l])==null?void 0:d.snapshot)==null||f.restore(c)})}async function ve(r,{noScroll:o=!1,replaceState:c=!1,keepFocus:l=!1,state:d={},invalidateAll:f=!1},g,m){return typeof r=="string"&&(r=new URL(r,Qe(document))),he({url:r,scroll:o?se():null,keepfocus:l,redirect_chain:g,details:{state:d,replaceState:c},nav_token:m,accepted:()=>{f&&(D=!0)},blocked:()=>{},type:"goto"})}async function Me(r){const o=de(r,!1);if(!o)throw new Error(`Attempted to preload a URL that does not belong to this app: ${r}`);return s={id:o.id,promise:Ge(o).then(c=>(c.type==="loaded"&&c.state.error&&(s=null),c))},s.promise}async function fe(...r){const c=Pe.filter(l=>r.some(d=>l.exec(d))).map(l=>Promise.all([...l.layouts,l.leaf].map(d=>d==null?void 0:d[1]())));await Promise.all(c)}async function $e(r,o,c,l,d,f={},g){var b,w;Ce=f;let m=r&&await Ge(r);if(m||(m=await Ye(o,{id:null},await oe(new Error(`Not found: ${o.pathname}`),{url:o,params:{},route:{id:null}}),404)),o=(r==null?void 0:r.url)||o,Ce!==f)return!1;if(m.type==="redirect")if(c.length>10||c.includes(o.pathname))m=await ue({status:500,error:await oe(new Error("Redirect loop"),{url:o,params:{},route:{id:null}}),url:o,route:{id:null}});else return ve(new URL(m.location,o).href,{},[...c,o.pathname],f),!1;else((w=(b=m.props)==null?void 0:b.page)==null?void 0:w.status)>=400&&await M.updated.check()&&await ne(o);if(n.length=0,D=!1,y=!0,l&&(Ne(l),Fe(l)),d&&d.details){const{details:k}=d,A=k.replaceState?0:1;if(k.state[F]=I+=A,history[k.replaceState?"replaceState":"pushState"](k.state,"",o),!k.replaceState){let P=I+1;for(;re[P]||Y[P];)delete re[P],delete Y[P],P+=1}}if(s=null,h?(t=m.state,m.props.page&&(m.props.page.url=o),V.$set(m.props)):Be(m),d){const{scroll:k,keepfocus:A}=d,{activeElement:P}=document;await me();const L=document.activeElement!==P&&document.activeElement!==document.body;if(!A&&!L&&await Ue(),_){const v=o.hash&&document.getElementById(decodeURIComponent(o.hash.slice(1)));k?scrollTo(k.x,k.y):v?v.scrollIntoView():scrollTo(0,0)}}else await me();_=!0,m.props.page&&(J=m.props.page),g&&g(),y=!1}function Be(r){var l;t=r.state;const o=document.querySelector("style[data-sveltekit]");o&&o.remove(),J=r.props.page,V=new Xt({target:a,props:{...r.props,stores:M,components:i},hydrate:!0}),He(I);const c={from:null,to:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};p.after_navigate.forEach(d=>d(c)),h=!0}async function te({url:r,params:o,branch:c,status:l,error:d,route:f,form:g}){let m="never";for(const L of c)(L==null?void 0:L.slash)!==void 0&&(m=L.slash);r.pathname=At(r.pathname,m),r.search=r.search;const b={type:"loaded",state:{url:r,params:o,branch:c,error:d,route:f},props:{constructors:cn(c).map(L=>L.node.component)}};g!==void 0&&(b.props.form=g);let w={},k=!J,A=0;for(let L=0;L(m.params.add(j),v[j])}),data:(f==null?void 0:f.data)??null,url:Ut(c,()=>{m.url=!0}),async fetch(v,j){let C;v instanceof Request?(C=v.url,j={body:v.method==="GET"||v.method==="HEAD"?void 0:await v.blob(),cache:v.cache,credentials:v.credentials,headers:v.headers,integrity:v.integrity,keepalive:v.keepalive,method:v.method,mode:v.mode,redirect:v.redirect,referrer:v.referrer,referrerPolicy:v.referrerPolicy,signal:v.signal,...j}):C=v;const q=new URL(C,c);return P(q.href),q.origin===c.origin&&(C=q.href.slice(c.origin.length)),h?qt(C,q.href,j):Ct(C,j)},setHeaders:()=>{},depends:P,parent(){return m.parent=!0,o()}};g=await b.universal.load.call(null,L)??null,g=g?await en(g):null}return{node:b,loader:r,server:f,universal:(k=b.universal)!=null&&k.load?{type:"data",data:g,uses:m}:null,data:g??(f==null?void 0:f.data)??null,slash:((A=b.universal)==null?void 0:A.trailingSlash)??(f==null?void 0:f.slash)}}function Ke(r,o,c,l,d){if(D)return!0;if(!l)return!1;if(l.parent&&r||l.route&&o||l.url&&c)return!0;for(const f of l.params)if(d[f]!==t.params[f])return!0;for(const f of l.dependencies)if(n.some(g=>g(new URL(f))))return!0;return!1}function ke(r,o){return(r==null?void 0:r.type)==="data"?{type:"data",data:r.data,uses:{dependencies:new Set(r.uses.dependencies??[]),params:new Set(r.uses.params??[]),parent:!!r.uses.parent,route:!!r.uses.route,url:!!r.uses.url},slash:r.slash}:(r==null?void 0:r.type)==="skip"?o??null:null}async function Ge({id:r,invalidating:o,url:c,params:l,route:d}){if((s==null?void 0:s.id)===r)return s.promise;const{errors:f,layouts:g,leaf:m}=d,b=[...g,m];f.forEach(R=>R==null?void 0:R().catch(()=>{})),b.forEach(R=>R==null?void 0:R[1]().catch(()=>{}));let w=null;const k=t.url?r!==t.url.pathname+t.url.search:!1,A=t.route?d.id!==t.route.id:!1;let P=!1;const L=b.map((R,T)=>{var z;const O=t.branch[T],N=!!(R!=null&&R[0])&&((O==null?void 0:O.loader)!==R[1]||Ke(P,A,k,(z=O.server)==null?void 0:z.uses,l));return N&&(P=!0),N});if(L.some(Boolean)){try{w=await st(c,L)}catch(R){return ue({status:R instanceof le?R.status:500,error:await oe(R,{url:c,params:l,route:{id:d.id}}),url:c,route:d})}if(w.type==="redirect")return w}const v=w==null?void 0:w.nodes;let j=!1;const C=b.map(async(R,T)=>{var Se;if(!R)return;const O=t.branch[T],N=v==null?void 0:v[T];if((!N||N.type==="skip")&&R[1]===(O==null?void 0:O.loader)&&!Ke(j,A,k,(Se=O.universal)==null?void 0:Se.uses,l))return O;if(j=!0,(N==null?void 0:N.type)==="error")throw N;return Ee({loader:R[1],url:c,params:l,route:d,parent:async()=>{var Ze;const Xe={};for(let Re=0;Re{});const q=[];for(let R=0;RPromise.resolve({}),server_data_node:ke(f)}),b={node:await Te(),loader:Te,universal:null,server:null,data:null};return await te({url:c,params:d,branch:[m,b],status:r,error:o,route:null})}function de(r,o){if(et(r,X))return;const c=pe(r);for(const l of Pe){const d=l.exec(c);if(d)return{id:r.pathname+r.search,invalidating:o,route:l,params:Pt(d),url:r}}}function pe(r){return Ot(r.pathname.slice(X.length)||"/")}function ze({url:r,type:o,intent:c,delta:l}){var m,b;let d=!1;const f={from:{params:t.params,route:{id:((m=t.route)==null?void 0:m.id)??null},url:t.url},to:{params:(c==null?void 0:c.params)??null,route:{id:((b=c==null?void 0:c.route)==null?void 0:b.id)??null},url:r},willUnload:!c,type:o};l!==void 0&&(f.delta=l);const g={...f,cancel:()=>{d=!0}};return E||p.before_navigate.forEach(w=>w(g)),d?null:f}async function he({url:r,scroll:o,keepfocus:c,redirect_chain:l,details:d,type:f,delta:g,nav_token:m,accepted:b,blocked:w}){const k=de(r,!1),A=ze({url:r,type:f,delta:g,intent:k});if(!A){w();return}const P=I;b(),E=!0,h&&M.navigating.set(A),await $e(k,r,l,P,{scroll:o,keepfocus:c,details:d},m,()=>{E=!1,p.after_navigate.forEach(L=>L(A)),M.navigating.set(null)})}async function Ye(r,o,c,l){return r.origin===location.origin&&r.pathname===location.pathname&&!u?await ue({status:l,error:c,url:r,route:o}):await ne(r)}function ne(r){return location.href=r.href,new Promise(()=>{})}function dt(){let r;e.addEventListener("mousemove",f=>{const g=f.target;clearTimeout(r),r=setTimeout(()=>{l(g,2)},20)});function o(f){l(f.composedPath()[0],1)}e.addEventListener("mousedown",o),e.addEventListener("touchstart",o,{passive:!0});const c=new IntersectionObserver(f=>{for(const g of f)g.isIntersecting&&(fe(pe(new URL(g.target.href))),c.unobserve(g.target))},{threshold:0});function l(f,g){const m=xe(f,e);if(!m)return;const{url:b,external:w}=Ae(m,X);if(w)return;const k=_e(m);k.reload||(g<=k.preload_data?Me(b):g<=k.preload_code&&fe(pe(b)))}function d(){c.disconnect();for(const f of e.querySelectorAll("a")){const{url:g,external:m}=Ae(f,X);if(m)continue;const b=_e(f);b.reload||(b.preload_code===tt.viewport&&c.observe(f),b.preload_code===tt.eager&&fe(pe(g)))}}p.after_navigate.push(d),d()}return{after_navigate:r=>{je(()=>(p.after_navigate.push(r),()=>{const o=p.after_navigate.indexOf(r);p.after_navigate.splice(o,1)}))},before_navigate:r=>{je(()=>(p.before_navigate.push(r),()=>{const o=p.before_navigate.indexOf(r);p.before_navigate.splice(o,1)}))},disable_scroll_handling:()=>{(y||!h)&&(_=!1)},goto:(r,o={})=>ve(r,o,[]),invalidate:r=>{if(typeof r=="function")n.push(r);else{const{href:o}=new URL(r,location.href);n.push(c=>c.href===o)}return qe()},invalidateAll:()=>(D=!0,qe()),preload_data:async r=>{const o=new URL(r,Qe(document));await Me(o)},preload_code:fe,apply_action:async r=>{if(r.type==="error"){const o=new URL(location.href),{branch:c,route:l}=t;if(!l)return;const d=await Je(t.branch.length,c,l.errors);if(d){const f=await te({url:o,params:t.params,branch:c.slice(0,d.idx).concat(d.node),status:r.status??500,error:r.error,route:l});t=f.state,V.$set(f.props),me().then(Ue)}}else if(r.type==="redirect")ve(r.location,{invalidateAll:!0},[]);else{const o={form:r.data,page:{...J,form:r.data,status:r.status}};V.$set(o),r.type==="success"&&me().then(Ue)}},_start_router:()=>{var r;history.scrollRestoration="manual",addEventListener("beforeunload",o=>{var l;let c=!1;if(!E){const d={from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url},to:null,willUnload:!0,type:"leave",cancel:()=>c=!0};p.before_navigate.forEach(f=>f(d))}c?(o.preventDefault(),o.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&(Ne(I),nt(it,Y),Fe(I),nt(lt,re))}),(r=navigator.connection)!=null&&r.saveData||dt(),e.addEventListener("click",o=>{if(o.button||o.which!==1||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey||o.defaultPrevented)return;const c=xe(o.composedPath()[0],e);if(!c)return;const{url:l,external:d,target:f}=Ae(c,X);if(!l)return;if(f==="_parent"||f==="_top"){if(window.parent!==window)return}else if(f&&f!=="_self")return;const g=_e(c);if(!(c instanceof SVGAElement)&&l.protocol!==location.protocol&&!(l.protocol==="https:"||l.protocol==="http:"))return;if(d||g.reload){ze({url:l,type:"link"})||o.preventDefault(),E=!0;return}const[b,w]=l.href.split("#");if(w!==void 0&&b===location.href.split("#")[0]){U=!0,Ne(I),t.url=l,M.page.set({...J,url:l}),M.page.notify();return}he({url:l,scroll:g.noscroll?se():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:l.href===location.href},accepted:()=>o.preventDefault(),blocked:()=>o.preventDefault(),type:"link"})}),e.addEventListener("submit",o=>{if(o.defaultPrevented)return;const c=HTMLFormElement.prototype.cloneNode.call(o.target),l=o.submitter;if(((l==null?void 0:l.formMethod)||c.method)!=="get")return;const f=new URL((l==null?void 0:l.hasAttribute("formaction"))&&(l==null?void 0:l.formAction)||c.action);if(et(f,X))return;const g=o.target,{noscroll:m,reload:b}=_e(g);if(b)return;o.preventDefault(),o.stopPropagation();const w=new FormData(g),k=l==null?void 0:l.getAttribute("name");k&&w.append(k,(l==null?void 0:l.getAttribute("value"))??""),f.search=new URLSearchParams(w).toString(),he({url:f,scroll:m?se():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async o=>{var c;if((c=o.state)!=null&&c[F]){if(o.state[F]===I)return;const l=Y[o.state[F]];if(t.url.href.split("#")[0]===location.href.split("#")[0]){Y[I]=se(),I=o.state[F],scrollTo(l.x,l.y);return}const d=o.state[F]-I;let f=!1;await he({url:new URL(location.href),scroll:l,keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{I=o.state[F]},blocked:()=>{history.go(-d),f=!0},type:"popstate",delta:d}),f||He(I)}}),addEventListener("hashchange",()=>{U&&(U=!1,history.replaceState({...history.state,[F]:++I},"",location.href))});for(const o of document.querySelectorAll("link"))o.rel==="icon"&&(o.href=o.href);addEventListener("pageshow",o=>{o.persisted&&M.navigating.set(null)})},_hydrate:async({status:r=200,error:o,node_ids:c,params:l,route:d,data:f,form:g})=>{u=!0;const m=new URL(location.href);({params:l={},route:d={id:null}}=de(m,!1)||{});let b;try{const w=c.map(async(k,A)=>{const P=f[A];return Ee({loader:be[k],url:m,params:l,route:d,parent:async()=>{const L={};for(let v=0;vk===d.id)??null})}catch(w){if(w instanceof ot){await ne(new URL(w.location,location.href));return}b=await ue({status:w instanceof le?w.status:500,error:await oe(w,{url:m,params:l,route:d}),url:m,route:d})}Be(b)}}}async function st(a,e){var p;const n=new URL(a);n.pathname=Dt(a.pathname),n.searchParams.append("x-sveltekit-invalidated",e.map(t=>t?"1":"").join("_"));const i=await ye(n.href),s=await i.json();if(!i.ok)throw new le(i.status,s);return(p=s.nodes)==null||p.forEach(t=>{(t==null?void 0:t.type)==="data"&&(t.data=ln(t.data),t.uses={dependencies:new Set(t.uses.dependencies??[]),params:new Set(t.uses.params??[]),parent:!!t.uses.parent,route:!!t.uses.route,url:!!t.uses.url})}),s}function oe(a,e){return a instanceof le?a.body:xt.handleError({error:a,event:e})??{message:e.route.id!=null?"Internal Error":"Not Found"}}function Ue(){const a=document.querySelector("[autofocus]");if(a)a.focus();else{const e=document.body,n=e.getAttribute("tabindex");return e.tabIndex=-1,e.focus({preventScroll:!0}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex"),new Promise(i=>{setTimeout(()=>{var s;i((s=getSelection())==null?void 0:s.removeAllRanges())})})}}async function gn({assets:a,env:e,hydrate:n,target:i,version:s}){Lt(a),It(s);const p=fn({target:i});Rt({client:p}),n?await p._hydrate(n):p.goto(location.href,{replaceState:!0}),p._start_router()}export{gn as start}; diff --git a/_app/version.json b/_app/version.json index bea34f50..acee1795 100644 --- a/_app/version.json +++ b/_app/version.json @@ -1 +1 @@ -{"version":"1677216133718"} \ No newline at end of file +{"version":"1678907445425"} \ No newline at end of file diff --git a/edit.html b/edit.html index 68166de0..6be895ae 100644 --- a/edit.html +++ b/edit.html @@ -50,22 +50,22 @@ crossorigin="anonymous" referrerpolicy="no-referrer"> - - - + + +
diff --git a/index.html b/index.html index 68166de0..6be895ae 100644 --- a/index.html +++ b/index.html @@ -50,22 +50,22 @@ crossorigin="anonymous" referrerpolicy="no-referrer"> - - - + + +
diff --git a/mermaidchart-logo.svg b/mermaidchart-logo.svg new file mode 100755 index 00000000..d7c8b59e --- /dev/null +++ b/mermaidchart-logo.svg @@ -0,0 +1 @@ + diff --git a/view.html b/view.html index 68166de0..6be895ae 100644 --- a/view.html +++ b/view.html @@ -50,22 +50,22 @@ crossorigin="anonymous" referrerpolicy="no-referrer"> - - - + + +