@burakboduroglu/nors 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +154 -0
- package/bin/nors.js +86 -0
- package/package.json +48 -0
- package/pb_migrations/1789000000_nors_notes.js +47 -0
- package/pb_public/nors/assets/abnfDiagram-VCTEODGH-72Hc1HpF.js +1 -0
- package/pb_public/nors/assets/arc-BEvzHx4o.js +1 -0
- package/pb_public/nors/assets/architecture-7GRP2DOG-HrDOEF9a.js +1 -0
- package/pb_public/nors/assets/architectureDiagram-5GKGNRK7-Dyvym86p.js +36 -0
- package/pb_public/nors/assets/array-BifhSqXX.js +1 -0
- package/pb_public/nors/assets/blockDiagram-I7D4REHJ-CDUU8dVT.js +129 -0
- package/pb_public/nors/assets/c4Diagram-7LVT6UL2-DO3ezHBq.js +38 -0
- package/pb_public/nors/assets/channel-Df8EOoqr.js +1 -0
- package/pb_public/nors/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/pb_public/nors/assets/chunk-4HAMMTFA-1EqQyQU7.js +62 -0
- package/pb_public/nors/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/pb_public/nors/assets/chunk-75Z2AOVW-Cwc7WThs.js +2 -0
- package/pb_public/nors/assets/chunk-DU6HZSFF-B5Wb9e-Z.js +127 -0
- package/pb_public/nors/assets/chunk-F27PBJKO-Bab3aPrd.js +1 -0
- package/pb_public/nors/assets/chunk-FOHPRMQF-DzxwRta7.js +161 -0
- package/pb_public/nors/assets/chunk-GMAD6QVW-BvxprKvk.js +72 -0
- package/pb_public/nors/assets/chunk-GVQU2GXP-CsbitBlJ.js +1 -0
- package/pb_public/nors/assets/chunk-IMKFNOWR-CPLySese.js +231 -0
- package/pb_public/nors/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/pb_public/nors/assets/chunk-L3NEJ4N5-CFPB-We8.js +1 -0
- package/pb_public/nors/assets/chunk-OSK3NFVY-BAJO2owD.js +10 -0
- package/pb_public/nors/assets/chunk-P2QGCYS3-f8ck-xGx.js +1 -0
- package/pb_public/nors/assets/chunk-POPQ4Y6H-B_VDFlEk.js +1 -0
- package/pb_public/nors/assets/chunk-PWAF6VOD-B32HYusP.js +1 -0
- package/pb_public/nors/assets/chunk-SHT3W25Y-CfjlZPrR.js +168 -0
- package/pb_public/nors/assets/chunk-SVP7TREG-DT0H529z.js +88 -0
- package/pb_public/nors/assets/chunk-TICWLB2K-BD3m0b83.js +206 -0
- package/pb_public/nors/assets/chunk-XXDRQBXY-DFBUG-OT.js +1 -0
- package/pb_public/nors/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/pb_public/nors/assets/classDiagram-ZZMXUADV-B17tfBoX.js +1 -0
- package/pb_public/nors/assets/classDiagram-v2-VYDZK3BY-B17tfBoX.js +1 -0
- package/pb_public/nors/assets/cose-bilkent-JH36ORCC-BiZdMhTY.js +1 -0
- package/pb_public/nors/assets/cynefin-OW5HDTMX-Bts7NCEe.js +1 -0
- package/pb_public/nors/assets/cynefinDiagram-5FMLGOSQ-DQtWZ8b_.js +62 -0
- package/pb_public/nors/assets/cytoscape.esm-Yq6u8L66.js +321 -0
- package/pb_public/nors/assets/dagre-C-rnJpZF.js +1 -0
- package/pb_public/nors/assets/dagre-GXQ25YYZ-9KsnELcz.js +4 -0
- package/pb_public/nors/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/pb_public/nors/assets/diagram-S7CK7UJ4-BH9UWoqn.js +30 -0
- package/pb_public/nors/assets/diagram-UQ7AKVKN-CxwLdAs_.js +41 -0
- package/pb_public/nors/assets/diagram-VSXAHHWV-CZ09vgYE.js +3 -0
- package/pb_public/nors/assets/diagram-VX7I27RA-BOR_eKl1.js +24 -0
- package/pb_public/nors/assets/diagram-Z3DM3KII-CNxcZIX5.js +24 -0
- package/pb_public/nors/assets/dist-DTg6UBE_.js +1 -0
- package/pb_public/nors/assets/ebnfDiagram-PWID7BFC-Bd6A_szT.js +1 -0
- package/pb_public/nors/assets/erDiagram-RLTQ6QDP-Cg1LC0U7.js +99 -0
- package/pb_public/nors/assets/eventmodeling-NTZA5JFV-04EdYz80.js +1 -0
- package/pb_public/nors/assets/flowDiagram-HODETNUW-D2i1JVc0.js +1 -0
- package/pb_public/nors/assets/ganttDiagram-EL5Y4UJY-DvZJpWfe.js +292 -0
- package/pb_public/nors/assets/gitGraph-4MIJSDKK-CsEbmQD4.js +1 -0
- package/pb_public/nors/assets/gitGraphDiagram-WWUBYQGX-CVlXu2Qq.js +106 -0
- package/pb_public/nors/assets/graphlib-DS17s2tU.js +1 -0
- package/pb_public/nors/assets/index-BZ_XOI9a.js +71 -0
- package/pb_public/nors/assets/index-DpLWWzac.css +1 -0
- package/pb_public/nors/assets/info-A6RAGUB7-Cr_1btt8.js +1 -0
- package/pb_public/nors/assets/infoDiagram-27XIBGKW-B5T1nV5L.js +2 -0
- package/pb_public/nors/assets/init-C-OQMol4.js +1 -0
- package/pb_public/nors/assets/ishikawaDiagram-5VMMS53U-CBxNSCVW.js +70 -0
- package/pb_public/nors/assets/journeyDiagram-3NMN7TZE-Cr3ECa1U.js +139 -0
- package/pb_public/nors/assets/kanban-definition-UXKFOSKX-DePsUrbx.js +89 -0
- package/pb_public/nors/assets/katex-ZlcWpGUi.js +257 -0
- package/pb_public/nors/assets/line-DcGZsAWh.js +1 -0
- package/pb_public/nors/assets/linear-B6A2FQ2q.js +1 -0
- package/pb_public/nors/assets/mermaid-parser.core-BR6xQvT6.js +7 -0
- package/pb_public/nors/assets/mermaid.core-FEPUjAo_.js +44 -0
- package/pb_public/nors/assets/mindmap-definition-YA3MSWOX-7sU4YIM1.js +96 -0
- package/pb_public/nors/assets/ordinal-BDEzSJ7C.js +1 -0
- package/pb_public/nors/assets/packet-AYTQ26CC-TYEYjIA7.js +1 -0
- package/pb_public/nors/assets/path-fybaL0A-.js +1 -0
- package/pb_public/nors/assets/pegDiagram-XKGWAZYB-BGzYtGBp.js +1 -0
- package/pb_public/nors/assets/pie-WAS4IAKB-BAuhAqOa.js +1 -0
- package/pb_public/nors/assets/pieDiagram-E7YTZNPT-Dc1PZDwl.js +39 -0
- package/pb_public/nors/assets/quadrantDiagram-AXDQQJYC-D-d3azLW.js +7 -0
- package/pb_public/nors/assets/radar-RG4KPBEZ-CWKhbiay.js +1 -0
- package/pb_public/nors/assets/railroad-74A4TZTK-Cm0h6b91.js +1 -0
- package/pb_public/nors/assets/railroad-abnf-HS5TGJTU-DAMHMau8.js +1 -0
- package/pb_public/nors/assets/railroad-ebnf-LZEXJU2U-CqJSrz-5.js +1 -0
- package/pb_public/nors/assets/railroad-peg-WCYAUIDC-CjgiTUIW.js +1 -0
- package/pb_public/nors/assets/railroadDiagram-O6MQD6OU-nzjXgwpW.js +1 -0
- package/pb_public/nors/assets/requirementDiagram-BXWQKSXE-v6B3lGir.js +84 -0
- package/pb_public/nors/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/pb_public/nors/assets/sankeyDiagram-P5KCCOFB-CuyMtFNE.js +40 -0
- package/pb_public/nors/assets/sequenceDiagram-WJ2MYXX4-C2LyM7bh.js +162 -0
- package/pb_public/nors/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/pb_public/nors/assets/src-BH-TyZbA.js +1 -0
- package/pb_public/nors/assets/stateDiagram-D77RDMKH-D1A2WBer.js +1 -0
- package/pb_public/nors/assets/stateDiagram-v2-MP3YSRHH-4A_XCUQM.js +1 -0
- package/pb_public/nors/assets/swimlanes-42K2YHIH-sCNSWX_N.js +1 -0
- package/pb_public/nors/assets/swimlanesDiagram-VR7AAH4N-D7VxXsS9.js +8 -0
- package/pb_public/nors/assets/timeline-definition-24CTP7MA-DCxtDLFB.js +120 -0
- package/pb_public/nors/assets/treeView-Q6P3EWNA-Bnjs5jw6.js +1 -0
- package/pb_public/nors/assets/treemap-WGGIJYW6-C5ajpoq6.js +1 -0
- package/pb_public/nors/assets/vennDiagram-4TSXK5OY-B5S6LN3U.js +34 -0
- package/pb_public/nors/assets/wardley-WFR3VGLG-zH3dSKZv.js +1 -0
- package/pb_public/nors/assets/wardleyDiagram-VM6X3IG4-BffSe1Zn.js +78 -0
- package/pb_public/nors/assets/xychartDiagram-S5SC5T6Z-zb3OjZUW.js +7 -0
- package/pb_public/nors/index.html +15 -0
- package/pb_public/nors/nors-mark.svg +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=typeof global==`object`&&global&&global.Object===Object&&global,t=typeof self==`object`&&self&&self.Object===Object&&self,n=e||t||Function(`return this`)(),r=n.Symbol,i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;function c(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch{}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}var l=Object.prototype.toString;function u(e){return l.call(e)}var d=`[object Null]`,f=`[object Undefined]`,p=r?r.toStringTag:void 0;function m(e){return e==null?e===void 0?f:d:p&&p in Object(e)?c(e):u(e)}function h(e){return typeof e==`object`&&!!e}var g=`[object Symbol]`;function _(e){return typeof e==`symbol`||h(e)&&m(e)==g}function v(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var y=Array.isArray,ee=1/0,te=r?r.prototype:void 0,ne=te?te.toString:void 0;function re(e){if(typeof e==`string`)return e;if(y(e))return v(e,re)+``;if(_(e))return ne?ne.call(e):``;var t=e+``;return t==`0`&&1/e==-ee?`-0`:t}function b(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function x(e){return e}var ie=`[object AsyncFunction]`,ae=`[object Function]`,oe=`[object GeneratorFunction]`,se=`[object Proxy]`;function S(e){if(!b(e))return!1;var t=m(e);return t==ae||t==oe||t==ie||t==se}var ce=n[`__core-js_shared__`],le=function(){var e=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ue(e){return!!le&&le in e}var de=Function.prototype.toString;function C(e){if(e!=null){try{return de.call(e)}catch{}try{return e+``}catch{}}return``}var fe=/[\\^$.*+?()[\]{}|]/g,pe=/^\[object .+?Constructor\]$/,me=Function.prototype,he=Object.prototype,ge=me.toString,_e=he.hasOwnProperty,ve=RegExp(`^`+ge.call(_e).replace(fe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function ye(e){return!b(e)||ue(e)?!1:(S(e)?ve:pe).test(C(e))}function be(e,t){return e?.[t]}function w(e,t){var n=be(e,t);return ye(n)?n:void 0}var xe=w(n,`WeakMap`);function Se(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ce(){}var we=800,Te=16,Ee=Date.now;function De(e){var t=0,n=0;return function(){var r=Ee(),i=Te-(r-n);if(n=r,i>0){if(++t>=we)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function T(e){return function(){return e}}var Oe=function(){try{var e=w(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),ke=De(Oe?function(e,t){return Oe(e,`toString`,{configurable:!0,enumerable:!1,value:T(t),writable:!0})}:x);function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function je(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Me(e){return e!==e}function Ne(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Pe(e,t,n){return t===t?Ne(e,t,n):je(e,Me,n)}function Fe(e,t){return!!(e!=null&&e.length)&&Pe(e,t,0)>-1}var Ie=9007199254740991,Le=/^(?:0|[1-9]\d*)$/;function Re(e,t){var n=typeof e;return t??=Ie,!!t&&(n==`number`||n!=`symbol`&&Le.test(e))&&e>-1&&e%1==0&&e<t}function ze(e,t){return e===t||e!==e&&t!==t}var Be=Math.max;function Ve(e,t,n){return t=Be(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Be(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Se(e,this,s)}}function He(e,t){return ke(Ve(e,t,x),e+``)}var Ue=9007199254740991;function We(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ue}function E(e){return e!=null&&We(e.length)&&!S(e)}var Ge=Object.prototype;function Ke(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ge)}function qe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Je=`[object Arguments]`;function Ye(e){return h(e)&&m(e)==Je}var Xe=Object.prototype,Ze=Xe.hasOwnProperty,Qe=Xe.propertyIsEnumerable,D=Ye(function(){return arguments}())?Ye:function(e){return h(e)&&Ze.call(e,`callee`)&&!Qe.call(e,`callee`)};function $e(){return!1}var et=typeof exports==`object`&&exports&&!exports.nodeType&&exports,tt=et&&typeof module==`object`&&module&&!module.nodeType&&module,nt=tt&&tt.exports===et?n.Buffer:void 0,O=(nt?nt.isBuffer:void 0)||$e,rt=`[object Arguments]`,it=`[object Array]`,at=`[object Boolean]`,ot=`[object Date]`,st=`[object Error]`,ct=`[object Function]`,lt=`[object Map]`,ut=`[object Number]`,dt=`[object Object]`,ft=`[object RegExp]`,pt=`[object Set]`,mt=`[object String]`,ht=`[object WeakMap]`,gt=`[object ArrayBuffer]`,_t=`[object DataView]`,vt=`[object Float32Array]`,yt=`[object Float64Array]`,bt=`[object Int8Array]`,xt=`[object Int16Array]`,St=`[object Int32Array]`,Ct=`[object Uint8Array]`,wt=`[object Uint8ClampedArray]`,Tt=`[object Uint16Array]`,Et=`[object Uint32Array]`,k={};k[vt]=k[yt]=k[bt]=k[xt]=k[St]=k[Ct]=k[wt]=k[Tt]=k[Et]=!0,k[rt]=k[it]=k[gt]=k[at]=k[_t]=k[ot]=k[st]=k[ct]=k[lt]=k[ut]=k[dt]=k[ft]=k[pt]=k[mt]=k[ht]=!1;function Dt(e){return h(e)&&We(e.length)&&!!k[m(e)]}function Ot(e){return function(t){return e(t)}}var kt=typeof exports==`object`&&exports&&!exports.nodeType&&exports,A=kt&&typeof module==`object`&&module&&!module.nodeType&&module,At=A&&A.exports===kt&&e.process,jt=function(){try{return A&&A.require&&A.require(`util`).types||At&&At.binding&&At.binding(`util`)}catch{}}(),Mt=jt&&jt.isTypedArray,j=Mt?Ot(Mt):Dt,Nt=Object.prototype.hasOwnProperty;function Pt(e,t){var n=y(e),r=!n&&D(e),i=!n&&!r&&O(e),a=!n&&!r&&!i&&j(e),o=n||r||i||a,s=o?qe(e.length,String):[],c=s.length;for(var l in e)(t||Nt.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Re(l,c)))&&s.push(l);return s}function Ft(e,t){return function(n){return e(t(n))}}var It=Ft(Object.keys,Object),Lt=Object.prototype.hasOwnProperty;function Rt(e){if(!Ke(e))return It(e);var t=[];for(var n in Object(e))Lt.call(e,n)&&n!=`constructor`&&t.push(n);return t}function M(e){return E(e)?Pt(e):Rt(e)}var zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/;function Vt(e,t){if(y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||_(e)?!0:Bt.test(e)||!zt.test(e)||t!=null&&e in Object(t)}var N=w(Object,`create`);function Ht(){this.__data__=N?N(null):{},this.size=0}function Ut(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Wt=`__lodash_hash_undefined__`,Gt=Object.prototype.hasOwnProperty;function Kt(e){var t=this.__data__;if(N){var n=t[e];return n===Wt?void 0:n}return Gt.call(t,e)?t[e]:void 0}var qt=Object.prototype.hasOwnProperty;function Jt(e){var t=this.__data__;return N?t[e]!==void 0:qt.call(t,e)}var Yt=`__lodash_hash_undefined__`;function Xt(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=N&&t===void 0?Yt:t,this}function P(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}P.prototype.clear=Ht,P.prototype.delete=Ut,P.prototype.get=Kt,P.prototype.has=Jt,P.prototype.set=Xt;function Zt(){this.__data__=[],this.size=0}function F(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}var Qt=Array.prototype.splice;function $t(e){var t=this.__data__,n=F(t,e);return n<0?!1:(n==t.length-1?t.pop():Qt.call(t,n,1),--this.size,!0)}function en(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]}function tn(e){return F(this.__data__,e)>-1}function nn(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function I(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}I.prototype.clear=Zt,I.prototype.delete=$t,I.prototype.get=en,I.prototype.has=tn,I.prototype.set=nn;var L=w(n,`Map`);function rn(){this.size=0,this.__data__={hash:new P,map:new(L||I),string:new P}}function an(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function R(e,t){var n=e.__data__;return an(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function on(e){var t=R(this,e).delete(e);return this.size-=+!!t,t}function sn(e){return R(this,e).get(e)}function cn(e){return R(this,e).has(e)}function ln(e,t){var n=R(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=rn,z.prototype.delete=on,z.prototype.get=sn,z.prototype.has=cn,z.prototype.set=ln;var un=`Expected a function`;function dn(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(un);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(dn.Cache||z),n}dn.Cache=z;var fn=500;function pn(e){var t=dn(e,function(e){return n.size===fn&&n.clear(),e}),n=t.cache;return t}var mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hn=/\\(\\)?/g,gn=pn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(mn,function(e,n,r,i){t.push(r?i.replace(hn,`$1`):n||e)}),t});function _n(e){return e==null?``:re(e)}function vn(e,t){return y(e)?e:Vt(e,t)?[e]:gn(_n(e))}var yn=1/0;function B(e){if(typeof e==`string`||_(e))return e;var t=e+``;return t==`0`&&1/e==-yn?`-0`:t}function bn(e,t){t=vn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[B(t[n++])];return n&&n==r?e:void 0}function xn(e,t,n){var r=e==null?void 0:bn(e,t);return r===void 0?n:r}function Sn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Cn=r?r.isConcatSpreadable:void 0;function wn(e){return y(e)||D(e)||!!(Cn&&e&&e[Cn])}function Tn(e,t,n,r,i){var a=-1,o=e.length;for(n||=wn,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Tn(s,t-1,n,r,i):Sn(i,s):r||(i[i.length]=s)}return i}function En(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Dn(){this.__data__=new I,this.size=0}function On(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function kn(e){return this.__data__.get(e)}function An(e){return this.__data__.has(e)}var jn=200;function Mn(e,t){var n=this.__data__;if(n instanceof I){var r=n.__data__;if(!L||r.length<jn-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new z(r)}return n.set(e,t),this.size=n.size,this}function V(e){var t=this.__data__=new I(e);this.size=t.size}V.prototype.clear=Dn,V.prototype.delete=On,V.prototype.get=kn,V.prototype.has=An,V.prototype.set=Mn;function Nn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Pn(){return[]}var Fn=Object.prototype.propertyIsEnumerable,In=Object.getOwnPropertySymbols,Ln=In?function(e){return e==null?[]:(e=Object(e),Nn(In(e),function(t){return Fn.call(e,t)}))}:Pn;function Rn(e,t,n){var r=t(e);return y(e)?r:Sn(r,n(e))}function zn(e){return Rn(e,M,Ln)}var Bn=w(n,`DataView`),Vn=w(n,`Promise`),H=w(n,`Set`),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=C(Bn),Yn=C(L),Xn=C(Vn),Zn=C(H),Qn=C(xe),U=m;(Bn&&U(new Bn(new ArrayBuffer(1)))!=qn||L&&U(new L)!=Hn||Vn&&U(Vn.resolve())!=Wn||H&&U(new H)!=Gn||xe&&U(new xe)!=Kn)&&(U=function(e){var t=m(e),n=t==Un?e.constructor:void 0,r=n?C(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t});var W=U,$n=n.Uint8Array,er=`__lodash_hash_undefined__`;function tr(e){return this.__data__.set(e,er),this}function nr(e){return this.__data__.has(e)}function G(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new z;++t<n;)this.add(e[t])}G.prototype.add=G.prototype.push=tr,G.prototype.has=nr;function rr(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ir(e,t){return e.has(t)}var ar=1,or=2;function sr(e,t,n,r,i,a){var o=n&ar,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&or?new G:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!rr(t,function(e,t){if(!ir(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function cr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function lr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ur=1,dr=2,fr=`[object Boolean]`,pr=`[object Date]`,mr=`[object Error]`,hr=`[object Map]`,gr=`[object Number]`,_r=`[object RegExp]`,vr=`[object Set]`,yr=`[object String]`,br=`[object Symbol]`,xr=`[object ArrayBuffer]`,Sr=`[object DataView]`,Cr=r?r.prototype:void 0,wr=Cr?Cr.valueOf:void 0;function Tr(e,t,n,r,i,a,o){switch(n){case Sr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xr:return!(e.byteLength!=t.byteLength||!a(new $n(e),new $n(t)));case fr:case pr:case gr:return ze(+e,+t);case mr:return e.name==t.name&&e.message==t.message;case _r:case yr:return e==t+``;case hr:var s=cr;case vr:var c=r&ur;if(s||=lr,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=dr,o.set(e,t);var u=sr(s(e),s(t),r,i,a,o);return o.delete(e),u;case br:if(wr)return wr.call(e)==wr.call(t)}return!1}var Er=1,Dr=Object.prototype.hasOwnProperty;function Or(e,t,n,r,i,a){var o=n&Er,s=zn(e),c=s.length;if(c!=zn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Dr.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var kr=1,Ar=`[object Arguments]`,jr=`[object Array]`,K=`[object Object]`,Mr=Object.prototype.hasOwnProperty;function Nr(e,t,n,r,i,a){var o=y(e),s=y(t),c=o?jr:W(e),l=s?jr:W(t);c=c==Ar?K:c,l=l==Ar?K:l;var u=c==K,d=l==K,f=c==l;if(f&&O(e)){if(!O(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new V,o||j(e)?sr(e,t,n,r,i,a):Tr(e,t,c,n,r,i,a);if(!(n&kr)){var p=u&&Mr.call(e,`__wrapped__`),m=d&&Mr.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new V,i(h,g,n,r,a)}}return f?(a||=new V,Or(e,t,n,r,i,a)):!1}function Pr(e,t,n,r,i){return e===t?!0:e==null||t==null||!h(e)&&!h(t)?e!==e&&t!==t:Nr(e,t,n,r,Pr,i)}var Fr=1,Ir=2;function Lr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new V;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Pr(u,l,Fr|Ir,r,d):f))return!1}}return!0}function Rr(e){return e===e&&!b(e)}function zr(e){for(var t=M(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Rr(i)]}return t}function Br(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Vr(e){var t=zr(e);return t.length==1&&t[0][2]?Br(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function Hr(e,t){return e!=null&&t in Object(e)}function Ur(e,t,n){t=vn(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=B(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&We(i)&&Re(o,i)&&(y(e)||D(e)))}function Wr(e,t){return e!=null&&Ur(e,t,Hr)}var Gr=1,Kr=2;function qr(e,t){return Vt(e)&&Rr(t)?Br(B(e),t):function(n){var r=xn(n,e);return r===void 0&&r===t?Wr(n,e):Pr(t,r,Gr|Kr)}}function Jr(e){return function(t){return t?.[e]}}function Yr(e){return function(t){return bn(t,e)}}function Xr(e){return Vt(e)?Jr(B(e)):Yr(e)}function Zr(e){return typeof e==`function`?e:e==null?x:typeof e==`object`?y(e)?qr(e[0],e[1]):Vr(e):Xr(e)}function Qr(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var $r=Qr();function ei(e,t){return e&&$r(e,t,M)}function ti(e,t){return function(n,r){if(n==null)return n;if(!E(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var q=ti(ei);function ni(e){return h(e)&&E(e)}function ri(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ii(e){return typeof e==`function`?e:x}function J(e,t){return(y(e)?Ae:q)(e,ii(t))}function ai(e,t){var n=[];return q(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Y(e,t){return(y(e)?Nn:ai)(e,Zr(t,3))}function oi(e,t){return v(t,function(t){return e[t]})}function X(e){return e==null?[]:oi(e,M(e))}var si=`[object Map]`,ci=`[object Set]`,li=Object.prototype.hasOwnProperty;function ui(e){if(e==null)return!0;if(E(e)&&(y(e)||typeof e==`string`||typeof e.splice==`function`||O(e)||j(e)||D(e)))return!e.length;var t=W(e);if(t==si||t==ci)return!e.size;if(Ke(e))return!Rt(e).length;for(var n in e)if(li.call(e,n))return!1;return!0}function Z(e){return e===void 0}function di(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function fi(e,t,n){var r=y(e)?En:di,i=arguments.length<3;return r(e,Zr(t,4),n,i,q)}var pi=H&&1/lr(new H([,-0]))[1]==1/0?function(e){return new H(e)}:Ce,mi=200;function hi(e,t,n){var r=-1,i=Fe,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=ri;else if(a>=mi){var l=t?null:pi(e);if(l)return lr(l);o=!1,i=ir,c=new G}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var gi=He(function(e){return hi(Tn(e,1,ni,!0))}),_i=`\0`,Q=`\0`,vi=``,yi=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=T(void 0),this._defaultEdgeLabelFn=T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Q]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return S(e)||(e=T(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return M(this._nodes)}sources(){var e=this;return Y(this.nodes(),function(t){return ui(e._in[t])})}sinks(){var e=this;return Y(this.nodes(),function(t){return ui(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return J(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Q,this._children[e]={},this._children[Q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],J(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),J(M(this._in[e]),t),delete this._in[e],delete this._preds[e],J(M(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(Z(t))t=Q;else{t+=``;for(var n=t;!Z(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Q)return t}}children(e){if(Z(e)&&(e=Q),this._isCompound){var t=this._children[e];if(t)return M(t)}else if(e===Q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return M(t)}successors(e){var t=this._sucs[e];if(t)return M(t)}neighbors(e){var t=this.predecessors(e);if(t)return gi(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;J(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),J(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&J(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return S(e)||(e=T(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return X(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return fi(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,Z(n)||(n=``+n);var o=$(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!Z(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Si(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,bi(this._preds[t],e),bi(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],xi(this._preds[t],e),xi(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=X(n);return t?Y(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=X(n);return t?Y(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};yi.prototype._nodeCount=0,yi.prototype._edgeCount=0;function bi(e,t){e[t]?e[t]++:e[t]=1}function xi(e,t){--e[t]||delete e[t]}function $(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+vi+a+vi+(Z(r)?_i:r)}function Si(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Ci(e,t){return $(e,t.v,t.w,t.name)}export{v as $,Rt as A,He as B,Tn as C,vn as D,B as E,Ot as F,Ae as G,ze as H,O as I,T as J,ke as K,D as L,Pt as M,j as N,_n as O,jt as P,y as Q,Ke as R,V as S,bn as T,Re as U,Ve as V,je as W,x as X,S as Y,b as Z,W as _,Y as a,Ln as b,ni as c,$r as d,_ as et,Zr as f,$n as g,Ur as h,X as i,n as it,Ft as j,M as k,q as l,Wr as m,fi as n,m as nt,J as o,Jr as p,Oe as q,Z as r,r as rt,ii as s,yi as t,h as tt,ei as u,zn as v,Sn as w,Pn as x,Rn as y,E as z};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-FEPUjAo_.js","assets/src-BH-TyZbA.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-B5Wb9e-Z.js","assets/chunk-75Z2AOVW-Cwc7WThs.js","assets/dist-DTg6UBE_.js","assets/chunk-PWAF6VOD-B32HYusP.js","assets/chunk-GMAD6QVW-BvxprKvk.js","assets/chunk-P2QGCYS3-f8ck-xGx.js","assets/chunk-4HAMMTFA-1EqQyQU7.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-GVQU2GXP-CsbitBlJ.js","assets/chunk-OSK3NFVY-BAJO2owD.js","assets/line-DcGZsAWh.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/graphlib-DS17s2tU.js","assets/chunk-L3NEJ4N5-CFPB-We8.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}var r=(e,t)=>e===t,i=Symbol(`solid-track`),a={equals:r},o=null,s=le,c=1,l=2,u={owned:null,cleanups:null,context:null,owner:null},d={},f=null,p=null,m=null,h=null,g=null,_=0;function v(e,t){let n=m,r=f,i=e.length===0,a=t===void 0?r:t,o=i?u:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>T(()=>N(o)));f=o,m=null;try{return M(s,!0)}finally{m=n,f=r}}function y(e,t){t=t?Object.assign({},a,t):a;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[oe.bind(n),e=>(typeof e==`function`&&(e=p&&p.running&&p.sources.has(n)?e(n.tValue):e(n.value)),O(n,e))]}function b(e,t,n){k(A(e,t,!0,c))}function x(e,t,n){k(A(e,t,!1,c))}function S(e,t,n){s=ue;let r=A(e,t,!1,c),i=D&&ae(D);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),g?g.push(r):k(r)}function C(e,t,n){n=n?Object.assign({},a,n):a;let r=A(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,k(r),oe.bind(r)}function ee(e){return e&&typeof e==`object`&&`then`in e}function w(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=d,l=null,u=!1,h=!1,g=`initialValue`in o,_=typeof i==`function`&&C(i),v=new Set,[x,S]=(o.storage||y)(o.initialValue),[w,te]=y(void 0),[re,ie]=y(void 0,{equals:!1}),[oe,O]=y(g?`ready`:`unresolved`);f&&E(()=>{for(let e of v.keys())e.decrement();v.clear(),p&&s&&p.promises.delete(s),s=null}),e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function k(e,t,n,r){return s===e&&(s=null,r!==void 0&&(g=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=d,p&&e&&u?(p.promises.delete(e),u=!1,M(()=>{p.running=!0,se(t,n)},!1)):se(t,n)),t}function se(e,t){M(()=>{t===void 0&&S(()=>e),O(t===void 0?g?`ready`:`unresolved`:`errored`),te(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function A(){let e=D&&ae(D),t=x(),n=w();if(n!==void 0&&!s)throw n;return m&&!m.user&&e&&b(()=>{re(),s&&(e.resolved&&p&&u?p.promises.add(s):v.has(e)||(e.increment(),v.add(e)))}),t}function j(e=!0){if(e!==!1&&h)return;h=!1;let t=_?_():i;if(u=p&&p.running,t==null||t===!1){k(s,T(x));return}p&&s&&p.promises.delete(s);let n,r=c===d?T(()=>{try{return a(t,{value:x(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){k(s,void 0,me(n),t);return}return ee(r)?(s=r,`v`in r?(r.s===1?k(s,r.v,void 0,t):k(s,void 0,me(r.v),t),r):(h=!0,queueMicrotask(()=>h=!1),M(()=>{O(g?`refreshing`:`pending`),ie()},!1),r.then(e=>k(r,e,void 0,t),e=>k(r,void 0,me(e),t)))):(k(s,r,void 0,t),r)}Object.defineProperties(A,{state:{get:()=>oe()},error:{get:()=>w()},loading:{get(){let e=oe();return e===`pending`||e===`refreshing`}},latest:{get(){if(!g)return A();let e=w();if(e&&!s)throw e;return x()}}});let ce=f;return _?b(()=>(ce=f,j(!1))):j(!1),[A,{refetch:e=>ne(ce,()=>j(e)),mutate:S}]}function T(e){if(m===null)return e();let t=m;m=null;try{return e()}finally{m=t}}function te(e){S(()=>T(e))}function E(e){return f===null||(f.cleanups===null?f.cleanups=[e]:f.cleanups.push(e)),e}function ne(e,t){let n=f,r=m;f=e,m=null;try{return M(t,!0)}catch(e){ge(e)}finally{f=n,m=r}}var[re,ie]=y(!1);function ae(e){let t;return f&&f.context&&(t=f.context[e.id])!==void 0?t:e.defaultValue}var D;function oe(){let e=p&&p.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===c)k(this);else{let e=h;h=null,M(()=>de(this),!1),h=e}}if(m){let e=this.observers;if(!e||e[e.length-1]!==m){let t=e?e.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(t)):(m.sources=[this],m.sourceSlots=[t]),e?(e.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}}return e&&p.sources.has(this)?this.tValue:this.value}function O(e,t,n){let r=p&&p.running&&p.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(p){let r=p.running;(r||!n&&p.sources.has(e))&&(p.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&M(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=p&&p.running;r&&p.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?h.push(n):g.push(n),n.observers&&fe(n)),r?n.tState=c:n.state=c)}if(h.length>1e6)throw h=[],Error()},!1)}return t}function k(e){if(!e.fn)return;N(e);let t=_;se(e,p&&p.running&&p.sources.has(e)?e.tValue:e.value,t),p&&!p.running&&p.sources.has(e)&&queueMicrotask(()=>{M(()=>{p&&(p.running=!0),m=f=e,se(e,e.tValue,t),m=f=null},!1)})}function se(e,t,n){let r,i=f,a=m;m=f=e;try{r=e.fn(t)}catch(t){return e.pure&&(p&&p.running?(e.tState=c,e.tOwned&&e.tOwned.forEach(N),e.tOwned=void 0):(e.state=c,e.owned&&e.owned.forEach(N),e.owned=null)),e.updatedAt=n+1,ge(t)}finally{m=a,f=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?O(e,r,!0):p&&p.running&&e.pure?(p.sources.has(e)||(e.value=r),p.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function A(e,t,n,r=c,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:f,context:f?f.context:null,pure:n};return p&&p.running&&(a.state=0,a.tState=r),f===null||f!==u&&(p&&p.running&&f.pure?f.tOwned?f.tOwned.push(a):f.tOwned=[a]:f.owned?f.owned.push(a):f.owned=[a]),a}function j(e){let t=p&&p.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===l)return de(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<_);){if(t&&p.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(p.disposed.has(t))return}if((t?e.tState:e.state)===c)k(e);else if((t?e.tState:e.state)===l){let t=h;h=null,M(()=>de(e,n[0]),!1),h=t}}}function M(e,t){if(h)return e();let n=!1;t||(h=[]),g?n=!0:g=[],_++;try{let t=e();return ce(n),t}catch(e){n||(g=null),h=null,ge(e)}}function ce(e){if(h&&=(le(h),null),e)return;let t;if(p){if(!p.promises.size&&!p.queue.size){let e=p.sources,n=p.disposed;g.push.apply(g,p.effects),t=p.resolve;for(let e of g)`tState`in e&&(e.state=e.tState),delete e.tState;p=null,M(()=>{for(let e of n)N(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)N(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}ie(!1)},!1)}else if(p.running){p.running=!1,p.effects.push.apply(p.effects,g),g=null,ie(!0);return}}let n=g;g=null,n.length&&M(()=>s(n),!1),t&&t()}function le(e){for(let t=0;t<e.length;t++)j(e[t])}function ue(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:j(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)j(t[r])}function de(e,t){let n=p&&p.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===c?i!==t&&(!i.updatedAt||i.updatedAt<_)&&j(i):e===l&&de(i,t)}}}function fe(e){let t=p&&p.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=l:r.state=l,r.pure?h.push(r):g.push(r),r.observers&&fe(r))}}function N(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)N(e.tOwned[t]);delete e.tOwned}if(p&&p.running&&e.pure)pe(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)N(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}p&&p.running?e.tState=0:e.state=0}function pe(e,t){if(t||(e.tState=0,p.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)pe(e.owned[t])}function me(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function he(e,t,n){try{for(let n of t)n(e)}catch(e){ge(e,n&&n.owner||null)}}function ge(e,t=f){let n=o&&t&&t.context&&t.context[o],r=me(e);if(!n)throw r;g?g.push({fn(){he(r,n,t)},state:c}):he(r,n,t)}var _e=Symbol(`fallback`);function ve(e){for(let t=0;t<e.length;t++)e[t]()}function ye(e,t,n={}){let r=[],a=[],o=[],s=0,c=t.length>1?[]:null;return E(()=>ve(o)),()=>{let l=e()||[],u=l.length,d,f;return l[i],T(()=>{let e,t,i,m,h,g,_,y,b;if(u===0)s!==0&&(ve(o),o=[],r=[],a=[],s=0,c&&=[]),n.fallback&&(r=[_e],a[0]=v(e=>(o[0]=e,n.fallback())),s=1);else if(s===0){for(a=Array(u),f=0;f<u;f++)r[f]=l[f],a[f]=v(p);s=u}else{for(i=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(s,u);g<_&&r[g]===l[g];g++);for(_=s-1,y=u-1;_>=g&&y>=g&&r[_]===l[y];_--,y--)i[y]=a[_],m[y]=o[_],c&&(h[y]=c[_]);for(e=new Map,t=Array(y+1),f=y;f>=g;f--)b=l[f],d=e.get(b),t[f]=d===void 0?-1:d,e.set(b,f);for(d=g;d<=_;d++)b=r[d],f=e.get(b),f!==void 0&&f!==-1?(i[f]=a[d],m[f]=o[d],c&&(h[f]=c[d]),f=t[f],e.set(b,f)):o[d]();for(f=g;f<u;f++)f in i?(a[f]=i[f],o[f]=m[f],c&&(c[f]=h[f],c[f](f))):a[f]=v(p);a=a.slice(0,s=u),r=l.slice(0)}return a});function p(e){if(o[f]=e,c){let[e,n]=y(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function P(e,t){return T(()=>e(t||{}))}var be=e=>`Stale read from <${e}>.`;function xe(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return C(ye(()=>e.each,e.children,t||void 0))}function F(e){let t=e.keyed,n=C(()=>e.when,void 0,void 0),r=t?n:C(n,void 0,{equals:(e,t)=>!e==!t});return C(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?T(()=>a(t?i:()=>{if(!T(r))throw be(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var Se=e=>C(()=>e());function Ce(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null){if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&(d=l.get(t[c]))!=null&&d===r+u;)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++}else t[o++].remove()}}}var we=`_$DX_DELEGATE`;function Te(e,t,n,r={}){let i;return v(r=>{i=r,t===document?e():R(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function I(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>T(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ee(e,t=window.document){let n=t[we]||(t[we]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ke))}}function L(e,t,n){Oe(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function De(e,t,n){return T(()=>e(t,n))}function R(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Ae(e,t,r,n);x(r=>Ae(e,t(),r,n),r)}function Oe(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ke(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function Ae(e,t,n,r,i){let a=Oe(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=z(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=z(e,n,r)}else if(o===`function`)return x(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Ae(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(je(o,t,n,i))return x(()=>n=Ae(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=z(e,n,r),s)return n}else c?n.length===0?Me(e,o,r):Ce(e,n,o):(n&&z(e),Me(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=z(e,n,r,t);z(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function je(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(o!=null&&o!==!0&&o!==!1){if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=je(e,o,s)||i;else if(c===`function`){if(r){for(;typeof o==`function`;)o=o();i=je(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0}else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}}return i}function Me(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function z(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var Ne=`nors_pb_token`,Pe=`nors_pb_user`,Fe=[`diagram`,`runbook`,`reference`,`scratch`],Ie={diagram:`Diagram`,runbook:`Runbook`,reference:`Reference`,scratch:`Scratch`};function Le(){return``}function Re(){return localStorage.getItem(Ne)}function ze(){localStorage.removeItem(Ne),localStorage.removeItem(Pe)}async function Be(e,t){let n=await fetch(`${Le()}/api/collections/_superusers/auth-with-password`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({identity:e,password:t})});if(!n.ok){let e=await n.text();throw Error(e||`login failed (${n.status})`)}let r=await n.json();localStorage.setItem(Ne,r.token),localStorage.setItem(Pe,JSON.stringify(r.record))}function Ve(){let e=Re();if(!e)throw Error(`not authenticated`);return{Authorization:e,"Content-Type":`application/json`}}async function He(e){let t=e?.includeDrafts?`status != "archived"`:`status = "published"`,n=new URLSearchParams({filter:t,sort:`-pinned,sort,updated`,perPage:`200`}),r=await fetch(`${Le()}/api/collections/nors_notes/records?${n}`,{headers:Ve()});if(r.status===401)throw ze(),Error(`session expired`);if(!r.ok)throw Error(`list failed (${r.status})`);return(await r.json()).items.map(Ge)}async function Ue(e){let t=new URLSearchParams({filter:`slug = "${e}"`}),n=await fetch(`${Le()}/api/collections/nors_notes/records?${t}`,{headers:Ve()});if(n.status===401)throw ze(),Error(`session expired`);if(!n.ok)throw Error(`get failed (${n.status})`);let r=await n.json();if(r.items.length===0)throw Error(`no note: ${e}`);return Ge(r.items[0])}async function We(e,t){let n=await fetch(`${Le()}/api/collections/nors_notes/records${t?`/${t}`:``}`,{method:t?`PATCH`:`POST`,headers:Ve(),body:JSON.stringify(e)});if(n.status===401)throw ze(),Error(`session expired`);if(!n.ok){let e=await n.text();throw Error(e||`save failed (${n.status})`)}return Ge(await n.json())}function Ge(e){let t=e.tags;return{id:String(e.id),title:String(e.title??``),slug:String(e.slug??``),summary:String(e.summary??``),body:String(e.body??``),kind:e.kind||`scratch`,tags:Array.isArray(t)?t:[],pinned:!!e.pinned,status:e.status||`draft`,sort:Number(e.sort??0),updated:String(e.updated??``)}}var Ke=`$new`;function qe(e){let t=e.replace(/^#\/?/,``).split(`/`);return t[0]===`n`&&t[1]?{name:`read`,slug:decodeURIComponent(t[1])}:t[0]===`edit`&&t[1]?{name:`edit`,slug:decodeURIComponent(t[1])}:{name:`dash`}}function Je(e){location.hash=e}function Ye(){let[e,t]=y(qe(location.hash));return te(()=>{let e=()=>t(qe(location.hash));window.addEventListener(`hashchange`,e),E(()=>window.removeEventListener(`hashchange`,e))}),e}var Xe=I(`<p class=error>`),Ze=I(`<div class=spin-wrap role=status aria-label=Loading><span class=spin>`),Qe=I(`<p class=hint>Saving order…`),$e=I(`<div class=empty-wrap><svg width=72 height=56 viewBox="0 0 72 56"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><ellipse cx=36 cy=46 rx=22 ry=5></ellipse><ellipse cx=36 cy=36 rx=15 ry=6></ellipse><ellipse cx=36 cy=26 rx=10 ry=5></ellipse><ellipse cx=36 cy=17 rx=5 ry=4></ellipse></svg><p>No notes yet</p><button type=button class=ghost>Write the first one`),et=I(`<main class=dash><div class=dash-head><h2>Notes</h2><button type=button class="ghost icononly"title=Refresh aria-label=Refresh><svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg></button></div><nav class=tabs><button type=button>All</button></nav><ul class=cards>`),tt=I(`<button type=button>`),nt=I(`<li class=card><a class=card-link><div class=card-top><span class=kind></span><span class=status></span></div><h3></h3><p></p><code class=slug>`),rt=10,it=e=>{let[t,n]=y(``),[r,i]=y(!1),[a,o]=y(null),[s,c]=y(null),[l,u]=y([]),[d,f]=y(`all`),[p,{refetch:m}]=w(async()=>{try{return await He({includeDrafts:!0})}catch(t){return t instanceof Error&&t.message===`session expired`?e.onExpired():n(t instanceof Error?t.message:String(t)),[]}});S(()=>{let e=p();e&&u(e)});let h=()=>l().find(e=>e.id===a())??null,g=()=>{let e=d();return e===`all`?l():l().filter(t=>t.kind===e)};async function _(e){i(!0),n(``);try{let t=0,n=0;await Promise.all(e.map(e=>{let r=e.pinned?t+=rt:n+=rt;return r===e.sort?Promise.resolve():We({title:e.title,slug:e.slug,summary:e.summary,body:e.body,kind:e.kind,tags:e.tags,pinned:e.pinned,status:e.status,sort:r},e.id)})),await m()}catch(e){n(e instanceof Error?e.message:String(e)),await m()}finally{i(!1)}}function v(e,t){t.preventDefault();let n=h();if(o(null),c(null),!n||n.id===e.id||n.pinned!==e.pinned)return;let r=l().filter(e=>e.id!==n.id),i=r.findIndex(t=>t.id===e.id),a=[...r.slice(0,i),n,...r.slice(i)];u(a),_(a)}return(()=>{var e=et(),n=e.firstChild,i=n.firstChild.nextSibling,l=n.nextSibling,u=l.firstChild,_=l.nextSibling;return i.$$click=()=>m(),u.$$click=()=>f(`all`),R(l,P(xe,{each:Fe,children:e=>(()=>{var t=tt();return t.$$click=()=>f(e),R(t,()=>Ie[e]),x(()=>t.classList.toggle(`on`,d()===e)),t})()}),null),R(e,P(F,{get when(){return t()},get children(){var e=Xe();return R(e,t),e}}),_),R(e,P(F,{get when(){return p.loading},get children(){return Ze()}}),_),R(e,P(F,{get when(){return r()},get children(){return Qe()}}),_),R(e,P(F,{get when(){return Se(()=>!p.loading)()&&(p()||[]).length===0},get children(){var e=$e(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>Je(`/edit/$new`),e}}),_),R(_,P(xe,{get each(){return g()},children:e=>(()=>{var t=nt(),n=t.firstChild,i=n.firstChild,l=i.firstChild,u=l.nextSibling,f=i.nextSibling,p=f.nextSibling,m=p.nextSibling;return t.addEventListener(`dragend`,()=>{o(null),c(null)}),t.addEventListener(`drop`,t=>v(e,t)),t.addEventListener(`dragleave`,()=>{s()===e.id&&c(null)}),t.addEventListener(`dragover`,t=>{let n=h();n&&n.id!==e.id&&n.pinned===e.pinned&&(t.preventDefault(),c(e.id))}),t.addEventListener(`dragstart`,t=>{o(e.id),t.dataTransfer&&(t.dataTransfer.setData(`text/plain`,e.id),t.dataTransfer.effectAllowed=`move`)}),L(n,`draggable`,!1),R(l,()=>Ie[e.kind]),R(u,()=>e.status),R(f,()=>e.title),R(p,()=>e.summary||`—`),R(m,()=>e.slug),x(i=>{var o=!!e.pinned,c=e.status===`draft`,l=a()===e.id,u=s()===e.id,f=d()===`all`&&!r(),p=`#/n/${encodeURIComponent(e.slug)}`;return o!==i.e&&t.classList.toggle(`pinned`,i.e=o),c!==i.t&&t.classList.toggle(`draft`,i.t=c),l!==i.a&&t.classList.toggle(`dragging`,i.a=l),u!==i.o&&t.classList.toggle(`drop`,i.o=u),f!==i.i&&L(t,`draggable`,i.i=f),p!==i.n&&L(n,`href`,i.n=p),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()})),x(()=>u.classList.toggle(`on`,d()===`all`)),e})()};Ee([`click`]);function at(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var B=at();function ot(e){B=e}var V={exec:()=>null};function H(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function U(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(W.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var st=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),W={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:H(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:H(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:H(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:H(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:H(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:H(e=>RegExp(`^ {0,${e}}>`))},ct=/^(?:[ \t]*(?:\n|$))+/,lt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ut=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ft=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,mt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ht=U(mt).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),gt=U(mt).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_t=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,vt=/^[^\n]+/,yt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,bt=U(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,yt).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xt=U(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,pt).getRegex(),St=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Ct=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wt=U(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Ct).replace(`tag`,St).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Tt=e=>U(_t).replace(`hr`,dt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,St).getRegex(),Et=Tt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Dt=Tt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ot={blockquote:U(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Dt).getRegex(),code:lt,def:bt,fences:ut,heading:ft,hr:dt,html:wt,lheading:ht,list:xt,newline:ct,paragraph:Et,table:V,text:vt},kt=U(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,dt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,St).getRegex(),At={...Ot,lheading:gt,table:kt,paragraph:U(_t).replace(`hr`,dt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,kt).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,St).getRegex()},jt={...Ot,html:U(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Ct).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:V,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U(_t).replace(`hr`,dt).replace(`heading`,` *#{1,6} *[^
|
|
3
|
+
]`).replace(`lheading`,ht).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Mt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pt=/^( {2,}|\\)\n(?!\s*$)/,Ft=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,G=/[\p{P}\p{S}]/u,K=/[\s\p{P}\p{S}]/u,It=/[^\s\p{P}\p{S}]/u,Lt=U(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,K).getRegex(),Rt=/[\p{Pi}\p{Ps}"']/u,zt=/(?!~)[\p{P}\p{S}]/u,Bt=/(?!~)[\s\p{P}\p{S}]/u,Vt=/(?:[^\s\p{P}\p{S}]|~)/u,Ht=U(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,st?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Ut=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Wt=U(Ut,`u`).replace(/punct/g,G).getRegex(),Gt=U(Ut,`u`).replace(/punct/g,zt).getRegex(),Kt=U(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Rt).replace(/punct/g,G).getRegex(),qt=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Jt=U(qt,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,K).replace(/punct/g,G).getRegex(),Yt=U(qt,`gu`).replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,Bt).replace(/punct/g,zt).getRegex(),Xt=U(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,K).replace(/punct/g,G).getRegex(),Zt=U(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,K).replace(/punct/g,G).getRegex(),Qt=U(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,K).replace(/punct/g,G).getRegex(),$t=U(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,G).getRegex(),en=U(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,K).replace(/punct/g,G).getRegex(),tn=U(/\\(punct)/,`gu`).replace(/punct/g,G).getRegex(),nn=U(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rn=U(Ct).replace(`(?:-->|$)`,`-->`).getRegex(),an=U(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,rn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),on=U(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,/\[(?:\\[\s\S]|[^\[\]\\])*\]/).getRegex(),sn=U(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,on).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cn=U(/^!?\[(label)\]\[(ref)\]/).replace(`label`,on).replace(`ref`,yt).getRegex(),ln=U(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,yt).getRegex(),un=U(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,cn).replace(`nolink`,ln).getRegex(),dn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fn={_backpedal:V,anyPunctuation:tn,autolink:nn,blockSkip:Ht,br:Pt,code:Nt,del:V,delLDelim:V,delRDelim:V,emStrongLDelim:Wt,emStrongRDelimAst:Jt,emStrongRDelimUnd:Zt,escape:Mt,link:sn,nolink:ln,punctuation:Lt,reflink:cn,reflinkSearch:un,tag:an,text:Ft,url:V},pn={...fn,emStrongLDelim:Kt,emStrongRDelimAst:Xt,emStrongRDelimUnd:Qt,link:U(/^!?\[(label)\]\((.*?)\)/).replace(`label`,on).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,on).getRegex()},mn={...fn,emStrongRDelimAst:Yt,emStrongLDelim:Gt,delLDelim:$t,delRDelim:en,url:U(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,dn).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:U(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,dn).getRegex()},hn={...mn,br:U(Pt).replace(`{2,}`,`*`).getRegex(),text:U(mn.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},gn={normal:Ot,gfm:At,pedantic:jt},q={normal:fn,gfm:mn,breaks:hn,pedantic:pn},_n={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},vn=e=>_n[e];function J(e,t){if(t){if(W.escapeTest.test(e))return e.replace(W.escapeReplace,vn)}else if(W.escapeTestNoEncode.test(e))return e.replace(W.escapeReplaceNoEncode,vn);return e}function yn(e){try{e=encodeURI(e).replace(W.percentDecode,`%`)}catch{return null}return e}function bn(e,t){let n=e.replace(W.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(W.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(W.slashPipe,`|`);return n}function Y(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function xn(e){let t=e.split(`
|
|
4
|
+
`),n=t.length-1;for(;n>=0&&W.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
5
|
+
`)}function Sn(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Cn(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function wn(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function Tn(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
6
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
7
|
+
`)}var En=class{options;rules;lexer;constructor(e){this.options=e||B}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:xn(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Tn(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Y(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Y(t[0],`
|
|
8
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Y(t[0],`
|
|
9
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Y(t[0],`
|
|
10
|
+
`).split(`
|
|
11
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
12
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
13
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
14
|
+
${s}`:s,r=r?`${r}
|
|
15
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
16
|
+
`),o=t.raw+`
|
|
17
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s,n=`${n}
|
|
18
|
+
${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
19
|
+
`+e.join(`
|
|
20
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
21
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Cn(t[2].split(`
|
|
22
|
+
`,1)[0],t[1].length),l=e.split(`
|
|
23
|
+
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
24
|
+
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
25
|
+
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
26
|
+
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
27
|
+
`+l}u=!l.trim(),r+=p+`
|
|
28
|
+
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=xn(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Y(t[0],`
|
|
29
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=bn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
30
|
+
`):[],a={type:`table`,raw:Y(t[0],`
|
|
31
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(bn(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Y(t[0],`
|
|
32
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
33
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Y(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Sn(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),wn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return wn(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},X=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||B,this.options.tokenizer=this.options.tokenizer||new En,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:W,block:gn.normal,inline:q.normal};this.options.pedantic?(t.block=gn.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=gn.gfm,t.inline=this.options.breaks?q.breaks:q.gfm),this.tokenizer.rules=t}static get rules(){return{block:gn,inline:q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(W.carriageReturn,`
|
|
34
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(W.tabCharGlobal,` `).replace(W.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
35
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
36
|
+
`)?``:`
|
|
37
|
+
`)+i.raw,n.text+=`
|
|
38
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
39
|
+
`)?``:`
|
|
40
|
+
`)+i.raw,n.text+=`
|
|
41
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
42
|
+
`)?``:`
|
|
43
|
+
`)+i.raw,r.text+=`
|
|
44
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
45
|
+
`)?``:`
|
|
46
|
+
`)+i.raw,n.text+=`
|
|
47
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,e.slice(n+1,-1))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,n.slice(r+1,-1)))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Dn=class{options;parser;constructor(e){this.options=e||B}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(W.notSpaceStart)?.[0],i=e?e.replace(W.endingNewline,``)+`
|
|
48
|
+
`:``;return r?`<pre><code class="language-`+J(r)+`">`+(n?i:J(i,!0))+`</code></pre>
|
|
49
|
+
`:`<pre><code>`+(n?i:J(i,!0))+`</code></pre>
|
|
50
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
51
|
+
${this.parser.parse(e)}</blockquote>
|
|
52
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
53
|
+
`}hr(e){return`<hr>
|
|
54
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
55
|
+
`+r+`</`+i+`>
|
|
56
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
57
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
58
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
59
|
+
<thead>
|
|
60
|
+
`+t+`</thead>
|
|
61
|
+
`+r+`</table>
|
|
62
|
+
`}tablerow({text:e}){return`<tr>
|
|
63
|
+
${e}</tr>
|
|
64
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
65
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${J(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?J(n,!0):this.parser.parseInline(r),o=yn(e);if(o===null)return a;e=J(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+J(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=yn(e);if(i===null)return J(n);e=i;let a=`<img src="${J(e)}" alt="${J(n)}"`;return t&&(a+=` title="${J(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:J(e.text)}},On=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Z=class e{options;renderer;textRenderer;constructor(e){this.options=e||B,this.options.renderer=this.options.renderer||new Dn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new On}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},kn=class{options;block;constructor(e){this.options=e||B}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?X.lex:X.lexInline}provideParser(e=this.block){return e?Z.parse:Z.parseInline}},Q=new class{defaults=at();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Z;Renderer=Dn;TextRenderer=On;Lexer=X;Tokenizer=En;Hooks=kn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Dn(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new En(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new kn;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=kn.passThroughHooks.has(n)?e=>{if(this.defaults.async&&kn.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return X.lex(e,t??this.defaults)}parser(e,t){return Z.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?X.lex:X.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?X.lex:X.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
66
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+J(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Q.parse(e,t)}$.options=$.setOptions=function(e){return Q.setOptions(e),$.defaults=Q.defaults,ot($.defaults),$},$.getDefaults=at,$.defaults=B;function An(...e){return Q.use(...e),$.defaults=Q.defaults,ot($.defaults),$}$.use=An,$.walkTokens=function(e,t){return Q.walkTokens(e,t)},$.parseInline=Q.parseInline,$.Parser=Z,$.parser=Z.parse,$.Renderer=Dn,$.TextRenderer=On,$.Lexer=X,$.lexer=X.lex,$.Tokenizer=En,$.Hooks=kn,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,Z.parse,X.lex;var jn=`modulepreload`,Mn=function(e){return`/nors/`+e},Nn={},Pn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Mn(t,n),t=s(t),t in Nn)return;Nn[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:jn,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function Fn(e){return{html:String(await $.parse(e??``)),mermaid:/```mermaid/.test(e)}}async function In(e){if(!e)return;let t=[...e.querySelectorAll(`pre code.language-mermaid`)];if(t.length===0)return;let{default:n}=await Pn(async()=>{let{default:e}=await import(`./mermaid.core-FEPUjAo_.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]));n.initialize({startOnLoad:!1}),await n.run({nodes:t})}var Ln=I(`<p class=error>`),Rn=I(`<p class=hint>Loading…`),zn=I(`<main class=reader>`),Bn=I(`<nav class=crumbs><a href=#/>← Notes</a><a class=ghost>Edit`),Vn=I(`<p class=meta><span class=kind></span><span class=status></span><span class=date>Updated `),Hn=I(`<h2>`),Un=I(`<div class=prose>`),Wn=I(`<span class=tag>#`),Gn=e=>{let[t,n]=y(``),r,[i]=w(()=>e.slug,async t=>{try{return await Ue(t)}catch(t){return t instanceof Error&&t.message===`session expired`?e.onExpired():n(t instanceof Error?t.message:String(t)),null}}),[a]=w(i,async e=>e?Fn(e.body):{html:``,mermaid:!1});return S(async()=>{a()?.mermaid&&await In(r)}),(()=>{var e=zn();return R(e,P(F,{get when(){return t()},get children(){var e=Ln();return R(e,t),e}}),null),R(e,P(F,{get when(){return i.loading||a.loading},get children(){return Rn()}}),null),R(e,P(F,{get when(){return i()},children:e=>[(()=>{var t=Bn(),n=t.firstChild.nextSibling;return x(()=>L(n,`href`,`#/edit/${encodeURIComponent(e().slug)}`)),t})(),(()=>{var t=Vn(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return i.firstChild,R(n,()=>Ie[e().kind]),R(r,()=>e().status),R(t,()=>e().tags.map(e=>(()=>{var t=Wn();return t.firstChild,R(t,e,null),t})()),i),R(i,()=>e().updated.slice(0,10),null),t})(),(()=>{var t=Hn();return R(t,()=>e().title),t})(),(()=>{var e=Un(),t=r;return typeof t==`function`?De(t,e):r=e,x(()=>e.innerHTML=a()?.html??``),e})()]}),null),e})()},Kn=I(`<p class=error>`),qn=I(`<p class=hint>Loading…`),Jn=I(`<main class=editor>`),Yn=I(`<a>Read`),Xn=I(`<nav class=crumbs><a href=#/>← Notes</a><span class=spacer></span><button type=button class=pinbtn><svg width=17 height=17 viewBox="0 0 24 24"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M8 3h8l-1 8 3 3v2H6v-2l3-3z"></path><line x1=12 y1=16 x2=12 y2=21>`),Zn=I(`<input class=doctitle placeholder="New note title…"maxlength=160 required>`),Qn=I(`<div class="tabs kindpills">`),$n=I(`<div class=iconbar><div class=icons><button type=button title=Bold aria-label=Bold>B</button><button type=button title=Italic aria-label=Italic>I</button><button type=button title=Link aria-label=Link><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></button><button type=button title=List aria-label=List><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=8 y1=6 x2=21 y2=6></line><line x1=8 y1=12 x2=21 y2=12></line><line x1=8 y1=18 x2=21 y2=18></line><line x1=3 y1=6 x2=3.01 y2=6></line><line x1=3 y1=12 x2=3.01 y2=12></line><line x1=3 y1=18 x2=3.01 y2=18></line></svg></button><button type=button title="Numbered list"aria-label="Numbered list"><span class=glyph>1.</span></button><button type=button title=Heading aria-label=Heading>H</button><button type=button title=Quote aria-label=Quote><span class=glyph>❝</span></button><button type=button title=Code aria-label=Code><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></button><button type=button title="Mermaid diagram"aria-label="Mermaid diagram"><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg></button></div><div class=minitabs><button type=button>Write</button><button type=button>Preview`),er=I(`<textarea class=doctext placeholder="Write your note here…"rows=8>`),tr=I(`<div class=edit-foot><button type=button class=ghost></button><button type=button>`),nr=I(`<button type=button>`),rr=I(`<div class="prose preview">`);function ir(e){let t={ç:`c`,ğ:`g`,ı:`i`,ö:`o`,ş:`s`,ü:`u`};return e.toLowerCase().replace(/[çğıöşü]/g,e=>t[e]).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,80)}function ar(){return{id:``,title:``,slug:``,summary:``,body:``,kind:`scratch`,tags:[],pinned:!1,status:`draft`,sort:0,updated:``}}var or=e=>{let[t,n]=y(``),[r]=w(()=>e.slug,async t=>{if(t===`$new`)return ar();try{return await Ue(t)}catch(t){return t instanceof Error&&t.message===`session expired`?e.onExpired():n(t instanceof Error?t.message:String(t)),null}});return(()=>{var n=Jn();return R(n,P(F,{get when(){return t()},get children(){var e=Kn();return R(e,t),e}}),null),R(n,P(F,{get when(){return r.loading},get children(){return qn()}}),null),R(n,P(F,{get when(){return r()},children:t=>P(sr,{get initial(){return t()},get onExpired(){return e.onExpired}})}),null),n})()},sr=e=>{let t=()=>e.initial,[n,r]=y(t().title),[i,a]=y(t().body),[o,s]=y(t().kind),[c,l]=y(t().pinned),[u,d]=y(`write`),f=()=>JSON.stringify([n(),i(),o(),c()]),p=f(),m=!0,h=location.hash;te(()=>{let e=()=>{if(!m){m=!0;return}if(f()===p||confirm(`Discard unsaved changes?`)){h=location.hash;return}m=!1,location.hash===h?m=!0:location.hash=h};window.addEventListener(`hashchange`,e),E(()=>window.removeEventListener(`hashchange`,e))});let[g,_]=y(``),v,b;function S(e,t,n){queueMicrotask(()=>{e.focus(),e.setSelectionRange(t,n)})}function C(e,t,n){let r=v;if(!r)return;let o=i(),s=r.selectionStart??o.length,c=r.selectionEnd??o.length,l=o.slice(s,c)||n;a(o.slice(0,s)+e+l+t+o.slice(c)),d(`write`),S(r,s+e.length,s+e.length+l.length)}function ee(e){let t=v;if(!t)return;let n=i(),r=t.selectionStart??0,o=t.selectionEnd??0,s=n.lastIndexOf(`
|
|
67
|
+
`,r-1)+1,c=n.indexOf(`
|
|
68
|
+
`,o),l=c<0?n.length:c,u=n.slice(s,l).split(`
|
|
69
|
+
`).map(t=>t.startsWith(e)?t:e+t).join(`
|
|
70
|
+
`);a(n.slice(0,s)+u+n.slice(l)),d(`write`),S(t,s,s+u.length)}function w(){let e="\n```mermaid\ngraph TD\n A --> B\n```\n",t=v;if(!t)return a(i()+e);let n=i(),r=t.selectionStart??n.length;a(n.slice(0,r)+e+n.slice(t.selectionEnd??r)),d(`write`),S(t,r+35,r+35)}async function T(){d(`preview`);let e=await Fn(i());_(e.html),e.mermaid&&queueMicrotask(()=>In(b))}let[ne,re]=y(!1),[ie,ae]=y(``);function D(e){return(e.split(`
|
|
71
|
+
`).map(e=>e.trim()).find(e=>e!==``&&!e.startsWith(`#`)&&!e.startsWith("```"))??``).replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/[*_`>#\-[\]()]/g,``).trim().slice(0,160)}function oe(e){let r=!t().id,a=n().trim();return{title:a,slug:r?ir(a)||`note`:t().slug,summary:r?D(i()):t().summary,body:i(),kind:o(),tags:r?[]:t().tags,pinned:c(),status:e,sort:t().sort}}async function O(r){if(!n().trim())return ae(`Title is required.`);let i=oe(r);re(!0),ae(``);try{let e=await We(i,t().id||void 0);p=f(),Je(`/n/${encodeURIComponent(e.slug)}`)}catch(t){t instanceof Error&&t.message===`session expired`?e.onExpired():ae(t instanceof Error?t.message:String(t))}finally{re(!1)}}return[(()=>{var e=Xn(),n=e.firstChild.nextSibling,r=n.nextSibling,i=r.firstChild;return R(e,P(F,{get when(){return t().slug},get children(){var e=Yn();return x(()=>L(e,`href`,`#/n/${encodeURIComponent(t().slug)}`)),e}}),n),r.$$click=()=>l(!c()),x(e=>{var t=!!c(),n=c()?`Unpin`:`Pin to top`,a=c(),o=c()?`currentColor`:`none`;return t!==e.e&&r.classList.toggle(`on`,e.e=t),n!==e.t&&L(r,`title`,e.t=n),a!==e.a&&L(r,`aria-pressed`,e.a=a),o!==e.o&&L(i,`fill`,e.o=o),e},{e:void 0,t:void 0,a:void 0,o:void 0}),e})(),P(F,{get when(){return ie()},get children(){var e=Kn();return R(e,ie),e}}),(()=>{var e=Zn();return e.$$input=e=>r(e.currentTarget.value),x(()=>e.value=n()),e})(),(()=>{var e=Qn();return R(e,P(xe,{each:Fe,children:e=>(()=>{var t=nr();return t.$$click=()=>s(e),R(t,()=>Ie[e]),x(()=>t.classList.toggle(`on`,o()===e)),t})()})),e})(),(()=>{var e=$n(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling,c=s.nextSibling,l=c.nextSibling,f=l.nextSibling,p=t.nextSibling.firstChild,m=p.nextSibling;return n.$$click=()=>C(`**`,`**`,`text`),r.$$click=()=>C(`*`,`*`,`text`),i.$$click=()=>C(`[`,`](https://)`,`text`),a.$$click=()=>ee(`- `),o.$$click=()=>ee(`1. `),s.$$click=()=>ee(`## `),c.$$click=()=>ee(`> `),l.$$click=()=>C("`","`",`code`),f.$$click=w,p.$$click=()=>d(`write`),m.$$click=T,x(e=>{var t=u()===`write`,n=u()===`preview`;return t!==e.e&&p.classList.toggle(`on`,e.e=t),n!==e.t&&m.classList.toggle(`on`,e.t=n),e},{e:void 0,t:void 0}),e})(),P(F,{get when(){return u()===`write`},get fallback(){return(()=>{var e=rr(),t=b;return typeof t==`function`?De(t,e):b=e,x(()=>e.innerHTML=g()),e})()},get children(){var e=er();e.$$input=e=>a(e.currentTarget.value);var t=v;return typeof t==`function`?De(t,e):v=e,x(()=>e.value=i()),e}}),(()=>{var e=tr(),n=e.firstChild,r=n.nextSibling;return n.$$click=()=>O(`draft`),R(n,()=>ne()?`…`:`Save draft`),r.$$click=()=>O(`published`),R(r,(()=>{var e=Se(()=>!!ne());return()=>e()?`…`:t().status===`published`?`Republish`:`Publish`})()),x(e=>{var t=ne(),i=ne();return t!==e.e&&(n.disabled=e.e=t),i!==e.t&&(r.disabled=e.t=i),e},{e:void 0,t:void 0}),e})()]};Ee([`click`,`input`]);var cr=I(`<p class=menu-mail>`),lr=I(`<div class=menu><button type=button class=out>Sign out`),ur=I(`<nav class=row><button type=button class=muted>+ New</button><div class=avatar-wrap><button type=button class=avatar aria-label=Account>`),dr=I(`<div class=shell><header class=top><a class=brand href=#/><img alt width=30 height=30><h1>Nors`),fr=I(`<p class=menu-mail>superuser`),pr=I(`<p class=error>`),mr=I(`<div class=center-page><form class=login><h2>Superuser</h2><p class=hint>Same PocketBase account as Skadi. Token stays in this browser.</p><label>Email<input type=email autocomplete=username required></label><label>Password<input type=password autocomplete=current-password required></label><button type=submit>`),hr=()=>{new URLSearchParams(location.search).get(`new`)===`1`&&history.replaceState(null,``,`${location.pathname}#/edit/${Ke}`);let[e,t]=y(Re()),[n,r]=y(``),[i,a]=y(``),[o,s]=y(``),[c,l]=y(!1),u=Ye(),[d,f]=y(!1),p;te(()=>{let e=e=>{p&&!p.contains(e.target)&&f(!1)},t=e=>{e.key===`Escape`&&f(!1)};document.addEventListener(`click`,e),document.addEventListener(`keydown`,t),E(()=>{document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t)})});let m=()=>{e();try{let e=JSON.parse(localStorage.getItem(`nors_pb_user`)||`{}`);return e&&typeof e==`object`&&`email`in e&&typeof e.email==`string`?e.email:``}catch{return``}},h=()=>(m()[0]??`N`).toUpperCase();async function g(e){e.preventDefault(),l(!0),s(``);try{await Be(n(),i()),t(Re()),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}function _(){ze(),t(null)}return(()=>{var t=dr(),s=t.firstChild,l=s.firstChild.firstChild;return R(s,P(F,{get when(){return e()},get children(){var e=ur(),t=e.firstChild,n=t.nextSibling,r=n.firstChild;t.$$click=()=>Je(`/edit/$new`);var i=p;return typeof i==`function`?De(i,n):p=n,r.$$click=()=>f(!d()),R(r,h),R(n,P(F,{get when(){return d()},get children(){var e=lr(),t=e.firstChild;return R(e,P(F,{get when(){return m()},get fallback(){return fr()},get children(){var e=cr();return R(e,m),e}}),t),t.$$click=_,e}}),null),x(()=>L(r,`aria-expanded`,d())),e}}),null),R(t,P(F,{get when(){return e()},get fallback(){return(()=>{var e=mr(),t=e.firstChild,s=t.firstChild.nextSibling.nextSibling,l=s.firstChild.nextSibling,u=s.nextSibling,d=u.firstChild.nextSibling,f=u.nextSibling;return t.addEventListener(`submit`,g),l.$$input=e=>r(e.currentTarget.value),d.$$input=e=>a(e.currentTarget.value),R(t,P(F,{get when(){return o()},get children(){var e=pr();return R(e,o),e}}),f),R(f,()=>c()?`…`:`Enter`),x(()=>f.disabled=c()),x(()=>l.value=n()),x(()=>d.value=i()),e})()},get children(){return(()=>{let e=u();return e.name===`read`?P(Gn,{get slug(){return e.slug},onExpired:_}):e.name===`edit`?P(or,{get slug(){return e.slug},onExpired:_}):P(it,{onExpired:_})})()}}),null),x(()=>L(l,`src`,`/nors/nors-mark.svg`)),t})()};Ee([`click`,`input`]);var gr=document.getElementById(`root`);if(!gr)throw Error(`#root missing`);Te(()=>P(hr,{}),gr);export{Pn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html,body,#root{height:100%}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0b0d10;--panel:#12151a;--ink:#e8eef5;--muted:#8b98a8;--accent:#6ec8ff;--tint:#b9e4ff;--line:#1e2430;--danger:#ff7b7b;background:var(--bg);color:var(--ink);font-family:IBM Plex Sans,Segoe UI,system-ui,sans-serif;line-height:1.45}*{box-sizing:border-box}body{background:var(--bg);min-height:100vh;margin:0}.shell{max-width:960px;margin:0 auto;padding:1.25rem 1rem 3rem}.top{justify-content:space-between;align-items:center;margin-bottom:1.5rem;display:flex}.brand{color:inherit;align-items:center;gap:.7rem;text-decoration:none;display:flex}.brand img{border-radius:7px;flex:none;width:30px;height:30px}.brand h1{letter-spacing:-.01em;margin:0;font-size:1.2rem;font-weight:650}.center-page{justify-content:center;align-items:center;min-height:70vh;display:flex}.login{background:var(--panel);border:1px solid var(--line);border-radius:8px;gap:.75rem;width:100%;max-width:360px;margin:0 auto;padding:1.25rem;display:grid}.login h2{margin:0}.login label{color:var(--muted);gap:.35rem;font-size:.85rem;display:grid}.login input{border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:6px;padding:.55rem .65rem}button{background:var(--accent);color:#041018;cursor:pointer;border:0;border-radius:6px;min-height:44px;padding:.55rem .9rem;font-weight:600}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}button:disabled{opacity:.6;cursor:wait}button.ghost{color:var(--tint);border:1px solid var(--line);background:0 0}button.icononly{justify-content:center;align-items:center;width:36px;min-height:36px;padding:0;display:inline-flex}button.muted{background:var(--panel);color:var(--ink);border:1px solid var(--line);font-weight:550}.tabs{flex-wrap:wrap;gap:.5rem;margin:0 0 1rem;display:flex}.tabs button{background:var(--panel);color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:.35rem .85rem;font-weight:500}.tabs button.on{color:var(--tint);border-color:var(--accent)}.hint,.empty{color:var(--muted);font-size:.9rem}.error{color:var(--danger);margin:0;font-size:.85rem}.dash-head{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.dash-head h2{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin:0;font-size:1rem;font-weight:500}.cards{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.75rem;margin:0;padding:0;list-style:none;display:grid}.card{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-height:140px;padding:.9rem 1rem}.card.pinned{border-color:color-mix(in srgb, var(--accent) 45%, var(--line))}.card.draft{opacity:.85}.card-top{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);justify-content:space-between;gap:.5rem;margin-bottom:.4rem;font-size:.7rem;display:flex}.card h3{margin:0 0 .35rem;font-size:1.05rem}.card p{color:var(--muted);margin:0 0 .75rem;font-size:.9rem}.slug{color:var(--accent);font-size:.75rem}.row{align-items:center;gap:.5rem;display:flex}.card-link{color:inherit;text-decoration:none;display:block}.crumbs{flex-wrap:wrap;align-items:center;gap:.75rem;margin-bottom:1rem;display:flex}.crumbs a{color:var(--accent);text-decoration:none}.crumbs .spacer{flex:1}.pinbtn{width:44px;height:44px;color:var(--muted);background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;padding:0;display:flex}.pinbtn:hover{color:var(--tint);background:var(--bg)}.pinbtn.on{color:var(--accent)}.pinbtn svg{width:17px;height:17px}.reader h2,.editor h2{margin:0 0 1rem}.meta{align-items:center;gap:.5rem;margin:0 0 .5rem;display:flex}.meta .date{color:var(--muted);margin-left:auto;font-size:.75rem}.tag{color:var(--muted);font-size:.75rem}.prose{max-width:72ch}.prose pre{background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:.75rem 1rem;overflow-x:auto}.prose code{font-size:.85em}.prose table{border-collapse:collapse}.prose th,.prose td{border:1px solid var(--line);padding:.25rem .75rem}.editor label{gap:.25rem;margin-bottom:.75rem;display:grid}.editor input,.editor select,.editor textarea{background:var(--panel);border:1px solid var(--line);color:var(--ink);font:inherit;border-radius:6px;padding:.5rem .75rem}.editor input,.editor select{height:2.5rem}.editor textarea{resize:vertical;font-family:ui-monospace,monospace}.card.dragging{opacity:.4}.card.drop{border-color:var(--accent)}.avatar-wrap{position:relative}.avatar{background:var(--panel);width:44px;min-width:44px;height:44px;color:var(--ink);border:1px solid var(--line);border-radius:50%;padding:0;font-weight:650}.avatar[aria-expanded=true]{border-color:var(--accent)}.menu{z-index:20;background:var(--panel);border:1px solid var(--line);border-radius:10px;min-width:210px;padding:6px;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 14px 34px #000a}.menu button{width:100%;min-height:0;color:var(--ink);text-align:left;background:0 0;border-radius:6px;padding:.5rem .75rem;font-weight:500;display:flex}.menu button:hover{background:var(--bg)}.menu button.out{color:var(--danger)}.menu-sep{background:var(--line);height:1px;margin:6px 4px}.menu-mail{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;margin:0;padding:.5rem .75rem;font-size:.8rem;overflow:hidden}.editor input.doctitle{letter-spacing:-.02em;width:100%;color:var(--ink);background:0 0;border:0;border-radius:0;height:auto;margin:0 0 .75rem;padding:.25rem 0;font-size:1.75rem;font-weight:700}.editor input.doctitle:focus{outline:none}.editor input.doctitle::placeholder{color:var(--muted);opacity:.55}.kindpills{margin-bottom:1rem}.iconbar{border-top:1px solid var(--line);border-bottom:1px solid var(--line);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem .75rem;margin-bottom:1rem;padding:.35rem 0;display:flex}.icons{align-items:center;gap:.3rem;display:flex}.icons button{width:44px;height:44px;color:var(--muted);background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;padding:0;font-size:.95rem;font-weight:700;display:flex}.icons button:hover{color:var(--tint);background:var(--bg)}.icons button svg{width:18px;height:18px}.icons .glyph{font-size:.9rem}.minitabs{gap:.25rem;display:flex}.minitabs button{color:var(--muted);background:0 0;border:0;border-radius:6px;padding:.35rem .6rem;font-size:.85rem;font-weight:600}.minitabs button.on{color:var(--tint);background:var(--bg)}.edit-foot{justify-content:flex-end;gap:.5rem;margin-top:1rem;display:flex}.editor textarea.doctext{width:100%;min-height:22vh;color:var(--ink);resize:vertical;background:0 0;border:0;border-radius:0;padding:.25rem 0;font-family:ui-monospace,monospace;font-size:.95rem;line-height:1.65}.editor textarea.doctext:focus{outline:none}.editor textarea.doctext::placeholder{color:var(--muted);opacity:.55}.prose.preview{background:var(--panel);border:1px solid var(--line);border-radius:6px;min-height:200px;padding:.75rem 1rem}.empty-wrap{text-align:center;color:var(--muted);padding:3rem 1rem}.empty-wrap svg{color:var(--muted);opacity:.7;margin:0 auto 1rem;display:block}.spin-wrap{justify-content:center;padding:2.5rem 0;display:flex}.spin{border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;width:28px;height:28px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.empty-wrap p{margin:0 0 1rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{w as e}from"./mermaid-parser.core-BR6xQvT6.js";export{e as createInfoServices};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{m as e}from"./src-BH-TyZbA.js";import{n as t}from"./mermaid-parser.core-BR6xQvT6.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{c as r}from"./chunk-DU6HZSFF-B5Wb9e-Z.js";import{f as i}from"./mermaid.core-FEPUjAo_.js";var a={parse:n(async n=>{let r=await t(`info`,n);e.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:n(()=>o.version,`getVersion`)},renderer:{draw:n((t,n,a)=>{e.debug(`rendering info diagram
|
|
2
|
+
`+t);let o=i(n);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}export{e as t};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import"./src-BH-TyZbA.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-B5Wb9e-Z.js";import{p as d}from"./chunk-75Z2AOVW-Cwc7WThs.js";import{t as f}from"./rough.esm-Dy-Kn_BL.js";import{f as p}from"./mermaid.core-FEPUjAo_.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=p(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?f.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,u,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
|
|
7
|
+
`)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>`
|
|
8
|
+
.ishikawa .ishikawa-spine,
|
|
9
|
+
.ishikawa .ishikawa-branch,
|
|
10
|
+
.ishikawa .ishikawa-sub-branch {
|
|
11
|
+
stroke: ${e.lineColor};
|
|
12
|
+
stroke-width: 2;
|
|
13
|
+
fill: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ishikawa .ishikawa-sub-branch {
|
|
17
|
+
stroke-width: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ishikawa .ishikawa-arrow {
|
|
21
|
+
fill: ${e.lineColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ishikawa .ishikawa-head {
|
|
25
|
+
fill: ${e.mainBkg};
|
|
26
|
+
stroke: ${e.lineColor};
|
|
27
|
+
stroke-width: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ishikawa .ishikawa-label-box {
|
|
31
|
+
fill: ${e.mainBkg};
|
|
32
|
+
stroke: ${e.lineColor};
|
|
33
|
+
stroke-width: 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ishikawa text {
|
|
37
|
+
font-family: ${e.fontFamily};
|
|
38
|
+
font-size: ${e.fontSize};
|
|
39
|
+
fill: ${e.textColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ishikawa .ishikawa-head-label {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
text-anchor: middle;
|
|
45
|
+
dominant-baseline: middle;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ishikawa .ishikawa-label {
|
|
50
|
+
text-anchor: end;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ishikawa .ishikawa-label.cause {
|
|
54
|
+
text-anchor: middle;
|
|
55
|
+
dominant-baseline: middle;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ishikawa .ishikawa-label.align {
|
|
59
|
+
text-anchor: end;
|
|
60
|
+
dominant-baseline: middle;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ishikawa .ishikawa-label.up {
|
|
64
|
+
dominant-baseline: baseline;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ishikawa .ishikawa-label.down {
|
|
68
|
+
dominant-baseline: hanging;
|
|
69
|
+
}
|
|
70
|
+
`,`getStyles`)};export{R as diagram};
|