rhua-chatgpt-web 1.0.98 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api_chain-wgmc7e6E.js → api_chain-6WuaFa6d.js} +2 -2
- package/dist/{api_chain-CB8GWGIU.cjs → api_chain-z7-hferR.cjs} +1 -1
- package/dist/{combine_docs_chain-DgONM3Mw.cjs → combine_docs_chain-CFAXRlyi.cjs} +1 -1
- package/dist/{combine_docs_chain-C4dphi5e.js → combine_docs_chain-CO7HVb4R.js} +2 -2
- package/dist/{few_shot-CAlLA7_Y.js → few_shot-D1fV7wmE.js} +1 -1
- package/dist/{few_shot-D1R-zNl7.cjs → few_shot-GynjP3JZ.cjs} +1 -1
- package/dist/{index-Bg5840_w.js → index-B3AeHb0J.js} +1 -1
- package/dist/{index-D6StpCel.cjs → index-BcePyLfy.cjs} +1 -1
- package/dist/{index-r3AjaSlS.cjs → index-BdHsAk36.cjs} +1 -1
- package/dist/index-BiyXJ5nZ.js +4 -0
- package/dist/{index-DWSafnCg.cjs → index-BjVIOIdk.cjs} +1 -1
- package/dist/index-C4FSTC-Y.js +4 -0
- package/dist/{index-DMb9FQJU.cjs → index-CFCSEDxn.cjs} +1 -1
- package/dist/{index-Dt6MdEi3.cjs → index-CMmMjajZ.cjs} +1 -1
- package/dist/{index-BN7_2Vpx.js → index-CYZSWzuu.js} +2 -2
- package/dist/{index-BbYqG4Lp.js → index-Cfz7TnCH.js} +192 -157
- package/dist/{index-CymPiKxB.js → index-D0o12JtU.js} +1 -1
- package/dist/{index-Bg42RK-4.js → index-DKYlRoiR.js} +2 -2
- package/dist/{index-D8gIJjM_.cjs → index-DL_ocleL.cjs} +1 -1
- package/dist/{index-CjSvTRsR.cjs → index-DaVkrct-.cjs} +1 -1
- package/dist/index-De7_kMn7.js +4 -0
- package/dist/{index-cTMOFBXD.cjs → index-Dift2gpr.cjs} +1 -1
- package/dist/{index-CI8OM2Jz.js → index-Dkq6Ss_h.js} +1 -1
- package/dist/{index-CjmBLRKu.cjs → index-DsPuml45.cjs} +3 -3
- package/dist/index-Gi2kGbCW.js +4 -0
- package/dist/{index-BekrpxaM.cjs → index-KDG7mz5O.cjs} +1 -1
- package/dist/{index-C1T2elxu.js → index-PRwtvON1.js} +1 -1
- package/dist/{index-DrDcayhM.js → index-gI4Ks2P3.js} +1 -1
- package/dist/{index-Cd_gRf5s.cjs → index-jr5i21r1.cjs} +1 -1
- package/dist/{index-CfwXktuP.cjs → index-oel1bTo0.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-67G0dUQ8.js → index.es-Fq7tEj25.js} +11 -11
- package/dist/{index.es-CtypdcdJ.cjs → index.es-QDwz4eEz.cjs} +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/{llm_chain-AXaQuXMt.js → llm_chain-5NVYgTDC.js} +1 -1
- package/dist/{llm_chain-RoYoMcLp.cjs → llm_chain-HMEylFLR.cjs} +1 -1
- package/dist/{sequential_chain-DVxvWiQQ.js → sequential_chain-B3aNFa_8.js} +1 -1
- package/dist/{sequential_chain-9yzJVjdz.cjs → sequential_chain-BIwygM6l.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{vector_db_qa-Ca-yXUO_.js → vector_db_qa-BlC0aeM2.js} +3 -3
- package/dist/{vector_db_qa-4lYMS_5X.cjs → vector_db_qa-C_vzGRYC.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-ASKx-pn3.js +0 -4
- package/dist/index-B-yz5nX2.js +0 -4
- package/dist/index-Ctbtl5KP.js +0 -4
- package/dist/index-Cuzto2LI.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as svg, D as html, E as webNamespaces, F as s, G as h, I as find, J as ok, V as VFile, K as VFileMessage } from "./index-
|
|
1
|
+
import { A as svg, D as html, E as webNamespaces, F as s, G as h, I as find, J as ok, V as VFile, K as VFileMessage } from "./index-Cfz7TnCH.js";
|
|
2
2
|
function location(file) {
|
|
3
3
|
const value = String(file);
|
|
4
4
|
const indices = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-
|
|
2
|
-
import { m as minifyWhitespace, p as phrasing$1 } from "./index-
|
|
1
|
+
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-Cfz7TnCH.js";
|
|
2
|
+
import { m as minifyWhitespace, p as phrasing$1 } from "./index-Dkq6Ss_h.js";
|
|
3
3
|
function rehypeMinifyWhitespace(options) {
|
|
4
4
|
return function(tree) {
|
|
5
5
|
minifyWhitespace(tree, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CjmBLRKu.cjs"),e=require("./index-CfwXktuP.cjs");function n(t){const e=String(t);let n=e.length;for(;n>0;){const t=e.codePointAt(n-1);if(void 0===t||10!==t&&13!==t)break;n--}return e.slice(0,n)}const r="language-";function i(e,i){const l=i.children;let o,c,s=-1;if("pre"===i.tagName)for(;++s<l.length;){const t=l[s];if("element"===t.type&&"code"===t.tagName&&t.properties&&t.properties.className&&Array.isArray(t.properties.className)){o=t.properties.className;break}}if(o)for(s=-1;++s<o.length;)if(String(o[s]).slice(0,9)===r){c=String(o[s]).slice(9);break}const a={type:"code",lang:c||null,meta:null,value:n(t.toText(i))};return e.patch(i,a),a}function l(t,e){const n={type:"delete",children:t.all(e)};return t.patch(e,n),n}function o(t){let e=-1;if(t.length>1)for(;++e<t.length;)if(t[e].spread)return!0;return!1}function c(t,e){const n=t.all({type:"root",children:e}),r=t.toSpecificContent(n,s);return 0===r.length?[]:1===r.length?r[0].children:[{type:"list",ordered:!1,start:null,spread:o(r),children:r}]}function s(){return{type:"listItem",spread:!1,checked:null,children:[]}}function a(t,e){const n={type:"emphasis",children:t.all(e)};return t.patch(e,n),n}function p(t){let e=0,n=t.length;for(;e<n&&"break"===t[e].type;)e++;for(;n>e&&"break"===t[n-1].type;)n--;return 0===e&&n===t.length?t:t.slice(e,n)}function u(t,e){const n={type:"heading",depth:Number(e.tagName.charAt(1))||1,children:p(t.all(e))};return t.patch(e,n),n}function h(t,e){const n=e.properties||{},r={type:"image",url:t.resolve(String(n.src||"")||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):""};return t.patch(e,r),r}function d(e,n){const r={type:"inlineCode",value:t.toText(n)};return e.patch(n,r),r}function f(e,n){const r=[],i=[],l=n||e.properties||{},o=g(e),c=Math.min(Number.parseInt(String(l.size),10),0)||(l.multiple?4:1);let s=-1;for(;++s<o.length;){const t=o[s];t&&t.properties&&t.properties.selected&&r.push(t)}const a=r.length>0?r:o,p=Math.min(a.length,c);for(s=-1;++s<p;){const e=a[s],n=e.properties||{},r=t.toText(e),l=r||String(n.label||""),o=String(n.value||"")||r;i.push([o,l===o?void 0:l])}return i}function g(t){const e=[];let n=-1;for(;++n<t.children.length;){const r=t.children[n];"children"in r&&Array.isArray(r.children)&&e.push(...g(r)),"element"!==r.type||"option"!==r.tagName||r.properties&&r.properties.disabled||e.push(r)}return e}function y(t,e){const{rest:n,checkbox:r}=b(e),i=r?Boolean(r.properties.checked):null,l={type:"listItem",spread:m(n),checked:i,children:t.toFlow(t.all(n))};return t.patch(e,l),l}function m(t){let n=-1,r=!1;for(;++n<t.children.length;){const i=t.children[n];if("element"===i.type){if(e.phrasing(i))continue;if("p"===i.tagName||r||m(i))return!0;r=!0}}return!1}function b(t){const e=t.children[0];if(e&&"element"===e.type&&"input"===e.tagName&&e.properties&&("checkbox"===e.properties.type||"radio"===e.properties.type)){return{checkbox:e,rest:{...t,children:t.children.slice(1)}}}if(e&&"element"===e.type&&"p"===e.tagName){const{checkbox:n,rest:r}=b(e);if(n){return{checkbox:n,rest:{...t,children:[r,...t.children.slice(1)]}}}}return{checkbox:void 0,rest:t}}function v(t,e){const n="ol"===e.tagName,r=t.toSpecificContent(t.all(e),S);let i=null;n&&(i=e.properties&&e.properties.start?Number.parseInt(String(e.properties.start),10):1);const l={type:"list",ordered:n,start:i,spread:o(r),children:r};return t.patch(e,l),l}function S(){return{type:"listItem",spread:!1,checked:null,children:[]}}function x(t){let e=-1;for(;++e<t.length;){const n=t[e];if(!w(n)||"children"in n&&x(n.children))return!0}return!1}function k(e){return T(e,function(e){return e.every(function(e){return"text"===e.type&&t.whitespace(e.value)})?[]:[{type:"paragraph",children:p(e)}]},function(t){return t})}function N(t){return T(t.children,function(e){const n=C(t);return n.children=e,[n]},function(e){if("children"in e&&"children"in t){const n=C(t),r=C(e);return n.children=e.children,r.children.push(n),r}return{...e}})}function T(t,e,n){const r=function(t){const e=[];let n=-1;for(;++n<t.length;){const r=t[n];"delete"!==r.type&&"link"!==r.type||!x(r.children)?e.push(r):e.push(...N(r))}return e}(t),i=[];let l=[],o=-1;for(;++o<r.length;){const t=r[o];w(t)?l.push(t):(l.length>0&&(i.push(...e(l)),l=[]),i.push(n(t)))}return l.length>0&&(i.push(...e(l)),l=[]),i}function w(n){const r=n.data&&n.data.hName;return r?e.phrasing({type:"element",tagName:r,properties:{},children:[]}):t.phrasing(n)}function C(e){return t.structuredClone({...e,children:[]})}function I(e,n){const r=n.properties||{},i="video"===n.tagName?String(r.poster||""):"";let l=String(r.src||""),o=-1,c=!1,s=e.all(n);const a={type:"root",children:s};if(t.visit(a,function(e){if("link"===e.type)return c=!0,t.EXIT}),c||x(s))return s;for(;!l&&++o<n.children.length;){const t=n.children[o];"element"===t.type&&"source"===t.tagName&&t.properties&&(l=String(t.properties.src||""))}if(i){const r={type:"image",title:null,url:e.resolve(i),alt:t.toString(s)};e.patch(n,r),s=[r]}const p=s,u={type:"link",title:r.title?String(r.title):null,url:e.resolve(l),children:p};return e.patch(n,u),u}function M(t,e){const n=p(t.all(e));if(n.length>0){const r={type:"paragraph",children:n};return t.patch(e,r),r}}const A=['"'];function U(t,e){const n={type:"strong",children:t.all(e)};return t.patch(e,n),n}function q(t,e){const n={type:"tableCell",children:t.all(e)};if(t.patch(e,n),e.properties){const t=e.properties.rowSpan,r=e.properties.colSpan;if(t||r){const e=n.data||(n.data={});t&&(e.hastUtilToMdastTemporaryRowSpan=t),r&&(e.hastUtilToMdastTemporaryColSpan=r)}}return n}function B(){return{type:"tableCell",children:[]}}function R(){return{type:"tableCell",children:[]}}function j(){return{type:"tableRow",children:[]}}const F={comment:function(t,e){const n={type:"html",value:"\x3c!--"+e.value+"--\x3e"};return t.patch(e,n),n},doctype:O,root:function(t,e){let n=t.all(e);(t.options.document||x(n))&&(n=k(n));const r={type:"root",children:n};return t.patch(e,r),r},text:function(t,e){const n={type:"text",value:e.value};return t.patch(e,n),n}},z={applet:O,area:O,basefont:O,bgsound:O,caption:O,col:O,colgroup:O,command:O,content:O,datalist:O,dialog:O,element:O,embed:O,frame:O,frameset:O,isindex:O,keygen:O,link:O,math:O,menu:O,menuitem:O,meta:O,nextid:O,noembed:O,noframes:O,optgroup:O,option:O,param:O,script:O,shadow:O,source:O,spacer:O,style:O,svg:O,template:O,title:O,track:O,abbr:H,acronym:H,bdi:H,bdo:H,big:H,blink:H,button:H,canvas:H,cite:H,data:H,details:H,dfn:H,font:H,ins:H,label:H,map:H,marquee:H,meter:H,nobr:H,noscript:H,object:H,output:H,progress:H,rb:H,rbc:H,rp:H,rt:H,rtc:H,ruby:H,slot:H,small:H,span:H,sup:H,sub:H,tbody:H,tfoot:H,thead:H,time:H,address:P,article:P,aside:P,body:P,center:P,div:P,fieldset:P,figcaption:P,figure:P,form:P,footer:P,header:P,hgroup:P,html:P,legend:P,main:P,multicol:P,nav:P,picture:P,section:P,a:function(t,e){const n=e.properties||{},r=t.all(e),i={type:"link",url:t.resolve(String(n.href||"")||null),title:n.title?String(n.title):null,children:r};return t.patch(e,i),i},audio:I,b:U,base:function(t,e){t.baseFound||(t.frozenBaseUrl=String(e.properties&&e.properties.href||"")||void 0,t.baseFound=!0)},blockquote:function(t,e){const n={type:"blockquote",children:t.toFlow(t.all(e))};return t.patch(e,n),n},br:function(t,e){const n={type:"break"};return t.patch(e,n),n},code:d,dir:v,dl:function(t,e){const n=[],r=[];let i=-1;for(;++i<e.children.length;){const t=e.children[i];"element"===t.type&&"div"===t.tagName?n.push(...t.children):n.push(t)}let l={definitions:[],titles:[]};for(i=-1;++i<n.length;){const t=n[i];if("element"===t.type&&"dt"===t.tagName){const e=n[i-1];e&&"element"===e.type&&"dd"===e.tagName&&(r.push(l),l={definitions:[],titles:[]}),l.titles.push(t)}else l.definitions.push(t)}r.push(l),i=-1;const s=[];for(;++i<r.length;){const e=[...c(t,r[i].titles),...c(t,r[i].definitions)];e.length>0&&s.push({type:"listItem",spread:e.length>1,checked:null,children:e})}if(s.length>0){const n={type:"list",ordered:!1,start:null,spread:o(s),children:s};return t.patch(e,n),n}},dt:y,dd:y,del:l,em:a,h1:u,h2:u,h3:u,h4:u,h5:u,h6:u,hr:function(t,e){const n={type:"thematicBreak"};return t.patch(e,n),n},i:a,iframe:function(t,e){const n=e.properties||{},r=String(n.src||""),i=String(n.title||"");if(r&&i){const n={type:"link",title:null,url:t.resolve(r),children:[{type:"text",value:i}]};return t.patch(e,n),n}},img:h,image:h,input:function(t,e){const n=e.properties||{},r=String(n.value||n.placeholder||"");if(n.disabled||"hidden"===n.type||"file"===n.type)return;if("checkbox"===n.type||"radio"===n.type){const r={type:"text",value:n.checked?t.options.checked||"[x]":t.options.unchecked||"[ ]"};return t.patch(e,r),r}if("image"===n.type){const i=n.alt||r;if(i){const r={type:"image",url:t.resolve(String(n.src||"")||null),title:String(n.title||"")||null,alt:String(i)};return t.patch(e,r),r}return}let i=[];if(r)i=[[r,void 0]];else if("button"!==n.type&&"file"!==n.type&&"password"!==n.type&&"reset"!==n.type&&"submit"!==n.type&&n.list){const e=String(n.list),r=t.elementById.get(e);r&&"datalist"===r.tagName&&(i=f(r,n))}if(0===i.length)return;if("password"===n.type&&(i[0]=["•".repeat(i[0][0].length),void 0]),"email"===n.type||"url"===n.type){const e=[];let r=-1;for(;++r<i.length;){const l=t.resolve(i[r][0]),o={type:"link",title:null,url:"email"===n.type?"mailto:"+l:l,children:[{type:"text",value:i[r][1]||l}]};e.push(o),r!==i.length-1&&e.push({type:"text",value:", "})}return e}const l=[];let o=-1;for(;++o<i.length;)l.push(i[o][1]?i[o][1]+" ("+i[o][0]+")":i[o][0]);const c={type:"text",value:l.join(", ")};return t.patch(e,c),c},kbd:d,li:y,listing:i,mark:a,ol:v,p:M,plaintext:i,pre:i,q:function(t,e){const n=t.options.quotes||A;t.qNesting++;const r=t.all(e);t.qNesting--;const i=n[t.qNesting%n.length],l=r[0],o=r[r.length-1],c=i.charAt(0),s=i.length>1?i.charAt(1):i;return l&&"text"===l.type?l.value=c+l.value:r.unshift({type:"text",value:c}),o&&"text"===o.type?o.value+=s:r.push({type:"text",value:s}),r},s:l,samp:d,select:function(t,e){const n=f(e);let r=-1;const i=[];for(;++r<n.length;){const t=n[r];i.push(t[1]?t[1]+" ("+t[0]+")":t[0])}if(i.length>0){const n={type:"text",value:i.join(", ")};return t.patch(e,n),n}},strike:l,strong:U,summary:M,table:function(e,n){if(e.inTable){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r}e.inTable=!0;const{align:r,headless:i}=function(e){const n={align:[null],headless:!0};let r=0,i=0;return t.visit(e,function(l){if("element"===l.type){if("table"===l.tagName&&e!==l)return t.SKIP;if("th"!==l.tagName&&"td"!==l.tagName||!l.properties)"thead"===l.tagName?n.headless=!1:"tr"===l.tagName&&(r++,i=0);else{if(!n.align[i]){const t=String(l.properties.align||"")||null;"center"!==t&&"left"!==t&&"right"!==t&&null!==t||(n.align[i]=t)}n.headless&&r<2&&"th"===l.tagName&&(n.headless=!1),i++}}}),n}(n),l=e.toSpecificContent(e.all(n),j);i&&l.unshift({type:"tableRow",children:[]});let o=-1;for(;++o<l.length;){const t=l[o],n=e.toSpecificContent(t.children,R);t.children=n}let c=1;for(o=-1;++o<l.length;){const t=l[o].children;let e=-1;for(;++e<t.length;){const n=t[e];if(n.data){const t=n.data,r=Number.parseInt(String(t.hastUtilToMdastTemporaryColSpan),10)||1,i=Number.parseInt(String(t.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||i>1){let t=o-1;for(;++t<o+i;){let n=e-1;for(;++n<e+r&&l[t];){const r=[];t===o&&n===e||r.push({type:"tableCell",children:[]}),l[t].children.splice(n,0,...r)}}}"hastUtilToMdastTemporaryColSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,"hastUtilToMdastTemporaryRowSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,0===Object.keys(n.data).length&&delete n.data}}t.length>c&&(c=t.length)}for(o=-1;++o<l.length;){const t=l[o].children;let e=t.length-1;for(;++e<c;)t.push({type:"tableCell",children:[]})}let s=r.length-1;for(;++s<c;)r.push(null);e.inTable=!1;const a={type:"table",align:r,children:l};return e.patch(n,a),a},td:q,textarea:function(e,n){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r},th:q,tr:function(t,e){const n={type:"tableRow",children:t.toSpecificContent(t.all(e),B)};return t.patch(e,n),n},tt:d,u:a,ul:v,var:d,video:I,wbr:function(t,e){const n={type:"text",value:""};return t.patch(e,n),n},xmp:i};function H(t,e){return t.all(e)}function P(t,e){return t.toFlow(t.all(e))}function O(){}const $={}.hasOwnProperty;function E(t){const e=t.children||[],n=[];let r=-1;for(;++r<e.length;){const i=e[r],l=this.one(i,t);Array.isArray(l)?n.push(...l):l&&n.push(l)}return n}function K(t,e){if("element"===t.type){if(t.properties&&"ignore"===t.properties.dataMdast)return;if($.call(this.handlers,t.tagName))return this.handlers[t.tagName](this,t,e)||void 0}else if($.call(this.nodeHandlers,t.type))return this.nodeHandlers[t.type](this,t,e)||void 0;if("value"in t&&"string"==typeof t.value){const e={type:"text",value:t.value};return this.patch(t,e),e}if("children"in t)return this.all(t)}function L(e,n){e.position&&(n.position=t.position(e))}function W(t){const e=this.frozenBaseUrl;return null==t?"":e?String(new URL(t,e)):t}function X(t){return k(t)}function D(t,e){const n=e(),r=[];let i=[],l=-1;for(;++l<t.length;){const e=t[l];if(o(e))i.length>0&&(e.children.unshift(...i),i=[]),r.push(e);else{const t=e;i.push(t)}}if(i.length>0){let t=r[r.length-1];t||(t=e(),r.push(t)),t.children.push(...i),i=[]}return r;function o(t){return t.type===n.type}}const G={};function J(n,r){const i=t.structuredClone(n),l=r||G,o=function(t){return function(n){e.minifyWhitespace(n,t)}}({newlines:!0===l.newlines}),c=function(t){return{all:E,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...z,...t.handlers},inTable:!1,nodeHandlers:{...F,...t.nodeHandlers},one:K,options:t,patch:L,qNesting:0,resolve:W,toFlow:X,toSpecificContent:D}}(l);let s;o(i),t.visit(i,function(t){if(t&&"element"===t.type&&t.properties){const e=String(t.properties.id||"")||void 0;e&&!c.elementById.has(e)&&c.elementById.set(e,t)}});const a=c.one(i,void 0);if(a)if(Array.isArray(a)){s={type:"root",children:a}}else s=a;else s={type:"root",children:[]};return t.visit(s,function(t,e,n){if("text"===t.type&&void 0!==e&&n){const r=n.children[e-1];if(r&&r.type===t.type)return r.value+=t.value,n.children.splice(e,1),r.position&&t.position&&(r.position.end=t.position.end),e-1;if(t.value=t.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,"$1"),!n||"heading"!==n.type&&"paragraph"!==n.type&&"root"!==n.type||(e||(t.value=t.value.replace(/^[\t ]+/,"")),e===n.children.length-1&&(t.value=t.value.replace(/[\t ]+$/,""))),!t.value)return n.children.splice(e,1),e}}),s}const Q={document:!0};exports.default=function(t,e){return t&&"run"in t?async function(n,r){const i=J(n,{...Q,...e});await t.run(i,r)}:function(e){return J(e,{...Q,...t})}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DsPuml45.cjs"),e=require("./index-oel1bTo0.cjs");function n(t){const e=String(t);let n=e.length;for(;n>0;){const t=e.codePointAt(n-1);if(void 0===t||10!==t&&13!==t)break;n--}return e.slice(0,n)}const r="language-";function i(e,i){const l=i.children;let o,c,s=-1;if("pre"===i.tagName)for(;++s<l.length;){const t=l[s];if("element"===t.type&&"code"===t.tagName&&t.properties&&t.properties.className&&Array.isArray(t.properties.className)){o=t.properties.className;break}}if(o)for(s=-1;++s<o.length;)if(String(o[s]).slice(0,9)===r){c=String(o[s]).slice(9);break}const a={type:"code",lang:c||null,meta:null,value:n(t.toText(i))};return e.patch(i,a),a}function l(t,e){const n={type:"delete",children:t.all(e)};return t.patch(e,n),n}function o(t){let e=-1;if(t.length>1)for(;++e<t.length;)if(t[e].spread)return!0;return!1}function c(t,e){const n=t.all({type:"root",children:e}),r=t.toSpecificContent(n,s);return 0===r.length?[]:1===r.length?r[0].children:[{type:"list",ordered:!1,start:null,spread:o(r),children:r}]}function s(){return{type:"listItem",spread:!1,checked:null,children:[]}}function a(t,e){const n={type:"emphasis",children:t.all(e)};return t.patch(e,n),n}function p(t){let e=0,n=t.length;for(;e<n&&"break"===t[e].type;)e++;for(;n>e&&"break"===t[n-1].type;)n--;return 0===e&&n===t.length?t:t.slice(e,n)}function u(t,e){const n={type:"heading",depth:Number(e.tagName.charAt(1))||1,children:p(t.all(e))};return t.patch(e,n),n}function h(t,e){const n=e.properties||{},r={type:"image",url:t.resolve(String(n.src||"")||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):""};return t.patch(e,r),r}function d(e,n){const r={type:"inlineCode",value:t.toText(n)};return e.patch(n,r),r}function f(e,n){const r=[],i=[],l=n||e.properties||{},o=g(e),c=Math.min(Number.parseInt(String(l.size),10),0)||(l.multiple?4:1);let s=-1;for(;++s<o.length;){const t=o[s];t&&t.properties&&t.properties.selected&&r.push(t)}const a=r.length>0?r:o,p=Math.min(a.length,c);for(s=-1;++s<p;){const e=a[s],n=e.properties||{},r=t.toText(e),l=r||String(n.label||""),o=String(n.value||"")||r;i.push([o,l===o?void 0:l])}return i}function g(t){const e=[];let n=-1;for(;++n<t.children.length;){const r=t.children[n];"children"in r&&Array.isArray(r.children)&&e.push(...g(r)),"element"!==r.type||"option"!==r.tagName||r.properties&&r.properties.disabled||e.push(r)}return e}function y(t,e){const{rest:n,checkbox:r}=b(e),i=r?Boolean(r.properties.checked):null,l={type:"listItem",spread:m(n),checked:i,children:t.toFlow(t.all(n))};return t.patch(e,l),l}function m(t){let n=-1,r=!1;for(;++n<t.children.length;){const i=t.children[n];if("element"===i.type){if(e.phrasing(i))continue;if("p"===i.tagName||r||m(i))return!0;r=!0}}return!1}function b(t){const e=t.children[0];if(e&&"element"===e.type&&"input"===e.tagName&&e.properties&&("checkbox"===e.properties.type||"radio"===e.properties.type)){return{checkbox:e,rest:{...t,children:t.children.slice(1)}}}if(e&&"element"===e.type&&"p"===e.tagName){const{checkbox:n,rest:r}=b(e);if(n){return{checkbox:n,rest:{...t,children:[r,...t.children.slice(1)]}}}}return{checkbox:void 0,rest:t}}function v(t,e){const n="ol"===e.tagName,r=t.toSpecificContent(t.all(e),S);let i=null;n&&(i=e.properties&&e.properties.start?Number.parseInt(String(e.properties.start),10):1);const l={type:"list",ordered:n,start:i,spread:o(r),children:r};return t.patch(e,l),l}function S(){return{type:"listItem",spread:!1,checked:null,children:[]}}function x(t){let e=-1;for(;++e<t.length;){const n=t[e];if(!w(n)||"children"in n&&x(n.children))return!0}return!1}function k(e){return T(e,function(e){return e.every(function(e){return"text"===e.type&&t.whitespace(e.value)})?[]:[{type:"paragraph",children:p(e)}]},function(t){return t})}function N(t){return T(t.children,function(e){const n=C(t);return n.children=e,[n]},function(e){if("children"in e&&"children"in t){const n=C(t),r=C(e);return n.children=e.children,r.children.push(n),r}return{...e}})}function T(t,e,n){const r=function(t){const e=[];let n=-1;for(;++n<t.length;){const r=t[n];"delete"!==r.type&&"link"!==r.type||!x(r.children)?e.push(r):e.push(...N(r))}return e}(t),i=[];let l=[],o=-1;for(;++o<r.length;){const t=r[o];w(t)?l.push(t):(l.length>0&&(i.push(...e(l)),l=[]),i.push(n(t)))}return l.length>0&&(i.push(...e(l)),l=[]),i}function w(n){const r=n.data&&n.data.hName;return r?e.phrasing({type:"element",tagName:r,properties:{},children:[]}):t.phrasing(n)}function C(e){return t.structuredClone({...e,children:[]})}function I(e,n){const r=n.properties||{},i="video"===n.tagName?String(r.poster||""):"";let l=String(r.src||""),o=-1,c=!1,s=e.all(n);const a={type:"root",children:s};if(t.visit(a,function(e){if("link"===e.type)return c=!0,t.EXIT}),c||x(s))return s;for(;!l&&++o<n.children.length;){const t=n.children[o];"element"===t.type&&"source"===t.tagName&&t.properties&&(l=String(t.properties.src||""))}if(i){const r={type:"image",title:null,url:e.resolve(i),alt:t.toString(s)};e.patch(n,r),s=[r]}const p=s,u={type:"link",title:r.title?String(r.title):null,url:e.resolve(l),children:p};return e.patch(n,u),u}function M(t,e){const n=p(t.all(e));if(n.length>0){const r={type:"paragraph",children:n};return t.patch(e,r),r}}const A=['"'];function U(t,e){const n={type:"strong",children:t.all(e)};return t.patch(e,n),n}function q(t,e){const n={type:"tableCell",children:t.all(e)};if(t.patch(e,n),e.properties){const t=e.properties.rowSpan,r=e.properties.colSpan;if(t||r){const e=n.data||(n.data={});t&&(e.hastUtilToMdastTemporaryRowSpan=t),r&&(e.hastUtilToMdastTemporaryColSpan=r)}}return n}function B(){return{type:"tableCell",children:[]}}function R(){return{type:"tableCell",children:[]}}function j(){return{type:"tableRow",children:[]}}const F={comment:function(t,e){const n={type:"html",value:"\x3c!--"+e.value+"--\x3e"};return t.patch(e,n),n},doctype:O,root:function(t,e){let n=t.all(e);(t.options.document||x(n))&&(n=k(n));const r={type:"root",children:n};return t.patch(e,r),r},text:function(t,e){const n={type:"text",value:e.value};return t.patch(e,n),n}},z={applet:O,area:O,basefont:O,bgsound:O,caption:O,col:O,colgroup:O,command:O,content:O,datalist:O,dialog:O,element:O,embed:O,frame:O,frameset:O,isindex:O,keygen:O,link:O,math:O,menu:O,menuitem:O,meta:O,nextid:O,noembed:O,noframes:O,optgroup:O,option:O,param:O,script:O,shadow:O,source:O,spacer:O,style:O,svg:O,template:O,title:O,track:O,abbr:H,acronym:H,bdi:H,bdo:H,big:H,blink:H,button:H,canvas:H,cite:H,data:H,details:H,dfn:H,font:H,ins:H,label:H,map:H,marquee:H,meter:H,nobr:H,noscript:H,object:H,output:H,progress:H,rb:H,rbc:H,rp:H,rt:H,rtc:H,ruby:H,slot:H,small:H,span:H,sup:H,sub:H,tbody:H,tfoot:H,thead:H,time:H,address:P,article:P,aside:P,body:P,center:P,div:P,fieldset:P,figcaption:P,figure:P,form:P,footer:P,header:P,hgroup:P,html:P,legend:P,main:P,multicol:P,nav:P,picture:P,section:P,a:function(t,e){const n=e.properties||{},r=t.all(e),i={type:"link",url:t.resolve(String(n.href||"")||null),title:n.title?String(n.title):null,children:r};return t.patch(e,i),i},audio:I,b:U,base:function(t,e){t.baseFound||(t.frozenBaseUrl=String(e.properties&&e.properties.href||"")||void 0,t.baseFound=!0)},blockquote:function(t,e){const n={type:"blockquote",children:t.toFlow(t.all(e))};return t.patch(e,n),n},br:function(t,e){const n={type:"break"};return t.patch(e,n),n},code:d,dir:v,dl:function(t,e){const n=[],r=[];let i=-1;for(;++i<e.children.length;){const t=e.children[i];"element"===t.type&&"div"===t.tagName?n.push(...t.children):n.push(t)}let l={definitions:[],titles:[]};for(i=-1;++i<n.length;){const t=n[i];if("element"===t.type&&"dt"===t.tagName){const e=n[i-1];e&&"element"===e.type&&"dd"===e.tagName&&(r.push(l),l={definitions:[],titles:[]}),l.titles.push(t)}else l.definitions.push(t)}r.push(l),i=-1;const s=[];for(;++i<r.length;){const e=[...c(t,r[i].titles),...c(t,r[i].definitions)];e.length>0&&s.push({type:"listItem",spread:e.length>1,checked:null,children:e})}if(s.length>0){const n={type:"list",ordered:!1,start:null,spread:o(s),children:s};return t.patch(e,n),n}},dt:y,dd:y,del:l,em:a,h1:u,h2:u,h3:u,h4:u,h5:u,h6:u,hr:function(t,e){const n={type:"thematicBreak"};return t.patch(e,n),n},i:a,iframe:function(t,e){const n=e.properties||{},r=String(n.src||""),i=String(n.title||"");if(r&&i){const n={type:"link",title:null,url:t.resolve(r),children:[{type:"text",value:i}]};return t.patch(e,n),n}},img:h,image:h,input:function(t,e){const n=e.properties||{},r=String(n.value||n.placeholder||"");if(n.disabled||"hidden"===n.type||"file"===n.type)return;if("checkbox"===n.type||"radio"===n.type){const r={type:"text",value:n.checked?t.options.checked||"[x]":t.options.unchecked||"[ ]"};return t.patch(e,r),r}if("image"===n.type){const i=n.alt||r;if(i){const r={type:"image",url:t.resolve(String(n.src||"")||null),title:String(n.title||"")||null,alt:String(i)};return t.patch(e,r),r}return}let i=[];if(r)i=[[r,void 0]];else if("button"!==n.type&&"file"!==n.type&&"password"!==n.type&&"reset"!==n.type&&"submit"!==n.type&&n.list){const e=String(n.list),r=t.elementById.get(e);r&&"datalist"===r.tagName&&(i=f(r,n))}if(0===i.length)return;if("password"===n.type&&(i[0]=["•".repeat(i[0][0].length),void 0]),"email"===n.type||"url"===n.type){const e=[];let r=-1;for(;++r<i.length;){const l=t.resolve(i[r][0]),o={type:"link",title:null,url:"email"===n.type?"mailto:"+l:l,children:[{type:"text",value:i[r][1]||l}]};e.push(o),r!==i.length-1&&e.push({type:"text",value:", "})}return e}const l=[];let o=-1;for(;++o<i.length;)l.push(i[o][1]?i[o][1]+" ("+i[o][0]+")":i[o][0]);const c={type:"text",value:l.join(", ")};return t.patch(e,c),c},kbd:d,li:y,listing:i,mark:a,ol:v,p:M,plaintext:i,pre:i,q:function(t,e){const n=t.options.quotes||A;t.qNesting++;const r=t.all(e);t.qNesting--;const i=n[t.qNesting%n.length],l=r[0],o=r[r.length-1],c=i.charAt(0),s=i.length>1?i.charAt(1):i;return l&&"text"===l.type?l.value=c+l.value:r.unshift({type:"text",value:c}),o&&"text"===o.type?o.value+=s:r.push({type:"text",value:s}),r},s:l,samp:d,select:function(t,e){const n=f(e);let r=-1;const i=[];for(;++r<n.length;){const t=n[r];i.push(t[1]?t[1]+" ("+t[0]+")":t[0])}if(i.length>0){const n={type:"text",value:i.join(", ")};return t.patch(e,n),n}},strike:l,strong:U,summary:M,table:function(e,n){if(e.inTable){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r}e.inTable=!0;const{align:r,headless:i}=function(e){const n={align:[null],headless:!0};let r=0,i=0;return t.visit(e,function(l){if("element"===l.type){if("table"===l.tagName&&e!==l)return t.SKIP;if("th"!==l.tagName&&"td"!==l.tagName||!l.properties)"thead"===l.tagName?n.headless=!1:"tr"===l.tagName&&(r++,i=0);else{if(!n.align[i]){const t=String(l.properties.align||"")||null;"center"!==t&&"left"!==t&&"right"!==t&&null!==t||(n.align[i]=t)}n.headless&&r<2&&"th"===l.tagName&&(n.headless=!1),i++}}}),n}(n),l=e.toSpecificContent(e.all(n),j);i&&l.unshift({type:"tableRow",children:[]});let o=-1;for(;++o<l.length;){const t=l[o],n=e.toSpecificContent(t.children,R);t.children=n}let c=1;for(o=-1;++o<l.length;){const t=l[o].children;let e=-1;for(;++e<t.length;){const n=t[e];if(n.data){const t=n.data,r=Number.parseInt(String(t.hastUtilToMdastTemporaryColSpan),10)||1,i=Number.parseInt(String(t.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||i>1){let t=o-1;for(;++t<o+i;){let n=e-1;for(;++n<e+r&&l[t];){const r=[];t===o&&n===e||r.push({type:"tableCell",children:[]}),l[t].children.splice(n,0,...r)}}}"hastUtilToMdastTemporaryColSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,"hastUtilToMdastTemporaryRowSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,0===Object.keys(n.data).length&&delete n.data}}t.length>c&&(c=t.length)}for(o=-1;++o<l.length;){const t=l[o].children;let e=t.length-1;for(;++e<c;)t.push({type:"tableCell",children:[]})}let s=r.length-1;for(;++s<c;)r.push(null);e.inTable=!1;const a={type:"table",align:r,children:l};return e.patch(n,a),a},td:q,textarea:function(e,n){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r},th:q,tr:function(t,e){const n={type:"tableRow",children:t.toSpecificContent(t.all(e),B)};return t.patch(e,n),n},tt:d,u:a,ul:v,var:d,video:I,wbr:function(t,e){const n={type:"text",value:""};return t.patch(e,n),n},xmp:i};function H(t,e){return t.all(e)}function P(t,e){return t.toFlow(t.all(e))}function O(){}const $={}.hasOwnProperty;function E(t){const e=t.children||[],n=[];let r=-1;for(;++r<e.length;){const i=e[r],l=this.one(i,t);Array.isArray(l)?n.push(...l):l&&n.push(l)}return n}function K(t,e){if("element"===t.type){if(t.properties&&"ignore"===t.properties.dataMdast)return;if($.call(this.handlers,t.tagName))return this.handlers[t.tagName](this,t,e)||void 0}else if($.call(this.nodeHandlers,t.type))return this.nodeHandlers[t.type](this,t,e)||void 0;if("value"in t&&"string"==typeof t.value){const e={type:"text",value:t.value};return this.patch(t,e),e}if("children"in t)return this.all(t)}function L(e,n){e.position&&(n.position=t.position(e))}function W(t){const e=this.frozenBaseUrl;return null==t?"":e?String(new URL(t,e)):t}function X(t){return k(t)}function D(t,e){const n=e(),r=[];let i=[],l=-1;for(;++l<t.length;){const e=t[l];if(o(e))i.length>0&&(e.children.unshift(...i),i=[]),r.push(e);else{const t=e;i.push(t)}}if(i.length>0){let t=r[r.length-1];t||(t=e(),r.push(t)),t.children.push(...i),i=[]}return r;function o(t){return t.type===n.type}}const G={};function J(n,r){const i=t.structuredClone(n),l=r||G,o=function(t){return function(n){e.minifyWhitespace(n,t)}}({newlines:!0===l.newlines}),c=function(t){return{all:E,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...z,...t.handlers},inTable:!1,nodeHandlers:{...F,...t.nodeHandlers},one:K,options:t,patch:L,qNesting:0,resolve:W,toFlow:X,toSpecificContent:D}}(l);let s;o(i),t.visit(i,function(t){if(t&&"element"===t.type&&t.properties){const e=String(t.properties.id||"")||void 0;e&&!c.elementById.has(e)&&c.elementById.set(e,t)}});const a=c.one(i,void 0);if(a)if(Array.isArray(a)){s={type:"root",children:a}}else s=a;else s={type:"root",children:[]};return t.visit(s,function(t,e,n){if("text"===t.type&&void 0!==e&&n){const r=n.children[e-1];if(r&&r.type===t.type)return r.value+=t.value,n.children.splice(e,1),r.position&&t.position&&(r.position.end=t.position.end),e-1;if(t.value=t.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,"$1"),!n||"heading"!==n.type&&"paragraph"!==n.type&&"root"!==n.type||(e||(t.value=t.value.replace(/^[\t ]+/,"")),e===n.children.length-1&&(t.value=t.value.replace(/[\t ]+$/,""))),!t.value)return n.children.splice(e,1),e}}),s}const Q={document:!0};exports.default=function(t,e){return t&&"run"in t?async function(n,r){const i=J(n,{...Q,...e});await t.run(i,r)}:function(e){return J(e,{...Q,...t})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DsPuml45.cjs");exports.unified=e.unified;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-2yo2kUGy.cjs"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-2yo2kUGy.cjs"),t=require("./index-DsPuml45.cjs"),n={}.hasOwnProperty;function r(e,t){let o,i=-1;if(t.extensions)for(;++i<t.extensions.length;)r(e,t.extensions[i]);for(o in t)if(n.call(t,o))switch(o){case"extensions":break;case"unsafe":case"join":c(e[o],t[o]);break;case"handlers":a(e[o],t[o]);break;default:e.options[o]=t[o]}return e}function c(e,t){t&&e.push(...t)}function a(e,t){t&&Object.assign(e,t)}const o=[function(e,n,r,c){if("code"===n.type&&t.formatCodeAsIndented(n,c)&&("list"===e.type||e.type===n.type&&t.formatCodeAsIndented(e,c)))return!1;if("spread"in r&&"boolean"==typeof r.spread){if("paragraph"===e.type&&(e.type===n.type||"definition"===n.type||"heading"===n.type&&t.formatHeadingAsSetext(n,c)))return;return r.spread?1:0}}];const i=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],s=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:i},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:i},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:i},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"~"}];function h(e){return e.label||!e.identifier?e.label||"":t.decodeString(e.identifier)}function u(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function f(e,t,n,r){let c=r.join.length;for(;c--;){const a=r.join[c](e,t,n,r);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const l=/\r?\n|\r/g;function d(e,t){const n=[];let r,c=0,a=0;for(;r=l.exec(e);)o(e.slice(c,r.index)),n.push(r[0]),c=r.index+r[0].length,a++;return o(e.slice(c)),n.join("");function o(e){n.push(t(e,a,!e))}}function p(e,t){return e-t}function g(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],c=[],a=e+t;let o,i=-1,s=0;for(;o=n.exec(a);)r.push(o.index);for(;++i<r.length;)s!==r[i]&&c.push(e.slice(s,r[i])),c.push("\\"),s=r[i];return c.push(e.slice(s)),c.join("")}function C(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,c=n.line||1,a=n.column||1;return{move:function(e){const t=e||"",n=t.split(/\r?\n|\r/g),o=n[n.length-1];return c+=n.length-1,a=1===n.length?a+o.length:1+o.length+r,t},current:function(){return{now:{line:c,column:a},lineShift:r}},shift:function(e){r+=e}}}function b(n,c){const a=c||{},i={associationId:h,containerPhrasing:y,containerFlow:v,createTracker:C,compilePattern:u,enter:function(e){return i.stack.push(e),function(){i.stack.pop()}},handlers:{...t.handle},handle:void 0,indentLines:d,indexStack:[],join:[...o],options:{},safe:m,stack:[],unsafe:[...s]};r(i,a),i.options.tightDefinitions&&i.join.push(A),i.handle=e.zwitch("type",{invalid:k,unknown:x,handlers:i.handlers});let f=i.handle(n,void 0,i,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return f&&10!==f.charCodeAt(f.length-1)&&13!==f.charCodeAt(f.length-1)&&(f+="\n"),f}function k(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function x(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function A(e,t){if("definition"===e.type&&e.type===t.type)return 0}function y(e,n){return function(e,n,r){const c=n.indexStack,a=e.children||[],o=[];let i,s=-1,h=r.before;c.push(-1);let u=n.createTracker(r);for(;++s<a.length;){const f=a[s];let l;if(c[c.length-1]=s,s+1<a.length){let t=n.handle.handlers[a[s+1].type];t&&t.peek&&(t=t.peek),l=t?t(a[s+1],e,n,{before:"",after:"",...u.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===h||"\n"===h)&&"html"===f.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),h=" ",u=n.createTracker(r),u.move(o.join("")));let d=n.handle(f,e,n,{...u.current(),after:l,before:h});i&&i===d.slice(0,1)&&(d=t.encodeCharacterReference(i.charCodeAt(0))+d.slice(1));const p=n.attentionEncodeSurroundingInfo;n.attentionEncodeSurroundingInfo=void 0,i=void 0,p&&(o.length>0&&p.before&&h===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+t.encodeCharacterReference(h.charCodeAt(0))),p.after&&(i=l)),u.move(d),o.push(d),h=d.slice(-1)}return c.pop(),o.join("")}(e,this,n)}function v(e,t){return function(e,t,n){const r=t.indexStack,c=e.children||[],a=t.createTracker(n),o=[];let i=-1;for(r.push(-1);++i<c.length;){const n=c[i];r[r.length-1]=i,o.push(a.move(t.handle(n,e,t,{before:"\n",after:"\n",...a.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),i<c.length-1&&o.push(a.move(f(n,c[i+1],e,t)))}return r.pop(),o.join("")}(e,this,t)}function m(e,n){return function(e,n,r){const c=(r.before||"")+(n||"")+(r.after||""),a=[],o=[],i={};let s=-1;for(;++s<e.unsafe.length;){const n=e.unsafe[s];if(!t.patternInScope(e.stack,n))continue;const r=e.compilePattern(n);let o;for(;o=r.exec(c);){const e="before"in n||Boolean(n.atBreak),t="after"in n,r=o.index+(e?o[1].length:0);a.includes(r)?(i[r].before&&!e&&(i[r].before=!1),i[r].after&&!t&&(i[r].after=!1)):(a.push(r),i[r]={before:e,after:t})}}a.sort(p);let h=r.before?r.before.length:0;const u=c.length-(r.after?r.after.length:0);for(s=-1;++s<a.length;){const e=a[s];e<h||e>=u||e+1<u&&a[s+1]===e+1&&i[e].after&&!i[e+1].before&&!i[e+1].after||a[s-1]===e-1&&i[e].before&&!i[e-1].before&&!i[e-1].after||(h!==e&&o.push(g(c.slice(h,e),"\\")),h=e,!/[!-/:-@[-`{-~]/.test(c.charAt(e))||r.encode&&r.encode.includes(c.charAt(e))?(o.push(t.encodeCharacterReference(c.charCodeAt(e))),h++):o.push("\\"))}return o.push(g(c.slice(h,u),r.after)),o.join("")}(this,e,n)}exports.default=function(e){const t=this;t.compiler=function(n){return b(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-
|
|
1
|
+
import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-Cfz7TnCH.js";
|
|
2
2
|
const embedded = convertElement(
|
|
3
3
|
/**
|
|
4
4
|
* @param element
|