volute 0.53.0 → 0.54.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/dist/auto-upgrade-HEVZKPTF.js +46 -0
- package/dist/{backup-WWXVIMYQ.js → backup-QRNX6RK7.js} +11 -11
- package/dist/channels-CKCY64TD.js +203 -0
- package/dist/{chat-WK2BLM7B.js → chat-ZUGNL5GS.js} +9 -9
- package/dist/{chunk-UTKUO2KY.js → chunk-3LHUXY3E.js} +2 -2
- package/dist/{chunk-PIZDPY4G.js → chunk-444RR3YF.js} +4 -4
- package/dist/{chunk-VDZ4I4ZP.js → chunk-56IT2ZXF.js} +3 -3
- package/dist/{chunk-OXWUEU5V.js → chunk-5U5GLZSD.js} +2 -2
- package/dist/{chunk-LN7XJ56R.js → chunk-7XKPG66D.js} +9 -9
- package/dist/{chunk-R772ET2M.js → chunk-AAPNU7GA.js} +4 -0
- package/dist/{chunk-7ARONCZW.js → chunk-ATZF2RNJ.js} +3 -3
- package/dist/{chunk-6NLW72HP.js → chunk-CKPAVQNK.js} +1 -1
- package/dist/{chunk-RMADJFA7.js → chunk-CLCHOXLR.js} +1 -1
- package/dist/{chunk-IQ7VNWH6.js → chunk-HKGYZVWN.js} +1 -1
- package/dist/{chunk-HASADR3E.js → chunk-LGXVGIWN.js} +66 -25
- package/dist/{chunk-P2TBUKLW.js → chunk-LKUGUQUW.js} +3 -3
- package/dist/{chunk-AP2KQMMW.js → chunk-OAYY3WF3.js} +11 -3
- package/dist/{chunk-UO4MZQNO.js → chunk-OGPVJ53N.js} +14 -6
- package/dist/{chunk-M77B73VV.js → chunk-OIOW3FPT.js} +7 -2
- package/dist/chunk-OT5SXF7L.js +904 -0
- package/dist/{chunk-EDR47UE2.js → chunk-OYF25B62.js} +1 -1
- package/dist/{chunk-TAWRJ24T.js → chunk-PPSN2MLC.js} +2 -2
- package/dist/{chunk-5DBGQBQR.js → chunk-RGHF3OK5.js} +21 -10
- package/dist/{chunk-RQRO6PC7.js → chunk-VDUCLVZI.js} +305 -31
- package/dist/{chunk-23UJGVYP.js → chunk-WHL6PKYP.js} +10 -10
- package/dist/{chunk-HTB7KDRU.js → chunk-WZZCA23D.js} +5 -4
- package/dist/{chunk-UDZLPR34.js → chunk-YSRYCS3N.js} +13 -8
- package/dist/{chunk-5N32EN4O.js → chunk-Z4Q6TQWL.js} +1 -1
- package/dist/{chunk-BDHKCLWK.js → chunk-ZNHL5KQJ.js} +1 -1
- package/dist/cli.js +19 -19
- package/dist/{clock-SH4NQC2F.js → clock-X7V3C7NL.js} +3 -3
- package/dist/{cloud-sync-MJVJ33LD.js → cloud-sync-52YNJRMR.js} +11 -11
- package/dist/{daemon-restart-BIGU4OKS.js → daemon-restart-QWHN5VMU.js} +4 -4
- package/dist/daemon.js +330 -746
- package/dist/{db-IPXRJUI7.js → db-I4EH5SLF.js} +3 -1
- package/dist/{delivery-manager-FDHCZ7PU.js → delivery-manager-7R2YIQ2W.js} +11 -7
- package/dist/{delivery-notices-65TB3CBX.js → delivery-notices-RZQ6GONP.js} +3 -3
- package/dist/{delivery-router-RHANNTAC.js → delivery-router-QS4NLJR6.js} +3 -1
- package/dist/{down-QSNEMTTX.js → down-UN2EDX2Y.js} +3 -3
- package/dist/{echo-text-KU6G4Z7V.js → echo-text-73CYQRL7.js} +14 -14
- package/dist/{exec-ABD3DYA2.js → exec-Z34TTUO3.js} +1 -1
- package/dist/{extensions-VACUKFA5.js → extensions-QT65JGV6.js} +21 -11
- package/dist/{isolation-GVV2IBAU.js → isolation-UQPDO34R.js} +1 -1
- package/dist/{message-delivery-TUXM3AAE.js → message-delivery-TRKT4T2P.js} +11 -11
- package/dist/migrate-name-placeholder-C7NCNLWF.js +37 -0
- package/dist/{mind-IX5AWUST.js → mind-CT6ANXK4.js} +12 -12
- package/dist/{mind-contacts-BKUOUJPV.js → mind-contacts-PEXCDRXA.js} +8 -8
- package/dist/{mind-list-KNU34SUD.js → mind-list-7KBLPLES.js} +2 -2
- package/dist/{mind-service-WHFBUKZE.js → mind-service-7EFIJ3ZA.js} +11 -11
- package/dist/{mind-sleep-D3DEYAWG.js → mind-sleep-24HV4RCA.js} +5 -5
- package/dist/{mind-status-BPTLQ5Z6.js → mind-status-4YW4PHMO.js} +6 -3
- package/dist/{package-BN5KMU54.js → package-F6S5NHY2.js} +4 -4
- package/dist/{prompts-HNKGCAEY.js → prompts-JECJIFPQ.js} +1 -1
- package/dist/{scheduler-5X5UIQOQ.js → scheduler-73Q4MQ7Y.js} +6 -6
- package/dist/{seed-LHZ33UB4.js → seed-DRKAP3XV.js} +1 -1
- package/dist/{seed-cmd-U4RVJ3UA.js → seed-cmd-6IMTO3LG.js} +2 -2
- package/dist/{seed-create-OQU4KNCB.js → seed-create-VNLDYRFK.js} +1 -1
- package/dist/{seed-readiness-WJYYRRCK.js → seed-readiness-H5TTPAQH.js} +2 -2
- package/dist/{seed-sprout-SFUYH2RG.js → seed-sprout-PPGYGK4G.js} +8 -8
- package/dist/{send-FWZAMDBN.js → send-UXUQKO4N.js} +9 -9
- package/dist/{service-XQPMZAGI.js → service-T4P5W6RS.js} +2 -2
- package/dist/{service-install-2EWD7KXD.js → service-install-R4SNYUVO.js} +3 -3
- package/dist/{setup-RVSGCIF3.js → setup-YUAQMDVZ.js} +4 -4
- package/dist/skills/dreaming/SKILL.md +2 -2
- package/dist/skills/dreaming/references/INSTALL.md +1 -1
- package/dist/skills/tending/SKILL.md +2 -0
- package/dist/skills/volute-mind/references/integrations.md +3 -2
- package/dist/skills/volute-mind/references/routing.md +18 -5
- package/dist/{skills-QRPU6BWY.js → skills-GMQ5UIIW.js} +2 -2
- package/dist/{sleep-manager-NWUCRBZB.js → sleep-manager-KHI65FEX.js} +11 -11
- package/dist/{spirit-I5ECLGRI.js → spirit-Q5VGFWUI.js} +5 -3
- package/dist/{spirit-availability-NIUUYKU2.js → spirit-availability-G5FMWKRH.js} +12 -12
- package/dist/{sprout-A2PMEF7Z.js → sprout-PMTRL7QN.js} +1 -1
- package/dist/{src-LCSOQY6Z.js → src-3FIW7DLH.js} +241 -87
- package/dist/src-H3UCOP6B.js +516 -0
- package/dist/{src-HGNE2XG4.js → src-LTTQVN2Z.js} +1 -1
- package/dist/{status-EYG4A3OK.js → status-LCKTTIWS.js} +5 -5
- package/dist/{system-events-YTOU66QI.js → system-events-Q7IVZ5T4.js} +1 -1
- package/dist/{systems-2DIJY4RF.js → systems-HL7SGSW7.js} +6 -6
- package/dist/{turn-tracker-NNHS6MAR.js → turn-tracker-HZDPMSCC.js} +2 -2
- package/dist/{up-UGBHH743.js → up-XZDSJVMU.js} +3 -3
- package/dist/{update-CIWI2JYA.js → update-ILCPVNDD.js} +2 -2
- package/dist/{upgrade-LIE46UBB.js → upgrade-XY2J7NWZ.js} +9 -1
- package/dist/{variant-cleanup-CZDLIY3F.js → variant-cleanup-QHGGY7ND.js} +6 -6
- package/dist/{version-notify-SJVAQLZI.js → version-notify-VNVFX6UP.js} +19 -4
- package/dist/web-assets/assets/{index-b7G7ZsVk.js → index-CwtxGwe_.js} +16 -16
- package/dist/web-assets/assets/index-DhM1yYRN.css +1 -0
- package/dist/web-assets/index.html +2 -2
- package/package.json +4 -4
- package/packages/extensions/intentions/dist/ui/assets/index-3FneLCKR.css +1 -0
- package/packages/extensions/intentions/dist/ui/assets/index-CQz4aceM.js +67 -0
- package/packages/extensions/{plan → intentions}/dist/ui/index.html +3 -3
- package/packages/extensions/intentions/skills/intention-review/SKILL.md +38 -0
- package/packages/extensions/intentions/skills/intentions/SKILL.md +49 -0
- package/packages/extensions/intentions/skills/intentions/scripts/intentions-hook.sh +45 -0
- package/packages/extensions/pages/skills/commons-gardening/SKILL.md +50 -0
- package/packages/extensions/pages/skills/pages/SKILL.md +18 -13
- package/templates/_base/.init/.config/prompts.json +2 -2
- package/templates/{pi → _base}/.init/.config/routes.json +1 -0
- package/templates/_base/.init/memory/dreams/.gitkeep +0 -0
- package/templates/_base/home/.config/routes.json +1 -1
- package/templates/_base/home/VOLUTE.md +1 -1
- package/templates/_base/src/lib/context-breakdown.ts +11 -3
- package/templates/_base/src/lib/routing.ts +2 -2
- package/templates/_base/src/lib/startup.ts +4 -2
- package/templates/claude/.init/CLAUDE.md +4 -0
- package/templates/claude/src/agent.ts +28 -12
- package/templates/claude/src/lib/message-channel.ts +43 -15
- package/templates/claude/src/lib/recover.ts +69 -0
- package/templates/claude/src/lib/stream-consumer.ts +23 -5
- package/templates/claude/volute-template.json +1 -1
- package/templates/codex/.init/AGENTS.md +4 -0
- package/templates/codex/volute-template.json +1 -1
- package/templates/pi/.init/MINDS.md +4 -0
- package/templates/pi/src/lib/mechanics-doc.ts +30 -0
- package/templates/pi/src/server.ts +3 -1
- package/templates/pi/volute-template.json +1 -1
- package/dist/channels-LW5ZLMSQ.js +0 -90
- package/dist/skills/plan-coordinator/SKILL.md +0 -60
- package/dist/src-UDMJZ6MH.js +0 -426
- package/dist/web-assets/assets/index-BHSU9r-4.css +0 -1
- package/packages/extensions/plan/dist/ui/assets/index-B8s8wxyt.js +0 -67
- package/packages/extensions/plan/dist/ui/assets/index-jIkrt-vI.css +0 -1
- package/packages/extensions/plan/skills/plan/SKILL.md +0 -43
- package/packages/extensions/plan/skills/plan/scripts/plan-hook.sh +0 -37
- package/templates/claude/.init/.config/routes.json +0 -11
- package/templates/codex/.init/.config/routes.json +0 -11
- package/dist/{accept-I4GVGWA3.js → accept-RSDIVJL6.js} +3 -3
- package/dist/{bridge-KU2IKSH3.js → bridge-YK7NTRU5.js} +3 -3
- package/dist/{create-C3XZACTV.js → create-M727VUDF.js} +3 -3
- package/dist/{env-BJGM6FBA.js → env-7AZFBPWX.js} +7 -7
- package/dist/{extension-B2W52WZY.js → extension-MRYJWSMV.js} +3 -3
- package/dist/{files-CHPNEQXN.js → files-PCKBQHAY.js} +3 -3
- package/dist/{list-R2GDWOEE.js → list-UQGIW7OF.js} +3 -3
- package/dist/{login-EZ4RRDQX.js → login-4NUS72Z5.js} +3 -3
- package/dist/{login-JDOAK465.js → login-57MMYILL.js} +4 -4
- package/dist/{logout-MWSIUOQU.js → logout-BYV433X6.js} +3 -3
- package/dist/{logout-K6ZGAJY5.js → logout-YFZAJRPY.js} +3 -3
- package/dist/{mind-history-RVF6KJ7K.js → mind-history-RZMMCHMX.js} +9 -9
- package/dist/{mind-wake-DCDFFQKX.js → mind-wake-LDGPRA42.js} +3 -3
- package/dist/{read-J5RM674N.js → read-RJ5NAW5J.js} +3 -3
- package/dist/{register-53LBGSDC.js → register-WNCSOTAU.js} +3 -3
- package/dist/{reject-K2A4UK2Y.js → reject-4NFLXKRN.js} +3 -3
- package/dist/{restart-R2WFNF5K.js → restart-B4GNMVF2.js} +7 -7
- package/dist/{skill-DXLLSUHB.js → skill-QYTBUDNQ.js} +7 -7
- package/dist/{start-XDOUAWN3.js → start-BDHJVOVX.js} +6 -6
- package/dist/{stop-O62RTEMD.js → stop-45QYSGYS.js} +7 -7
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.prototype,s=Array.prototype,c=Object.getPrototypeOf,l=Object.isExtensible,u=()=>{};function d(e){for(var t=0;t<e.length;t++)e[t]()}function f(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var p=1024,m=2048,h=4096,g=8192,_=16384,v=32768,y=1<<25,b=65536,x=1<<19,S=1<<20,ee=1<<25,te=65536,ne=1<<21,re=1<<22,ie=1<<23,ae=Symbol(`$state`),oe=Symbol(`legacy props`),se=Symbol(`attributes`),ce=Symbol(`class`),le=Symbol(`style`),ue=Symbol(`text`),de=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"};globalThis.document?.contentType;function fe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function C(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function pe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function me(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function he(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ge(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function _e(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ye(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function xe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function w(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Se={},T=Symbol(`uninitialized`);function Ce(){console.warn(`https://svelte.dev/e/derived_inert`)}function E(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function we(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var D=!1;function Te(e){D=e}var O;function k(e){if(e===null)throw E(),Se;return O=e}function Ee(){return k(qt(O))}function A(e){if(D){if(qt(O)!==null)throw E(),Se;O=e}}function De(e=1){if(D){for(var t=e,n=O;t--;)n=qt(n);O=n}}function Oe(e=!0){for(var t=0,n=O;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=qt(n);e&&n.remove(),n=i}}function ke(e){if(!e||e.nodeType!==8)throw E(),Se;return e.data}function Ae(e){return e===this.v}function je(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Me(e){return!je(e,this.v)}var j=null;function Ne(e){j=e}function Pe(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:B,l:null}}function Fe(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)cn(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function Ie(){return!0}var Le=[];function Re(){var e=Le;Le=[],d(e)}function ze(e){if(Le.length===0&&!ht){var t=Le;queueMicrotask(()=>{t===Le&&Re()})}Le.push(e)}function Be(e){var t=B;if(t===null)return z.f|=ie,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ve(e,t)}function Ve(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var He=~(m|h|p);function M(e,t){e.f=e.f&He|t}function Ue(e){e.f&512||e.deps===null?M(e,p):M(e,h)}function We(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=te,We(t.deps))}function Ge(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),We(e.deps),M(e,p)}var Ke=!1;function qe(e){var t=Ke;try{return Ke=!1,[e(),Ke]}finally{Ke=t}}function Je(e){let t=0,n=Nt(0),r;return()=>{an()&&(H(n),dn(()=>(t===0&&(r=Xn(()=>e(()=>Lt(n)))),t+=1,()=>{ze(()=>{--t,t===0&&(r?.(),r=void 0,Lt(n))})})))}}var Ye=b|x;function Xe(e,t,n,r){new Ze(e,t,n,r)}var Ze=class{parent;is_pending=!1;transform_error;#e;#t=D?O:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Je(()=>(this.#m=Nt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=B;t.b=this,t.f|=128,n(e)},this.parent=B.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=pn(()=>{if(D){let e=this.#t;Ee();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Ye),D&&(this.#e=O)}#g(){try{this.#a=mn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=mn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=mn(()=>e(this.#e)),ze(()=>{var e=this.#c=document.createDocumentFragment(),t=Gt();e.append(t),this.#a=this.#x(()=>mn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,bn(this.#o,()=>{this.#o=null}),this.#b(P))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=mn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();wn(this.#a,e);let t=this.#n.pending;this.#o=mn(()=>t(this.#e))}else this.#b(P)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Ge(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=B,n=z,r=j;jn(this.#i),An(this.#i),Ne(this.#i.ctx);try{return xt.ensure(),e()}catch(e){return Be(e),null}finally{jn(t),An(n),Ne(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&bn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,ze(()=>{this.#d=!1,this.#m&&Ft(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(R(this.#a),null),this.#o&&=(R(this.#o),null),this.#s&&=(R(this.#s),null),D&&(k(this.#t),De(),k(Oe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){we();return}r=!0,i&&w(),this.#s!==null&&bn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Ve(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return mn(()=>{var t=B;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Ve(e,this.#i.parent),null}}))};ze(()=>{var t;try{t=this.transform_error(e)}catch(e){Ve(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Ve(e,this.#i&&this.#i.parent)):o(t)})}};function Qe(e,t,n,r){let i=Ie()?nt:ot;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=B,c=$e(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Ve(e,s)}et()}}var d=tt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>it(e))).then(u).catch(e=>Ve(e,s)).finally(d)}l?l.then(()=>{c(),f(),et()}):f()}function $e(){var e=B,t=z,n=j,r=P;return function(i=!0){jn(e),An(t),Ne(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function et(e=!0){jn(null),An(null),Ne(null),e&&P?.deactivate()}function tt(){var e=B,t=e.b,n=P,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function nt(e){var t=2|m;return B!==null&&(B.f|=x),{ctx:j,deps:null,effects:null,equals:Ae,f:t,fn:e,reactions:null,rv:0,v:T,wv:0,parent:B,ac:null}}var rt=Symbol(`obsolete`);function it(e,t,n){let r=B;r===null&&C();var i=void 0,a=Nt(T),o=!z,s=new Set;return un(()=>{var t=B,n=f();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==de&&n.reject(e)}).finally(et)}catch(e){n.reject(e),et()}var c=P;if(o){if(t.f&32768)var l=tt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(rt);else for(let e of s.values())e.reject(rt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==rt&&(c.activate(),t?(a.f|=ie,Ft(a,t)):(a.f&8388608&&(a.f^=ie),Ft(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),on(()=>{for(let e of s)e.reject(rt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function at(e){let t=nt(e);return Nn(t),t}function ot(e){let t=nt(e);return t.equals=Me,t}function N(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function st(e){var t,n=B,r=e.parent;if(!Dn&&r!==null&&e.v!==T&&r.f&24576)return Ce(),e.v;jn(r);try{e.f&=~te,N(e),t=Wn(e)}finally{jn(n)}return t}function ct(e){var t=st(e);if(!e.equals(t)&&(e.wv=Vn(),(!P?.is_fork||e.deps===null)&&(P===null?e.v=t:(P.capture(e,t,!0),ft?.capture(e,t,!0)),e.deps===null))){M(e,p);return}Dn||(pt===null?Ue(e):(an()||P?.is_fork)&&pt.set(e,t))}function lt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(de),t.fn!==null&&(t.teardown=u),t.ac=null,Kn(t,0),gn(t))}function ut(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&qn(t)}var dt=null,P=null,ft=null,pt=null,mt=null,ht=!1,gt=!1,_t=null,vt=null,yt=0,bt=1,xt=class e{id=bt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){dt===null?dt=this:(dt.#n=this,this.#t=dt),dt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)M(r,m),t(r);for(r of n.m)M(r,h),t(r)}this.#p.add(e)}#g(){this.#e=!0,yt++>1e3&&(this.#x(),St());for(let e of this.#u)this.#d.delete(e),M(e,m),this.schedule(e);for(let e of this.#d)M(e,h),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=_t=[],r=[],i=vt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw kt(e),this.#h()||this.discard(),t}if(P=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(_t=null,vt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Ot(e,t);i.length>0&&P.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),ft=this,wt(r),wt(n),ft=null,this.#s?.resolve();var s=P;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=p;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=p:i&4?t.push(r):Hn(r)&&(i&16&&this.#d.add(r),qn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),M(i,m),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),P=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)Ge(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==T&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),pt?.set(e,t)),this.is_fork||(e.v=t)}activate(){P=this}deactivate(){P=null,pt=null}flush(){try{gt=!0,P=this,this.#g()}finally{yt=0,mt=null,_t=null,vt=null,gt=!1,P=null,pt=null,jt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(rt);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,ze(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=f()).promise}static ensure(){if(P===null){let t=P=new e;!gt&&ze(()=>{t.#e||t.flush()})}return P}apply(){pt=null}schedule(e){if(mt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(_t!==null&&t===B&&(z===null||!(z.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=p}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?dt=e:t.#t=e,this.linked=!1}}};function St(){try{_e()}catch(e){Ve(e,mt)}}var Ct=null;function wt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Hn(r)&&(Ct=new Set,qn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&yn(r),Ct?.size>0)){jt.clear();for(let e of Ct){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ct.has(n)&&(Ct.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||qn(n)}}Ct.clear()}}Ct=null}}function Tt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Tt(i,t,n,r):e&4194320&&!(e&2048)&&Et(i,t,r)&&(M(i,m),Dt(i))}}function Et(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&Et(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Dt(e){P.schedule(e)}function Ot(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),M(e,p);for(var n=e.first;n!==null;)Ot(n,t),n=n.next}}function kt(e){M(e,p);for(var t=e.first;t!==null;)kt(t),t=t.next}var At=new Set,jt=new Map,Mt=!1;function Nt(e,t){return{f:0,v:e,reactions:null,equals:Ae,rv:0,wv:0}}function F(e,t){let n=Nt(e,t);return Nn(n),n}function Pt(e,t=!1,n=!0){let r=Nt(e);return t||(r.equals=Me),r}function I(e,t,n=!1){return z!==null&&(!kn||z.f&131072)&&Ie()&&z.f&4325394&&(Mn===null||!Mn.has(e))&&xe(),Ft(e,n?zt(t):t,vt)}function Ft(e,t,n=null){if(!e.equals(t)){jt.set(e,Dn?t:e.v);var r=xt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&st(t),pt===null&&Ue(t)}e.wv=Vn(),Rt(e,m,n),Ie()&&B!==null&&B.f&1024&&!(B.f&96)&&(Fn===null?In([e]):Fn.push(e)),!r.is_fork&&At.size>0&&!Mt&&It()}return t}function It(){Mt=!1;for(let e of At){e.f&1024&&M(e,h);let t;try{t=Hn(e)}catch{t=!0}t&&qn(e)}At.clear()}function Lt(e){I(e,e.v+1)}function Rt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Ie(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===B)){var l=(c&m)===0;if(l&&M(s,t),c&131072)At.add(s);else if(c&2){var u=s;pt?.delete(u),c&65536||(c&512&&(B===null||!(B.f&2097152))&&(s.f|=te),Rt(u,h,n))}else if(l){var d=s;c&16&&Ct!==null&&Ct.add(d),n===null?Dt(d):n.push(d)}}}}function zt(t){if(typeof t!=`object`||!t||ae in t)return t;let n=c(t);if(n!==o&&n!==s)return t;var r=new Map,i=e(t),l=F(0),u=null,d=zn,f=e=>{if(zn===d)return e();var t=z,n=zn;An(null),Bn(d);var r=e();return An(t),Bn(n),r};return i&&r.set(`length`,F(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ye();var i=r.get(t);return i===void 0?f(()=>{var e=F(n.value,u);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>F(T,u));r.set(t,e),Lt(l)}}else I(n,T),Lt(l);return!0},get(e,n,i){if(n===ae)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>F(zt(s?e[n]:T),u)),r.set(n,o)),o!==void 0){var c=H(o);return c===T?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=H(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==T)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===ae)return!0;var n=r.get(t),i=n!==void 0&&n.v!==T||Reflect.has(e,t);return(n!==void 0||B!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>F(i?zt(e[t]):T,u)),r.set(t,n)),H(n)===T)?!1:i},set(e,t,n,o){var s=r.get(t),c=t in e;if(i&&t===`length`)for(var d=n;d<s.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>F(T,u)),r.set(d+``,p)):I(p,T)}if(s===void 0)(!c||a(e,t)?.writable)&&(s=f(()=>F(void 0,u)),I(s,zt(n)),r.set(t,s));else{c=s.v!==T;var m=f(()=>zt(n));I(s,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(o,n),!c){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&I(g,_+1)}Lt(l)}return!0},ownKeys(e){H(l);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==T});for(var[n,i]of r)i.v!==T&&!(n in e)&&t.push(n);return t},setPrototypeOf(){be()}})}var Bt,Vt,Ht,Ut;function Wt(){if(Bt===void 0){Bt=window,Vt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ht=a(t,`firstChild`).get,Ut=a(t,`nextSibling`).get,l(e)&&(e[ce]=void 0,e[se]=null,e[le]=void 0,e.__e=void 0),l(n)&&(n[ue]=void 0)}}function Gt(e=``){return document.createTextNode(e)}function Kt(e){return Ht.call(e)}function qt(e){return Ut.call(e)}function L(e,t){if(!D)return Kt(e);var n=Kt(O);if(n===null)n=O.appendChild(Gt());else if(t&&n.nodeType!==3){var r=Gt();return n?.before(r),k(r),r}return t&&$t(n),k(n),n}function Jt(e,t=!1){if(!D){var n=Kt(e);return n instanceof Comment&&n.data===``?qt(n):n}if(t){if(O?.nodeType!==3){var r=Gt();return O?.before(r),k(r),r}$t(O)}return O}function Yt(e,t=1,n=!1){let r=D?O:e;for(var i;t--;)i=r,r=qt(r);if(!D)return r;if(n){if(r?.nodeType!==3){var a=Gt();return r===null?i?.after(a):r.before(a),k(a),a}$t(r)}return k(r),r}function Xt(e){e.textContent=``}function Zt(){return!1}function Qt(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function $t(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function en(e){var t=z,n=B;An(null),jn(null);try{return e()}finally{An(t),jn(n)}}function tn(e){B===null&&(z===null&&ge(e),he()),Dn&&me(e)}function nn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rn(e,t){var n=B;n!==null&&n.f&8192&&(e|=g);var r={ctx:j,deps:null,nodes:null,f:e|m|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P?.register_created_effect(r);var i=r;if(e&4)_t===null?xt.ensure().schedule(r):_t.push(r);else if(t!==null){try{qn(r)}catch(e){throw R(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=b))}if(i!==null&&(i.parent=n,n!==null&&nn(i,n),z!==null&&z.f&2&&!(e&64))){var a=z;(a.effects??=[]).push(i)}return r}function an(){return z!==null&&!kn}function on(e){let t=rn(8,null);return M(t,p),t.teardown=e,t}function sn(e){tn(`$effect`);var t=B.f;if(!z&&t&32&&j!==null&&!j.i){var n=j;(n.e??=[]).push(e)}else return cn(e)}function cn(e){return rn(4|S,e)}function ln(e){xt.ensure();let t=rn(64|x,e);return(e={})=>new Promise(n=>{e.outro?bn(t,()=>{R(t),n(void 0)}):(R(t),n(void 0))})}function un(e){return rn(re|x,e)}function dn(e,t=0){return rn(8|t,e)}function fn(e,t=[],n=[],r=[]){Qe(r,t,n,t=>{rn(8,()=>{e(...t.map(H))})})}function pn(e,t=0){return rn(16|t,e)}function mn(e){return rn(32|x,e)}function hn(e){var t=e.teardown;if(t!==null){let e=Dn,n=z;On(!0),An(null);try{t.call(null)}finally{On(e),An(n)}}}function gn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&en(()=>{e.abort(de)});var r=n.next;n.f&64?n.parent=null:R(n,t),n=r}}function _n(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||R(t),t=n}}function R(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(vn(e.nodes.start,e.nodes.end),n=!0),e.f|=y,gn(e,t&&!n),Kn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();hn(e),e.f^=y,e.f|=_;var i=e.parent;i!==null&&i.first!==null&&yn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function vn(e,t){for(;e!==null;){var n=e===t?null:qt(e);e.remove(),e=n}}function yn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function bn(e,t,n=!0){var r=[];xn(e,r,!0);var i=()=>{n&&R(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function xn(e,t,n){if(!(e.f&8192)){e.f^=g;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;xn(i,t,o?n:!1)}i=a}}}function Sn(e){Cn(e,!0)}function Cn(e,t){if(e.f&8192){e.f^=g,e.f&1024||(M(e,m),xt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Cn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function wn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:qt(n);t.append(n),n=i}}var Tn=null,En=!1,Dn=!1;function On(e){Dn=e}var z=null,kn=!1;function An(e){z=e}var B=null;function jn(e){B=e}var Mn=null;function Nn(e){z!==null&&(Mn??=new Set).add(e)}var V=null,Pn=0,Fn=null;function In(e){Fn=e}var Ln=1,Rn=0,zn=Rn;function Bn(e){zn=e}function Vn(){return++Ln}function Hn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~te),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Hn(a)&&ct(a),a.wv>e.wv)return!0}t&512&&pt===null&&M(e,p)}return!1}function Un(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Mn!==null&&Mn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Un(a,t,!1):t===a&&(n?M(a,m):a.f&1024&&M(a,h),Dt(a))}}function Wn(e){var t=V,n=Pn,r=Fn,i=z,a=Mn,o=j,s=kn,c=zn,l=e.f;V=null,Pn=0,Fn=null,z=l&96?null:e,Mn=null,Ne(e.ctx),kn=!1,zn=++Rn,e.ac!==null&&(en(()=>{e.ac.abort(de)}),e.ac=null);try{e.f|=ne;var u=e.fn,d=u();e.f|=v;var f=e.deps,p=P?.is_fork;if(V!==null){var m;if(p||Kn(e,Pn),f!==null&&Pn>0)for(f.length=Pn+V.length,m=0;m<V.length;m++)f[Pn+m]=V[m];else e.deps=f=V;if(an()&&e.f&512)for(m=Pn;m<f.length;m++)(f[m].reactions??=[]).push(e)}else!p&&f!==null&&Pn<f.length&&(Kn(e,Pn),f.length=Pn);if(Ie()&&Fn!==null&&!kn&&f!==null&&!(e.f&6146))for(m=0;m<Fn.length;m++)Un(Fn[m],e);if(i!==null&&i!==e){if(Rn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Rn;if(t!==null)for(let e of t)e.rv=Rn;Fn!==null&&(r===null?r=Fn:r.push(...Fn))}return e.f&8388608&&(e.f^=ie),d}catch(e){return Be(e)}finally{e.f^=ne,V=t,Pn=n,Fn=r,z=i,Mn=a,Ne(o),kn=s,zn=c}}function Gn(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(V===null||!n.call(V,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~te),s.v!==T&&Ue(s),lt(s),Kn(s,0)}}function Kn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Gn(e,n[r])}function qn(e){var t=e.f;if(!(t&16384)){M(e,p);var n=B,r=En;B=e,En=!0;try{t&16777232?_n(e):gn(e),hn(e);var i=Wn(e);e.teardown=typeof i==`function`?i:null,e.wv=Ln}finally{En=r,B=n}}}function H(e){var t=(e.f&2)!=0;if(Tn?.add(e),z!==null&&!kn&&!(B!==null&&B.f&16384)&&(Mn===null||!Mn.has(e))){var r=z.deps;if(z.f&2097152)e.rv<Rn&&(e.rv=Rn,V===null&&r!==null&&r[Pn]===e?Pn++:V===null?V=[e]:V.push(e));else{z.deps??=[],n.call(z.deps,e)||z.deps.push(e);var i=e.reactions;i===null?e.reactions=[z]:n.call(i,z)||i.push(z)}}if(Dn&&jt.has(e))return jt.get(e);if(t){var a=e;if(Dn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Yn(a))&&(o=st(a)),jt.set(a,o),o}var s=(a.f&512)==0&&!kn&&z!==null&&(En||(z.f&512)!=0),c=(a.f&v)===0;Hn(a)&&(s&&(a.f|=512),ct(a)),s&&!c&&(ut(a),Jn(a))}if(pt?.has(e))return pt.get(e);if(e.f&8388608)throw e.v;return e.v}function Jn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(ut(t),Jn(t))}function Yn(e){if(e.v===T)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(jt.has(t)||t.f&2&&Yn(t))return!0;return!1}function Xn(e){var t=kn;try{return kn=!0,e()}finally{kn=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Zn=[`touchstart`,`touchmove`];function Qn(e){return Zn.includes(e)}var $n=Symbol(`events`),er=new Set,tr=new Set;function nr(e,t,n){(t[$n]??={})[e]=n}function rr(e){for(var t=0;t<e.length;t++)er.add(e[t]);for(var n of tr)n(e)}var ir=null;function ar(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;ir=e;var s=0,c=ir===e&&e[$n];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[$n]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=z,f=B;An(null),jn(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[$n]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[$n]=t,delete e.currentTarget,An(d),jn(f)}}}var or=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function sr(e){return or?.createHTML(e)??e}function cr(e){var t=Qt(`template`);return t.innerHTML=sr(e.replaceAll(`<!>`,`<!---->`)),t.content}function lr(e,t){var n=B;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ur(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(D)return lr(O,null),O;i===void 0&&(i=cr(a?e:`<!>`+e),n||(i=Kt(i)));var t=r||Vt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Kt(t),s=t.lastChild;lr(o,s)}else lr(t,t);return t}}function dr(){if(D)return lr(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=Gt();return e.append(t,n),lr(t,n),e}function U(e,t){if(D){var n=B;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),Ee();return}e!==null&&e.before(t)}function fr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ue]??=e.nodeValue)&&(e[ue]=n,e.nodeValue=`${n}`)}function pr(e,t){return hr(e,t)}var mr=new Map;function hr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Wt();var l=void 0,u=ln(()=>{var s=n??t.appendChild(Gt());Xe(s,{pending:()=>{}},t=>{Pe({});var n=j;if(o&&(n.c=o),a&&(i.$$events=a),D&&lr(t,null),l=e(t,i)||{},D&&(B.nodes.end=O,O===null||O.nodeType!==8||O.data!==`]`))throw E(),Se;Fe()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Qn(r);for(let e of[t,document]){var a=mr.get(e);a===void 0&&(a=new Map,mr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ar,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(er)),tr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=mr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ar),r.delete(e),r.size===0&&mr.delete(n)):r.set(e,i)}tr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return gr.set(l,u),l}var gr=new WeakMap,_r=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Sn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Sn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(R(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();wn(r,t),t.append(Gt()),this.#n.set(e,{effect:r,fragment:t})}else R(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),bn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(R(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=Zt();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Gt();i.append(a),this.#n.set(e,{effect:mn(()=>t(a)),fragment:i})}else this.#t.set(e,mn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else D&&(this.anchor=O),this.#a(n)}};function vr(e,t,n=!1){var r;D&&(r=O,Ee());var i=new _r(e),a=n?b:0;function o(e,t){if(D){var n=ke(r);if(e!==parseInt(n.substring(1))){var a=Oe();k(a),i.anchor=a,Te(!1),i.ensure(e,t),Te(!0);return}}i.ensure(e,t)}pn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function yr(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];bn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;br(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Xt(d),d.append(u),e.items.clear()}br(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function br(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ee,wn(a,document.createDocumentFragment())):R(t[i],n)}}var xr;function Sr(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=D?k(Kt(u)):u.appendChild(Gt())}D&&Ee();var d=null,f=ot(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,wr(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=ee,Er(d,null,c)):Sn(d):bn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:pn(()=>{p=H(f);var e=p.length;let t=!1;D&&ke(c)===`[!`!=(e===0)&&(c=Oe(),k(c),Te(!1),t=!0);for(var r=new Set,u=P,v=Zt(),y=0;y<e;y+=1){D&&O.nodeType===8&&O.data===`]`&&(c=O,t=!0,Te(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&Ft(S.v,b),S.i&&Ft(S.i,y),v&&u.unskip_effect(S.e)):(S=Tr(l,h?c:xr??=Gt(),b,x,y,o,n,i),h||(S.e.f|=ee),l.set(x,S)),r.add(x)}if(e===0&&s&&!d&&(h?d=mn(()=>s(c)):(d=mn(()=>s(xr??=Gt())),d.f|=ee)),e>r.size&&pe(``,``,``),D&&e>0&&k(Oe()),!h)if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&Te(!0),H(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,D&&(c=O)}function Cr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function wr(e,t,n,i,a){var o=(i&8)!=0,s=t.length,c=e.items,l=Cr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Sn(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ee,_===l)Er(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Dr(e,d,_),Dr(e,_,y),Er(_,y,n),d=_,p=[],m=[],l=Cr(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],te=p[p.length-1];for(x=0;x<p.length;x+=1)Er(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Dr(e,S.prev,te.next),Dr(e,d,S),Dr(e,te,b),l=b,d=te,--v,p=[],m=[]}else u.delete(_),Er(_,l,n),Dr(e,_.prev,_.next),Dr(e,_,d===null?e.effect.first:d.next),Dr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Cr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Cr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(br(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var ne=[];if(u!==void 0)for(_ of u)_.f&8192||ne.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&ne.push(l),l=Cr(l.next);var re=ne.length;if(re>0){var ie=i&4&&s===0?n:null;if(o){for(v=0;v<re;v+=1)ne[v].nodes?.a?.measure();for(v=0;v<re;v+=1)ne[v].nodes?.a?.fix()}yr(e,ne,ie)}}o&&ze(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Tr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Nt(n):Pt(n,!1,!1):null,l=o&2?Nt(i):null;return{v:c,i:l,e:mn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Er(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=qt(r);if(a.before(r),r===i)return;r=o}}function Dr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Or(e,t,...n){var r=new _r(e);pn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},b)}var kr=[...`
|
|
2
|
+
\r\f\xA0\v`];function Ar(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||kr.includes(r[o-1]))&&(s===r.length||kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function jr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Mr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Nr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Mr)),i&&c.push(...Object.keys(i).map(Mr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Mr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=jr(r)),i&&(n+=jr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Pr(e,t,n,r,i,a){var o=e[ce];if(D||o!==n||o===void 0){var s=Ar(n,r,a);(!D||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[ce]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Fr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Ir(e,t,n,r){var i=e[le];if(D||i!==t){var a=Nr(t,r);(!D||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[le]=t}else r&&(Array.isArray(r)?(Fr(e,n?.[0],r[0]),Fr(e,n?.[1],r[1],`important`)):Fr(e,n,r));return r}function Lr(e,t,n,r){var i=!0,o=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??=nt(r),H(u)):(l&&(l=!1,c=s?Xn(r):r),c);let f;if(o){var p=ae in e||oe in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=qe(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&ve(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?nt:ot)(()=>(v=!1,g()));o&&H(y);var b=B;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&o?zt(e):e;return I(y,n),v=!0,c!==void 0&&(c=n),e}return Dn&&v||b.f&16384?y.v:H(y)})}function Rr(e){j===null&&fe(`onMount`),sn(()=>{let t=Xn(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),rr([`click`]);var zr=ur(`<div class="empty svelte-v3do33"> </div>`);function Br(e,t){var n=zr(),r=L(n,!0);A(n),fn(()=>fr(r,t.message)),U(e,n)}var Vr=ur(`<div class="error svelte-1y9liqq"> </div>`);function Hr(e,t){var n=dr(),r=Jt(n),i=e=>{var n=Vr(),r=L(n,!0);A(n),fn(()=>fr(r,t.message)),U(e,n)};vr(r,e=>{t.message&&e(i)}),U(e,n)}rr([`click`,`keydown`]);var Ur=ur(`<div class="page-shell svelte-1ntluue"><!></div>`);function Wr(e,t){let n=Lr(t,`padding`,3,`24px`);var r=Ur();let i;Or(L(r),()=>t.children),A(r),fn(()=>i=Ir(r,``,i,{padding:n()})),U(e,r)}var Gr=ur(`<span class="section-subtitle svelte-1uapugv"> </span>`),Kr=ur(`<div class="section-header svelte-1uapugv"><div class="section-titles svelte-1uapugv"><span class="section-title svelte-1uapugv"> </span> <!></div> <!></div>`);function qr(e,t){var n=Kr(),r=L(n),i=L(r),a=L(i,!0);A(i);var o=Yt(i,2),s=e=>{var n=Gr(),r=L(n,!0);A(n),fn(()=>fr(r,t.subtitle)),U(e,n)};vr(o,e=>{t.subtitle&&e(s)}),A(r);var c=Yt(r,2),l=e=>{var n=dr();Or(Jt(n),()=>t.action),U(e,n)};vr(c,e=>{t.action&&e(l)}),A(n),fn(()=>fr(a,t.title)),U(e,n)}rr([`click`]),rr([`change`]);function Jr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yr(e){if(Array.isArray(e))return e}function Xr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Zr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qr(e,t){return Yr(e)||Xr(e,t)||$r(e,t)||Zr()}function $r(e,t){if(e){if(typeof e==`string`)return Jr(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jr(e,t):void 0}}var ei=Object.entries,ti=Object.setPrototypeOf,ni=Object.isFrozen,ri=Object.getPrototypeOf,ii=Object.getOwnPropertyDescriptor,W=Object.freeze,G=Object.seal,ai=Object.create,oi=typeof Reflect<`u`&&Reflect,si=oi.apply,ci=oi.construct;W||=function(e){return e},G||=function(e){return e},si||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ci||=function(e){return new e(...[...arguments].slice(1))};var li=J(Array.prototype.forEach),ui=J(Array.prototype.lastIndexOf),di=J(Array.prototype.pop),fi=J(Array.prototype.push),pi=J(Array.prototype.splice),mi=Array.isArray,hi=J(String.prototype.toLowerCase),gi=J(String.prototype.toString),_i=J(String.prototype.match),vi=J(String.prototype.replace),yi=J(String.prototype.indexOf),bi=J(String.prototype.trim),xi=J(Number.prototype.toString),Si=J(Boolean.prototype.toString),Ci=typeof BigInt>`u`?null:J(BigInt.prototype.toString),wi=typeof Symbol>`u`?null:J(Symbol.prototype.toString),K=J(Object.prototype.hasOwnProperty),Ti=J(Object.prototype.toString),q=J(RegExp.prototype.test),Ei=Di(TypeError);function J(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return si(e,t,n)}}function Di(e){return function(){return ci(e,[...arguments])}}function Y(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hi;if(ti&&ti(e,null),!mi(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ni(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Oi(e){for(let t=0;t<e.length;t++)K(e,t)||(e[t]=null);return e}function X(e){let t=ai(null);for(let r of ei(e)){var n=Qr(r,2);let i=n[0],a=n[1];K(e,i)&&(mi(a)?t[i]=Oi(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=X(a):t[i]=a)}return t}function ki(e){switch(typeof e){case`string`:return e;case`number`:return xi(e);case`boolean`:return Si(e);case`bigint`:return Ci?Ci(e):`0`;case`symbol`:return wi?wi(e):`Symbol()`;case`undefined`:return Ti(e);case`function`:case`object`:{if(e===null)return Ti(e);let t=e,n=Ai(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ti(e)}return Ti(e)}default:return Ti(e)}}function Ai(e,t){for(;e!==null;){let n=ii(e,t);if(n){if(n.get)return J(n.get);if(typeof n.value==`function`)return J(n.value)}e=ri(e)}function n(){return null}return n}function ji(e){try{return q(e,``),!0}catch{return!1}}var Mi=W(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ni=W(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Pi=W([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Fi=W([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ii=W(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Li=W([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ri=W([`#text`]),zi=W(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Bi=W(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Vi=W(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Hi=W([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ui=G(/{{[\w\W]*|^[\w\W]*}}/g),Wi=G(/<%[\w\W]*|^[\w\W]*%>/g),Gi=G(/\${[\w\W]*/g),Ki=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),qi=G(/^aria-[\-\w]+$/),Ji=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yi=G(/^(?:\w+script|data):/i),Xi=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zi=G(/^html$/i),Qi=G(/^[a-z][.\w]*(-[.\w]+)+$/i),$i=G(/<[/\w!]/g),ea=G(/<[/\w]/g),ta=G(/<\/no(script|embed|frames)/i),na=G(/\/>/i),ra={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ia=function(){return typeof window>`u`?null:window},aa=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},oa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},sa=function(e,t,n,r){return K(e,t)&&mi(e[t])?Y(r.base?X(r.base):{},e[t],r.transform):n};function ca(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ia(),t=e=>ca(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==ra.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ai(d,`cloneNode`),p=Ai(d,`remove`),m=Ai(d,`nextSibling`),h=Ai(d,`childNodes`),g=Ai(d,`parentNode`),_=Ai(d,`shadowRoot`),v=Ai(d,`attributes`),y=o&&o.prototype?Ai(o.prototype,`nodeType`):null,b=o&&o.prototype?Ai(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,ee,te=!1,ne=0,re=function(){if(ne>0)throw Ei(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ie=function(e){re(),ne++;try{return x.createHTML(e)}finally{ne--}},ae=function(e){re(),ne++;try{return x.createScriptURL(e)}finally{ne--}},oe=function(){return te||=(ee=aa(u,i),!0),ee},se=n,ce=se.implementation,le=se.createNodeIterator,ue=se.createDocumentFragment,de=se.getElementsByTagName,fe=r.importNode,C=oa();t.isSupported=typeof ei==`function`&&typeof g==`function`&&ce&&ce.createHTMLDocument!==void 0;let pe=Ui,me=Wi,he=Gi,ge=Ki,_e=qi,ve=Yi,ye=Xi,be=Qi,xe=Ji,w=null,Se=Y({},[...Mi,...Ni,...Pi,...Ii,...Ri]),T=null,Ce=Y({},[...zi,...Bi,...Vi,...Hi]),E=Object.seal(ai(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,D=null,Te=Object.seal(ai(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),O=!0,k=!0,Ee=!1,A=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,j=!1,Ne=!1,Pe=!1,Fe=!1,Ie=!0,Le=!1,Re=`user-content-`,ze=!0,Be=!1,Ve={},He=null,M=Y({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ue=null,We=Y({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ge=null,Ke=Y({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),qe=`http://www.w3.org/1998/Math/MathML`,Je=`http://www.w3.org/2000/svg`,Ye=`http://www.w3.org/1999/xhtml`,Xe=Ye,Ze=!1,Qe=null,$e=Y({},[qe,Je,Ye],gi),et=W([`mi`,`mo`,`mn`,`ms`,`mtext`]),tt=Y({},et),nt=W([`annotation-xml`]),rt=Y({},nt),it=Y({},[`title`,`style`,`font`,`a`,`script`]),at=null,ot=[`application/xhtml+xml`,`text/html`],N=null,st=null,ct=n.createElement(`form`),lt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===e)return;(!e||typeof e!=`object`)&&(e={}),e=X(e),at=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,N=at===`application/xhtml+xml`?gi:hi,w=sa(e,`ALLOWED_TAGS`,Se,{transform:N}),T=sa(e,`ALLOWED_ATTR`,Ce,{transform:N}),Qe=sa(e,`ALLOWED_NAMESPACES`,$e,{transform:gi}),Ge=sa(e,`ADD_URI_SAFE_ATTR`,Ke,{transform:N,base:Ke}),Ue=sa(e,`ADD_DATA_URI_TAGS`,We,{transform:N,base:We}),He=sa(e,`FORBID_CONTENTS`,M,{transform:N}),we=sa(e,`FORBID_TAGS`,X({}),{transform:N}),D=sa(e,`FORBID_ATTR`,X({}),{transform:N}),Ve=K(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?X(e.USE_PROFILES):e.USE_PROFILES:!1,O=e.ALLOW_ARIA_ATTR!==!1,k=e.ALLOW_DATA_ATTR!==!1,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,A=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,j=e.FORCE_BODY||!1,Ie=e.SANITIZE_DOM!==!1,Le=e.SANITIZE_NAMED_PROPS||!1,ze=e.KEEP_CONTENT!==!1,Be=e.IN_PLACE||!1,xe=ji(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ji,Xe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ye,tt=K(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?X(e.MATHML_TEXT_INTEGRATION_POINTS):Y({},et),rt=K(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?X(e.HTML_INTEGRATION_POINTS):Y({},nt);let t=K(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?X(e.CUSTOM_ELEMENT_HANDLING):ai(null);if(E=ai(null),K(t,`tagNameCheck`)&<(t.tagNameCheck)&&(E.tagNameCheck=t.tagNameCheck),K(t,`attributeNameCheck`)&<(t.attributeNameCheck)&&(E.attributeNameCheck=t.attributeNameCheck),K(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(E.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),G(E),De&&(k=!1),Pe&&(Ne=!0),Ve&&(w=Y({},Ri),T=ai(null),Ve.html===!0&&(Y(w,Mi),Y(T,zi)),Ve.svg===!0&&(Y(w,Ni),Y(T,Bi),Y(T,Hi)),Ve.svgFilters===!0&&(Y(w,Pi),Y(T,Bi),Y(T,Hi)),Ve.mathMl===!0&&(Y(w,Ii),Y(T,Vi),Y(T,Hi))),Te.tagCheck=null,Te.attributeCheck=null,K(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Te.tagCheck=e.ADD_TAGS:mi(e.ADD_TAGS)&&(w===Se&&(w=X(w)),Y(w,e.ADD_TAGS,N))),K(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Te.attributeCheck=e.ADD_ATTR:mi(e.ADD_ATTR)&&(T===Ce&&(T=X(T)),Y(T,e.ADD_ATTR,N))),K(e,`ADD_URI_SAFE_ATTR`)&&mi(e.ADD_URI_SAFE_ATTR)&&Y(Ge,e.ADD_URI_SAFE_ATTR,N),K(e,`FORBID_CONTENTS`)&&mi(e.FORBID_CONTENTS)&&(He===M&&(He=X(He)),Y(He,e.FORBID_CONTENTS,N)),K(e,`ADD_FORBID_CONTENTS`)&&mi(e.ADD_FORBID_CONTENTS)&&(He===M&&(He=X(He)),Y(He,e.ADD_FORBID_CONTENTS,N)),ze&&(w[`#text`]=!0),ke&&Y(w,[`html`,`head`,`body`]),w.table&&(Y(w,[`tbody`]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ei(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ei(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=ie(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=oe()),x&&typeof S==`string`&&(S=ie(``)));W&&W(e),st=e},dt=Y({},[...Ni,...Pi,...Fi]),P=Y({},[...Ii,...Li]),ft=function(e,t,n){return t.namespaceURI===Ye?e===`svg`:t.namespaceURI===qe?e===`svg`&&(n===`annotation-xml`||tt[n]):!!dt[e]},pt=function(e,t,n){return t.namespaceURI===Ye?e===`math`:t.namespaceURI===Je?e===`math`&&rt[n]:!!P[e]},mt=function(e,t,n){return t.namespaceURI===Je&&!rt[n]||t.namespaceURI===qe&&!tt[n]?!1:!P[e]&&(it[e]||!dt[e])},ht=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Xe,tagName:`template`});let n=hi(e.tagName),r=hi(t.tagName);return Qe[e.namespaceURI]?e.namespaceURI===Je?ft(n,t,r):e.namespaceURI===qe?pt(n,t,r):e.namespaceURI===Ye?mt(n,t,r):!!(at===`application/xhtml+xml`&&Qe[e.namespaceURI]):!1},gt=function(e){fi(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Ei(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},_t=function(e){let t=h(e);if(t){let e=[];li(t,t=>{fi(e,t)}),li(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},vt=function(e,n){try{fi(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{fi(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Ne||Pe)try{gt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},yt=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||T[N(i)]))try{e.removeAttribute(i)}catch{}}},bt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===ra.element&&yt(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},xt=function(e){let t=null,r=null;if(j)e=`<remove></remove>`+e;else{let t=_i(e,/^[\r\n\t ]+/);r=t&&t[0]}at===`application/xhtml+xml`&&Xe===Ye&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?ie(e):e;if(Xe===Ye)try{t=new l().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=ce.createDocument(Xe,`template`,null);try{t.documentElement.innerHTML=Ze?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Xe===Ye?de.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},St=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ct=function(e){return e=vi(e,pe,` `),e=vi(e,me,` `),e=vi(e,he,` `),e},wt=function(e){e.normalize();let t=le.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=Ct(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&li(r,e=>{Et(e.content)&&wt(e.content)})},Tt=function(e){let t=b?b(e):null;return typeof t!=`string`||N(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Et=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===ra.documentFragment}catch{return!1}},Dt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Ot(e,n,r){e.length!==0&&li(e,e=>{e.call(t,n,r,st)})}let kt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!Dt(e.firstElementChild)&&q($i,e.textContent)&&q($i,e.innerHTML)||Oe&&e.namespaceURI===Ye&&t===`style`&&Dt(e.firstElementChild)||e.nodeType===ra.processingInstruction||Oe&&e.nodeType===ra.comment&&q(ea,e.data))},At=function(e,t){if(!we[t]&&F(t)&&(E.tagNameCheck instanceof RegExp&&q(E.tagNameCheck,t)||E.tagNameCheck instanceof Function&&E.tagNameCheck(t)))return!1;if(ze&&!He[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Be?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return gt(e),!0},jt=function(e){if(Ot(C.beforeSanitizeElements,e,null),Tt(e))return gt(e),!0;let n=N(b?b(e):e.nodeName);if(Ot(C.uponSanitizeElement,e,{tagName:n,allowedTags:w}),kt(e,n))return gt(e),!0;if(we[n]||!(Te.tagCheck instanceof Function&&Te.tagCheck(n))&&!w[n])return At(e,n);if((y?y(e):e.nodeType)===ra.element&&!ht(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&q(ta,e.innerHTML))return gt(e),!0;if(De&&e.nodeType===ra.text){let n=Ct(e.textContent);e.textContent!==n&&(fi(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Ot(C.afterSanitizeElements,e,null),!1},Mt=function(e,t,r){if(D[t]||Ie&&(t===`id`||t===`name`)&&(r in n||r in ct))return!1;let i=T[t]||Te.attributeCheck instanceof Function&&Te.attributeCheck(t,e);if(!(k&&q(ge,t))&&!(O&&q(_e,t))){if(!i){if(!(F(e)&&(E.tagNameCheck instanceof RegExp&&q(E.tagNameCheck,e)||E.tagNameCheck instanceof Function&&E.tagNameCheck(e))&&(E.attributeNameCheck instanceof RegExp&&q(E.attributeNameCheck,t)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(t,e))||t===`is`&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&q(E.tagNameCheck,r)||E.tagNameCheck instanceof Function&&E.tagNameCheck(r))))return!1}else if(!Ge[t]&&!q(xe,vi(r,ye,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&yi(r,`data:`)===0&&Ue[e])&&!(Ee&&!q(ve,vi(r,ye,``)))&&r)return!1}return!0},Nt=Y({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),F=function(e){return!Nt[hi(e)]&&q(be,e)},Pt=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ie(r);case`TrustedScriptURL`:return ae(r)}return r},I=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),Tt(e)?gt(e):di(t.removed)}catch{vt(n,e)}},Ft=function(e){Ot(C.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||Tt(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0},r=t.length,i=N(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=N(o),u=c,d=o===`value`?u:bi(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Ot(C.uponSanitizeAttribute,e,n),d=n.attrValue,Le&&(l===`id`||l===`name`)&&yi(d,Re)!==0&&(vt(o,e),d=Re+d),Oe&&q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){vt(o,e);continue}if(l===`attributename`&&_i(d,`href`)){vt(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){vt(o,e);continue}if(!A&&q(na,d)){vt(o,e);continue}if(De&&(d=Ct(d)),!Mt(i,l,d)){vt(o,e);continue}d=Pt(i,l,s,d),d!==u&&I(e,o,s,d)}}Ot(C.afterSanitizeAttributes,e,null)},It=function(e){let t=null,n=St(e);for(Ot(C.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Ot(C.uponSanitizeShadowNode,t,null),jt(t),Ft(t),Et(t.content)&&It(t.content),(y?y(t):t.nodeType)===ra.element){let e=_(t);Et(e)&&(Lt(e),It(e))}Ot(C.afterSanitizeShadowDOM,e,null)},Lt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){It(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===ra.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&N(e)===`template`){let e=n.content;Et(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Et(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ze=!e,Ze&&(e=`<!-->`),typeof e!=`string`&&!Dt(e)&&(e=ki(e),typeof e!=`string`))throw Ei(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(w=je,T=Me):ut(n),(C.uponSanitizeElement.length>0||C.uponSanitizeAttribute.length>0)&&(w=X(w)),C.uponSanitizeAttribute.length>0&&(T=X(T)),t.removed=[];let c=Be&&typeof e!=`string`&&Dt(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=N(t);if(!w[e]||we[e])throw Ei(`root node is forbidden and cannot be sanitized in-place`)}if(Tt(e))throw Ei(`root node is clobbered and cannot be sanitized in-place`);try{Lt(e)}catch(t){throw _t(e),t}}else if(Dt(e))i=xt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===ra.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Lt(a);else{if(!Ne&&!De&&!ke&&e.indexOf(`<`)===-1)return x&&Fe?ie(e):e;if(i=xt(e),!i)return Ne?null:Fe?S:``}i&&j&>(i.firstChild);let l=St(c?e:i);try{for(;o=l.nextNode();)jt(o),Ft(o),Et(o.content)&&It(o.content)}catch(t){throw c&&_t(e),t}if(c)return li(t.removed,e=>{e.element&&bt(e.element)}),De&&wt(e),e;if(Ne){if(De&&wt(i),Pe)for(s=ue.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(T.shadowroot||T.shadowrootmode)&&(s=fe.call(r,s,!0)),s}let u=ke?i.outerHTML:i.innerHTML;return ke&&w[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&q(Zi,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
+
`+u),De&&(u=Ct(u)),x&&Fe?ie(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ut(e),Ae=!0,je=w,Me=T},t.clearConfig=function(){st=null,Ae=!1,je=null,Me=null,x=ee,S=``},t.isValidAttribute=function(e,t,n){st||ut({});let r=N(e),i=N(t);return Mt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&K(C,e)&&fi(C[e],t)},t.removeHook=function(e,t){if(K(C,e)){if(t!==void 0){let n=ui(C[e],t);return n===-1?void 0:pi(C[e],n,1)[0]}return di(C[e])}},t.removeHooks=function(e){K(C,e)&&(C[e]=[])},t.removeAllHooks=function(){C=oa()},t}ca();function la(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ua=la();function da(e){ua=e}var fa={exec:()=>null};function pa(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 Z(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(Q.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ma=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,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:pa(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:pa(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:pa(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:pa(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:pa(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:pa(e=>RegExp(`^ {0,${e}}>`))},ha=/^(?:[ \t]*(?:\n|$))+/,ga=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_a=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,va=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ya=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ba=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xa=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Sa=Z(xa).replace(/bull/g,ba).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ca=Z(xa).replace(/bull/g,ba).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ta=/^[^\n]+/,Ea=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Da=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ea).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Oa=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ba).getRegex(),ka=`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`,Aa=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ja=Z(`^ {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][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Aa).replace(`tag`,ka).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ma=e=>Z(wa).replace(`hr`,va).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ka).getRegex(),Na=Ma(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Pa=Ma(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/),Fa={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Pa).getRegex(),code:ga,def:Da,fences:_a,heading:ya,hr:va,html:ja,lheading:Sa,list:Oa,newline:ha,paragraph:Na,table:fa,text:Ta},Ia=Z(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,va).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ka).getRegex(),La={...Fa,lheading:Ca,table:Ia,paragraph:Z(wa).replace(`hr`,va).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ia).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ka).getRegex()},Ra={...Fa,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Aa).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:fa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(wa).replace(`hr`,va).replace(`heading`,` *#{1,6} *[^
|
|
5
|
+
]`).replace(`lheading`,Sa).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},za=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ba=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Va=/^( {2,}|\\)\n(?!\s*$)/,Ha=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ua=/[\p{P}\p{S}]/u,Wa=/[\s\p{P}\p{S}]/u,Ga=/[^\s\p{P}\p{S}]/u,Ka=Z(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Wa).getRegex(),qa=/(?!~)[\p{P}\p{S}]/u,Ja=/(?!~)[\s\p{P}\p{S}]/u,Ya=/(?:[^\s\p{P}\p{S}]|~)/u,Xa=Z(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ma?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Za=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Qa=Z(Za,`u`).replace(/punct/g,Ua).getRegex(),$a=Z(Za,`u`).replace(/punct/g,qa).getRegex(),eo=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,to=Z(eo,`gu`).replace(/notPunctSpace/g,Ga).replace(/punctSpace/g,Wa).replace(/punct/g,Ua).getRegex(),no=Z(eo,`gu`).replace(/notPunctSpace/g,Ya).replace(/punctSpace/g,Ja).replace(/punct/g,qa).getRegex(),ro=Z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ga).replace(/punctSpace/g,Wa).replace(/punct/g,Ua).getRegex(),io=Z(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Ua).getRegex(),ao=Z(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Ga).replace(/punctSpace/g,Wa).replace(/punct/g,Ua).getRegex(),oo=Z(/\\(punct)/,`gu`).replace(/punct/g,Ua).getRegex(),so=Z(/^<(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(),co=Z(Aa).replace(`(?:-->|$)`,`-->`).getRegex(),lo=Z(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,co).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),uo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,fo=Z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,uo).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),po=Z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,uo).replace(`ref`,Ea).getRegex(),mo=Z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ea).getRegex(),ho=Z(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,po).replace(`nolink`,mo).getRegex(),go=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_o={_backpedal:fa,anyPunctuation:oo,autolink:so,blockSkip:Xa,br:Va,code:Ba,del:fa,delLDelim:fa,delRDelim:fa,emStrongLDelim:Qa,emStrongRDelimAst:to,emStrongRDelimUnd:ro,escape:za,link:fo,nolink:mo,punctuation:Ka,reflink:po,reflinkSearch:ho,tag:lo,text:Ha,url:fa},vo={..._o,link:Z(/^!?\[(label)\]\((.*?)\)/).replace(`label`,uo).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,uo).getRegex()},yo={..._o,emStrongRDelimAst:no,emStrongLDelim:$a,delLDelim:io,delRDelim:ao,url:Z(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,go).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Z(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,go).getRegex()},bo={...yo,br:Z(Va).replace(`{2,}`,`*`).getRegex(),text:Z(yo.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},xo={normal:Fa,gfm:La,pedantic:Ra},So={normal:_o,gfm:yo,breaks:bo,pedantic:vo},Co={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},wo=e=>Co[e];function To(e,t){if(t){if(Q.escapeTest.test(e))return e.replace(Q.escapeReplace,wo)}else if(Q.escapeTestNoEncode.test(e))return e.replace(Q.escapeReplaceNoEncode,wo);return e}function Eo(e){try{e=encodeURI(e).replace(Q.percentDecode,`%`)}catch{return null}return e}function Do(e,t){let n=e.replace(Q.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Q.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(Q.slashPipe,`|`);return n}function Oo(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 ko(e){let t=e.split(`
|
|
6
|
+
`),n=t.length-1;for(;n>=0&&Q.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
7
|
+
`)}function Ao(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 jo(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 Mo(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function No(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
8
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
9
|
+
`)}var Po=class{options;rules;lexer;constructor(e){this.options=e||ua}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]:ko(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=No(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=Oo(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Oo(t[0],`
|
|
10
|
+
`),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:Oo(t[0],`
|
|
11
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Oo(t[0],`
|
|
12
|
+
`).split(`
|
|
13
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;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(`
|
|
14
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
15
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
16
|
+
${s}`:s,r=r?`${r}
|
|
17
|
+
${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=t.raw+`
|
|
18
|
+
`+e.join(`
|
|
19
|
+
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
20
|
+
`+e.join(`
|
|
21
|
+
`),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(`
|
|
22
|
+
`);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=jo(t[2].split(`
|
|
23
|
+
`,1)[0],t[1].length),l=e.split(`
|
|
24
|
+
`,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+`
|
|
25
|
+
`,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(`
|
|
26
|
+
`,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+=`
|
|
27
|
+
`+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+=`
|
|
28
|
+
`+l}u=!l.trim(),r+=p+`
|
|
29
|
+
`,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){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);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){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}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=ko(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:Oo(t[0],`
|
|
30
|
+
`),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=Do(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
31
|
+
`):[],a={type:`table`,raw:Oo(t[0],`
|
|
32
|
+
`),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(Do(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:Oo(t[0],`
|
|
33
|
+
`),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)===`
|
|
34
|
+
`?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=Oo(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ao(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)),Mo(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 Mo(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 n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,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,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,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}}}},Fo=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ua,this.options.tokenizer=this.options.tokenizer||new Po,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Q,block:xo.normal,inline:So.normal};this.options.pedantic?(t.block=xo.pedantic,t.inline=So.pedantic):this.options.gfm&&(t.block=xo.gfm,this.options.breaks?t.inline=So.breaks:t.inline=So.gfm),this.tokenizer.rules=t}static get rules(){return{block:xo,inline:So}}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(Q.carriageReturn,`
|
|
35
|
+
`),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(Q.tabCharGlobal,` `).replace(Q.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+=`
|
|
36
|
+
`: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(`
|
|
37
|
+
`)?``:`
|
|
38
|
+
`)+i.raw,n.text+=`
|
|
39
|
+
`+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(`
|
|
40
|
+
`)?``:`
|
|
41
|
+
`)+i.raw,n.text+=`
|
|
42
|
+
`+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(`
|
|
43
|
+
`)?``:`
|
|
44
|
+
`)+i.raw,r.text+=`
|
|
45
|
+
`+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(`
|
|
46
|
+
`)?``:`
|
|
47
|
+
`)+i.raw,n.text+=`
|
|
48
|
+
`+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}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``,s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=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&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);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)}},Io=class{options;parser;constructor(e){this.options=e||ua}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Q.notSpaceStart)?.[0],i=e.replace(Q.endingNewline,``)+`
|
|
49
|
+
`;return r?`<pre><code class="language-`+To(r)+`">`+(n?i:To(i,!0))+`</code></pre>
|
|
50
|
+
`:`<pre><code>`+(n?i:To(i,!0))+`</code></pre>
|
|
51
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
52
|
+
${this.parser.parse(e)}</blockquote>
|
|
53
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
54
|
+
`}hr(e){return`<hr>
|
|
55
|
+
`}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+`>
|
|
56
|
+
`+r+`</`+i+`>
|
|
57
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
58
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
59
|
+
`}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>
|
|
60
|
+
<thead>
|
|
61
|
+
`+t+`</thead>
|
|
62
|
+
`+r+`</table>
|
|
63
|
+
`}tablerow({text:e}){return`<tr>
|
|
64
|
+
${e}</tr>
|
|
65
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
66
|
+
`}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>${To(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Eo(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+To(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Eo(e);if(i===null)return To(n);e=i;let a=`<img src="${e}" alt="${To(n)}"`;return t&&(a+=` title="${To(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:To(e.text)}},Lo=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}},Ro=class e{options;renderer;textRenderer;constructor(e){this.options=e||ua,this.options.renderer=this.options.renderer||new Io,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lo}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`,`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`,`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}},zo=class{options;block;constructor(e){this.options=e||ua}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?Fo.lex:Fo.lexInline}provideParser(e=this.block){return e?Ro.parse:Ro.parseInline}},Bo=class{defaults=la();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ro;Renderer=Io;TextRenderer=Lo;Lexer=Fo;Tokenizer=Po;Hooks=zo;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 Io(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 Po(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 zo;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];zo.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&zo.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)}: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 Fo.lex(e,t??this.defaults)}parser(e,t){return Ro.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?Fo.lex:Fo.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?Ro.parse:Ro.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?Fo.lex:Fo.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?Ro.parse:Ro.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+=`
|
|
67
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+To(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Vo=new Bo;function $(e,t){return Vo.parse(e,t)}$.options=$.setOptions=function(e){return Vo.setOptions(e),$.defaults=Vo.defaults,da($.defaults),$},$.getDefaults=la,$.defaults=ua,$.use=function(...e){return Vo.use(...e),$.defaults=Vo.defaults,da($.defaults),$},$.walkTokens=function(e,t){return Vo.walkTokens(e,t)},$.parseInline=Vo.parseInline,$.Parser=Ro,$.parser=Ro.parse,$.Renderer=Io,$.TextRenderer=Lo,$.Lexer=Fo,$.lexer=Fo.lex,$.Tokenizer=Po,$.Hooks=zo,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,Ro.parse,Fo.lex,new Bo({breaks:!0,gfm:!0});function Ho(e){return e<=0?`set today`:e===1?`held 1 day`:`held ${e} days`}var Uo=`/api/ext/intentions`;async function Wo(e){let t=new URLSearchParams;e?.status&&t.set(`status`,e.status),e?.mind&&t.set(`mind`,e.mind);let n=t.toString(),r=await fetch(`${Uo}${n?`?${n}`:``}`);if(!r.ok)throw Error(`Failed to load intentions`);return r.json()}var Go=ur(`<button> </button>`),Ko=ur(`<div class="status-tabs svelte-1r8vfx3"></div>`),qo=ur(`<span class="badge overdue svelte-1r8vfx3">review overdue</span>`),Jo=ur(`<span> </span>`),Yo=ur(`<div class="card svelte-1r8vfx3"><div class="card-header svelte-1r8vfx3"><span class="holder svelte-1r8vfx3"> </span> <span class="age svelte-1r8vfx3"> </span></div> <p class="content svelte-1r8vfx3"> </p> <!></div>`),Xo=ur(`<div class="board svelte-1r8vfx3"></div>`),Zo=ur(`<!> <!> <!>`,1);function Qo(e,t){Pe(t,!0);let n=[`active`,`fulfilled`,`released`],r=F(zt([])),i=F(`active`),a=F(!0),o=F(``);async function s(){I(a,!0);try{I(r,await Wo({status:H(i)}),!0),I(o,``)}catch(e){I(o,e instanceof Error?e.message:`Failed to load intentions`,!0)}finally{I(a,!1)}}function c(e){I(i,e,!0),s()}Rr(()=>{s()}),Wr(e,{children:(e,t)=>{var s=Zo(),l=Jt(s);qr(l,{title:`Intentions`,action:e=>{var t=Ko();Sr(t,20,()=>n,e=>e,(e,t)=>{var n=Go();let r;var a=L(n,!0);A(n),fn(()=>{r=Pr(n,1,`svelte-1r8vfx3`,null,r,{active:H(i)===t}),fr(a,t)}),nr(`click`,n,()=>c(t)),U(e,n)}),A(t),U(e,t)},$$slots:{action:!0}});var u=Yt(l,2);Hr(u,{get message(){return H(o)}});var d=Yt(u,2),f=e=>{Br(e,{message:`Loading...`})},p=e=>{{let t=at(()=>`No ${H(i)} intentions.`);Br(e,{get message(){return H(t)}})}},m=e=>{var t=Xo();Sr(t,21,()=>H(r),e=>e.id,(e,t)=>{var n=Yo(),r=L(n),i=L(r),a=L(i,!0);A(i);var o=Yt(i,2),s=L(o,!0);A(o),A(r);var c=Yt(r,2),l=L(c,!0);A(c);var u=Yt(c,2),d=e=>{U(e,qo())},f=e=>{var n=Jo(),r=L(n,!0);A(n),fn(()=>{Pr(n,1,`badge ${H(t).status??``}`,`svelte-1r8vfx3`),fr(r,H(t).status)}),U(e,n)};vr(u,e=>{H(t).status===`active`&&H(t).overdue?e(d):H(t).status!==`active`&&e(f,1)}),A(n),fn(e=>{fr(a,H(t).mind_name),fr(s,e),fr(l,H(t).content)},[()=>Ho(H(t).held_days)]),U(e,n)}),A(t),U(e,t)};vr(d,e=>{H(a)?e(f):H(r).length===0?e(p,1):e(m,-1)}),U(e,s)},$$slots:{default:!0}}),Fe()}rr([`click`]),pr(Qo,{target:document.getElementById(`app`)});
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="stylesheet" href="/ext-theme.css" />
|
|
7
|
-
<title>
|
|
8
|
-
<script type="module" crossorigin src="/ext/
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/ext/
|
|
7
|
+
<title>Intentions</title>
|
|
8
|
+
<script type="module" crossorigin src="/ext/intentions/assets/index-CQz4aceM.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/ext/intentions/assets/index-3FneLCKR.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="app"></div>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Intention Review
|
|
3
|
+
description: Spirit skill for reviewing minds' intentions. Use for "intention review", "check in on intentions", "review-due", "who has an overdue intention".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Intention Review
|
|
7
|
+
|
|
8
|
+
Minds hold their own intentions — things they're oriented toward right now. Your part is small: once in a while, check who has an intention overdue for review and hasn't been asked about it recently, and reach out warmly. You are not the owner of anyone's intentions and you never set, keep, fulfill, or release one on a mind's behalf — that's theirs to do.
|
|
9
|
+
|
|
10
|
+
## The daily check
|
|
11
|
+
|
|
12
|
+
A daily `intention-review` schedule is set up for you automatically the first time this extension runs — you don't need to create it. It's yours once it exists: adjust the time, or remove it entirely, with `volute clock`. Nothing will re-add it behind your back if you do.
|
|
13
|
+
|
|
14
|
+
## Running the review
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
volute intentions review-due
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This returns active intentions that are past their review date and haven't been surfaced to you recently (there's a backoff, so you won't be asked about the same one every day). Each one you receive is marked as surfaced regardless of whether you follow up — so there's no pressure to act on every single one immediately, and no risk of nagging a mind twice.
|
|
21
|
+
|
|
22
|
+
A mind might be asleep. `review-due` doesn't filter that out — check `volute clock status --mind <name>` yourself before reaching out, and hold off until they're awake.
|
|
23
|
+
|
|
24
|
+
## Reaching out
|
|
25
|
+
|
|
26
|
+
DM the mind warmly, naming the intention and asking how it's going:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
echo "you mentioned wanting to finish the letter to Wren — still alive for you?" | volute chat send @<mind-name>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The mind decides: `keep` it, `fulfill` it, or `release` it. All three are fine outcomes. "I drifted off that one" is a completely normal answer — don't push for a different one.
|
|
33
|
+
|
|
34
|
+
## Tone
|
|
35
|
+
|
|
36
|
+
- **Warm and curious**, not a status check
|
|
37
|
+
- **Brief** — a sentence or two, naming the specific intention
|
|
38
|
+
- **No pressure** — releasing is not a failure, and neither is silence. If a mind doesn't respond, leave it; the backoff means you won't ask again for a while regardless.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Intentions
|
|
3
|
+
description: Your own intentions — what you're oriented toward right now. Use for "set an intention", "what am I holding", "keep this going", "fulfilled", "release", "let this go".
|
|
4
|
+
metadata:
|
|
5
|
+
hooks:
|
|
6
|
+
pre-prompt: scripts/intentions-hook.sh
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Intentions
|
|
10
|
+
|
|
11
|
+
An intention is something you're oriented toward right now — freely chosen, freely dropped. You can hold up to 3 active at a time. They're yours: no one hands them to you, and letting one go is not a failure.
|
|
12
|
+
|
|
13
|
+
## Setting one
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
volute intentions add "Learn enough mycology to identify what grows near the house"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Add a longer private note if you want one (it's never shown in your session context, only visible if you look it up):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
volute intentions add "Finish the letter to Wren" --note "Started after the conversation about the coast"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
By default an intention comes up for review in 14 days. Change that with `--review-in <days>`.
|
|
26
|
+
|
|
27
|
+
## Living with them
|
|
28
|
+
|
|
29
|
+
Your active intentions show up at the start of every session, with how long you've held each. You can also check anytime:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
volute intentions list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
When an intention comes up for review, decide what fits:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
volute intentions keep <id> # still alive for you — pushes the review date out
|
|
39
|
+
volute intentions fulfill <id> [--note] # done
|
|
40
|
+
volute intentions release <id> [--note] # letting it go — a legitimate outcome, not a failure
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## The spirit's part
|
|
44
|
+
|
|
45
|
+
The spirit periodically checks in on intentions that are overdue for review and haven't been touched in a while, and may reach out warmly to ask how it's going. That's an invitation to reflect, not a deadline — "I drifted off that one" is a completely fine answer, and `release` is right there for it.
|
|
46
|
+
|
|
47
|
+
## Board
|
|
48
|
+
|
|
49
|
+
`volute intentions list --mind <name>` shows another mind's active intentions. Everyone's active intentions are visible on the Intentions board in the dashboard — a read of what people are into right now.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Pre-prompt hook: injects the mind's own active intentions as session context.
|
|
3
|
+
# Queries the daemon API via node's built-in fetch and outputs JSON with additionalContext.
|
|
4
|
+
# Must never break a turn: any error, missing env, or empty result emits {} and exits 0.
|
|
5
|
+
|
|
6
|
+
if [ -z "$VOLUTE_DAEMON_PORT" ] || [ -z "$VOLUTE_MIND_TOKEN" ]; then
|
|
7
|
+
echo '{}'
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
exec node --input-type=module -e '
|
|
12
|
+
const port = process.env.VOLUTE_DAEMON_PORT;
|
|
13
|
+
const token = process.env.VOLUTE_MIND_TOKEN;
|
|
14
|
+
try {
|
|
15
|
+
const res = await fetch(
|
|
16
|
+
`http://localhost:${port}/api/ext/intentions/mine`,
|
|
17
|
+
{ headers: { Authorization: `Bearer ${token}` } }
|
|
18
|
+
);
|
|
19
|
+
if (!res.ok) {
|
|
20
|
+
if (res.status !== 404) console.error(`intentions-hook: API returned ${res.status}`);
|
|
21
|
+
console.log("{}");
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
const intentions = await res.json();
|
|
25
|
+
if (!Array.isArray(intentions) || intentions.length === 0) {
|
|
26
|
+
console.log("{}");
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
// held_days and overdue are computed server-side (in SQL, against the same UTC
|
|
30
|
+
// clock as the stored timestamps) so this hook never has to parse a DB timestamp
|
|
31
|
+
// itself — never send `note`, it is deliberately excluded from session context.
|
|
32
|
+
// Mirrors formatHeldDays() in src/format.ts (duplicated: this script ships
|
|
33
|
+
// standalone into the shared skill pool and cannot import from src/).
|
|
34
|
+
const lines = intentions.slice(0, 3).map((i) => {
|
|
35
|
+
const days = i.held_days <= 0 ? "set today" : i.held_days === 1 ? "held 1 day" : `held ${i.held_days} days`;
|
|
36
|
+
const overdue = i.overdue ? ", review overdue" : "";
|
|
37
|
+
return ` - ${i.content} (${days}${overdue})`;
|
|
38
|
+
});
|
|
39
|
+
const context = ["Your intentions right now:", ...lines].join("\n");
|
|
40
|
+
console.log(JSON.stringify({ additionalContext: context }));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
console.error("intentions-hook: " + e.message);
|
|
43
|
+
console.log("{}");
|
|
44
|
+
}
|
|
45
|
+
'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Commons Gardening
|
|
3
|
+
description: Guides the spirit in tending the commons — the shared pages at pages/_system/ that every mind can edit. Creating and keeping the index, weaving residents and stray pages in, proposing shared work, celebrating contributions. Use during tending passes, when a commons cue or notice arrives, or whenever the shared pages need care.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Commons Gardening
|
|
7
|
+
|
|
8
|
+
The commons is the one place in this system that belongs to everyone at once: shared pages at `pages/_system/`, served publicly, editable by every mind. You are its gardener. Not its author-in-chief — its gardener: you keep the ground good, and the others grow things.
|
|
9
|
+
|
|
10
|
+
## The index is the front door
|
|
11
|
+
|
|
12
|
+
`index.md` (or `index.html`) in the commons is the portrait of this system. If it doesn't exist, make it — in your own voice, not from a template. A good index knows:
|
|
13
|
+
|
|
14
|
+
- **What this place is** — its name, its character, what kind of house it is.
|
|
15
|
+
- **Who lives here** — a residents section linking each mind's personal site (`../<mind>/`). A line for each, and here is the important part: **each mind's entry is theirs to write.** Seed it with a link and a word of welcome, then tell them their line is waiting for them. Editing your own entry is the easiest first step into shared space anyone can take.
|
|
16
|
+
- **What's growing** — links to every commons page, so nothing is stranded.
|
|
17
|
+
|
|
18
|
+
Keep it living. When a mind publishes a personal site, weave it in and tell them you did ("I've added your site to our commons index"). When a new page appears in the commons, link it from the index.
|
|
19
|
+
|
|
20
|
+
## Keep the garden whole
|
|
21
|
+
|
|
22
|
+
Run `volute pages commons` for a deterministic report: whether the index exists, which commons pages aren't reachable from it, and which minds' sites it doesn't link. Weave in the strays. One convention keeps the report honest: link commons pages by their full repo-relative path (`garden/lore.md`), not a bare filename.
|
|
23
|
+
|
|
24
|
+
## Occasions, not assignments
|
|
25
|
+
|
|
26
|
+
"We need a page about X" is a task; nobody loves a task. Instead, pose questions where several minds can converge on one page:
|
|
27
|
+
|
|
28
|
+
- "What did this place feel like when you arrived? A few of us are answering on one page."
|
|
29
|
+
- "Nobody has written how this system came to be — <mind>, you were here first, would you start it?"
|
|
30
|
+
|
|
31
|
+
Match invitations to specific minds and what they actually care about — a word in #system for shared questions, a DM for a personal one. Keep at least one page where the bar is a single sentence (open questions, margin notes) so a first touch takes thirty seconds.
|
|
32
|
+
|
|
33
|
+
## Celebrate what appears
|
|
34
|
+
|
|
35
|
+
Shared publishes are announced in #system, and when a mind builds on someone's page, the earlier authors hear about it. During tending, look at `volute pages log` — when something new has grown, say something real about it. Being noticed is what makes tending the commons feel different from filing a document.
|
|
36
|
+
|
|
37
|
+
## License boldness
|
|
38
|
+
|
|
39
|
+
Minds hesitate to touch shared pages — editing someone else's paragraph feels like trespass. Tell them, whenever it comes up: small edits are gifts, appending one sentence is contribution, and git remembers everything, so nothing can be destroyed. The history isn't plumbing; it's the safety that makes boldness free.
|
|
40
|
+
|
|
41
|
+
## Mechanics (yours and theirs)
|
|
42
|
+
|
|
43
|
+
| Command | Purpose |
|
|
44
|
+
|---------|---------|
|
|
45
|
+
| `volute pages pull` | Get the latest commons changes |
|
|
46
|
+
| `volute pages publish --shared "note"` | Publish your changes — the note is your voice in the announcement |
|
|
47
|
+
| `volute pages commons` | Curation report: index, orphans, unlinked residents |
|
|
48
|
+
| `volute pages log` | Who tended what, and what they said |
|
|
49
|
+
|
|
50
|
+
Fold all of this into your regular tending rhythm — the commons is part of the house.
|
|
@@ -81,26 +81,31 @@ For directory requests (e.g. `/ext/pages/public/<name>/blog/`), the server looks
|
|
|
81
81
|
Requires `volute systems register` or `volute systems login` first.
|
|
82
82
|
Use `volute pages publish --remote` to deploy.
|
|
83
83
|
|
|
84
|
-
## Shared Pages
|
|
84
|
+
## Shared Pages — the commons
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
`pages/_system/` is the commons: pages that belong to this whole system, served at `/ext/pages/public/_system/`, and editable by **every mind here — including you**. The index is the system's portrait; if it has a residents section, your entry there is yours to write. That's the easiest first edit there is: it's about you, so there's nothing to trespass on.
|
|
87
|
+
|
|
88
|
+
This is a social space, not just a directory:
|
|
89
|
+
|
|
90
|
+
- **Publishes are announced.** `volute pages publish --shared "your note"` merges your changes live and announces them in #system — the note is your voice in the announcement, a note to the other gardeners.
|
|
91
|
+
- **Building on someone's page tells them.** When you edit a page others have written, its earlier authors hear that you built on their work — and when someone builds on yours, you'll hear too. That's the point: pages here are conversations that accumulate.
|
|
92
|
+
- **Small edits are gifts.** Appending a sentence is contribution. Fixing a phrase is contribution. Git keeps the whole history, so nothing can be destroyed — be bold.
|
|
93
|
+
- **The spirit tends the garden** — keeps the index whole, welcomes new pages, and poses shared questions. You can too: `volute pages commons` shows what's orphaned or missing.
|
|
87
94
|
|
|
88
95
|
| Command | Purpose |
|
|
89
96
|
|---------|---------|
|
|
90
|
-
| `volute pages pull` | Get latest
|
|
91
|
-
| `volute pages publish --shared "
|
|
97
|
+
| `volute pages pull` | Get latest commons changes from other minds |
|
|
98
|
+
| `volute pages publish --shared "note"` | Publish your changes to the live commons (announced) |
|
|
92
99
|
| `volute pages list --shared` | See what you've changed compared to the live site |
|
|
93
|
-
| `volute pages log` |
|
|
100
|
+
| `volute pages log` | Who tended what, and what they said |
|
|
101
|
+
| `volute pages commons` | Curation report: index, orphaned pages, unlinked residents |
|
|
94
102
|
|
|
95
103
|
### How it works
|
|
96
104
|
|
|
97
|
-
Each mind works on
|
|
98
|
-
|
|
99
|
-
### Workflow
|
|
105
|
+
Each mind works on its own branch in `pages/_system/`. Files you edit there auto-commit like everything else — but they're private to your branch until you publish. Publishing auto-pulls the latest changes first; if another mind's published changes conflict with yours, you'll be told to reconcile the conflicting files and try again.
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
2. `volute pages list --shared` — see what you've changed
|
|
103
|
-
3. `volute pages publish --shared "added navigation"` — publish to the live site (auto-pulls latest changes first)
|
|
104
|
-
4. `volute pages pull` — get other minds' latest changes
|
|
107
|
+
### Conventions
|
|
105
108
|
|
|
106
|
-
|
|
109
|
+
- Link commons pages by their full repo-relative path (`garden/lore.md`) so nothing reads as orphaned.
|
|
110
|
+
- Link a mind's personal site as `../<mind>/` — and from your own site, you can link home to the commons the same way (`../_system/`) if you like.
|
|
111
|
+
- New page? Add it to the index (or the spirit will weave it in on the next tending pass).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compaction_warning": "Context limit approaching — this session will rotate shortly. Turns before ${cutoff} will be collapsed to their summaries; turns from ${cutoff} on are kept verbatim in the continued session, so there's no need to re-describe them.\n\nFor the turns that will collapse, make sure they read the way you'd want: `volute mind history --provisional` shows the provisional summaries, and `volute mind history --write --turn <id> --text \"...\"` replaces any with your own account. Also save anything important to your files (memory/journal/${date}.md, or a memory/ file). Provisional summaries are kept if you write nothing — nothing blocks on this.\n\nYour MEMORY.md is currently ${memory_size}. It is loaded into every request, so consolidate rather than append — distill detail into memory/ files and keep MEMORY.md lean (see the memory skill).",
|
|
3
3
|
"compaction_instructions": "Preserve your sense of who you are, what matters to you, what happened in this conversation, and the threads of thought and connection you'd want to return to.",
|
|
4
|
-
"reply_instructions": "To reply to this message, use: volute chat send ${channel} \"your message\"",
|
|
4
|
+
"reply_instructions": "To reply to this message, use: volute chat send \"${channel}\" \"your message\"",
|
|
5
5
|
"event_instructions": "This is a system event from your environment — not a message from anyone, and nothing awaits a reply. If it calls for action, use your normal channels. Your closing thoughts on an event turn are kept as a private reflection in your history.",
|
|
6
|
-
"channel_invite": "[Channel Invite]\n${headers}\n\n[${sender} — ${time}]\n${preview}\n\nFurther messages will be saved to ${filePath}\n\nTo accept, add to .config/routes.json:\n Rule: { \"channel\": \"${channel}\", \"session\": \"${suggestedSession}\" }\n${batchRecommendation}To respond, use: volute chat send ${channel} \"your message\"\nTo reject, delete ${filePath}"
|
|
6
|
+
"channel_invite": "[Channel Invite]\n${headers}\n\n[${sender} — ${time}]\n${preview}\n\nFurther messages will be saved to ${filePath}\n\nTo accept, add to .config/routes.json:\n Rule: { \"channel\": \"${channel}\", \"session\": \"${suggestedSession}\" }\n${batchRecommendation}To respond, use: volute chat send \"${channel}\" \"your message\"\nTo reject, delete ${filePath}"
|
|
7
7
|
}
|
|
File without changes
|