@jojovms/scripto 0.0.2 β†’ 0.0.6

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.
@@ -1,77 +0,0 @@
1
- (function(j,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(j=typeof globalThis<"u"?globalThis:j||self,E(j.ReactScripto={},j.React))})(this,function(j,E){"use strict";var Ti=Object.defineProperty;var Xn=j=>{throw TypeError(j)};var wi=(j,E,J)=>E in j?Ti(j,E,{enumerable:!0,configurable:!0,writable:!0,value:J}):j[E]=J;var M=(j,E,J)=>wi(j,typeof E!="symbol"?E+"":E,J),_i=(j,E,J)=>E.has(j)||Xn("Cannot "+J);var Kn=(j,E,J)=>E.has(j)?Xn("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(j):E.set(j,J);var Bt=(j,E,J)=>(_i(j,E,"access private method"),J);var Pe,dn,Qn;var J={exports:{}},qe={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var mn;function Jn(){if(mn)return qe;mn=1;var l=E,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function r(u,c,x){var h,g={},m=null,y=null;x!==void 0&&(m=""+x),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(y=c.ref);for(h in c)n.call(c,h)&&!a.hasOwnProperty(h)&&(g[h]=c[h]);if(u&&u.defaultProps)for(h in c=u.defaultProps,c)g[h]===void 0&&(g[h]=c[h]);return{$$typeof:e,type:u,key:m,ref:y,props:g,_owner:o.current}}return qe.Fragment=t,qe.jsx=r,qe.jsxs=r,qe}var Ve={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var gn;function er(){return gn||(gn=1,process.env.NODE_ENV!=="production"&&function(){var l=E,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),R=Symbol.iterator,T="@@iterator";function N(s){if(s===null||typeof s!="object")return null;var p=R&&s[R]||s[T];return typeof p=="function"?p:null}var $=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function U(s){{for(var p=arguments.length,k=new Array(p>1?p-1:0),w=1;w<p;w++)k[w-1]=arguments[w];ee("error",s,k)}}function ee(s,p,k){{var w=$.ReactDebugCurrentFrame,O=w.getStackAddendum();O!==""&&(p+="%s",k=k.concat([O]));var D=k.map(function(A){return String(A)});D.unshift("Warning: "+p),Function.prototype.apply.call(console[s],console,D)}}var H=!1,ce=!1,ot=!1,an=!1,ln=!1,Ot;Ot=Symbol.for("react.module.reference");function cn(s){return!!(typeof s=="string"||typeof s=="function"||s===n||s===a||ln||s===o||s===x||s===h||an||s===y||H||ce||ot||typeof s=="object"&&s!==null&&(s.$$typeof===m||s.$$typeof===g||s.$$typeof===r||s.$$typeof===u||s.$$typeof===c||s.$$typeof===Ot||s.getModuleId!==void 0))}function Y(s,p,k){var w=s.displayName;if(w)return w;var O=p.displayName||p.name||"";return O!==""?k+"("+O+")":k}function ze(s){return s.displayName||"Context"}function ie(s){if(s==null)return null;if(typeof s.tag=="number"&&U("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case o:return"StrictMode";case x:return"Suspense";case h:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case u:var p=s;return ze(p)+".Consumer";case r:var k=s;return ze(k._context)+".Provider";case c:return Y(s,s.render,"ForwardRef");case g:var w=s.displayName||null;return w!==null?w:ie(s.type)||"Memo";case m:{var O=s,D=O._payload,A=O._init;try{return ie(A(D))}catch{return null}}}return null}var ue=Object.assign,Ne=0,Ct,Lt,st,It,at,B,lt;function G(){}G.__reactDisabledLog=!0;function Dt(){{if(Ne===0){Ct=console.log,Lt=console.info,st=console.warn,It=console.error,at=console.group,B=console.groupCollapsed,lt=console.groupEnd;var s={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}Ne++}}function F(){{if(Ne--,Ne===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ue({},s,{value:Ct}),info:ue({},s,{value:Lt}),warn:ue({},s,{value:st}),error:ue({},s,{value:It}),group:ue({},s,{value:at}),groupCollapsed:ue({},s,{value:B}),groupEnd:ue({},s,{value:lt})})}Ne<0&&U("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var be=$.ReactCurrentDispatcher,Me;function fe(s,p,k){{if(Me===void 0)try{throw Error()}catch(O){var w=O.stack.trim().match(/\n( *(at )?)/);Me=w&&w[1]||""}return`
18
- `+Me+s}}var $e=!1,Se;{var Pt=typeof WeakMap=="function"?WeakMap:Map;Se=new Pt}function ct(s,p){if(!s||$e)return"";{var k=Se.get(s);if(k!==void 0)return k}var w;$e=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=be.current,be.current=null,Dt();try{if(p){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(L){w=L}Reflect.construct(s,[],A)}else{try{A.call()}catch(L){w=L}s.call(A.prototype)}}else{try{throw Error()}catch(L){w=L}s()}}catch(L){if(L&&w&&typeof L.stack=="string"){for(var v=L.stack.split(`
19
- `),q=w.stack.split(`
20
- `),d=v.length-1,i=q.length-1;d>=1&&i>=0&&v[d]!==q[i];)i--;for(;d>=1&&i>=0;d--,i--)if(v[d]!==q[i]){if(d!==1||i!==1)do if(d--,i--,i<0||v[d]!==q[i]){var f=`
21
- `+v[d].replace(" at new "," at ");return s.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",s.displayName)),typeof s=="function"&&Se.set(s,f),f}while(d>=1&&i>=0);break}}}finally{$e=!1,be.current=D,F(),Error.prepareStackTrace=O}var b=s?s.displayName||s.name:"",C=b?fe(b):"";return typeof s=="function"&&Se.set(s,C),C}function Ae(s,p,k){return ct(s,!1)}function Fe(s){var p=s.prototype;return!!(p&&p.isReactComponent)}function oe(s,p,k){if(s==null)return"";if(typeof s=="function")return ct(s,Fe(s));if(typeof s=="string")return fe(s);switch(s){case x:return fe("Suspense");case h:return fe("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case c:return Ae(s.render);case g:return oe(s.type,p,k);case m:{var w=s,O=w._payload,D=w._init;try{return oe(D(O),p,k)}catch{}}}return""}var xe=Object.prototype.hasOwnProperty,Ue={},Te=$.ReactDebugCurrentFrame;function we(s){if(s){var p=s._owner,k=oe(s.type,s._source,p?p.type:null);Te.setExtraStackFrame(k)}else Te.setExtraStackFrame(null)}function Be(s,p,k,w,O){{var D=Function.call.bind(xe);for(var A in s)if(D(s,A)){var v=void 0;try{if(typeof s[A]!="function"){var q=Error((w||"React class")+": "+k+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}v=s[A](p,A,w,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){v=d}v&&!(v instanceof Error)&&(we(O),U("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",k,A,typeof v),we(null)),v instanceof Error&&!(v.message in Ue)&&(Ue[v.message]=!0,we(O),U("Failed %s type: %s",k,v.message),we(null))}}}var Nt=Array.isArray;function We(s){return Nt(s)}function un(s){{var p=typeof Symbol=="function"&&Symbol.toStringTag,k=p&&s[Symbol.toStringTag]||s.constructor.name||"Object";return k}}function ut(s){try{return Re(s),!1}catch{return!0}}function Re(s){return""+s}function _e(s){if(ut(s))return U("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",un(s)),Re(s)}var ne=$.ReactCurrentOwner,ft={key:!0,ref:!0,__self:!0,__source:!0},pt,ht;function dt(s){if(xe.call(s,"ref")){var p=Object.getOwnPropertyDescriptor(s,"ref").get;if(p&&p.isReactWarning)return!1}return s.ref!==void 0}function Mt(s){if(xe.call(s,"key")){var p=Object.getOwnPropertyDescriptor(s,"key").get;if(p&&p.isReactWarning)return!1}return s.key!==void 0}function He(s,p){typeof s.ref=="string"&&ne.current}function Ge(s,p){{var k=function(){pt||(pt=!0,U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};k.isReactWarning=!0,Object.defineProperty(s,"key",{get:k,configurable:!0})}}function pe(s,p){{var k=function(){ht||(ht=!0,U("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};k.isReactWarning=!0,Object.defineProperty(s,"ref",{get:k,configurable:!0})}}var Oe=function(s,p,k,w,O,D,A){var v={$$typeof:e,type:s,key:p,ref:k,props:A,_owner:D};return v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(v,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(v,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v};function mt(s,p,k,w,O){{var D,A={},v=null,q=null;k!==void 0&&(_e(k),v=""+k),Mt(p)&&(_e(p.key),v=""+p.key),dt(p)&&(q=p.ref,He(p,O));for(D in p)xe.call(p,D)&&!ft.hasOwnProperty(D)&&(A[D]=p[D]);if(s&&s.defaultProps){var d=s.defaultProps;for(D in d)A[D]===void 0&&(A[D]=d[D])}if(v||q){var i=typeof s=="function"?s.displayName||s.name||"Unknown":s;v&&Ge(A,i),q&&pe(A,i)}return Oe(s,v,q,O,w,ne.current,A)}}var je=$.ReactCurrentOwner,jt=$.ReactDebugCurrentFrame;function he(s){if(s){var p=s._owner,k=oe(s.type,s._source,p?p.type:null);jt.setExtraStackFrame(k)}else jt.setExtraStackFrame(null)}var Ce;Ce=!1;function gt(s){return typeof s=="object"&&s!==null&&s.$$typeof===e}function Le(){{if(je.current){var s=ie(je.current.type);if(s)return`
22
-
23
- Check the render method of \``+s+"`."}return""}}function fn(s){return""}var zt={};function W(s){{var p=Le();if(!p){var k=typeof s=="string"?s:s.displayName||s.name;k&&(p=`
24
-
25
- Check the top-level render call using <`+k+">.")}return p}}function ye(s,p){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var k=W(p);if(zt[k])return;zt[k]=!0;var w="";s&&s._owner&&s._owner!==je.current&&(w=" It was passed a child from "+ie(s._owner.type)+"."),he(s),U('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,w),he(null)}}function $t(s,p){{if(typeof s!="object")return;if(We(s))for(var k=0;k<s.length;k++){var w=s[k];gt(w)&&ye(w,p)}else if(gt(s))s._store&&(s._store.validated=!0);else if(s){var O=N(s);if(typeof O=="function"&&O!==s.entries)for(var D=O.call(s),A;!(A=D.next()).done;)gt(A.value)&&ye(A.value,p)}}}function Ft(s){{var p=s.type;if(p==null||typeof p=="string")return;var k;if(typeof p=="function")k=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===c||p.$$typeof===g))k=p.propTypes;else return;if(k){var w=ie(p);Be(k,s.props,"prop",w,s)}else if(p.PropTypes!==void 0&&!Ce){Ce=!0;var O=ie(p);U("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&U("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kt(s){{for(var p=Object.keys(s.props),k=0;k<p.length;k++){var w=p[k];if(w!=="children"&&w!=="key"){he(s),U("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),he(null);break}}s.ref!==null&&(he(s),U("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var bt={};function xt(s,p,k,w,O,D){{var A=cn(s);if(!A){var v="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(v+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var q=fn();q?v+=q:v+=Le();var d;s===null?d="null":We(s)?d="array":s!==void 0&&s.$$typeof===e?(d="<"+(ie(s.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):d=typeof s,U("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,v)}var i=mt(s,p,k,O,D);if(i==null)return i;if(A){var f=p.children;if(f!==void 0)if(w)if(We(f)){for(var b=0;b<f.length;b++)$t(f[b],s);Object.freeze&&Object.freeze(f)}else U("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $t(f,s)}if(xe.call(p,"key")){var C=ie(s),L=Object.keys(p).filter(function(de){return de!=="key"}),z=L.length>0?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}";if(!bt[C+z]){var Z=L.length>0?"{"+L.join(": ..., ")+": ...}":"{}";U(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,z,C,Z,C),bt[C+z]=!0}}return s===n?kt(i):Ft(i),i}}function pn(s,p,k){return xt(s,p,k,!0)}function se(s,p,k){return xt(s,p,k,!1)}var Ee=se,Ut=pn;Ve.Fragment=n,Ve.jsx=Ee,Ve.jsxs=Ut}()),Ve}process.env.NODE_ENV==="production"?J.exports=Jn():J.exports=er();var _=J.exports,kn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},bn=E.createContext&&E.createContext(kn),ve=function(){return ve=Object.assign||function(l){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(l[o]=e[o])}return l},ve.apply(this,arguments)},tr=function(l,e){var t={};for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&e.indexOf(n)<0&&(t[n]=l[n]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(l);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(l,n[o])&&(t[n[o]]=l[n[o]]);return t};function xn(l){return l&&l.map(function(e,t){return E.createElement(e.tag,ve({key:t},e.attr),xn(e.child))})}function ae(l){return function(e){return E.createElement(nr,ve({attr:ve({},l.attr)},e),xn(l.child))}}function nr(l){var e=function(t){var n=l.attr,o=l.size,a=l.title,r=tr(l,["attr","size","title"]),u=o||t.size||"1em",c;return t.className&&(c=t.className),l.className&&(c=(c?c+" ":"")+l.className),E.createElement("svg",ve({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,r,{className:c,style:ve(ve({color:l.color||t.color},t.style),l.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&E.createElement("title",null,a),l.children)};return bn!==void 0?E.createElement(bn.Consumer,null,function(t){return e(t)}):e(kn)}function rr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"}}]})(l)}function ir(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128L192 384l-96-96"}}]})(l)}function or(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144m224 0L144 368"}}]})(l)}function sr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 255.79l-64-64-64 64m64 192.42V207.79"}}]})(l)}function ar(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"336",height:"336",x:"128",y:"128",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"57",ry:"57"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24"}}]})(l)}function lr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0032 32h120m-232 80h160m-160 80h160"}}]})(l)}function cr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"}}]})(l)}function ur(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"}}]})(l)}function fr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"}},{tag:"path",attr:{d:"M310.4 336H201.6a25.62 25.62 0 01-25.6-25.6V201.6a25.62 25.62 0 0125.6-25.6h108.8a25.62 25.62 0 0125.6 25.6v108.8a25.62 25.62 0 01-25.6 25.6z"}}]})(l)}function pr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 48v48m0 320v48m147.08-355.08l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08l-33.94-33.94M142.86 142.86l-33.94-33.94"}},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32"}}]})(l)}function hr(l){return ae({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M126 192H56a8 8 0 00-8 8v112a8 8 0 008 8h69.65a15.93 15.93 0 0110.14 3.54l91.47 74.89A8 8 0 00240 392V120a8 8 0 00-12.74-6.43l-91.47 74.89A15 15 0 01126 192zm194 128c9.74-19.38 16-40.84 16-64 0-23.48-6-44.42-16-64m48 176c19.48-33.92 32-64.06 32-112s-12-77.74-32-112m48 272c30-46 48-91.43 48-160s-18-113-48-160"}}]})(l)}const dr=({onFileLoaded:l})=>{const e=E.useRef(null),[t,n]=E.useState(!1),[o,a]=E.useState(""),[r,u]=E.useState(!1),c=T=>{if(T.length>0){const N=T[0];x(N)?h(N):alert("Please upload a valid Markdown (.md) file.")}},x=T=>T.name.endsWith(".md")||T.name.endsWith(".markdown")||T.type==="text/markdown",h=T=>{const N=new FileReader;N.onload=$=>{l({name:T.name,content:$.target.result})},N.readAsText(T)},g=T=>{T.preventDefault(),T.stopPropagation(),T.type==="dragenter"||T.type==="dragover"?n(!0):(T.type==="dragleave"||T.type==="drop")&&n(!1)},m=T=>{T.preventDefault(),T.stopPropagation(),n(!1),T.dataTransfer.files&&T.dataTransfer.files[0]&&c(T.dataTransfer.files)},y=async()=>{const T=o.trim();if(T){u(!0);try{const N=R(T),$=await fetch(N);if(!$.ok)throw new Error(`HTTP error! status: ${$.status}`);const U=await $.text();let ee=T.substring(T.lastIndexOf("/")+1)||"remote-file.md";ee.includes("?")&&(ee=ee.split("?")[0]),l({name:ee,content:U})}catch(N){console.error("Fetch error:",N),alert(`Failed to load Markdown from URL.
31
-
32
- Note: This might be due to CORS restrictions. Try a raw GitHub URL.`)}finally{u(!1)}}},R=T=>{try{if(new URL(T).hostname==="github.com"&&T.includes("/blob/"))return T.replace("github.com","raw.githubusercontent.com").replace("/blob/","/")}catch{}return T};return _.jsxs("section",{className:`upload-zone ${t?"drag-active":""}`,onClick:()=>e.current.click(),onDragEnter:g,onDragLeave:g,onDragOver:g,onDrop:m,id:"upload-area",children:[_.jsx("input",{type:"file",ref:e,accept:".md,.markdown",hidden:!0,onChange:T=>c(T.target.files)}),_.jsxs("div",{className:"upload-content",children:[_.jsx("div",{className:"icon-wrapper",children:_.jsx(sr,{})}),_.jsx("h2",{children:"Drop your Markdown file here"}),_.jsxs("p",{children:["or ",_.jsx("span",{className:"browse-btn",children:"browse files"})]}),_.jsx("div",{className:"divider",children:_.jsx("span",{children:"OR"})}),_.jsxs("div",{className:"url-input-container",onClick:T=>T.stopPropagation(),children:[_.jsx("input",{type:"url",id:"url-input",placeholder:"Paste a raw Markdown URL...",spellCheck:"false",value:o,onChange:T=>a(T.target.value),onKeyDown:T=>T.key==="Enter"&&y()}),_.jsx("button",{id:"url-btn",onClick:y,disabled:r,children:r?"...":"Go"})]}),_.jsxs("p",{className:"sub-text",children:["Supports ",_.jsx("span",{style:{color:"aqua"},children:".md"})," and ",_.jsx("span",{style:{color:"aqua"},children:".markdown"})]})]})]})};function Wt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ie=Wt();function Tn(l){Ie=l}const wn=/[&<>"']/,mr=new RegExp(wn.source,"g"),_n=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gr=new RegExp(_n.source,"g"),kr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yn=l=>kr[l];function te(l,e){if(e){if(wn.test(l))return l.replace(mr,yn)}else if(_n.test(l))return l.replace(gr,yn);return l}const br=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function xr(l){return l.replace(br,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Tr=/(^|[^\[])\^/g;function P(l,e){let t=typeof l=="string"?l:l.source;e=e||"";const n={replace:(o,a)=>{let r=typeof a=="string"?a:a.source;return r=r.replace(Tr,"$1"),t=t.replace(o,r),n},getRegex:()=>new RegExp(t,e)};return n}function En(l){try{l=encodeURI(l).replace(/%25/g,"%")}catch{return null}return l}const Ze={exec:()=>null};function vn(l,e){const t=l.replace(/\|/g,(a,r,u)=>{let c=!1,x=r;for(;--x>=0&&u[x]==="\\";)c=!c;return c?"|":" |"}),n=t.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function Tt(l,e,t){const n=l.length;if(n===0)return"";let o=0;for(;o<n&&l.charAt(n-o-1)===e;)o++;return l.slice(0,n-o)}function wr(l,e){if(l.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===e[0])t++;else if(l[n]===e[1]&&(t--,t<0))return n;return-1}function Sn(l,e,t,n){const o=e.href,a=e.title?te(e.title):null,r=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const u={type:"link",raw:t,href:o,title:a,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,u}return{type:"image",raw:t,href:o,title:a,text:te(r)}}function _r(l,e){const t=l.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
33
- `).map(o=>{const a=o.match(/^\s+/);if(a===null)return o;const[r]=a;return r.length>=n.length?o.slice(n.length):o}).join(`
34
- `)}class wt{constructor(e){M(this,"options");M(this,"rules");M(this,"lexer");this.options=e||Ie}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Tt(n,`
35
- `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],o=_r(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:o}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const o=Tt(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=Tt(t[0].replace(/^ *>[ \t]?/gm,""),`
36
- `),o=this.lexer.state.top;this.lexer.state.top=!0;const a=this.lexer.blockTokens(n);return this.lexer.state.top=o,{type:"blockquote",raw:t[0],tokens:a,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const o=n.length>1,a={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let u="",c="",x=!1;for(;e;){let h=!1;if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let g=t[2].split(`
37
- `,1)[0].replace(/^\t+/,$=>" ".repeat(3*$.length)),m=e.split(`
38
- `,1)[0],y=0;this.options.pedantic?(y=2,c=g.trimStart()):(y=t[2].search(/[^ ]/),y=y>4?1:y,c=g.slice(y),y+=t[1].length);let R=!1;if(!g&&/^ *$/.test(m)&&(u+=m+`
39
- `,e=e.substring(m.length+1),h=!0),!h){const $=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),U=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),ee=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),H=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;e;){const ce=e.split(`
40
- `,1)[0];if(m=ce,this.options.pedantic&&(m=m.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ee.test(m)||H.test(m)||$.test(m)||U.test(e))break;if(m.search(/[^ ]/)>=y||!m.trim())c+=`
41
- `+m.slice(y);else{if(R||g.search(/[^ ]/)>=4||ee.test(g)||H.test(g)||U.test(g))break;c+=`
42
- `+m}!R&&!m.trim()&&(R=!0),u+=ce+`
43
- `,e=e.substring(ce.length+1),g=m.slice(y)}}a.loose||(x?a.loose=!0:/\n *\n *$/.test(u)&&(x=!0));let T=null,N;this.options.gfm&&(T=/^\[[ xX]\] /.exec(c),T&&(N=T[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:u,task:!!T,checked:N,loose:!1,text:c,tokens:[]}),a.raw+=u}a.items[a.items.length-1].raw=u.trimEnd(),a.items[a.items.length-1].text=c.trimEnd(),a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){const g=a.items[h].tokens.filter(y=>y.type==="space"),m=g.length>0&&g.some(y=>/\n.*\n/.test(y.raw));a.loose=m}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),o=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:o,title:a}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=vn(t[1]),o=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
44
- `):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const u of o)/^ *-+: *$/.test(u)?r.align.push("right"):/^ *:-+: *$/.test(u)?r.align.push("center"):/^ *:-+ *$/.test(u)?r.align.push("left"):r.align.push(null);for(const u of n)r.header.push({text:u,tokens:this.lexer.inline(u)});for(const u of a)r.rows.push(vn(u,r.header.length).map(c=>({text:c,tokens:this.lexer.inline(c)})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
45
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const 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){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:te(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const r=Tt(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=wr(t[2],"()");if(r>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let o=t[2],a="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);r&&(o=r[1],a=r[3])}else a=t[3]?t[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),Sn(t,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const o=(n[2]||n[1]).replace(/\s+/g," "),a=t[o.toLowerCase()];if(!a){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return Sn(n,a,n[0],this.lexer)}}emStrong(e,t,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...o[0]].length-1;let u,c,x=r,h=0;const g=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,t=t.slice(-1*e.length+r);(o=g.exec(t))!=null;){if(u=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!u)continue;if(c=[...u].length,o[3]||o[4]){x+=c;continue}else if((o[5]||o[6])&&r%3&&!((r+c)%3)){h+=c;continue}if(x-=c,x>0)continue;c=Math.min(c,c+x+h);const m=[...o[0]][0].length,y=e.slice(0,r+o.index+m+c);if(Math.min(r,c)%2){const T=y.slice(1,-1);return{type:"em",raw:y,text:T,tokens:this.lexer.inlineTokens(T)}}const R=y.slice(2,-2);return{type:"strong",raw:y,text:R,tokens:this.lexer.inlineTokens(R)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const o=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return o&&a&&(n=n.substring(1,n.length-1)),n=te(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,o;return t[2]==="@"?(n=te(t[1]),o="mailto:"+n):(n=te(t[1]),o=n),{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let o,a;if(t[2]==="@")o=te(t[0]),a="mailto:"+o;else{let r;do r=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(r!==t[0]);o=te(t[0]),t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:o,href:a,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=te(t[0]),{type:"text",raw:t[0],text:n}}}}const yr=/^(?: *(?:\n|$))+/,Er=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,vr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,An=/(?:[*+-]|\d{1,9}[.)])/,Rn=P(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,An).getRegex(),Ht=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ar=/^[^\n]+/,Gt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Rr=P(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Gt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Or=P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,An).getRegex(),_t="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yt=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Cr=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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",Yt).replace("tag",_t).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),On=P(Ht).replace("hr",Xe).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"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex(),qt={blockquote:P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",On).getRegex(),code:Er,def:Rr,fences:vr,heading:Sr,hr:Xe,html:Cr,lheading:Rn,list:Or,newline:yr,paragraph:On,table:Ze,text:Ar},Cn=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex(),Lr={...qt,table:Cn,paragraph:P(Ht).replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex()},Ir={...qt,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yt).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:Ze,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(Ht).replace("hr",Xe).replace("heading",` *#{1,6} *[^
46
- ]`).replace("lheading",Rn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ln=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,In=/^( {2,}|\\)\n(?!\s*$)/,Pr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ke="\\p{P}$+<=>`^|~",Nr=P(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ke).getRegex(),Mr=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,jr=P(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ke).getRegex(),zr=P("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ke).getRegex(),$r=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ke).getRegex(),Fr=P(/\\([punct])/,"gu").replace(/punct/g,Ke).getRegex(),Ur=P(/^<(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(),Br=P(Yt).replace("(?:-->|$)","-->").getRegex(),Wr=P("^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",Br).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Hr=P(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",yt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dn=P(/^!?\[(label)\]\[(ref)\]/).replace("label",yt).replace("ref",Gt).getRegex(),Pn=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gt).getRegex(),Gr=P("reflink|nolink(?!\\()","g").replace("reflink",Dn).replace("nolink",Pn).getRegex(),Vt={_backpedal:Ze,anyPunctuation:Fr,autolink:Ur,blockSkip:Mr,br:In,code:Dr,del:Ze,emStrongLDelim:jr,emStrongRDelimAst:zr,emStrongRDelimUnd:$r,escape:Ln,link:Hr,nolink:Pn,punctuation:Nr,reflink:Dn,reflinkSearch:Gr,tag:Wr,text:Pr,url:Ze},Yr={...Vt,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",yt).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yt).getRegex()},Zt={...Vt,escape:P(Ln).replace("])","~|])").getRegex(),url:P(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qr={...Zt,br:P(In).replace("{2,}","*").getRegex(),text:P(Zt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Et={normal:qt,gfm:Lr,pedantic:Ir},Qe={normal:Vt,gfm:Zt,breaks:qr,pedantic:Yr};class me{constructor(e){M(this,"tokens");M(this,"options");M(this,"state");M(this,"tokenizer");M(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ie,this.options.tokenizer=this.options.tokenizer||new wt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Et.normal,inline:Qe.normal};this.options.pedantic?(t.block=Et.pedantic,t.inline=Qe.pedantic):this.options.gfm&&(t.block=Et.gfm,this.options.breaks?t.inline=Qe.breaks:t.inline=Qe.gfm),this.tokenizer.rules=t}static get rules(){return{block:Et,inline:Qe}}static lex(e,t){return new me(t).lex(e)}static lexInline(e,t){return new me(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
47
- `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(u,c,x)=>c+" ".repeat(x.length));let n,o,a,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(u=>(n=u.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
48
- `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),o=t[t.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
49
- `+n.raw,o.text+=`
50
- `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),o=t[t.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
51
- `+n.raw,o.text+=`
52
- `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startBlock){let u=1/0;const c=e.slice(1);let x;this.options.extensions.startBlock.forEach(h=>{x=h.call({lexer:this},c),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(a=e.substring(0,u+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){o=t[t.length-1],r&&o.type==="paragraph"?(o.raw+=`
53
- `+n.raw,o.text+=`
54
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n),r=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),o=t[t.length-1],o&&o.type==="text"?(o.raw+=`
55
- `+n.raw,o.text+=`
56
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,o,a,r=e,u,c,x;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(u=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(u=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(u=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,u.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(x=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),o=t[t.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),o=t[t.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,x)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const g=e.slice(1);let m;this.options.extensions.startInline.forEach(y=>{m=y.call({lexer:this},g),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(x=n.raw.slice(-1)),c=!0,o=t[t.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):t.push(n);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}}class vt{constructor(e){M(this,"options");this.options=e||Ie}code(e,t,n){var a;const o=(a=(t||"").match(/^\S*/))==null?void 0:a[0];return e=e.replace(/\n$/,"")+`
57
- `,o?'<pre><code class="language-'+te(o)+'">'+(n?e:te(e,!0))+`</code></pre>
58
- `:"<pre><code>"+(n?e:te(e,!0))+`</code></pre>
59
- `}blockquote(e){return`<blockquote>
60
- ${e}</blockquote>
61
- `}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>
62
- `}hr(){return`<hr>
63
- `}list(e,t,n){const o=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+o+a+`>
64
- `+e+"</"+o+`>
65
- `}listitem(e,t,n){return`<li>${e}</li>
66
- `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
67
- `}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
68
- <thead>
69
- `+e+`</thead>
70
- `+t+`</table>
71
- `}tablerow(e){return`<tr>
72
- ${e}</tr>
73
- `}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
74
- `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const o=En(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+t+'"'),a+=">"+n+"</a>",a}image(e,t,n){const o=En(e);if(o===null)return n;e=o;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${t}"`),a+=">",a}text(e){return e}}class Xt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ge{constructor(e){M(this,"options");M(this,"renderer");M(this,"textRenderer");this.options=e||Ie,this.options.renderer=this.options.renderer||new vt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xt}static parse(e,t){return new ge(t).parse(e)}static parseInline(e,t){return new ge(t).parseInline(e)}parse(e,t=!0){let n="";for(let o=0;o<e.length;o++){const a=e[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const r=a,u=this.options.extensions.renderers[r.type].call({parser:this},r);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(r.type)){n+=u||"";continue}}switch(a.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{const r=a;n+=this.renderer.heading(this.parseInline(r.tokens),r.depth,xr(this.parseInline(r.tokens,this.textRenderer)));continue}case"code":{const r=a;n+=this.renderer.code(r.text,r.lang,!!r.escaped);continue}case"table":{const r=a;let u="",c="";for(let h=0;h<r.header.length;h++)c+=this.renderer.tablecell(this.parseInline(r.header[h].tokens),{header:!0,align:r.align[h]});u+=this.renderer.tablerow(c);let x="";for(let h=0;h<r.rows.length;h++){const g=r.rows[h];c="";for(let m=0;m<g.length;m++)c+=this.renderer.tablecell(this.parseInline(g[m].tokens),{header:!1,align:r.align[m]});x+=this.renderer.tablerow(c)}n+=this.renderer.table(u,x);continue}case"blockquote":{const r=a,u=this.parse(r.tokens);n+=this.renderer.blockquote(u);continue}case"list":{const r=a,u=r.ordered,c=r.start,x=r.loose;let h="";for(let g=0;g<r.items.length;g++){const m=r.items[g],y=m.checked,R=m.task;let T="";if(m.task){const N=this.renderer.checkbox(!!y);x?m.tokens.length>0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=N+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=N+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:N+" "}):T+=N+" "}T+=this.parse(m.tokens,x),h+=this.renderer.listitem(T,R,!!y)}n+=this.renderer.list(h,u,c);continue}case"html":{const r=a;n+=this.renderer.html(r.text,r.block);continue}case"paragraph":{const r=a;n+=this.renderer.paragraph(this.parseInline(r.tokens));continue}case"text":{let r=a,u=r.tokens?this.parseInline(r.tokens):r.text;for(;o+1<e.length&&e[o+1].type==="text";)r=e[++o],u+=`
75
- `+(r.tokens?this.parseInline(r.tokens):r.text);n+=t?this.renderer.paragraph(u):u;continue}default:{const r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let o=0;o<e.length;o++){const a=e[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const r=this.options.extensions.renderers[a.type].call({parser:this},a);if(r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=r||"";continue}}switch(a.type){case"escape":{const r=a;n+=t.text(r.text);break}case"html":{const r=a;n+=t.html(r.text);break}case"link":{const r=a;n+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break}case"image":{const r=a;n+=t.image(r.href,r.title,r.text);break}case"strong":{const r=a;n+=t.strong(this.parseInline(r.tokens,t));break}case"em":{const r=a;n+=t.em(this.parseInline(r.tokens,t));break}case"codespan":{const r=a;n+=t.codespan(r.text);break}case"br":{n+=t.br();break}case"del":{const r=a;n+=t.del(this.parseInline(r.tokens,t));break}case"text":{const r=a;n+=t.text(r.text);break}default:{const r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return n}}class Je{constructor(e){M(this,"options");this.options=e||Ie}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}M(Je,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Vr{constructor(...e){Kn(this,Pe);M(this,"defaults",Wt());M(this,"options",this.setOptions);M(this,"parse",Bt(this,Pe,dn).call(this,me.lex,ge.parse));M(this,"parseInline",Bt(this,Pe,dn).call(this,me.lexInline,ge.parseInline));M(this,"Parser",ge);M(this,"Renderer",vt);M(this,"TextRenderer",Xt);M(this,"Lexer",me);M(this,"Tokenizer",wt);M(this,"Hooks",Je);this.use(...e)}walkTokens(e,t){var o,a;let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const u=r;for(const c of u.header)n=n.concat(this.walkTokens(c.tokens,t));for(const c of u.rows)for(const x of c)n=n.concat(this.walkTokens(x.tokens,t));break}case"list":{const u=r;n=n.concat(this.walkTokens(u.items,t));break}default:{const u=r;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[u.type]?this.defaults.extensions.childTokens[u.type].forEach(c=>{const x=u[c].flat(1/0);n=n.concat(this.walkTokens(x,t))}):u.tokens&&(n=n.concat(this.walkTokens(u.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const r=t.renderers[a.name];r?t.renderers[a.name]=function(...u){let c=a.renderer.apply(this,u);return c===!1&&(c=r.apply(this,u)),c}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[a.level];r?r.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),o.extensions=t),n.renderer){const a=this.defaults.renderer||new vt(this.defaults);for(const r in n.renderer){if(!(r in a))throw new Error(`renderer '${r}' does not exist`);if(r==="options")continue;const u=r,c=n.renderer[u],x=a[u];a[u]=(...h)=>{let g=c.apply(a,h);return g===!1&&(g=x.apply(a,h)),g||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new wt(this.defaults);for(const r in n.tokenizer){if(!(r in a))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const u=r,c=n.tokenizer[u],x=a[u];a[u]=(...h)=>{let g=c.apply(a,h);return g===!1&&(g=x.apply(a,h)),g}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Je;for(const r in n.hooks){if(!(r in a))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;const u=r,c=n.hooks[u],x=a[u];Je.passThroughHooks.has(r)?a[u]=h=>{if(this.defaults.async)return Promise.resolve(c.call(a,h)).then(m=>x.call(a,m));const g=c.call(a,h);return x.call(a,g)}:a[u]=(...h)=>{let g=c.apply(a,h);return g===!1&&(g=x.apply(a,h)),g}}o.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,r=n.walkTokens;o.walkTokens=function(u){let c=[];return c.push(r.call(this,u)),a&&(c=c.concat(a.call(this,u))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return me.lex(e,t??this.defaults)}parser(e,t){return ge.parse(e,t??this.defaults)}}Pe=new WeakSet,dn=function(e,t){return(n,o)=>{const a={...o},r={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0);const u=Bt(this,Pe,Qn).call(this,!!r.silent,!!r.async);if(typeof n>"u"||n===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(r.hooks&&(r.hooks.options=r),r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(c=>e(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>t(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(u);try{r.hooks&&(n=r.hooks.preprocess(n));let c=e(n,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let x=t(c,r);return r.hooks&&(x=r.hooks.postprocess(x)),x}catch(c){return u(c)}}},Qn=function(e,t){return n=>{if(n.message+=`
76
- Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+te(n.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(n);throw n}};const De=new Vr;function I(l,e){return De.parse(l,e)}I.options=I.setOptions=function(l){return De.setOptions(l),I.defaults=De.defaults,Tn(I.defaults),I},I.getDefaults=Wt,I.defaults=Ie,I.use=function(...l){return De.use(...l),I.defaults=De.defaults,Tn(I.defaults),I},I.walkTokens=function(l,e){return De.walkTokens(l,e)},I.parseInline=De.parseInline,I.Parser=ge,I.parser=ge.parse,I.Renderer=vt,I.TextRenderer=Xt,I.Lexer=me,I.lexer=me.lex,I.Tokenizer=wt,I.Hooks=Je,I.parse=I,I.options,I.setOptions,I.use,I.walkTokens,I.parseInline,ge.parse,me.lex;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Nn,setPrototypeOf:Mn,isFrozen:Zr,getPrototypeOf:Xr,getOwnPropertyDescriptor:Kr}=Object;let{freeze:X,seal:re,create:Kt}=Object,{apply:Qt,construct:Jt}=typeof Reflect<"u"&&Reflect;X||(X=function(e){return e}),re||(re=function(e){return e}),Qt||(Qt=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return e.apply(t,o)}),Jt||(Jt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const St=Q(Array.prototype.forEach),Qr=Q(Array.prototype.lastIndexOf),jn=Q(Array.prototype.pop),et=Q(Array.prototype.push),Jr=Q(Array.prototype.splice),At=Q(String.prototype.toLowerCase),en=Q(String.prototype.toString),tn=Q(String.prototype.match),tt=Q(String.prototype.replace),ei=Q(String.prototype.indexOf),ti=Q(String.prototype.trim),le=Q(Object.prototype.hasOwnProperty),K=Q(RegExp.prototype.test),nt=ni(TypeError);function Q(l){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Qt(l,e,n)}}function ni(l){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jt(l,t)}}function S(l,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At;Mn&&Mn(l,null);let n=e.length;for(;n--;){let o=e[n];if(typeof o=="string"){const a=t(o);a!==o&&(Zr(e)||(e[n]=a),o=a)}l[o]=!0}return l}function ri(l){for(let e=0;e<l.length;e++)le(l,e)||(l[e]=null);return l}function ke(l){const e=Kt(null);for(const[t,n]of Nn(l))le(l,t)&&(Array.isArray(n)?e[t]=ri(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=ke(n):e[t]=n);return e}function rt(l,e){for(;l!==null;){const n=Kr(l,e);if(n){if(n.get)return Q(n.get);if(typeof n.value=="function")return Q(n.value)}l=Xr(l)}function t(){return null}return t}const zn=X(["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"]),nn=X(["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"]),rn=X(["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"]),ii=X(["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"]),on=X(["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"]),oi=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$n=X(["#text"]),Fn=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),sn=X(["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"]),Un=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Rt=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),si=re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ai=re(/<%[\w\W]*|[\w\W]*%>/gm),li=re(/\$\{[\w\W]*/gm),ci=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),ui=re(/^aria-[\-\w]+$/),Bn=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fi=re(/^(?:\w+script|data):/i),pi=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wn=re(/^html$/i),hi=re(/^[a-z][.\w]*(-[.\w]+)+$/i);var Hn=Object.freeze({__proto__:null,ARIA_ATTR:ui,ATTR_WHITESPACE:pi,CUSTOM_ELEMENT:hi,DATA_ATTR:ci,DOCTYPE_NAME:Wn,ERB_EXPR:ai,IS_ALLOWED_URI:Bn,IS_SCRIPT_OR_DATA:fi,MUSTACHE_EXPR:si,TMPLIT_EXPR:li});const it={element:1,text:3,progressingInstruction:7,comment:8,document:9},di=function(){return typeof window>"u"?null:window},mi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Gn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Yn(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:di();const e=d=>Yn(d);if(e.version="3.3.1",e.removed=[],!l||!l.document||l.document.nodeType!==it.document||!l.Element)return e.isSupported=!1,e;let{document:t}=l;const n=t,o=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:r,Node:u,Element:c,NodeFilter:x,NamedNodeMap:h=l.NamedNodeMap||l.MozNamedAttrMap,HTMLFormElement:g,DOMParser:m,trustedTypes:y}=l,R=c.prototype,T=rt(R,"cloneNode"),N=rt(R,"remove"),$=rt(R,"nextSibling"),U=rt(R,"childNodes"),ee=rt(R,"parentNode");if(typeof r=="function"){const d=t.createElement("template");d.content&&d.content.ownerDocument&&(t=d.content.ownerDocument)}let H,ce="";const{implementation:ot,createNodeIterator:an,createDocumentFragment:ln,getElementsByTagName:Ot}=t,{importNode:cn}=n;let Y=Gn();e.isSupported=typeof Nn=="function"&&typeof ee=="function"&&ot&&ot.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:ie,TMPLIT_EXPR:ue,DATA_ATTR:Ne,ARIA_ATTR:Ct,IS_SCRIPT_OR_DATA:Lt,ATTR_WHITESPACE:st,CUSTOM_ELEMENT:It}=Hn;let{IS_ALLOWED_URI:at}=Hn,B=null;const lt=S({},[...zn,...nn,...rn,...on,...$n]);let G=null;const Dt=S({},[...Fn,...sn,...Un,...Rt]);let F=Object.seal(Kt(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}})),be=null,Me=null;const fe=Object.seal(Kt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $e=!0,Se=!0,Pt=!1,ct=!0,Ae=!1,Fe=!0,oe=!1,xe=!1,Ue=!1,Te=!1,we=!1,Be=!1,Nt=!0,We=!1;const un="user-content-";let ut=!0,Re=!1,_e={},ne=null;const ft=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let pt=null;const ht=S({},["audio","video","img","source","image","track"]);let dt=null;const Mt=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let Oe=pe,mt=!1,je=null;const jt=S({},[He,Ge,pe],en);let he=S({},["mi","mo","mn","ms","mtext"]),Ce=S({},["annotation-xml"]);const gt=S({},["title","style","font","a","script"]);let Le=null;const fn=["application/xhtml+xml","text/html"],zt="text/html";let W=null,ye=null;const $t=t.createElement("form"),Ft=function(i){return i instanceof RegExp||i instanceof Function},kt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ye&&ye===i)){if((!i||typeof i!="object")&&(i={}),i=ke(i),Le=fn.indexOf(i.PARSER_MEDIA_TYPE)===-1?zt:i.PARSER_MEDIA_TYPE,W=Le==="application/xhtml+xml"?en:At,B=le(i,"ALLOWED_TAGS")?S({},i.ALLOWED_TAGS,W):lt,G=le(i,"ALLOWED_ATTR")?S({},i.ALLOWED_ATTR,W):Dt,je=le(i,"ALLOWED_NAMESPACES")?S({},i.ALLOWED_NAMESPACES,en):jt,dt=le(i,"ADD_URI_SAFE_ATTR")?S(ke(Mt),i.ADD_URI_SAFE_ATTR,W):Mt,pt=le(i,"ADD_DATA_URI_TAGS")?S(ke(ht),i.ADD_DATA_URI_TAGS,W):ht,ne=le(i,"FORBID_CONTENTS")?S({},i.FORBID_CONTENTS,W):ft,be=le(i,"FORBID_TAGS")?S({},i.FORBID_TAGS,W):ke({}),Me=le(i,"FORBID_ATTR")?S({},i.FORBID_ATTR,W):ke({}),_e=le(i,"USE_PROFILES")?i.USE_PROFILES:!1,$e=i.ALLOW_ARIA_ATTR!==!1,Se=i.ALLOW_DATA_ATTR!==!1,Pt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,ct=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=i.SAFE_FOR_TEMPLATES||!1,Fe=i.SAFE_FOR_XML!==!1,oe=i.WHOLE_DOCUMENT||!1,Te=i.RETURN_DOM||!1,we=i.RETURN_DOM_FRAGMENT||!1,Be=i.RETURN_TRUSTED_TYPE||!1,Ue=i.FORCE_BODY||!1,Nt=i.SANITIZE_DOM!==!1,We=i.SANITIZE_NAMED_PROPS||!1,ut=i.KEEP_CONTENT!==!1,Re=i.IN_PLACE||!1,at=i.ALLOWED_URI_REGEXP||Bn,Oe=i.NAMESPACE||pe,he=i.MATHML_TEXT_INTEGRATION_POINTS||he,Ce=i.HTML_INTEGRATION_POINTS||Ce,F=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&Ft(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&Ft(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(F.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ae&&(Se=!1),we&&(Te=!0),_e&&(B=S({},$n),G=[],_e.html===!0&&(S(B,zn),S(G,Fn)),_e.svg===!0&&(S(B,nn),S(G,sn),S(G,Rt)),_e.svgFilters===!0&&(S(B,rn),S(G,sn),S(G,Rt)),_e.mathMl===!0&&(S(B,on),S(G,Un),S(G,Rt))),i.ADD_TAGS&&(typeof i.ADD_TAGS=="function"?fe.tagCheck=i.ADD_TAGS:(B===lt&&(B=ke(B)),S(B,i.ADD_TAGS,W))),i.ADD_ATTR&&(typeof i.ADD_ATTR=="function"?fe.attributeCheck=i.ADD_ATTR:(G===Dt&&(G=ke(G)),S(G,i.ADD_ATTR,W))),i.ADD_URI_SAFE_ATTR&&S(dt,i.ADD_URI_SAFE_ATTR,W),i.FORBID_CONTENTS&&(ne===ft&&(ne=ke(ne)),S(ne,i.FORBID_CONTENTS,W)),i.ADD_FORBID_CONTENTS&&(ne===ft&&(ne=ke(ne)),S(ne,i.ADD_FORBID_CONTENTS,W)),ut&&(B["#text"]=!0),oe&&S(B,["html","head","body"]),B.table&&(S(B,["tbody"]),delete be.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=i.TRUSTED_TYPES_POLICY,ce=H.createHTML("")}else H===void 0&&(H=mi(y,o)),H!==null&&typeof ce=="string"&&(ce=H.createHTML(""));X&&X(i),ye=i}},bt=S({},[...nn,...rn,...ii]),xt=S({},[...on,...oi]),pn=function(i){let f=ee(i);(!f||!f.tagName)&&(f={namespaceURI:Oe,tagName:"template"});const b=At(i.tagName),C=At(f.tagName);return je[i.namespaceURI]?i.namespaceURI===Ge?f.namespaceURI===pe?b==="svg":f.namespaceURI===He?b==="svg"&&(C==="annotation-xml"||he[C]):!!bt[b]:i.namespaceURI===He?f.namespaceURI===pe?b==="math":f.namespaceURI===Ge?b==="math"&&Ce[C]:!!xt[b]:i.namespaceURI===pe?f.namespaceURI===Ge&&!Ce[C]||f.namespaceURI===He&&!he[C]?!1:!xt[b]&&(gt[b]||!bt[b]):!!(Le==="application/xhtml+xml"&&je[i.namespaceURI]):!1},se=function(i){et(e.removed,{element:i});try{ee(i).removeChild(i)}catch{N(i)}},Ee=function(i,f){try{et(e.removed,{attribute:f.getAttributeNode(i),from:f})}catch{et(e.removed,{attribute:null,from:f})}if(f.removeAttribute(i),i==="is")if(Te||we)try{se(f)}catch{}else try{f.setAttribute(i,"")}catch{}},Ut=function(i){let f=null,b=null;if(Ue)i="<remove></remove>"+i;else{const z=tn(i,/^[\r\n\t ]+/);b=z&&z[0]}Le==="application/xhtml+xml"&&Oe===pe&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const C=H?H.createHTML(i):i;if(Oe===pe)try{f=new m().parseFromString(C,Le)}catch{}if(!f||!f.documentElement){f=ot.createDocument(Oe,"template",null);try{f.documentElement.innerHTML=mt?ce:C}catch{}}const L=f.body||f.documentElement;return i&&b&&L.insertBefore(t.createTextNode(b),L.childNodes[0]||null),Oe===pe?Ot.call(f,oe?"html":"body")[0]:oe?f.documentElement:L},s=function(i){return an.call(i.ownerDocument||i,i,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},p=function(i){return i instanceof g&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof h)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},k=function(i){return typeof u=="function"&&i instanceof u};function w(d,i,f){St(d,b=>{b.call(e,i,f,ye)})}const O=function(i){let f=null;if(w(Y.beforeSanitizeElements,i,null),p(i))return se(i),!0;const b=W(i.nodeName);if(w(Y.uponSanitizeElement,i,{tagName:b,allowedTags:B}),Fe&&i.hasChildNodes()&&!k(i.firstElementChild)&&K(/<[/\w!]/g,i.innerHTML)&&K(/<[/\w!]/g,i.textContent)||i.nodeType===it.progressingInstruction||Fe&&i.nodeType===it.comment&&K(/<[/\w]/g,i.data))return se(i),!0;if(!(fe.tagCheck instanceof Function&&fe.tagCheck(b))&&(!B[b]||be[b])){if(!be[b]&&A(b)&&(F.tagNameCheck instanceof RegExp&&K(F.tagNameCheck,b)||F.tagNameCheck instanceof Function&&F.tagNameCheck(b)))return!1;if(ut&&!ne[b]){const C=ee(i)||i.parentNode,L=U(i)||i.childNodes;if(L&&C){const z=L.length;for(let Z=z-1;Z>=0;--Z){const de=T(L[Z],!0);de.__removalCount=(i.__removalCount||0)+1,C.insertBefore(de,$(i))}}}return se(i),!0}return i instanceof c&&!pn(i)||(b==="noscript"||b==="noembed"||b==="noframes")&&K(/<\/no(script|embed|frames)/i,i.innerHTML)?(se(i),!0):(Ae&&i.nodeType===it.text&&(f=i.textContent,St([ze,ie,ue],C=>{f=tt(f,C," ")}),i.textContent!==f&&(et(e.removed,{element:i.cloneNode()}),i.textContent=f)),w(Y.afterSanitizeElements,i,null),!1)},D=function(i,f,b){if(Nt&&(f==="id"||f==="name")&&(b in t||b in $t))return!1;if(!(Se&&!Me[f]&&K(Ne,f))){if(!($e&&K(Ct,f))){if(!(fe.attributeCheck instanceof Function&&fe.attributeCheck(f,i))){if(!G[f]||Me[f]){if(!(A(i)&&(F.tagNameCheck instanceof RegExp&&K(F.tagNameCheck,i)||F.tagNameCheck instanceof Function&&F.tagNameCheck(i))&&(F.attributeNameCheck instanceof RegExp&&K(F.attributeNameCheck,f)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(f,i))||f==="is"&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&K(F.tagNameCheck,b)||F.tagNameCheck instanceof Function&&F.tagNameCheck(b))))return!1}else if(!dt[f]){if(!K(at,tt(b,st,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&i!=="script"&&ei(b,"data:")===0&&pt[i])){if(!(Pt&&!K(Lt,tt(b,st,"")))){if(b)return!1}}}}}}}return!0},A=function(i){return i!=="annotation-xml"&&tn(i,It)},v=function(i){w(Y.beforeSanitizeAttributes,i,null);const{attributes:f}=i;if(!f||p(i))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let C=f.length;for(;C--;){const L=f[C],{name:z,namespaceURI:Z,value:de}=L,Ye=W(z),hn=de;let V=z==="value"?hn:ti(hn);if(b.attrName=Ye,b.attrValue=V,b.keepAttr=!0,b.forceKeepAttr=void 0,w(Y.uponSanitizeAttribute,i,b),V=b.attrValue,We&&(Ye==="id"||Ye==="name")&&(Ee(z,i),V=un+V),Fe&&K(/((--!?|])>)|<\/(style|title|textarea)/i,V)){Ee(z,i);continue}if(Ye==="attributename"&&tn(V,"href")){Ee(z,i);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){Ee(z,i);continue}if(!ct&&K(/\/>/i,V)){Ee(z,i);continue}Ae&&St([ze,ie,ue],Zn=>{V=tt(V,Zn," ")});const Vn=W(i.nodeName);if(!D(Vn,Ye,V)){Ee(z,i);continue}if(H&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Z)switch(y.getAttributeType(Vn,Ye)){case"TrustedHTML":{V=H.createHTML(V);break}case"TrustedScriptURL":{V=H.createScriptURL(V);break}}if(V!==hn)try{Z?i.setAttributeNS(Z,z,V):i.setAttribute(z,V),p(i)?se(i):jn(e.removed)}catch{Ee(z,i)}}w(Y.afterSanitizeAttributes,i,null)},q=function d(i){let f=null;const b=s(i);for(w(Y.beforeSanitizeShadowDOM,i,null);f=b.nextNode();)w(Y.uponSanitizeShadowNode,f,null),O(f),v(f),f.content instanceof a&&d(f.content);w(Y.afterSanitizeShadowDOM,i,null)};return e.sanitize=function(d){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,b=null,C=null,L=null;if(mt=!d,mt&&(d="<!-->"),typeof d!="string"&&!k(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw nt("dirty is not a string, aborting")}else throw nt("toString is not a function");if(!e.isSupported)return d;if(xe||kt(i),e.removed=[],typeof d=="string"&&(Re=!1),Re){if(d.nodeName){const de=W(d.nodeName);if(!B[de]||be[de])throw nt("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof u)f=Ut("<!---->"),b=f.ownerDocument.importNode(d,!0),b.nodeType===it.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?f=b:f.appendChild(b);else{if(!Te&&!Ae&&!oe&&d.indexOf("<")===-1)return H&&Be?H.createHTML(d):d;if(f=Ut(d),!f)return Te?null:Be?ce:""}f&&Ue&&se(f.firstChild);const z=s(Re?d:f);for(;C=z.nextNode();)O(C),v(C),C.content instanceof a&&q(C.content);if(Re)return d;if(Te){if(we)for(L=ln.call(f.ownerDocument);f.firstChild;)L.appendChild(f.firstChild);else L=f;return(G.shadowroot||G.shadowrootmode)&&(L=cn.call(n,L,!0)),L}let Z=oe?f.outerHTML:f.innerHTML;return oe&&B["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&K(Wn,f.ownerDocument.doctype.name)&&(Z="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
77
- `+Z),Ae&&St([ze,ie,ue],de=>{Z=tt(Z,de," ")}),H&&Be?H.createHTML(Z):Z},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kt(d),xe=!0},e.clearConfig=function(){ye=null,xe=!1},e.isValidAttribute=function(d,i,f){ye||kt({});const b=W(d),C=W(i);return D(b,C,f)},e.addHook=function(d,i){typeof i=="function"&&et(Y[d],i)},e.removeHook=function(d,i){if(i!==void 0){const f=Qr(Y[d],i);return f===-1?void 0:Jr(Y[d],f,1)[0]}return jn(Y[d])},e.removeHooks=function(d){Y[d]=[]},e.removeAllHooks=function(){Y=Gn()},e}var gi=Yn();const ki={heading(l,e,t){typeof l=="object"&&l!==null&&(t=l.raw||t,e=l.depth||l.level||e,l=l.text||"");const o=(t||String(l)).toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"");return`<h${e} id="${o}">${l}</h${e}>`}};I.use({renderer:ki});function bi(l){const e=I.parse(l);return gi.sanitize(e,{ADD_ATTR:["id","name"],ADD_TAGS:["h1","h2","h3","h4","h5","h6"]})}const xi=({content:l,filename:e,onClose:t})=>{const[n,o]=E.useState(""),[a,r]=E.useState(!1),[u,c]=E.useState(!1);E.useEffect(()=>{if(l){const m=bi(l);o(m)}},[l]),E.useEffect(()=>{const m=R=>{var N;const T=(N=R.target.getAttribute("href"))==null?void 0:N.substring(1);if(T){const $=document.getElementById(T);$&&(R.preventDefault(),$.scrollIntoView({behavior:"smooth",block:"start"}))}},y=document.querySelectorAll('.markdown-body a[href^="#"]');return y.forEach(R=>R.addEventListener("click",m)),()=>{y.forEach(R=>R.removeEventListener("click",m))}},[n]);const x=()=>{var m;if(a)window.speechSynthesis.cancel(),r(!1);else{const y=(m=document.getElementById("markdown-content"))==null?void 0:m.innerText;if(!y)return;const R=new SpeechSynthesisUtterance(y);R.rate=1,R.onend=()=>r(!1),R.onerror=()=>r(!1),window.speechSynthesis.speak(R),r(!0)}};E.useEffect(()=>()=>window.speechSynthesis.cancel(),[]);const h=()=>{const m=document.getElementById("markdown-content");if(!m)return;const y=m.innerText,R=m.innerHTML,T=new Blob([R],{type:"text/html"}),N=new Blob([y],{type:"text/plain"}),$=[new ClipboardItem({"text/html":T,"text/plain":N})];navigator.clipboard.write($).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)}).catch(()=>{navigator.clipboard.writeText(y).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)})})},g=()=>{alert("πŸ’‘ Tip: To preserve the visual theme in your PDF, make sure to check 'Background graphics' in the print settings window."),window.print()};return _.jsxs("section",{className:"preview-zone",children:[_.jsxs("div",{className:"preview-header",children:[_.jsx("span",{id:"filename-display",children:e||"filename.md"}),_.jsxs("div",{className:"header-actions",children:[_.jsx("button",{className:`icon-btn ${a?"speaking":""}`,onClick:x,title:a?"Stop Reading":"Read Aloud",children:a?_.jsx(fr,{}):_.jsx(hr,{})}),_.jsx("button",{className:"icon-btn",onClick:h,title:"Copy to Clipboard",style:{color:u?"var(--accent-color)":""},children:u?_.jsx(ir,{}):_.jsx(ar,{})}),_.jsx("button",{className:"icon-btn",onClick:g,title:"Save as PDF",children:_.jsx(cr,{})}),_.jsx("button",{className:"icon-btn",onClick:t,title:"Close File",id:"close-btn",children:_.jsx(or,{})})]})]}),_.jsx("div",{id:"markdown-content",className:"markdown-body",dangerouslySetInnerHTML:{__html:n}})]})},qn=()=>{const[l,e]=E.useState("light"),[t,n]=E.useState(null),[o,a]=E.useState(!1),r=E.useRef(null);E.useEffect(()=>{const g=localStorage.getItem("theme"),m=window.matchMedia("(prefers-color-scheme: dark)").matches;e(g||(m?"dark":"light"))},[]);const u=()=>{const g=l==="light"?"dark":"light";e(g),localStorage.setItem("theme",g)};E.useEffect(()=>{const g=r.current;if(!g)return;const m=()=>{g.scrollTop>300?a(!0):a(!1)};return g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)},[]);const c=()=>{r.current&&r.current.scrollTo({top:0,behavior:"smooth"})},x=g=>{n(g),r.current&&(r.current.scrollTop=0)},h=()=>{n(null);const g=new URL(window.location);g.searchParams.delete("url"),window.history.pushState({},"",g)};return E.useEffect(()=>{new URLSearchParams(window.location.search).get("url")},[]),_.jsxs("div",{className:"scripto-wrapper","data-theme":l,children:[_.jsxs("div",{className:"background-blobs",children:[_.jsx("div",{className:"blob blob-1"}),_.jsx("div",{className:"blob blob-2"}),_.jsx("div",{className:"blob blob-3"})]}),_.jsx("button",{id:"theme-toggle","aria-label":"Toggle Theme",onClick:u,children:l==="light"?_.jsx(pr,{}):_.jsx(ur,{})}),_.jsxs("main",{className:"app-container",ref:r,children:[_.jsxs("header",{className:"glass-header",children:[_.jsxs("div",{className:"logo",children:[_.jsx(lr,{}),_.jsxs("h1",{children:["Scr!p",_.jsx("span",{children:"tō"})]})]}),_.jsx("p",{children:"β€œSimple, elegant visualization β€” where every mark becomes meaning.”"})]}),t?_.jsx(xi,{content:t.content,filename:t.name,onClose:h}):_.jsx(dr,{onFileLoaded:x}),_.jsx("footer",{className:"app-footer",children:_.jsxs("p",{children:["🎯 App created by ",_.jsx("a",{href:"https://bio.link/shijoshaji",target:"_blank",rel:"noopener noreferrer",children:"Shijo Shaji"})]})})]}),_.jsx("button",{id:"scroll-top-btn","aria-label":"Scroll to Top",className:o?"visible":"",onClick:c,children:_.jsx(rr,{})})]})};j.Scripto=qn,j.default=qn,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});