@rudderhq/server 0.3.5 → 0.3.6-canary.1
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/bootstrap/register-api-routes.d.ts.map +1 -1
- package/dist/bootstrap/register-api-routes.js +2 -0
- package/dist/bootstrap/register-api-routes.js.map +1 -1
- package/dist/bundled-plugins/plugin-linear/dist/worker.js +46 -0
- package/dist/bundled-plugins/plugin-linear/dist/worker.js.map +2 -2
- package/dist/routes/chats.d.ts.map +1 -1
- package/dist/routes/chats.js +10 -5
- package/dist/routes/chats.js.map +1 -1
- package/dist/routes/costs.d.ts.map +1 -1
- package/dist/routes/costs.js +8 -0
- package/dist/routes/costs.js.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/integrations.d.ts +3 -0
- package/dist/routes/integrations.d.ts.map +1 -0
- package/dist/routes/integrations.js +30 -0
- package/dist/routes/integrations.js.map +1 -0
- package/dist/services/budgets.d.ts +4 -0
- package/dist/services/budgets.d.ts.map +1 -1
- package/dist/services/budgets.js +71 -11
- package/dist/services/budgets.js.map +1 -1
- package/dist/services/chats.d.ts +53 -0
- package/dist/services/chats.d.ts.map +1 -1
- package/dist/services/chats.js +14 -0
- package/dist/services/chats.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/integrations/feishu/inbound-dispatcher-db.d.ts +8 -0
- package/dist/services/integrations/feishu/inbound-dispatcher-db.d.ts.map +1 -0
- package/dist/services/integrations/feishu/inbound-dispatcher-db.js +255 -0
- package/dist/services/integrations/feishu/inbound-dispatcher-db.js.map +1 -0
- package/dist/services/integrations/feishu/inbound-normalizer.d.ts +4 -0
- package/dist/services/integrations/feishu/inbound-normalizer.d.ts.map +1 -0
- package/dist/services/integrations/feishu/inbound-normalizer.js +69 -0
- package/dist/services/integrations/feishu/inbound-normalizer.js.map +1 -0
- package/dist/services/messenger.d.ts.map +1 -1
- package/dist/services/messenger.js +1 -0
- package/dist/services/messenger.js.map +1 -1
- package/dist/services/organization-intelligence-profiles.d.ts +1 -1
- package/dist/services/organization-intelligence-profiles.d.ts.map +1 -1
- package/dist/services/organization-intelligence-profiles.js +7 -6
- package/dist/services/organization-intelligence-profiles.js.map +1 -1
- package/package.json +13 -13
- package/resources/bundled-skills/rudder/references/cli-reference.md +1 -1
- package/skills/rudder/references/cli-reference.md +1 -1
- package/ui-dist/assets/_basePickBy-DUmHf2J9.js +1 -0
- package/ui-dist/assets/{_baseUniq-CPTrhgCa.js → _baseUniq-td6AtUjS.js} +1 -1
- package/ui-dist/assets/{arc-B7NTQPhP.js → arc-DXd7PJe3.js} +1 -1
- package/ui-dist/assets/{architectureDiagram-2XIMDMQ5-Bfd7rJIb.js → architectureDiagram-2XIMDMQ5-DtxDWlz1.js} +1 -1
- package/ui-dist/assets/{blockDiagram-WCTKOSBZ-BTrM4r_V.js → blockDiagram-WCTKOSBZ-Bm0EQnGY.js} +1 -1
- package/ui-dist/assets/{c4Diagram-IC4MRINW-BYtI6FYL.js → c4Diagram-IC4MRINW-Rjm_nADA.js} +1 -1
- package/ui-dist/assets/channel-BXLSa2by.js +1 -0
- package/ui-dist/assets/{chunk-4BX2VUAB--Ppxnmb_.js → chunk-4BX2VUAB-CLeXE1c6.js} +1 -1
- package/ui-dist/assets/{chunk-55IACEB6-CQ83eeoT.js → chunk-55IACEB6-BEEoBpTZ.js} +1 -1
- package/ui-dist/assets/{chunk-FMBD7UC4-OVtz1nfu.js → chunk-FMBD7UC4-BqUjmlZ6.js} +1 -1
- package/ui-dist/assets/{chunk-JSJVCQXG-CUm2fIgz.js → chunk-JSJVCQXG-DzY_OyBE.js} +1 -1
- package/ui-dist/assets/{chunk-KX2RTZJC-SXc6fGM7.js → chunk-KX2RTZJC-uLJpMg9u.js} +1 -1
- package/ui-dist/assets/{chunk-NQ4KR5QH-DwGxW1TD.js → chunk-NQ4KR5QH-8FNLln-G.js} +1 -1
- package/ui-dist/assets/{chunk-QZHKN3VN-Ck5sO31S.js → chunk-QZHKN3VN-skS7L9O4.js} +1 -1
- package/ui-dist/assets/{chunk-WL4C6EOR-BUSXe5E8.js → chunk-WL4C6EOR-DkReNG1J.js} +1 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-KzRWf35q.js +1 -0
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-KzRWf35q.js +1 -0
- package/ui-dist/assets/clone-YmLUb5vl.js +1 -0
- package/ui-dist/assets/{cose-bilkent-S5V4N54A-CAc4VjLs.js → cose-bilkent-S5V4N54A-CNGrGImu.js} +1 -1
- package/ui-dist/assets/{dagre-KLK3FWXG-8nuHebTb.js → dagre-KLK3FWXG-JCkcUw7y.js} +1 -1
- package/ui-dist/assets/{diagram-E7M64L7V-Cv94_Ur8.js → diagram-E7M64L7V-BVErICFT.js} +1 -1
- package/ui-dist/assets/{diagram-IFDJBPK2-DU76Wofo.js → diagram-IFDJBPK2-Z9g6dF9k.js} +1 -1
- package/ui-dist/assets/{diagram-P4PSJMXO-BY2jd1q0.js → diagram-P4PSJMXO-CUNotvcF.js} +1 -1
- package/ui-dist/assets/{erDiagram-INFDFZHY-D8SNSe_N.js → erDiagram-INFDFZHY-BFTKy_4E.js} +1 -1
- package/ui-dist/assets/{flowDiagram-PKNHOUZH-CnyHXWrs.js → flowDiagram-PKNHOUZH-6BzrzA-n.js} +1 -1
- package/ui-dist/assets/{ganttDiagram-A5KZAMGK-BBQy4AfN.js → ganttDiagram-A5KZAMGK-CPTQCjXJ.js} +4 -4
- package/ui-dist/assets/{gitGraphDiagram-K3NZZRJ6-No-FiKKg.js → gitGraphDiagram-K3NZZRJ6-BgBPspT0.js} +1 -1
- package/ui-dist/assets/{graph-DLjJiX57.js → graph-fSHZ4Cek.js} +1 -1
- package/ui-dist/assets/index-47TV2jCu.js +1 -0
- package/ui-dist/assets/{index-DRZmptwI.js → index-73uVdxLu.js} +4 -4
- package/ui-dist/assets/index-AyD6u7Wg.js +1 -0
- package/ui-dist/assets/index-B9qhNWT1.js +1 -0
- package/ui-dist/assets/{index-utOKzUnM.js → index-BVn2p8fW.js} +462 -440
- package/ui-dist/assets/index-BnFWda1Q.js +1 -0
- package/ui-dist/assets/index-Bwm8BASM.js +1 -0
- package/ui-dist/assets/index-CwKt16q5.js +7 -0
- package/ui-dist/assets/index-DPuckjlF.js +1 -0
- package/ui-dist/assets/index-DVTf65Ap.js +1 -0
- package/ui-dist/assets/index-DergJGAy.js +1 -0
- package/ui-dist/assets/index-DoKNhJzR.js +1 -0
- package/ui-dist/assets/index-Dq6lUKZ1.js +1 -0
- package/ui-dist/assets/index-DqTqsnAG.js +1 -0
- package/ui-dist/assets/index-Dv6aTCoB.css +1 -0
- package/ui-dist/assets/index-K17Hw7_V.js +1 -0
- package/ui-dist/assets/index-WZ_s75vu.js +1 -0
- package/ui-dist/assets/{index-CgrToN7g.js → index-Yi6yE9cA.js} +2 -2
- package/ui-dist/assets/index-hZ10ucc5.js +1 -0
- package/ui-dist/assets/{infoDiagram-LFFYTUFH-B6T3mObQ.js → infoDiagram-LFFYTUFH-CBZbka4C.js} +1 -1
- package/ui-dist/assets/{ishikawaDiagram-PHBUUO56-D6ffyu9A.js → ishikawaDiagram-PHBUUO56-D9-ny_VL.js} +1 -1
- package/ui-dist/assets/{journeyDiagram-4ABVD52K-CT1nha3u.js → journeyDiagram-4ABVD52K-CtJg6O87.js} +1 -1
- package/ui-dist/assets/{kanban-definition-K7BYSVSG-d8GJ4n_-.js → kanban-definition-K7BYSVSG-lucEEz3W.js} +1 -1
- package/ui-dist/assets/{layout-gL287YTy.js → layout-basK_x4F.js} +1 -1
- package/ui-dist/assets/{linear-Bf1ea6Jq.js → linear-CRaB7O2x.js} +1 -1
- package/ui-dist/assets/{mermaid.core-dHWytwA_.js → mermaid.core-D60kSn5S.js} +4 -4
- package/ui-dist/assets/{mindmap-definition-YRQLILUH-JrUFNpGy.js → mindmap-definition-YRQLILUH-C7VUrBAR.js} +1 -1
- package/ui-dist/assets/{pieDiagram-SKSYHLDU-D4Wfs-K5.js → pieDiagram-SKSYHLDU-3Dx4fplg.js} +1 -1
- package/ui-dist/assets/{quadrantDiagram-337W2JSQ-BVITuQui.js → quadrantDiagram-337W2JSQ-BskcC7zC.js} +1 -1
- package/ui-dist/assets/{requirementDiagram-Z7DCOOCP-CwJeuuXP.js → requirementDiagram-Z7DCOOCP-f774X3B5.js} +1 -1
- package/ui-dist/assets/{sankeyDiagram-WA2Y5GQK-Cj7QPF5g.js → sankeyDiagram-WA2Y5GQK-DwwFeShg.js} +1 -1
- package/ui-dist/assets/{sequenceDiagram-2WXFIKYE-CaCPs0da.js → sequenceDiagram-2WXFIKYE-78-ZIzeA.js} +1 -1
- package/ui-dist/assets/{stateDiagram-RAJIS63D-DLlYG-8N.js → stateDiagram-RAJIS63D-CRkZKEyo.js} +1 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-DQv7SL4q.js +1 -0
- package/ui-dist/assets/{timeline-definition-YZTLITO2-C_G6klSp.js → timeline-definition-YZTLITO2-CtZ-7nmo.js} +1 -1
- package/ui-dist/assets/{treemap-KZPCXAKY-BLd4RSVW.js → treemap-KZPCXAKY-MoG3fIFh.js} +1 -1
- package/ui-dist/assets/{vennDiagram-LZ73GAT5-CxeNzJkA.js → vennDiagram-LZ73GAT5-SCkIrUYd.js} +1 -1
- package/ui-dist/assets/{xychartDiagram-JWTSCODW-BJEoZfiu.js → xychartDiagram-JWTSCODW-D8LTWujp.js} +1 -1
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/_basePickBy-BB7g62ME.js +0 -1
- package/ui-dist/assets/channel-DURfI6uy.js +0 -1
- package/ui-dist/assets/classDiagram-VBA2DB6C-dFkERNjc.js +0 -1
- package/ui-dist/assets/classDiagram-v2-RAHNMMFH-dFkERNjc.js +0 -1
- package/ui-dist/assets/clone-CDyUD1RA.js +0 -1
- package/ui-dist/assets/index-Bg1K4IPR.js +0 -1
- package/ui-dist/assets/index-BidXCe8A.js +0 -1
- package/ui-dist/assets/index-BmKWlvnC.js +0 -1
- package/ui-dist/assets/index-BozRwWt9.js +0 -1
- package/ui-dist/assets/index-CCmTOQyL.js +0 -1
- package/ui-dist/assets/index-CH7djPxu.js +0 -1
- package/ui-dist/assets/index-CQJhrxim.css +0 -1
- package/ui-dist/assets/index-CVCK0DNv.js +0 -13
- package/ui-dist/assets/index-CtHNqKUz.js +0 -7
- package/ui-dist/assets/index-D7FFHYtM.js +0 -1
- package/ui-dist/assets/index-DAf6hKOQ.js +0 -1
- package/ui-dist/assets/index-DZ-V8KVP.js +0 -1
- package/ui-dist/assets/index-DZb9m95s.js +0 -1
- package/ui-dist/assets/index-Dqlt5nna.js +0 -1
- package/ui-dist/assets/index-Dr13cMjz.js +0 -1
- package/ui-dist/assets/index-R3qcUUQM.js +0 -1
- package/ui-dist/assets/index-Ugzuyk1m.js +0 -1
- package/ui-dist/assets/index-_DT1YhSt.js +0 -3
- package/ui-dist/assets/index-n2PKHeE9.js +0 -1
- package/ui-dist/assets/index-p9AqxRLQ.js +0 -1
- package/ui-dist/assets/index-v7rD-G_w.js +0 -1
- package/ui-dist/assets/stateDiagram-v2-FVOUBMTO-I_TDliKE.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as be,e as he,E as $,C as Te,s as Pe,t as b,h as xe,g as K,j as Ve,Q as ye,R as we,S as ve,n as M,a as Xe,U as $e,L as _e,i as qe,f as Ce,O as ke}from"./index-BVn2p8fW.js";import{cssLanguage as J,css as Qe}from"./index-BnFWda1Q.js";const Ae=55,Ye=1,Me=56,Re=2,Ee=57,Ze=3,z=4,Be=5,R=6,ee=7,te=8,ae=9,le=10,ze=11,De=12,We=13,_=58,Ne=14,Ge=15,D=59,re=21,Ie=23,ne=24,je=25,A=27,se=28,Ue=29,Le=32,Fe=35,He=37,Ke=38,Je=0,et=1,tt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},at={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},W={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function lt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let N=null,G=null,I=0;function Y(e,a){let r=e.pos+a;if(I==r&&G==e)return N;let l=e.peek(a),t="";for(;lt(l);)t+=String.fromCharCode(l),l=e.peek(++a);return G=e,I=r,N=t?t.toLowerCase():l==rt||l==nt?void 0:null}const oe=60,X=62,E=47,rt=63,nt=33,st=45;function j(e,a){this.name=e,this.parent=a}const ot=[R,le,ee,te,ae],it=new Te({start:null,shift(e,a,r,l){return ot.indexOf(a)>-1?new j(Y(l,1)||"",e):e},reduce(e,a){return a==re&&e?e.parent:e},reuse(e,a,r,l){let t=a.type.id;return t==R||t==He?new j(Y(l,1)||"",e):e},strict:!1}),ut=new $((e,a)=>{if(e.next!=oe){e.next<0&&a.context&&e.acceptToken(_);return}e.advance();let r=e.next==E;r&&e.advance();let l=Y(e,0);if(l===void 0)return;if(!l)return e.acceptToken(r?Ge:Ne);let t=a.context?a.context.name:null;if(r){if(l==t)return e.acceptToken(ze);if(t&&at[t])return e.acceptToken(_,-2);if(a.dialectEnabled(Je))return e.acceptToken(De);for(let s=a.context;s;s=s.parent)if(s.name==l)return;e.acceptToken(We)}else{if(l=="script")return e.acceptToken(ee);if(l=="style")return e.acceptToken(te);if(l=="textarea")return e.acceptToken(ae);if(tt.hasOwnProperty(l))return e.acceptToken(le);t&&W[t]&&W[t][l]?e.acceptToken(_,-1):e.acceptToken(R)}},{contextual:!0}),Ot=new $(e=>{for(let a=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(D);break}if(e.next==st)a++;else if(e.next==X&&a>=2){r>=3&&e.acceptToken(D,-2);break}else a=0;e.advance()}});function dt(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ct=new $((e,a)=>{if(e.next==E&&e.peek(1)==X){let r=a.dialectEnabled(et)||dt(a.context);e.acceptToken(r?Be:z,2)}else e.next==X&&e.acceptToken(z,1)});function Z(e,a,r){let l=2+e.length;return new $(t=>{for(let s=0,o=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(a);break}if(s==0&&t.next==oe||s==1&&t.next==E||s>=2&&s<l&&t.next==e.charCodeAt(s-2))s++,o++;else if(s==l&&t.next==X){i>o?t.acceptToken(a,-o):t.acceptToken(r,-(o-2));break}else if((t.next==10||t.next==13)&&i){t.acceptToken(a,1);break}else s=o=0;t.advance()}})}const pt=Z("script",Ae,Ye),mt=Z("style",Me,Re),ft=Z("textarea",Ee,Ze),gt=Pe({"Text RawText IncompleteTag IncompleteCloseTag":b.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":b.angleBracket,TagName:b.tagName,"MismatchedCloseTag/TagName":[b.tagName,b.invalid],AttributeName:b.attributeName,"AttributeValue UnquotedAttributeValue":b.attributeValue,Is:b.definitionOperator,"EntityReference CharacterReference":b.character,Comment:b.blockComment,ProcessingInst:b.processingInstruction,DoctypeDecl:b.documentMeta}),St=he.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:it,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[gt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[pt,mt,ft,ct,ut,Ot,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function ie(e,a){let r=Object.create(null);for(let l of e.getChildren(ne)){let t=l.getChild(je),s=l.getChild(A)||l.getChild(se);t&&(r[a.read(t.from,t.to)]=s?s.type.id==A?a.read(s.from+1,s.to-1):a.read(s.from,s.to):"")}return r}function U(e,a){let r=e.getChild(Ie);return r?a.read(r.from,r.to):" "}function q(e,a,r){let l;for(let t of r)if(!t.attrs||t.attrs(l||(l=ie(e.node.parent.firstChild,a))))return{parser:t.parser,bracketed:!0};return null}function ue(e=[],a=[]){let r=[],l=[],t=[],s=[];for(let i of e)(i.tag=="script"?r:i.tag=="style"?l:i.tag=="textarea"?t:s).push(i);let o=a.length?Object.create(null):null;for(let i of a)(o[i.name]||(o[i.name]=[])).push(i);return be((i,u)=>{let f=i.type.id;if(f==Ue)return q(i,u,r);if(f==Le)return q(i,u,l);if(f==Fe)return q(i,u,t);if(f==re&&s.length){let p=i.node,d=p.firstChild,m=d&&U(d,u),O;if(m){for(let c of s)if(c.tag==m&&(!c.attrs||c.attrs(O||(O=ie(d,u))))){let S=p.lastChild,h=S.type.id==Ke?S.from:p.to;if(h>d.to)return{parser:c.parser,overlay:[{from:d.to,to:h}]}}}}if(o&&f==ne){let p=i.node,d;if(d=p.firstChild){let m=o[u.read(d.from,d.to)];if(m)for(let O of m){if(O.tagName&&O.tagName!=U(p.parent,u))continue;let c=p.lastChild;if(c.type.id==A){let S=c.from+1,h=c.lastChild,T=c.to-(h&&h.isError?0:1);if(T>S)return{parser:O.parser,overlay:[{from:S,to:T}],bracketed:!0}}else if(c.type.id==se)return{parser:O.parser,overlay:[{from:c.from,to:c.to}]}}}}return null})}const V=["_blank","_self","_top","_parent"],C=["ascii","utf-8","utf-16","latin1","latin1"],k=["get","post","put","delete"],Q=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],g=["true","false"],n={},bt={a:{attrs:{href:null,ping:null,type:null,media:null,target:V,hreflang:null}},abbr:n,address:n,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:n,aside:n,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:n,base:{attrs:{href:null,target:V}},bdi:n,bdo:n,blockquote:{attrs:{cite:null}},body:n,br:n,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:n,center:n,cite:n,code:n,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:n,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:n,div:n,dl:n,dt:n,em:n,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:n,figure:n,footer:n,form:{attrs:{action:null,name:null,"accept-charset":C,autocomplete:["on","off"],enctype:Q,method:k,novalidate:["novalidate"],target:V}},h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:n,hgroup:n,hr:n,html:{attrs:{manifest:null}},i:n,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:n,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:n,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:n,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:C,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:n,noscript:n,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:n,param:{attrs:{name:null,value:null}},pre:n,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:n,rt:n,ruby:n,samp:n,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:C}},section:n,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:n,source:{attrs:{src:null,type:null,media:null}},span:n,strong:n,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:n,summary:n,sup:n,table:n,tbody:n,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:n,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:n,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:n,time:{attrs:{datetime:null}},title:n,tr:n,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:n,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:n},Oe={accesskey:null,class:null,contenteditable:g,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:g,autocorrect:g,autocapitalize:g,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":g,"aria-autocomplete":["inline","list","both","none"],"aria-busy":g,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":g,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":g,"aria-hidden":g,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":g,"aria-multiselectable":g,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":g,"aria-relevant":null,"aria-required":g,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},de="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of de)Oe[e]=null;class y{constructor(a,r){this.tags={...bt,...a},this.globalAttrs={...Oe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}y.default=new y;function P(e,a,r=e.length){if(!a)return"";let l=a.firstChild,t=l&&l.getChild("TagName");return t?e.sliceString(t.from,Math.min(t.to,r)):""}function x(e,a=!1){for(;e;e=e.parent)if(e.name=="Element")if(a)a=!1;else return e;return null}function ce(e,a,r){let l=r.tags[P(e,x(a))];return(l==null?void 0:l.children)||r.allTags}function B(e,a){let r=[];for(let l=x(a);l&&!l.type.isTop;l=x(l.parent)){let t=P(e,l);if(t&&l.lastChild.name=="CloseTag")break;t&&r.indexOf(t)<0&&(a.name=="EndTag"||a.from>=l.firstChild.to)&&r.push(t)}return r}const pe=/^[:\-\.\w\u00b7-\uffff]*$/;function L(e,a,r,l,t){let s=/\s*>/.test(e.sliceDoc(t,t+5))?"":">",o=x(r,r.name=="StartTag"||r.name=="TagName");return{from:l,to:t,options:ce(e.doc,o,a).map(i=>({label:i,type:"type"})).concat(B(e.doc,r).map((i,u)=>({label:"/"+i,apply:"/"+i+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function F(e,a,r,l){let t=/\s*>/.test(e.sliceDoc(l,l+5))?"":">";return{from:r,to:l,options:B(e.doc,a).map((s,o)=>({label:s,apply:s+t,type:"type",boost:99-o})),validFor:pe}}function ht(e,a,r,l){let t=[],s=0;for(let o of ce(e.doc,r,a))t.push({label:"<"+o,type:"type"});for(let o of B(e.doc,r))t.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:l,to:l,options:t,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Tt(e,a,r,l,t){let s=x(r),o=s?a.tags[P(e.doc,s)]:null,i=o&&o.attrs?Object.keys(o.attrs):[],u=o&&o.globalAttrs===!1?i:i.length?i.concat(a.globalAttrNames):a.globalAttrNames;return{from:l,to:t,options:u.map(f=>({label:f,type:"property"})),validFor:pe}}function Pt(e,a,r,l,t){var s;let o=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),i=[],u;if(o){let f=e.sliceDoc(o.from,o.to),p=a.globalAttrs[f];if(!p){let d=x(r),m=d?a.tags[P(e.doc,d)]:null;p=(m==null?void 0:m.attrs)&&m.attrs[f]}if(p){let d=e.sliceDoc(l,t).toLowerCase(),m='"',O='"';/^['"]/.test(d)?(u=d[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",O=e.sliceDoc(t,t+1)==d[0]?"":d[0],d=d.slice(1),l++):u=/^[^\s<>='"]*$/;for(let c of p)i.push({label:c,apply:m+c+O,type:"constant"})}}return{from:l,to:t,options:i,validFor:u}}function me(e,a){let{state:r,pos:l}=a,t=K(r).resolveInner(l,-1),s=t.resolve(l);for(let o=l,i;s==t&&(i=t.childBefore(o));){let u=i.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=t=i,o=u.from}return t.name=="TagName"?t.parent&&/CloseTag$/.test(t.parent.name)?F(r,t,t.from,l):L(r,e,t,t.from,l):t.name=="StartTag"||t.name=="IncompleteTag"?L(r,e,t,l,l):t.name=="StartCloseTag"||t.name=="IncompleteCloseTag"?F(r,t,l,l):t.name=="OpenTag"||t.name=="SelfClosingTag"||t.name=="AttributeName"?Tt(r,e,t,t.name=="AttributeName"?t.from:l,l):t.name=="Is"||t.name=="AttributeValue"||t.name=="UnquotedAttributeValue"?Pt(r,e,t,t.name=="Is"?l:t.from,l):a.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?ht(r,e,t,l):null}function Xt(e){return me(y.default,e)}function xt(e){let{extraTags:a,extraGlobalAttributes:r}=e,l=r||a?new y(a,r):y.default;return t=>me(l,t)}const Vt=M.parser.configure({top:"SingleExpression"}),fe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:ye.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:we.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:ve.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Vt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:M.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:J.parser}],ge=[{name:"style",parser:J.parser.configure({top:"Styles"})}].concat(de.map(e=>({name:e,parser:M.parser}))),Se=_e.define({name:"html",parser:St.configure({props:[qe.add({Element(e){let a=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+a[0].length?e.continue():e.lineIndent(e.node.from)+(a[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let a=null,r;for(let l=e.node;;){let t=l.lastChild;if(!t||t.name!="Element"||t.to!=l.to)break;a=l=t}return a&&!((r=a.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(a.from)+e.unit:null}}),Ce.add({Element(e){let a=e.firstChild,r=e.lastChild;return!a||a.name!="OpenTag"?null:{from:a.to,to:r.name=="CloseTag"?r.from:e.to}}}),ke.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),v=Se.configure({wrap:ue(fe,ge)});function $t(e={}){let a="",r;e.matchClosingTags===!1&&(a="noMatch"),e.selfClosingTags===!0&&(a=(a?a+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=ue((e.nestedLanguages||[]).concat(fe),(e.nestedAttributes||[]).concat(ge)));let l=r?Se.configure({wrap:r,dialect:a}):a?v.configure({dialect:a}):v;return new Xe(l,[v.data.of({autocomplete:xt(e)}),e.autoCloseTags!==!1?yt:[],$e().support,Qe().support])}const H=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),yt=xe.inputHandler.of((e,a,r,l,t)=>{if(e.composing||e.state.readOnly||a!=r||l!=">"&&l!="/"||!v.isActiveAt(e.state,a,-1))return!1;let s=t(),{state:o}=s,i=o.changeByRange(u=>{var f,p,d;let m=o.doc.sliceString(u.from-1,u.to)==l,{head:O}=u,c=K(o).resolveInner(O,-1),S;if(m&&l==">"&&c.name=="EndTag"){let h=c.parent;if(((p=(f=h.parent)===null||f===void 0?void 0:f.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(S=P(o.doc,h.parent,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`</${S}>`;return{range:u,changes:{from:O,to:T,insert:w}}}}else if(m&&l=="/"&&c.name=="IncompleteCloseTag"){let h=c.parent;if(c.from==O-2&&((d=h.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(S=P(o.doc,h,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`${S}>`;return{range:Ve.cursor(O+w.length,-1),changes:{from:O,to:T,insert:w}}}}return{range:u}});return i.changes.empty?!1:(e.dispatch([s,o.update(i,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{yt as autoCloseTags,$t as html,Xt as htmlCompletionSource,xt as htmlCompletionSourceWith,v as htmlLanguage};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{P as st,k as Q,l as v,q as it,N as Ee,s as Ie,T as H,p as ot,t as m,e as X,g as P,r as z,a as fe,u as at,v as lt,E as ht,w as ft,x as ut,y as dt,z as pt,C as ct,A as mt,f as Me,i as gt,B as kt,F as ue,G as Lt}from"./index-utOKzUnM.js";import{html as bt,htmlCompletionSource as wt}from"./index-D7FFHYtM.js";import"./index-BozRwWt9.js";import"./index-CCmTOQyL.js";import"./index-CVCK0DNv.js";class _{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new _(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Q.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
|
|
2
|
-
`+r.scrub(),i=this.advance(s);return i>-1&&i<s.length?this.complete(e,n,i):!1}finish(e,r){return(this.stage==2||this.stage==3)&&O(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,k(u.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Ze(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(k(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(qe(e,O(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=O(e,this.pos),n=0;if(r>this.pos){let s=Qe(e,r,this.start);if(s){let i=G(e,s.to-this.start);i>0&&(this.nextStage(s),n=i)}}return n||(n=G(e,this.pos)),n>0&&n<e.length?n:-1}else return G(e,this.pos)}}}function G(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!A(r))return-1}return e}class xt{nextLine(e,r,n){let s=r.depth<e.stack.length?-1:Re(r),i=r.next;if(s<0)return!1;let o=k(u.HeaderMark,e.lineStart+r.pos,e.lineStart+s);return e.nextLine(),e.addLeafElement(n,k(i==61?u.SetextHeading1:u.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const De={LinkReference(t,e){return e.content.charCodeAt(0)==91?new At(e):null},SetextHeading(){return new xt}},Bt=[(t,e)=>ye(e)>=0,(t,e)=>Pe(e)>=0,(t,e)=>ve(e)>=0,(t,e)=>ie(e,t,!0)>=0,(t,e)=>oe(e,t,!0)>=0,(t,e)=>se(e,t,!0)>=0,(t,e)=>ze(e,t,!0)>=0],Et={text:"",end:0};class It{constructor(e,r,n,s){this.parser=e,this.input=r,this.ranges=s,this.line=new Ct,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=
|
|
1
|
+
import{P as st,r as Q,u as v,T as it,v as Ee,s as Ie,w as H,p as ot,t as m,g as X,j as P,x as z,a as fe,y as at,z as lt,h as ht,A as ft,B as ut,D as dt,F as pt,G as ct,H as mt,f as Me,i as gt,J as kt,K as ue,M as Lt}from"./index-BVn2p8fW.js";import{html as bt,htmlCompletionSource as wt}from"./index-47TV2jCu.js";import"./index-BnFWda1Q.js";class U{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new U(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Q.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
|
|
2
|
+
`+r.scrub(),i=this.advance(s);return i>-1&&i<s.length?this.complete(e,n,i):!1}finish(e,r){return(this.stage==2||this.stage==3)&&O(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,k(u.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Ze(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(k(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(qe(e,O(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=O(e,this.pos),n=0;if(r>this.pos){let s=Qe(e,r,this.start);if(s){let i=G(e,s.to-this.start);i>0&&(this.nextStage(s),n=i)}}return n||(n=G(e,this.pos)),n>0&&n<e.length?n:-1}else return G(e,this.pos)}}}function G(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!A(r))return-1}return e}class xt{nextLine(e,r,n){let s=r.depth<e.stack.length?-1:Re(r),i=r.next;if(s<0)return!1;let o=k(u.HeaderMark,e.lineStart+r.pos,e.lineStart+s);return e.nextLine(),e.addLeafElement(n,k(i==61?u.SetextHeading1:u.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const De={LinkReference(t,e){return e.content.charCodeAt(0)==91?new At(e):null},SetextHeading(){return new xt}},Bt=[(t,e)=>ye(e)>=0,(t,e)=>Pe(e)>=0,(t,e)=>ve(e)>=0,(t,e)=>ie(e,t,!0)>=0,(t,e)=>oe(e,t,!0)>=0,(t,e)=>se(e,t,!0)>=0,(t,e)=>ze(e,t,!0)>=0],Et={text:"",end:0};class It{constructor(e,r,n,s){this.parser=e,this.input=r,this.ranges=s,this.line=new Ct,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=U.create(u.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new Pt(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let s=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!s||e.markers[n].from<s.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!s)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let s=n(this,e);if(s!=!1){if(s==!0)return null;e.forward();continue e}}break}let r=new St(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let s=n(this,r);s&&r.parsers.push(s)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=`
|
|
3
3
|
`+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=Ge(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let r=Et;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,s=this.rangeI;for(;this.ranges[s].to<r.end;){s++;let i=this.ranges[s].from,o=this.lineChunkAt(i);r.end=i+o.length,r.text=r.text.slice(0,this.ranges[s-1].to-n)+o,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let s=this.stack[e.depth],i=this.parser.skipContextMarkup[s.type];if(!i)throw new Error("Unhandled block context "+u[s.type]);let o=this.line.markers.length;if(!i(s,this,e)){this.line.markers.length>o&&(s.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==`
|
|
4
4
|
`?"":r;else{let s=r.indexOf(`
|
|
5
|
-
`);n=s<0?r:r.slice(0,s)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,r,n=0){this.block=_.create(e,n,this.lineStart+r,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,r,n=0){this.startContext(this.parser.getNodeType(e),r,n)}addNode(e,r,n){typeof e=="number"&&(e=new H(this.parser.nodeSet.types[e],N,N,(n??this.prevLineEnd())-r)),this.block.addChild(e,r-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,r){this.addNode(this.buffer.writeElements(re(r.children,e.marks),-r.from).finish(r.type,r.to-r.from),r.from)}finishContext(){let e=this.stack.pop(),r=this.stack[this.stack.length-1];r.addChild(e.toTree(this.parser.nodeSet),e.from-r.from),this.block=r}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Fe(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let r=re(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(r,-e.start).finish(u.Paragraph,e.content.length),e.start)}elt(e,r,n,s){return typeof e=="string"?k(this.parser.getNodeType(e),r,n,s):new Ue(e,r)}get buffer(){return new $e(this.parser.nodeSet)}}function Fe(t,e,r,n,s){let i=t[e].to,o=[],a=[],l=r.from+n;function h(f,p){for(;p?f>=i:f>i;){let d=t[e+1].from-i;n+=d,f+=d,e++,i=t[e].to}}for(let f=r.firstChild;f;f=f.nextSibling){h(f.from+n,!0);let p=f.from+n,d,c=s.get(f.tree);c?d=c:f.to+n>i?(d=Fe(t,e,f,n,s),h(f.to+n,!1)):d=f.toTree(),o.push(d),a.push(p-l)}return h(r.to+n,!1),new H(r.type,o,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}class Z extends st{constructor(e,r,n,s,i,o,a,l,h){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=i,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,r,n){let s=new It(this,e,r,n);for(let i of this.wrappers)s=i(s,e,r,n);return s}configure(e){let r=te(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:s}=this,i=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(R(r.defineNodes)){s=Object.assign({},s);let d=n.types.slice(),c;for(let L of r.defineNodes){let{name:g,block:B,composite:w,style:S}=typeof L=="string"?{name:L}:L;if(d.some(I=>I.name==g))continue;w&&(s[d.length]=(I,y,nt)=>w(y,nt,I.value));let b=d.length,E=w?["Block","BlockContext"]:B?b>=u.ATXHeading1&&b<=u.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(Q.define({id:b,name:g,props:E&&[[v.group,E]]})),S&&(c||(c={}),Array.isArray(S)||S instanceof it?c[g]=S:Object.assign(c,S))}n=new Ee(d),c&&(n=n.extend(Ie(c)))}if(R(r.props)&&(n=n.extend(...r.props)),R(r.remove))for(let d of r.remove){let c=this.blockNames.indexOf(d),L=this.inlineNames.indexOf(d);c>-1&&(i[c]=o[c]=void 0),L>-1&&(l[L]=void 0)}if(R(r.parseBlock))for(let d of r.parseBlock){let c=a.indexOf(d.name);if(c>-1)i[c]=d.parse,o[c]=d.leaf;else{let L=d.before?U(a,d.before):d.after?U(a,d.after)+1:a.length-1;i.splice(L,0,d.parse),o.splice(L,0,d.leaf),a.splice(L,0,d.name)}d.endLeaf&&f.push(d.endLeaf)}if(R(r.parseInline))for(let d of r.parseInline){let c=h.indexOf(d.name);if(c>-1)l[c]=d.parse;else{let L=d.before?U(h,d.before):d.after?U(h,d.after)+1:h.length-1;l.splice(L,0,d.parse),h.splice(L,0,d.name)}}return r.wrap&&(p=p.concat(r.wrap)),new Z(n,i,o,a,f,s,l,h,p)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw new RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new ae(this,e,r);e:for(let s=r;s<n.end;){let i=n.char(s);for(let o of this.inlineParsers)if(o){let a=o(n,i,s);if(a>=0){s=a;continue e}}s++}return n.resolveMarkers(0)}}function R(t){return t!=null&&t.length>0}function te(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=te(t[0]);if(t.length==1)return e;let r=te(t.slice(1));if(!r||!e)return e||r;let n=(o,a)=>(o||N).concat(a||N),s=e.wrap,i=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:s?i?(o,a,l,h)=>s(i(o,a,l,h),a,l,h):s:i}}function U(t,e){let r=t.indexOf(e);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return r}let Xe=[Q.none];for(let t=1,e;e=u[t];t++)Xe[t]=Q.define({id:t,name:e,props:t>=u.Escape?[]:[[v.group,t in He?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const N=[];class $e{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,r,n,s=0){return this.content.push(e,r,n,4+s*4),this}writeElements(e,r=0){for(let n of e)n.writeTo(this,r);return this}finish(e,r){return H.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:r})}}class D{constructor(e,r,n,s=N){this.type=e,this.from=r,this.to=n,this.children=s}writeTo(e,r){let n=e.content.length;e.writeElements(this.children,r),e.content.push(this.type,this.from+r,this.to+r,e.content.length+4-n)}toTree(e){return new $e(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Ue{constructor(e,r){this.tree=e,this.from=r}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return N}writeTo(e,r){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+r,this.to+r,-1)}toTree(){return this.tree}}function k(t,e,r,n){return new D(t,e,r,n)}const _e={resolve:"Emphasis",mark:"EmphasisMark"},je={resolve:"Emphasis",mark:"EmphasisMark"},M={},j={};class C{constructor(e,r,n,s){this.type=e,this.from=r,this.to=n,this.side=s}}const me="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let F=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{F=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const V={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let s=0;s<me.length;s++)if(me.charCodeAt(s)==n)return t.append(k(u.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(k(u.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let s=n-r,i=0;for(;n<t.end;n++)if(t.char(n)==96){if(i++,i==s&&t.char(n+1)!=96)return t.append(k(u.InlineCode,r,n+1,[k(u.CodeMark,r,r+s),k(u.CodeMark,n+1-s,n+1)]))}else i=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return t.append(k(u.Autolink,r,r+1+s[0].length,[k(u.LinkMark,r,r+1),k(u.URL,r+1,r+s[0].length),k(u.LinkMark,r+s[0].length,r+1+s[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return t.append(k(u.Comment,r,r+1+i[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(k(u.ProcessingInstruction,r,r+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(k(u.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let s=t.slice(r-1,r),i=t.slice(n,n+1),o=F.test(s),a=F.test(i),l=/\s|^$/.test(s),h=/\s|^$/.test(i),f=!h&&(!a||l||o),p=!l&&(!o||h||a),d=f&&(e==42||!p||o),c=p&&(e==42||!f||a);return t.append(new C(e==95?_e:je,r,n,(d?1:0)|(c?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(k(u.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(k(u.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new C(M,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new C(j,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let s=t.parts[n];if(s instanceof C&&(s.type==M||s.type==j)){if(!s.side||t.skipSpace(s.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let i=t.takeContent(n),o=t.parts[n]=Mt(t,i,s.type==M?u.Link:u.Image,s.from,r+1);if(s.type==M)for(let a=0;a<n;a++){let l=t.parts[a];l instanceof C&&l.type==M&&(l.side=0)}return o.to}}return-1}};function Mt(t,e,r,n,s){let{text:i}=t,o=t.char(s),a=s;if(e.unshift(k(u.LinkMark,n,n+(r==u.Image?2:1))),e.push(k(u.LinkMark,s-1,s)),o==40){let l=t.skipSpace(s+1),h=qe(i,l-t.offset,t.offset),f;h&&(l=t.skipSpace(h.to),l!=h.to&&(f=Qe(i,l-t.offset,t.offset),f&&(l=t.skipSpace(f.to)))),t.char(l)==41&&(e.push(k(u.LinkMark,s,s+1)),a=l+1,h&&e.push(h),f&&e.push(f),e.push(k(u.LinkMark,l,a)))}else if(o==91){let l=Ze(i,s-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return k(r,n,a,e)}function qe(t,e,r){if(t.charCodeAt(e)==60){for(let s=e+1;s<t.length;s++){let i=t.charCodeAt(s);if(i==62)return k(u.URL,e+r,s+1+r);if(i==60||i==10)return!1}return null}else{let s=0,i=e;for(let o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(A(a))break;if(o)o=!1;else if(a==40)s++;else if(a==41){if(!s)break;s--}else a==92&&(o=!0)}return i>e?k(u.URL,e+r,i+r):i==t.length?null:!1}}function Qe(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let i=e+1,o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(o)o=!1;else{if(a==s)return k(u.LinkTitle,e+r,i+1+r);a==92&&(o=!0)}}return null}function Ze(t,e,r,n){for(let s=!1,i=e+1,o=Math.min(t.length,i+999);i<o;i++){let a=t.charCodeAt(i);if(s)s=!1;else{if(a==93)return n?!1:k(u.LinkLabel,e+r,i+1+r);if(n&&!A(a)&&(n=!1),a==91)return!1;a==92&&(s=!0)}}return null}class ae{constructor(e,r,n){this.parser=e,this.text=r,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,r){return this.text.slice(e-this.offset,r-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,r,n,s,i){return this.append(new C(e,r,n,(s?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let r=this.parts[e];if(r instanceof C&&(r.type==M||r.type==j))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let s=this.parts[n];if(!(s instanceof C&&s.type.resolve&&s.side&2))continue;let i=s.type==_e||s.type==je,o=s.to-s.from,a,l=n-1;for(;l>=e;l--){let g=this.parts[l];if(g instanceof C&&g.side&1&&g.type==s.type&&!(i&&(s.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){a=g;break}}if(!a)continue;let h=s.type.resolve,f=[],p=a.from,d=s.to;if(i){let g=Math.min(2,a.to-a.from,o);p=a.to-g,d=s.from+g,h=g==1?"Emphasis":"StrongEmphasis"}a.type.mark&&f.push(this.elt(a.type.mark,p,a.to));for(let g=l+1;g<n;g++)this.parts[g]instanceof D&&f.push(this.parts[g]),this.parts[g]=null;s.type.mark&&f.push(this.elt(s.type.mark,s.from,d));let c=this.elt(h,p,d,f);this.parts[l]=i&&a.from!=p?new C(a.type,a.from,p,a.side):null,(this.parts[n]=i&&s.to!=d?new C(s.type,d,s.to,s.side):null)?this.parts.splice(n,0,c):this.parts[n]=c}let r=[];for(let n=e;n<this.parts.length;n++){let s=this.parts[n];s instanceof D&&r.push(s)}return r}findOpeningDelimiter(e){for(let r=this.parts.length-1;r>=0;r--){let n=this.parts[r];if(n instanceof C&&n.type==e&&n.side&1)return r}return null}takeContent(e){let r=this.resolveMarkers(e);return this.parts.length=e,r}getDelimiterAt(e){let r=this.parts[e];return r instanceof C?r:null}skipSpace(e){return O(this.text,e-this.offset)+this.offset}elt(e,r,n,s){return typeof e=="string"?k(this.parser.getNodeType(e),r,n,s):new Ue(e,r)}}ae.linkStart=M;ae.imageStart=j;function re(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let s of e){for(;n<r.length&&r[n].to<s.to;)n++;if(n<r.length&&r[n].from<s.from){let i=r[n];i instanceof D&&(r[n]=new D(i.type,i.from,i.to,re(i.children,[s])))}else r.splice(n++,0,s)}return r}const Ht=[u.CodeBlock,u.ListItem,u.OrderedList,u.BulletList];class Pt{constructor(e,r){this.fragments=e,this.input=r,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,r){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
|
|
6
|
-
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=e+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=r;if(!n.childAfter(s))return!1}}matches(e){let r=this.cursor.tree;return r&&r.prop(v.contextHash)==e}takeNodes(e){let r=this.cursor,n=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,o=i,a=e.block.children.length,l=o,h=a;for(;;){if(r.to-n>s){if(r.type.isAnonymous&&r.firstChild())continue;break}let f=Ge(r.from-n,e.ranges);if(r.to-n<=e.ranges[e.rangeI].to)e.addNode(r.tree,f);else{let p=new H(e.parser.nodeSet.types[u.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,r.tree),e.addNode(p,f)}if(r.type.is("Block")&&(Ht.indexOf(r.type.id)<0?(o=r.to-n,a=e.block.children.length):(o=l,a=h),l=r.to-n,h=e.block.children.length),!r.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-i}}function Ge(t,e){let r=t;for(let n=1;n<e.length;n++){let s=e[n-1].to,i=e[n].from;s<t&&(r-=i-s)}return r}const vt=Ie({"Blockquote/...":m.quote,HorizontalRule:m.contentSeparator,"ATXHeading1/... SetextHeading1/...":m.heading1,"ATXHeading2/... SetextHeading2/...":m.heading2,"ATXHeading3/...":m.heading3,"ATXHeading4/...":m.heading4,"ATXHeading5/...":m.heading5,"ATXHeading6/...":m.heading6,"Comment CommentBlock":m.comment,Escape:m.escape,Entity:m.character,"Emphasis/...":m.emphasis,"StrongEmphasis/...":m.strong,"Link/... Image/...":m.link,"OrderedList/... BulletList/...":m.list,"BlockQuote/...":m.quote,"InlineCode CodeText":m.monospace,"URL Autolink":m.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":m.processingInstruction,"CodeInfo LinkLabel":m.labelName,LinkTitle:m.string,Paragraph:m.content}),Nt=new Z(new Ee(Xe).extend(vt),Object.keys($).map(t=>$[t]),Object.keys($).map(t=>De[t]),Object.keys($),Bt,He,Object.keys(V).map(t=>V[t]),Object.keys(V),[]);function yt(t,e,r){let n=[];for(let s=t.firstChild,i=e;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function Rt(t){let{codeParser:e,htmlParser:r}=t;return{wrap:ot((s,i)=>{let o=s.type.id;if(e&&(o==u.CodeBlock||o==u.FencedCode)){let a="";if(o==u.FencedCode){let h=s.node.getChild(u.CodeInfo);h&&(a=i.read(h.from,h.to))}let l=e(a);if(l)return{parser:l,overlay:h=>h.type.id==u.CodeText,bracketed:o==u.FencedCode}}else if(r&&(o==u.HTMLBlock||o==u.HTMLTag||o==u.CommentBlock))return{parser:r,overlay:yt(s.node,s.from,s.to)};return null})}}const Ot={resolve:"Strikethrough",mark:"StrikethroughMark"},Tt={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":m.strikethrough}},{name:"StrikethroughMark",style:m.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),s=t.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=F.test(n),l=F.test(s);return t.addDelimiter(Ot,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function T(t,e,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,h=!1,f=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let p=r;p<e.length;p++){let d=e.charCodeAt(p);d==124&&!h?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&f(),n.push(t.elt("TableDelimiter",p+s,p+s+1))),a=l=-1):(h||d!=32&&d!=9)&&(a<0&&(a=p),l=p+1),h=!h&&d==92}return a>-1&&(i++,n&&f()),i}function ge(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}const Ve=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class ke{constructor(){this.rows=null}nextLine(e,r,n){if(this.rows==null){this.rows=!1;let s;if((r.next==45||r.next==58||r.next==124)&&Ve.test(s=r.text.slice(r.pos))){let i=[];T(e,n.content,0,i,n.start)==T(e,s,r.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+r.pos,e.lineStart+r.text.length)])}}else if(this.rows){let s=[];T(e,r.text,r.pos,s,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+r.pos,e.lineStart+r.text.length,s))}return!1}finish(e,r){return this.rows?(e.addLeafElement(r,e.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}}const zt={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":m.heading}},"TableRow",{name:"TableCell",style:m.content},{name:"TableDelimiter",style:m.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return ge(e.content,0)?new ke:null},endLeaf(t,e,r){if(r.parsers.some(s=>s instanceof ke)||!ge(e.text,e.basePos))return!1;let n=t.peekLine();return Ve.test(n)&&T(t,e.text,e.basePos)==T(t,n,e.basePos)},before:"SetextHeading"}]};class Dt{nextLine(){return!1}finish(e,r){return e.addLeafElement(r,e.elt("Task",r.start,r.start+r.content.length,[e.elt("TaskMarker",r.start,r.start+3),...e.parser.parseInline(r.content.slice(3),r.start+3)])),!0}}const Ft={defineNodes:[{name:"Task",block:!0,style:m.list},{name:"TaskMarker",style:m.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Dt:null},after:"SetextHeading"}]},Le=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,be=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Xt=/[\w-]+\.[\w-]+($|\/)/,we=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Se=/\/[a-zA-Z\d@.]+/gy;function Ce(t,e,r,n){let s=0;for(let i=e;i<r;i++)t[i]==n&&s++;return s}function $t(t,e){be.lastIndex=e;let r=be.exec(t);if(!r||Xt.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let s=t[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&Ce(t,e,n,")")>Ce(t,e,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+i.index;else break}return n}function Ae(t,e){we.lastIndex=e;let r=we.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}const Ut={parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;if(n&&/\w/.test(t.text[n-1]))return-1;Le.lastIndex=n;let s=Le.exec(t.text),i=-1;if(!s)return-1;if(s[1]||s[2]){if(i=$t(t.text,n+s[0].length),i>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,i));i=n+o[0].length}}else s[3]?i=Ae(t.text,n):(i=Ae(t.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(Se.lastIndex=i,s=Se.exec(t.text),s&&(i=s.index+s[0].length)));return i<0?-1:(t.addElement(t.elt("URL",r,i+t.offset)),i+t.offset)}}]},_t=[zt,Ft,Tt,Ut];function Ke(t,e,r){return(n,s,i)=>{if(s!=t||n.char(i+1)==t)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==t)return n.addElement(n.elt(e,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),A(l))break}return-1}}const jt={defineNodes:[{name:"Superscript",style:m.special(m.content)},{name:"SuperscriptMark",style:m.processingInstruction}],parseInline:[{name:"Superscript",parse:Ke(94,"Superscript","SuperscriptMark")}]},qt={defineNodes:[{name:"Subscript",style:m.special(m.content)},{name:"SubscriptMark",style:m.processingInstruction}],parseInline:[{name:"Subscript",parse:Ke(126,"Subscript","SubscriptMark")}]},Qt={defineNodes:[{name:"Emoji",style:m.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]},Je=pt({commentTokens:{block:{open:"<!--",close:"-->"}}}),Ye=new v,We=Nt.configure({props:[Me.add(t=>!t.is("Block")||t.is("Document")||ne(t)!=null||Zt(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Ye.add(ne),gt.add({Document:()=>null}),kt.add({Document:Je})]});function ne(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Zt(t){return t.name=="OrderedList"||t.name=="BulletList"}function Gt(t,e){let r=t;for(;;){let n=r.nextSibling,s;if(!n||(s=ne(n.type))!=null&&s<=e)break;r=n}return r.to}const Vt=dt.of((t,e,r)=>{for(let n=X(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let s=n.type.prop(Ye);if(s==null)continue;let i=Gt(n,s);if(i>r)return{from:r,to:i}}return null});function le(t){return new ft(Je,t,[],"markdown")}const Kt=le(We),Jt=We.configure([_t,qt,jt,Qt,{props:[Me.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),q=le(Jt);function Yt(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],typeof t=="function"?n=t(r):n=ue.matchLanguageName(t,r,!0),n instanceof ue)return n.support?n.support.language.parser:Lt.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}class K{constructor(e,r,n,s,i,o,a){this.node=e,this.from=r,this.to=n,this.spaceBefore=s,this.spaceAfter=i,this.type=o,this.item=a}blank(e,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let s=this.to-this.from-n.length-this.spaceAfter.length;s>0;s--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(e,r){let n=this.node.name=="OrderedList"?String(+tt(this.item,e)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function et(t,e){let r=[],n=[];for(let s=t;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=e.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new K(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),n.push(new K(i.parent,l,l+f,o[1],h,o[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),n.push(new K(i.parent,l,l+f,o[1],h,p,i))}}return n}function tt(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function J(t,e,r,n=0){for(let s=-1,i=t;;){if(i.name=="ListItem"){let a=tt(i,e),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function he(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(ut)!=" ")return t;let n=z(t,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+t.slice(r)}const Wt=(t={})=>({state:e,dispatch:r})=>{let n=X(e),{doc:s}=e,i=null,o=e.changeByRange(a=>{if(!a.empty||!q.isActiveAt(e,a.from,-1)&&!q.isActiveAt(e,a.from,1))return i={range:a};let l=a.from,h=s.lineAt(l),f=et(n.resolveInner(l,-1),s);for(;f.length&&f[f.length-1].from>l-h.from;)f.pop();if(!f.length)return i={range:a};let p=f[f.length-1];if(p.to-p.spaceAfter.length>l-h.from)return i={range:a};let d=l>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&d){let w=p.node.firstChild,S=p.node.getChild("ListItem","ListItem");if(w.to>=l||S&&S.to<l||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)||t.nonTightLists===!1){let b=f.length>1?f[f.length-2]:null,E,I="";b&&b.item?(E=h.from+b.from,I=b.marker(s,1)):E=h.from+(b?b.to:0);let y=[{from:E,to:l,insert:I}];return p.node.name=="OrderedList"&&J(p.item,s,y,-2),b&&b.node.name=="OrderedList"&&J(b.item,s,y),{range:P.cursor(E+I.length),changes:y}}else{let b=Be(f,e,h);return{range:P.cursor(l+b.length+1),changes:{from:h.from,insert:b+e.lineBreak}}}}if(p.node.name=="Blockquote"&&d&&h.from){let w=s.lineAt(h.from-1),S=/>\s*$/.exec(w.text);if(S&&S.index==p.from){let b=e.changes([{from:w.from+S.index,to:w.to},{from:h.from+p.from,to:h.to}]);return{range:a.map(b),changes:b}}}let c=[];p.node.name=="OrderedList"&&J(p.item,s,c);let L=p.item&&p.item.from<h.from,g="";if(!L||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let w=0,S=f.length-1;w<=S;w++)g+=w==S&&!L?f[w].marker(s,1):f[w].blank(w<S?z(h.text,4,f[w+1].from)-g.length:null);let B=l;for(;B>h.from&&/\s/.test(h.text.charAt(B-h.from-1));)B--;return g=he(g,e),tr(p.node,e.doc)&&(g=Be(f,e,h)+e.lineBreak+g),c.push({from:B,to:l,insert:e.lineBreak+g}),{range:P.cursor(B+g.length+1),changes:c}});return i?!1:(r(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},er=Wt();function xe(t){return t.name=="QuoteMark"||t.name=="ListMark"}function tr(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(r.to),i=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function Be(t,e,r){let n="";for(let s=0,i=t.length-2;s<=i;s++)n+=t[s].blank(s<i?z(r.text,4,t[s+1].from)-n.length:null,s<i);return he(n,e)}function rr(t,e){let r=t.resolveInner(e,-1),n=e;xe(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(xe(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}const nr=({state:t,dispatch:e})=>{let r=X(t),n=null,s=t.changeByRange(i=>{let o=i.from,{doc:a}=t;if(i.empty&&q.isActiveAt(t,i.from)){let l=a.lineAt(o),h=et(rr(r,o),a);if(h.length){let f=h[h.length-1],p=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-l.from>p&&!/\S/.test(l.text.slice(p,o-l.from)))return{range:P.cursor(l.from+p),changes:{from:l.from+p,to:o}};if(o-l.from==p&&(!f.item||l.from<=f.item.from||!/\S/.test(l.text.slice(0,f.to)))){let d=l.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(l.text.slice(f.from,f.to))){let c=f.blank(z(l.text,4,f.to)-z(l.text,4,f.from));return d==l.from&&(c=he(c,t)),{range:P.cursor(d+c.length),changes:{from:d,to:l.from+f.to,insert:c}}}if(d<o)return{range:P.cursor(d),changes:{from:d,to:o}}}}}return n={range:i}});return n?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},sr=[{key:"Enter",run:er},{key:"Backspace",run:nr}],rt=bt({matchClosingTags:!1});function cr(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=Kt,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=rt}=t;if(!(s instanceof Z))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],h=[a.support,Vt],f;o&&h.push(lr),r instanceof fe?(h.push(r.support),f=r.language):r&&(f=r);let p=e||f?Yt(e,f):void 0;l.push(Rt({codeParser:p,htmlParser:a.language.parser})),n&&h.push(at.high(lt.of(sr)));let d=le(s.configure(l));return i&&h.push(d.data.of({autocomplete:ir})),new fe(d,h)}function ir(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let s=X(e).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:or(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Y=null;function or(){if(Y)return Y;let t=wt(new ct(mt.create({extensions:rt}),0,!0));return Y=t?t.options:[]}const ar=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,lr=ht.domEventHandlers({paste:(t,e)=>{var r;let{main:n}=e.state.selection;if(n.empty)return!1;let s=(r=t.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s)||(/^www\./.test(s)&&(s="https://"+s),!q.isActiveAt(e.state,n.from,1)))return!1;let i=X(e.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:a=>{(a.from>n.from||ar.test(a.name))&&(o=!0)},leave:a=>{a.to<n.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});export{Kt as commonmarkLanguage,nr as deleteMarkupBackward,er as insertNewlineContinueMarkup,Wt as insertNewlineContinueMarkupCommand,cr as markdown,sr as markdownKeymap,q as markdownLanguage,lr as pasteURLAsLink};
|
|
5
|
+
`);n=s<0?r:r.slice(0,s)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,r,n=0){this.block=U.create(e,n,this.lineStart+r,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,r,n=0){this.startContext(this.parser.getNodeType(e),r,n)}addNode(e,r,n){typeof e=="number"&&(e=new H(this.parser.nodeSet.types[e],N,N,(n??this.prevLineEnd())-r)),this.block.addChild(e,r-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,r){this.addNode(this.buffer.writeElements(re(r.children,e.marks),-r.from).finish(r.type,r.to-r.from),r.from)}finishContext(){let e=this.stack.pop(),r=this.stack[this.stack.length-1];r.addChild(e.toTree(this.parser.nodeSet),e.from-r.from),this.block=r}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Fe(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let r=re(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(r,-e.start).finish(u.Paragraph,e.content.length),e.start)}elt(e,r,n,s){return typeof e=="string"?k(this.parser.getNodeType(e),r,n,s):new je(e,r)}get buffer(){return new $e(this.parser.nodeSet)}}function Fe(t,e,r,n,s){let i=t[e].to,o=[],a=[],l=r.from+n;function h(f,p){for(;p?f>=i:f>i;){let d=t[e+1].from-i;n+=d,f+=d,e++,i=t[e].to}}for(let f=r.firstChild;f;f=f.nextSibling){h(f.from+n,!0);let p=f.from+n,d,c=s.get(f.tree);c?d=c:f.to+n>i?(d=Fe(t,e,f,n,s),h(f.to+n,!1)):d=f.toTree(),o.push(d),a.push(p-l)}return h(r.to+n,!1),new H(r.type,o,a,r.to+n-l,r.tree?r.tree.propValues:void 0)}class Z extends st{constructor(e,r,n,s,i,o,a,l,h){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=i,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,r,n){let s=new It(this,e,r,n);for(let i of this.wrappers)s=i(s,e,r,n);return s}configure(e){let r=te(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:s}=this,i=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(R(r.defineNodes)){s=Object.assign({},s);let d=n.types.slice(),c;for(let L of r.defineNodes){let{name:g,block:B,composite:w,style:S}=typeof L=="string"?{name:L}:L;if(d.some(I=>I.name==g))continue;w&&(s[d.length]=(I,y,nt)=>w(y,nt,I.value));let b=d.length,E=w?["Block","BlockContext"]:B?b>=u.ATXHeading1&&b<=u.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(Q.define({id:b,name:g,props:E&&[[v.group,E]]})),S&&(c||(c={}),Array.isArray(S)||S instanceof it?c[g]=S:Object.assign(c,S))}n=new Ee(d),c&&(n=n.extend(Ie(c)))}if(R(r.props)&&(n=n.extend(...r.props)),R(r.remove))for(let d of r.remove){let c=this.blockNames.indexOf(d),L=this.inlineNames.indexOf(d);c>-1&&(i[c]=o[c]=void 0),L>-1&&(l[L]=void 0)}if(R(r.parseBlock))for(let d of r.parseBlock){let c=a.indexOf(d.name);if(c>-1)i[c]=d.parse,o[c]=d.leaf;else{let L=d.before?j(a,d.before):d.after?j(a,d.after)+1:a.length-1;i.splice(L,0,d.parse),o.splice(L,0,d.leaf),a.splice(L,0,d.name)}d.endLeaf&&f.push(d.endLeaf)}if(R(r.parseInline))for(let d of r.parseInline){let c=h.indexOf(d.name);if(c>-1)l[c]=d.parse;else{let L=d.before?j(h,d.before):d.after?j(h,d.after)+1:h.length-1;l.splice(L,0,d.parse),h.splice(L,0,d.name)}}return r.wrap&&(p=p.concat(r.wrap)),new Z(n,i,o,a,f,s,l,h,p)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw new RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new ae(this,e,r);e:for(let s=r;s<n.end;){let i=n.char(s);for(let o of this.inlineParsers)if(o){let a=o(n,i,s);if(a>=0){s=a;continue e}}s++}return n.resolveMarkers(0)}}function R(t){return t!=null&&t.length>0}function te(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=te(t[0]);if(t.length==1)return e;let r=te(t.slice(1));if(!r||!e)return e||r;let n=(o,a)=>(o||N).concat(a||N),s=e.wrap,i=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:s?i?(o,a,l,h)=>s(i(o,a,l,h),a,l,h):s:i}}function j(t,e){let r=t.indexOf(e);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return r}let Xe=[Q.none];for(let t=1,e;e=u[t];t++)Xe[t]=Q.define({id:t,name:e,props:t>=u.Escape?[]:[[v.group,t in He?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const N=[];class $e{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,r,n,s=0){return this.content.push(e,r,n,4+s*4),this}writeElements(e,r=0){for(let n of e)n.writeTo(this,r);return this}finish(e,r){return H.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:r})}}class D{constructor(e,r,n,s=N){this.type=e,this.from=r,this.to=n,this.children=s}writeTo(e,r){let n=e.content.length;e.writeElements(this.children,r),e.content.push(this.type,this.from+r,this.to+r,e.content.length+4-n)}toTree(e){return new $e(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class je{constructor(e,r){this.tree=e,this.from=r}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return N}writeTo(e,r){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+r,this.to+r,-1)}toTree(){return this.tree}}function k(t,e,r,n){return new D(t,e,r,n)}const Ue={resolve:"Emphasis",mark:"EmphasisMark"},_e={resolve:"Emphasis",mark:"EmphasisMark"},M={},_={};class C{constructor(e,r,n,s){this.type=e,this.from=r,this.to=n,this.side=s}}const me="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let F=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{F=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const V={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let s=0;s<me.length;s++)if(me.charCodeAt(s)==n)return t.append(k(u.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(k(u.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let s=n-r,i=0;for(;n<t.end;n++)if(t.char(n)==96){if(i++,i==s&&t.char(n+1)!=96)return t.append(k(u.InlineCode,r,n+1,[k(u.CodeMark,r,r+s),k(u.CodeMark,n+1-s,n+1)]))}else i=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return t.append(k(u.Autolink,r,r+1+s[0].length,[k(u.LinkMark,r,r+1),k(u.URL,r+1,r+s[0].length),k(u.LinkMark,r+s[0].length,r+1+s[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return t.append(k(u.Comment,r,r+1+i[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return t.append(k(u.ProcessingInstruction,r,r+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?t.append(k(u.HTMLTag,r,r+1+a[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let s=t.slice(r-1,r),i=t.slice(n,n+1),o=F.test(s),a=F.test(i),l=/\s|^$/.test(s),h=/\s|^$/.test(i),f=!h&&(!a||l||o),p=!l&&(!o||h||a),d=f&&(e==42||!p||o),c=p&&(e==42||!f||a);return t.append(new C(e==95?Ue:_e,r,n,(d?1:0)|(c?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(k(u.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(k(u.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new C(M,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new C(_,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let s=t.parts[n];if(s instanceof C&&(s.type==M||s.type==_)){if(!s.side||t.skipSpace(s.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let i=t.takeContent(n),o=t.parts[n]=Mt(t,i,s.type==M?u.Link:u.Image,s.from,r+1);if(s.type==M)for(let a=0;a<n;a++){let l=t.parts[a];l instanceof C&&l.type==M&&(l.side=0)}return o.to}}return-1}};function Mt(t,e,r,n,s){let{text:i}=t,o=t.char(s),a=s;if(e.unshift(k(u.LinkMark,n,n+(r==u.Image?2:1))),e.push(k(u.LinkMark,s-1,s)),o==40){let l=t.skipSpace(s+1),h=qe(i,l-t.offset,t.offset),f;h&&(l=t.skipSpace(h.to),l!=h.to&&(f=Qe(i,l-t.offset,t.offset),f&&(l=t.skipSpace(f.to)))),t.char(l)==41&&(e.push(k(u.LinkMark,s,s+1)),a=l+1,h&&e.push(h),f&&e.push(f),e.push(k(u.LinkMark,l,a)))}else if(o==91){let l=Ze(i,s-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return k(r,n,a,e)}function qe(t,e,r){if(t.charCodeAt(e)==60){for(let s=e+1;s<t.length;s++){let i=t.charCodeAt(s);if(i==62)return k(u.URL,e+r,s+1+r);if(i==60||i==10)return!1}return null}else{let s=0,i=e;for(let o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(A(a))break;if(o)o=!1;else if(a==40)s++;else if(a==41){if(!s)break;s--}else a==92&&(o=!0)}return i>e?k(u.URL,e+r,i+r):i==t.length?null:!1}}function Qe(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let i=e+1,o=!1;i<t.length;i++){let a=t.charCodeAt(i);if(o)o=!1;else{if(a==s)return k(u.LinkTitle,e+r,i+1+r);a==92&&(o=!0)}}return null}function Ze(t,e,r,n){for(let s=!1,i=e+1,o=Math.min(t.length,i+999);i<o;i++){let a=t.charCodeAt(i);if(s)s=!1;else{if(a==93)return n?!1:k(u.LinkLabel,e+r,i+1+r);if(n&&!A(a)&&(n=!1),a==91)return!1;a==92&&(s=!0)}}return null}class ae{constructor(e,r,n){this.parser=e,this.text=r,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,r){return this.text.slice(e-this.offset,r-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,r,n,s,i){return this.append(new C(e,r,n,(s?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let r=this.parts[e];if(r instanceof C&&(r.type==M||r.type==_))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let s=this.parts[n];if(!(s instanceof C&&s.type.resolve&&s.side&2))continue;let i=s.type==Ue||s.type==_e,o=s.to-s.from,a,l=n-1;for(;l>=e;l--){let g=this.parts[l];if(g instanceof C&&g.side&1&&g.type==s.type&&!(i&&(s.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){a=g;break}}if(!a)continue;let h=s.type.resolve,f=[],p=a.from,d=s.to;if(i){let g=Math.min(2,a.to-a.from,o);p=a.to-g,d=s.from+g,h=g==1?"Emphasis":"StrongEmphasis"}a.type.mark&&f.push(this.elt(a.type.mark,p,a.to));for(let g=l+1;g<n;g++)this.parts[g]instanceof D&&f.push(this.parts[g]),this.parts[g]=null;s.type.mark&&f.push(this.elt(s.type.mark,s.from,d));let c=this.elt(h,p,d,f);this.parts[l]=i&&a.from!=p?new C(a.type,a.from,p,a.side):null,(this.parts[n]=i&&s.to!=d?new C(s.type,d,s.to,s.side):null)?this.parts.splice(n,0,c):this.parts[n]=c}let r=[];for(let n=e;n<this.parts.length;n++){let s=this.parts[n];s instanceof D&&r.push(s)}return r}findOpeningDelimiter(e){for(let r=this.parts.length-1;r>=0;r--){let n=this.parts[r];if(n instanceof C&&n.type==e&&n.side&1)return r}return null}takeContent(e){let r=this.resolveMarkers(e);return this.parts.length=e,r}getDelimiterAt(e){let r=this.parts[e];return r instanceof C?r:null}skipSpace(e){return O(this.text,e-this.offset)+this.offset}elt(e,r,n,s){return typeof e=="string"?k(this.parser.getNodeType(e),r,n,s):new je(e,r)}}ae.linkStart=M;ae.imageStart=_;function re(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let s of e){for(;n<r.length&&r[n].to<s.to;)n++;if(n<r.length&&r[n].from<s.from){let i=r[n];i instanceof D&&(r[n]=new D(i.type,i.from,i.to,re(i.children,[s])))}else r.splice(n++,0,s)}return r}const Ht=[u.CodeBlock,u.ListItem,u.OrderedList,u.BulletList];class Pt{constructor(e,r){this.fragments=e,this.input=r,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,r){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
|
|
6
|
+
`;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=e+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=r;if(!n.childAfter(s))return!1}}matches(e){let r=this.cursor.tree;return r&&r.prop(v.contextHash)==e}takeNodes(e){let r=this.cursor,n=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,o=i,a=e.block.children.length,l=o,h=a;for(;;){if(r.to-n>s){if(r.type.isAnonymous&&r.firstChild())continue;break}let f=Ge(r.from-n,e.ranges);if(r.to-n<=e.ranges[e.rangeI].to)e.addNode(r.tree,f);else{let p=new H(e.parser.nodeSet.types[u.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,r.tree),e.addNode(p,f)}if(r.type.is("Block")&&(Ht.indexOf(r.type.id)<0?(o=r.to-n,a=e.block.children.length):(o=l,a=h),l=r.to-n,h=e.block.children.length),!r.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-i}}function Ge(t,e){let r=t;for(let n=1;n<e.length;n++){let s=e[n-1].to,i=e[n].from;s<t&&(r-=i-s)}return r}const vt=Ie({"Blockquote/...":m.quote,HorizontalRule:m.contentSeparator,"ATXHeading1/... SetextHeading1/...":m.heading1,"ATXHeading2/... SetextHeading2/...":m.heading2,"ATXHeading3/...":m.heading3,"ATXHeading4/...":m.heading4,"ATXHeading5/...":m.heading5,"ATXHeading6/...":m.heading6,"Comment CommentBlock":m.comment,Escape:m.escape,Entity:m.character,"Emphasis/...":m.emphasis,"StrongEmphasis/...":m.strong,"Link/... Image/...":m.link,"OrderedList/... BulletList/...":m.list,"BlockQuote/...":m.quote,"InlineCode CodeText":m.monospace,"URL Autolink":m.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":m.processingInstruction,"CodeInfo LinkLabel":m.labelName,LinkTitle:m.string,Paragraph:m.content}),Nt=new Z(new Ee(Xe).extend(vt),Object.keys($).map(t=>$[t]),Object.keys($).map(t=>De[t]),Object.keys($),Bt,He,Object.keys(V).map(t=>V[t]),Object.keys(V),[]);function yt(t,e,r){let n=[];for(let s=t.firstChild,i=e;;s=s.nextSibling){let o=s?s.from:r;if(o>i&&n.push({from:i,to:o}),!s)break;i=s.to}return n}function Rt(t){let{codeParser:e,htmlParser:r}=t;return{wrap:ot((s,i)=>{let o=s.type.id;if(e&&(o==u.CodeBlock||o==u.FencedCode)){let a="";if(o==u.FencedCode){let h=s.node.getChild(u.CodeInfo);h&&(a=i.read(h.from,h.to))}let l=e(a);if(l)return{parser:l,overlay:h=>h.type.id==u.CodeText,bracketed:o==u.FencedCode}}else if(r&&(o==u.HTMLBlock||o==u.HTMLTag||o==u.CommentBlock))return{parser:r,overlay:yt(s.node,s.from,s.to)};return null})}}const Ot={resolve:"Strikethrough",mark:"StrikethroughMark"},Tt={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":m.strikethrough}},{name:"StrikethroughMark",style:m.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),s=t.slice(r+2,r+3),i=/\s|^$/.test(n),o=/\s|^$/.test(s),a=F.test(n),l=F.test(s);return t.addDelimiter(Ot,r,r+2,!o&&(!l||i||a),!i&&(!a||o||l))},after:"Emphasis"}]};function T(t,e,r=0,n,s=0){let i=0,o=!0,a=-1,l=-1,h=!1,f=()=>{n.push(t.elt("TableCell",s+a,s+l,t.parser.parseInline(e.slice(a,l),s+a)))};for(let p=r;p<e.length;p++){let d=e.charCodeAt(p);d==124&&!h?((!o||a>-1)&&i++,o=!1,n&&(a>-1&&f(),n.push(t.elt("TableDelimiter",p+s,p+s+1))),a=l=-1):(h||d!=32&&d!=9)&&(a<0&&(a=p),l=p+1),h=!h&&d==92}return a>-1&&(i++,n&&f()),i}function ge(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}const Ve=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class ke{constructor(){this.rows=null}nextLine(e,r,n){if(this.rows==null){this.rows=!1;let s;if((r.next==45||r.next==58||r.next==124)&&Ve.test(s=r.text.slice(r.pos))){let i=[];T(e,n.content,0,i,n.start)==T(e,s,r.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+r.pos,e.lineStart+r.text.length)])}}else if(this.rows){let s=[];T(e,r.text,r.pos,s,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+r.pos,e.lineStart+r.text.length,s))}return!1}finish(e,r){return this.rows?(e.addLeafElement(r,e.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}}const zt={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":m.heading}},"TableRow",{name:"TableCell",style:m.content},{name:"TableDelimiter",style:m.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return ge(e.content,0)?new ke:null},endLeaf(t,e,r){if(r.parsers.some(s=>s instanceof ke)||!ge(e.text,e.basePos))return!1;let n=t.peekLine();return Ve.test(n)&&T(t,e.text,e.basePos)==T(t,n,e.basePos)},before:"SetextHeading"}]};class Dt{nextLine(){return!1}finish(e,r){return e.addLeafElement(r,e.elt("Task",r.start,r.start+r.content.length,[e.elt("TaskMarker",r.start,r.start+3),...e.parser.parseInline(r.content.slice(3),r.start+3)])),!0}}const Ft={defineNodes:[{name:"Task",block:!0,style:m.list},{name:"TaskMarker",style:m.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Dt:null},after:"SetextHeading"}]},Le=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,be=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Xt=/[\w-]+\.[\w-]+($|\/)/,we=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Se=/\/[a-zA-Z\d@.]+/gy;function Ce(t,e,r,n){let s=0;for(let i=e;i<r;i++)t[i]==n&&s++;return s}function $t(t,e){be.lastIndex=e;let r=be.exec(t);if(!r||Xt.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let s=t[n-1],i;if(/[?!.,:*_~]/.test(s)||s==")"&&Ce(t,e,n,")")>Ce(t,e,n,"("))n--;else if(s==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+i.index;else break}return n}function Ae(t,e){we.lastIndex=e;let r=we.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}const jt={parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;if(n&&/\w/.test(t.text[n-1]))return-1;Le.lastIndex=n;let s=Le.exec(t.text),i=-1;if(!s)return-1;if(s[1]||s[2]){if(i=$t(t.text,n+s[0].length),i>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,i));i=n+o[0].length}}else s[3]?i=Ae(t.text,n):(i=Ae(t.text,n+s[0].length),i>-1&&s[0]=="xmpp:"&&(Se.lastIndex=i,s=Se.exec(t.text),s&&(i=s.index+s[0].length)));return i<0?-1:(t.addElement(t.elt("URL",r,i+t.offset)),i+t.offset)}}]},Ut=[zt,Ft,Tt,jt];function Ke(t,e,r){return(n,s,i)=>{if(s!=t||n.char(i+1)==t)return-1;let o=[n.elt(r,i,i+1)];for(let a=i+1;a<n.end;a++){let l=n.char(a);if(l==t)return n.addElement(n.elt(e,i,a+1,o.concat(n.elt(r,a,a+1))));if(l==92&&o.push(n.elt("Escape",a,a+++2)),A(l))break}return-1}}const _t={defineNodes:[{name:"Superscript",style:m.special(m.content)},{name:"SuperscriptMark",style:m.processingInstruction}],parseInline:[{name:"Superscript",parse:Ke(94,"Superscript","SuperscriptMark")}]},qt={defineNodes:[{name:"Subscript",style:m.special(m.content)},{name:"SubscriptMark",style:m.processingInstruction}],parseInline:[{name:"Subscript",parse:Ke(126,"Subscript","SubscriptMark")}]},Qt={defineNodes:[{name:"Emoji",style:m.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]},Je=pt({commentTokens:{block:{open:"<!--",close:"-->"}}}),Ye=new v,We=Nt.configure({props:[Me.add(t=>!t.is("Block")||t.is("Document")||ne(t)!=null||Zt(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Ye.add(ne),gt.add({Document:()=>null}),kt.add({Document:Je})]});function ne(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Zt(t){return t.name=="OrderedList"||t.name=="BulletList"}function Gt(t,e){let r=t;for(;;){let n=r.nextSibling,s;if(!n||(s=ne(n.type))!=null&&s<=e)break;r=n}return r.to}const Vt=dt.of((t,e,r)=>{for(let n=X(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let s=n.type.prop(Ye);if(s==null)continue;let i=Gt(n,s);if(i>r)return{from:r,to:i}}return null});function le(t){return new ft(Je,t,[],"markdown")}const Kt=le(We),Jt=We.configure([Ut,qt,_t,Qt,{props:[Me.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),q=le(Jt);function Yt(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],typeof t=="function"?n=t(r):n=ue.matchLanguageName(t,r,!0),n instanceof ue)return n.support?n.support.language.parser:Lt.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}class K{constructor(e,r,n,s,i,o,a){this.node=e,this.from=r,this.to=n,this.spaceBefore=s,this.spaceAfter=i,this.type=o,this.item=a}blank(e,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let s=this.to-this.from-n.length-this.spaceAfter.length;s>0;s--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(e,r){let n=this.node.name=="OrderedList"?String(+tt(this.item,e)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function et(t,e){let r=[],n=[];for(let s=t;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&r.push(s)}for(let s=r.length-1;s>=0;s--){let i=r[s],o,a=e.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))n.push(new K(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),n.push(new K(i.parent,l,l+f,o[1],h,o[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),n.push(new K(i.parent,l,l+f,o[1],h,p,i))}}return n}function tt(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function J(t,e,r,n=0){for(let s=-1,i=t;;){if(i.name=="ListItem"){let a=tt(i,e),l=+a[2];if(s>=0){if(l!=s+1)return;r.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(s+2+n)})}s=l}let o=i.nextSibling;if(!o)break;i=o}}function he(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(ut)!=" ")return t;let n=z(t,4,r),s="";for(let i=n;i>0;)i>=4?(s+=" ",i-=4):(s+=" ",i--);return s+t.slice(r)}const Wt=(t={})=>({state:e,dispatch:r})=>{let n=X(e),{doc:s}=e,i=null,o=e.changeByRange(a=>{if(!a.empty||!q.isActiveAt(e,a.from,-1)&&!q.isActiveAt(e,a.from,1))return i={range:a};let l=a.from,h=s.lineAt(l),f=et(n.resolveInner(l,-1),s);for(;f.length&&f[f.length-1].from>l-h.from;)f.pop();if(!f.length)return i={range:a};let p=f[f.length-1];if(p.to-p.spaceAfter.length>l-h.from)return i={range:a};let d=l>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&d){let w=p.node.firstChild,S=p.node.getChild("ListItem","ListItem");if(w.to>=l||S&&S.to<l||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)||t.nonTightLists===!1){let b=f.length>1?f[f.length-2]:null,E,I="";b&&b.item?(E=h.from+b.from,I=b.marker(s,1)):E=h.from+(b?b.to:0);let y=[{from:E,to:l,insert:I}];return p.node.name=="OrderedList"&&J(p.item,s,y,-2),b&&b.node.name=="OrderedList"&&J(b.item,s,y),{range:P.cursor(E+I.length),changes:y}}else{let b=Be(f,e,h);return{range:P.cursor(l+b.length+1),changes:{from:h.from,insert:b+e.lineBreak}}}}if(p.node.name=="Blockquote"&&d&&h.from){let w=s.lineAt(h.from-1),S=/>\s*$/.exec(w.text);if(S&&S.index==p.from){let b=e.changes([{from:w.from+S.index,to:w.to},{from:h.from+p.from,to:h.to}]);return{range:a.map(b),changes:b}}}let c=[];p.node.name=="OrderedList"&&J(p.item,s,c);let L=p.item&&p.item.from<h.from,g="";if(!L||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let w=0,S=f.length-1;w<=S;w++)g+=w==S&&!L?f[w].marker(s,1):f[w].blank(w<S?z(h.text,4,f[w+1].from)-g.length:null);let B=l;for(;B>h.from&&/\s/.test(h.text.charAt(B-h.from-1));)B--;return g=he(g,e),tr(p.node,e.doc)&&(g=Be(f,e,h)+e.lineBreak+g),c.push({from:B,to:l,insert:e.lineBreak+g}),{range:P.cursor(B+g.length+1),changes:c}});return i?!1:(r(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},er=Wt();function xe(t){return t.name=="QuoteMark"||t.name=="ListMark"}function tr(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(r.to),i=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<i.number}function Be(t,e,r){let n="";for(let s=0,i=t.length-2;s<=i;s++)n+=t[s].blank(s<i?z(r.text,4,t[s+1].from)-n.length:null,s<i);return he(n,e)}function rr(t,e){let r=t.resolveInner(e,-1),n=e;xe(r)&&(n=r.from,r=r.parent);for(let s;s=r.childBefore(n);)if(xe(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")r=s.lastChild,n=r.to;else break;return r}const nr=({state:t,dispatch:e})=>{let r=X(t),n=null,s=t.changeByRange(i=>{let o=i.from,{doc:a}=t;if(i.empty&&q.isActiveAt(t,i.from)){let l=a.lineAt(o),h=et(rr(r,o),a);if(h.length){let f=h[h.length-1],p=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-l.from>p&&!/\S/.test(l.text.slice(p,o-l.from)))return{range:P.cursor(l.from+p),changes:{from:l.from+p,to:o}};if(o-l.from==p&&(!f.item||l.from<=f.item.from||!/\S/.test(l.text.slice(0,f.to)))){let d=l.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(l.text.slice(f.from,f.to))){let c=f.blank(z(l.text,4,f.to)-z(l.text,4,f.from));return d==l.from&&(c=he(c,t)),{range:P.cursor(d+c.length),changes:{from:d,to:l.from+f.to,insert:c}}}if(d<o)return{range:P.cursor(d),changes:{from:d,to:o}}}}}return n={range:i}});return n?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},sr=[{key:"Enter",run:er},{key:"Backspace",run:nr}],rt=bt({matchClosingTags:!1});function dr(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:s}=Kt,completeHTMLTags:i=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=rt}=t;if(!(s instanceof Z))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],h=[a.support,Vt],f;o&&h.push(lr),r instanceof fe?(h.push(r.support),f=r.language):r&&(f=r);let p=e||f?Yt(e,f):void 0;l.push(Rt({codeParser:p,htmlParser:a.language.parser})),n&&h.push(at.high(lt.of(sr)));let d=le(s.configure(l));return i&&h.push(d.data.of({autocomplete:ir})),new fe(d,h)}function ir(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let s=X(e).resolveInner(r,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:r-n[0].length,to:r,options:or(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Y=null;function or(){if(Y)return Y;let t=wt(new ct(mt.create({extensions:rt}),0,!0));return Y=t?t.options:[]}const ar=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,lr=ht.domEventHandlers({paste:(t,e)=>{var r;let{main:n}=e.state.selection;if(n.empty)return!1;let s=(r=t.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s)||(/^www\./.test(s)&&(s="https://"+s),!q.isActiveAt(e.state,n.from,1)))return!1;let i=X(e.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:a=>{(a.from>n.from||ar.test(a.name))&&(o=!0)},leave:a=>{a.to<n.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});export{Kt as commonmarkLanguage,nr as deleteMarkupBackward,er as insertNewlineContinueMarkup,Wt as insertNewlineContinueMarkupCommand,dr as markdown,sr as markdownKeymap,q as markdownLanguage,lr as pasteURLAsLink};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as g,a as P,p as l,n as i,s as q,t as r,e as c,E as p}from"./index-BVn2p8fW.js";import{html as R}from"./index-47TV2jCu.js";import"./index-BnFWda1Q.js";const b=1,$=33,m=34,v=35,x=36,W=new p(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(b)});function n(O,e,a){return new p(t=>{let u=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>u&&t.acceptToken(e)})}const d=n(39,$,!1),C=n(34,m,!1),f=n(39,v,!0),T=n(34,x,!0),A=c.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"⚠ Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[W,d,C,f,T,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),Q=A.configure({props:[q({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),o={parser:V},w={parser:i.parser},U=Q.configure({wrap:l((O,e)=>O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,e)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=R({selfClosingTags:!0});function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?N:null;case"Text":return E}return null}function Z(O={}){let e=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof g))throw new RangeError("The base option must be the result of calling html(...)");e=O.base}return new P(e.language==s.language?k:S(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{Z as angular,k as angularLanguage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as p,a as u,p as n,s as l,t as e,n as m,e as b,l as r}from"./index-BVn2p8fW.js";import{html as S}from"./index-47TV2jCu.js";import"./index-BnFWda1Q.js";const c=b.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:"!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",nodeNames:"⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",maxTerm:36,nodeProps:[["isolate",-3,3,13,17,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new r("b~RP#q#rU~XP#q#r[~aOT~~",17,4),new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new r("[~RPwxU~ZOp~~",11,15),new r("[~RPrsU~ZOn~~",11,14),new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),P=m.parser.configure({top:"SingleExpression"}),o=c.configure({props:[l({Text:e.content,Is:e.definitionOperator,AttributeName:e.attributeName,VueAttributeName:e.keyword,Identifier:e.variableName,"AttributeValue ScriptAttributeValue":e.attributeValue,Entity:e.character,"{{ }}":e.brace,"@ :":e.punctuation})]}),s={parser:P},Q=o.configure({wrap:n((O,t)=>O.name=="InterpolationContent"?s:null)}),g=o.configure({wrap:n((O,t)=>O.name=="AttributeScript"?s:null),top:"Attribute"}),y={parser:Q},R={parser:g},a=S();function i(O){return O.configure({dialect:"selfClosing",wrap:n(X)},"vue")}const T=i(a.language);function X(O,t){switch(O.name){case"Attribute":return/^(@|:|v-)/.test(t.read(O.from,O.from+2))?R:null;case"Text":return y}return null}function x(O={}){let t=a;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof p))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new u(t.language==a.language?T:i(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["{",'"']}})])}export{x as vue,T as vueLanguage};
|