-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewer.bundle.js
More file actions
78 lines (78 loc) · 102 KB
/
Copy pathviewer.bundle.js
File metadata and controls
78 lines (78 loc) · 102 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
var S1=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],h0=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118000,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918000,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function zx(x){if(x<=255)return S1[x];let N=0,F=h0.length-1;while(N<=F){let M=N+F>>1,A=h0[M];if(x<A[0]){F=M-1;continue}if(x>A[1]){N=M+1;continue}return A[2]}return"L"}function Cx(x){let N=x.length;if(N===0)return null;let F=Array(N),M=!1;for(let B=0;B<N;){let S=x.charCodeAt(B),Z=S,X=1;if(S>=55296&&S<=56319&&B+1<N){let R=x.charCodeAt(B+1);if(R>=56320&&R<=57343)Z=(S-55296<<10)+(R-56320)+65536,X=2}let Q=zx(Z);if(Q==="R"||Q==="AL"||Q==="AN")M=!0;for(let R=0;R<X;R++)F[B+R]=Q;B+=X}if(!M)return null;let A=0;for(let B=0;B<N;B++){let S=F[B];if(S==="L"){A=0;break}if(S==="R"||S==="AL"){A=1;break}}let D=new Int8Array(N);for(let B=0;B<N;B++)D[B]=A;let E=A&1?"R":"L",O=E,$=O;for(let B=0;B<N;B++)if(F[B]==="NSM")F[B]=$;else $=F[B];$=O;for(let B=0;B<N;B++){let S=F[B];if(S==="EN")F[B]=$==="AL"?"AN":"EN";else if(S==="R"||S==="L"||S==="AL")$=S}for(let B=0;B<N;B++)if(F[B]==="AL")F[B]="R";for(let B=1;B<N-1;B++){if(F[B]==="ES"&&F[B-1]==="EN"&&F[B+1]==="EN")F[B]="EN";if(F[B]==="CS"&&(F[B-1]==="EN"||F[B-1]==="AN")&&F[B+1]===F[B-1])F[B]=F[B-1]}for(let B=0;B<N;B++){if(F[B]!=="EN")continue;let S;for(S=B-1;S>=0&&F[S]==="ET";S--)F[S]="EN";for(S=B+1;S<N&&F[S]==="ET";S++)F[S]="EN"}for(let B=0;B<N;B++){let S=F[B];if(S==="WS"||S==="ES"||S==="ET"||S==="CS")F[B]="ON"}$=O;for(let B=0;B<N;B++){let S=F[B];if(S==="EN")F[B]=$==="L"?"L":"EN";else if(S==="R"||S==="L")$=S}for(let B=0;B<N;B++){if(F[B]!=="ON")continue;let S=B+1;while(S<N&&F[S]==="ON")S++;let Z=B>0?F[B-1]:O,X=S<N?F[S]:O,Q=Z!=="L"?"R":"L";if(Q===(X!=="L"?"R":"L"))for(let V=B;V<S;V++)F[V]=Q;B=S-1}for(let B=0;B<N;B++)if(F[B]==="ON")F[B]=E;for(let B=0;B<N;B++){let S=F[B];if((D[B]&1)===0){if(S==="R")D[B]++;else if(S==="AN"||S==="EN")D[B]+=2}else if(S==="L"||S==="AN"||S==="EN")D[B]++}return D}function $1(x,N){let F=Cx(x);if(F===null)return null;let M=new Int8Array(N.length);for(let A=0;A<N.length;A++)M[A]=F[N[A]];return M}var jx=/[ \t\n\r\f]+/g,Kx=/[\t\n\r\f]| {2,}|^ | $/;function _x(x){let N=x??"normal";return N==="pre-wrap"?{mode:N,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:N,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Lx(x){if(!Kx.test(x))return x;let N=x.replace(jx," ");if(N.charCodeAt(0)===32)N=N.slice(1);if(N.length>0&&N.charCodeAt(N.length-1)===32)N=N.slice(0,-1);return N}function Gx(x){if(!/[\r\f]/.test(x))return x;return x.replace(/\r\n/g,`
`).replace(/[\r\f]/g,`
`)}var g0=null,Px;function yx(){if(g0===null)g0=new Intl.Segmenter(Px,{granularity:"word"});return g0}var Wx=/\p{Script=Arabic}/u,J0=/\p{M}/u,J1=/\p{Nd}/u;function X1(x){return Wx.test(x)}function Z1(x){return x>=19968&&x<=40959||x>=13312&&x<=19903||x>=131072&&x<=173791||x>=173824&&x<=177983||x>=177984&&x<=178207||x>=178208&&x<=183983||x>=183984&&x<=191471||x>=191472&&x<=192093||x>=194560&&x<=195103||x>=196608&&x<=201551||x>=201552&&x<=205743||x>=205744&&x<=210041||x>=63744&&x<=64255||x>=12288&&x<=12351||x>=12352&&x<=12447||x>=12448&&x<=12543||x>=12592&&x<=12687||x>=44032&&x<=55215||x>=65280&&x<=65519}function l(x){for(let N=0;N<x.length;N++){let F=x.charCodeAt(N);if(F<12288)continue;if(F>=55296&&F<=56319&&N+1<x.length){let M=x.charCodeAt(N+1);if(M>=56320&&M<=57343){let A=(F-55296<<10)+(M-56320)+65536;if(Z1(A))return!0;N++;continue}}if(Z1(F))return!0}return!1}function Tx(x){let N=z0(x);return N!==null&&(U0.has(N)||a.has(N))}var bx=new Set([" "," ","","\uFEFF"]);function wx(x){return l(x)}function vx(x){let N=z0(x);return N!==null&&bx.has(N)}function H0(x){return!Tx(x)&&!vx(x)}var U0=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),O0=new Set(['"',"(","[","{","“","‘","«","‹","(","〔","〈","《","「","『","【","〖","〘","〚"]),m0=new Set(["'","’"]),a=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Ix=new Set([":",".","،","؛"]),fx=new Set(["၏"]),ux=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function hx(x){if(l0(x))return!0;let N=!1;for(let F of x){if(a.has(F)){N=!0;continue}if(N&&J0.test(F))continue;return!1}return N}function gx(x){for(let N of x)if(!U0.has(N)&&!a.has(N))return!1;return x.length>0}function kx(x){if(l0(x))return!0;for(let N of x)if(!O0.has(N)&&!m0.has(N)&&!J0.test(N))return!1;return x.length>0}function l0(x){let N=!1;for(let F of x){if(F==="\\"||J0.test(F))continue;if(O0.has(F)||a.has(F)||m0.has(F)){N=!0;continue}return!1}return N}function H1(x,N){let F=N-1;if(F<=0)return Math.max(F,0);let M=x.charCodeAt(F);if(M<56320||M>57343)return F;let A=F-1;if(A<0)return F;let D=x.charCodeAt(A);return D>=55296&&D<=56319?A:F}function z0(x){if(x.length===0)return null;let N=H1(x,x.length);return x.slice(N)}function mx(x){let N=Array.from(x),F=N.length;while(F>0){let M=N[F-1];if(J0.test(M)){F--;continue}if(O0.has(M)||m0.has(M)){F--;continue}break}if(F<=0||F===N.length)return null;return{head:N.slice(0,F).join(""),tail:N.slice(F).join("")}}function lx(x,N,F){return F==="text"&&!N&&x.length===1&&x!=="-"&&x!=="—"?x:null}function Y1(x,N,F,M){let A=N[M],D=x[M];if(A==null)return D;let E=F[M];if(D.length===E)return D;let O=A.repeat(E);return x[M]=O,O}function q1(x,N){return x&&N!==null&&Ix.has(N)}function px(x){let N=z0(x);return N!==null&&fx.has(N)}function cx(x){if(x.length<2||x[0]!==" ")return null;let N=x.slice(1);if(/^\p{M}+$/u.test(N))return{space:" ",marks:N};return null}function C0(x){let N=x.length;while(N>0){let F=H1(x,N),M=x.slice(F,N);if(ux.has(M))return!0;if(!a.has(M))return!1;N=F}return!1}function ox(x,N){if(N.preserveOrdinarySpaces||N.preserveHardBreaks){if(x===" ")return"preserved-space";if(x==="\t")return"tab";if(N.preserveHardBreaks&&x===`
`)return"hard-break"}if(x===" ")return"space";if(x===" "||x===" "||x===""||x==="\uFEFF")return"glue";if(x==="")return"zero-width-break";if(x==="")return"soft-hyphen";return"text"}var dx=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function m(x){return x.length===1?x[0]:x.join("")}function sx(x,N){let F=[];for(let M=x.length-1;M>=0;M--)F.push(x[M]);return F.push(N),m(F)}function ax(x,N,F,M){if(!dx.test(x))return[{text:x,isWordLike:N,kind:"text",start:F}];let A=[],D=null,E=[],O=F,$=!1,B=0;for(let S of x){let Z=ox(S,M),X=Z==="text"&&N;if(D!==null&&Z===D&&X===$){E.push(S),B+=S.length;continue}if(D!==null)A.push({text:m(E),isWordLike:$,kind:D,start:O});D=Z,E=[S],O=F+B,$=X,B+=S.length}if(D!==null)A.push({text:m(E),isWordLike:$,kind:D,start:O});return A}function k0(x){return x==="space"||x==="preserved-space"||x==="zero-width-break"||x==="hard-break"}var ix=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function rx(x,N){let F=x.texts[N];if(F.startsWith("www."))return!0;return ix.test(F)&&N+1<x.len&&x.kinds[N+1]==="text"&&x.texts[N+1]==="//"}function nx(x){return x.includes("?")&&(x.includes("://")||x.startsWith("www."))}function tx(x){let N=x.texts.slice(),F=x.isWordLike.slice(),M=x.kinds.slice(),A=x.starts.slice();for(let E=0;E<x.len;E++){if(M[E]!=="text"||!rx(x,E))continue;let O=[N[E]],$=E+1;while($<x.len&&!k0(M[$])){O.push(N[$]),F[E]=!0;let B=N[$].includes("?");if(M[$]="text",N[$]="",$++,B)break}N[E]=m(O)}let D=0;for(let E=0;E<N.length;E++){let O=N[E];if(O.length===0)continue;if(D!==E)N[D]=O,F[D]=F[E],M[D]=M[E],A[D]=A[E];D++}return N.length=D,F.length=D,M.length=D,A.length=D,{len:D,texts:N,isWordLike:F,kinds:M,starts:A}}function ex(x){let N=[],F=[],M=[],A=[];for(let D=0;D<x.len;D++){let E=x.texts[D];if(N.push(E),F.push(x.isWordLike[D]),M.push(x.kinds[D]),A.push(x.starts[D]),!nx(E))continue;let O=D+1;if(O>=x.len||k0(x.kinds[O]))continue;let $=[],B=x.starts[O],S=O;while(S<x.len&&!k0(x.kinds[S]))$.push(x.texts[S]),S++;if($.length>0)N.push(m($)),F.push(!0),M.push("text"),A.push(B),D=S-1}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}var xN=new Set([":","-","/","×",",",".","+","–","—"]),Q1=/^[A-Za-z0-9_]+[,:;]*$/,R1=/[,:;]+$/;function U1(x){for(let N of x)if(J1.test(N))return!0;return!1}function B0(x){if(x.length===0)return!1;for(let N of x){if(J1.test(N)||xN.has(N))continue;return!1}return!0}function NN(x){let N=[],F=[],M=[],A=[];for(let D=0;D<x.len;D++){let E=x.texts[D],O=x.kinds[D];if(O==="text"&&B0(E)&&U1(E)){let $=[E],B=D+1;while(B<x.len&&x.kinds[B]==="text"&&B0(x.texts[B]))$.push(x.texts[B]),B++;N.push(m($)),F.push(!0),M.push("text"),A.push(x.starts[D]),D=B-1;continue}N.push(E),F.push(x.isWordLike[D]),M.push(O),A.push(x.starts[D])}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function FN(x){let N=[],F=[],M=[],A=[];for(let D=0;D<x.len;D++){let E=x.texts[D],O=x.kinds[D],$=x.isWordLike[D];if(O==="text"&&$&&Q1.test(E)){let B=[E],S=R1.test(E),Z=D+1;while(S&&Z<x.len&&x.kinds[Z]==="text"&&x.isWordLike[Z]&&Q1.test(x.texts[Z])){let X=x.texts[Z];B.push(X),S=R1.test(X),Z++}N.push(m(B)),F.push(!0),M.push("text"),A.push(x.starts[D]),D=Z-1;continue}N.push(E),F.push($),M.push(O),A.push(x.starts[D])}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function AN(x){let N=[],F=[],M=[],A=[];for(let D=0;D<x.len;D++){let E=x.texts[D];if(x.kinds[D]==="text"&&E.includes("-")){let O=E.split("-"),$=O.length>1;for(let B=0;B<O.length;B++){let S=O[B];if(!$)break;if(S.length===0||!U1(S)||!B0(S))$=!1}if($){let B=0;for(let S=0;S<O.length;S++){let Z=O[S],X=S<O.length-1?`${Z}-`:Z;N.push(X),F.push(!0),M.push("text"),A.push(x.starts[D]+B),B+=X.length}continue}}N.push(E),F.push(x.isWordLike[D]),M.push(x.kinds[D]),A.push(x.starts[D])}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function MN(x){let N=[],F=[],M=[],A=[],D=0;while(D<x.len){let E=[x.texts[D]],O=x.isWordLike[D],$=x.kinds[D],B=x.starts[D];if($==="glue"){let S=[E[0]],Z=B;D++;while(D<x.len&&x.kinds[D]==="glue")S.push(x.texts[D]),D++;let X=m(S);if(D<x.len&&x.kinds[D]==="text")E[0]=X,E.push(x.texts[D]),O=x.isWordLike[D],$="text",B=Z,D++;else{N.push(X),F.push(!1),M.push("glue"),A.push(Z);continue}}else D++;if($==="text")while(D<x.len&&x.kinds[D]==="glue"){let S=[];while(D<x.len&&x.kinds[D]==="glue")S.push(x.texts[D]),D++;let Z=m(S);if(D<x.len&&x.kinds[D]==="text"){E.push(Z,x.texts[D]),O=O||x.isWordLike[D],D++;continue}E.push(Z)}N.push(m(E)),F.push(O),M.push($),A.push(B)}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function DN(x){let N=x.texts.slice(),F=x.isWordLike.slice(),M=x.kinds.slice(),A=x.starts.slice();for(let D=0;D<N.length-1;D++){if(M[D]!=="text"||M[D+1]!=="text")continue;if(!l(N[D])||!l(N[D+1]))continue;let E=mx(N[D]);if(E===null)continue;N[D]=E.head,N[D+1]=E.tail+N[D+1],A[D+1]=A[D]+E.head.length}return{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function V1(x,N,F){let M=yx(),A=0,D=[],E=[],O=[],$=[],B=[],S=[],Z=[],X=[],Q=[],R=[],V=[],C=[];for(let q of M.segment(x))for(let U of ax(q.segment,q.isWordLike??!1,q.index,F)){let z=function(){if(S[Y]!==null)E[Y]=[Y1(D,S,Z,Y)],S[Y]=null;E[Y].push(U.text),O[Y]=O[Y]||U.isWordLike,X[Y]=X[Y]||L,Q[Y]=Q[Y]||W,R[Y]=j,V[Y]=w,C[Y]=q1(Q[Y],H)},P=U.kind==="text",y=lx(U.text,U.isWordLike,U.kind),L=l(U.text),W=X1(U.text),H=z0(U.text),j=C0(U.text),w=px(U.text),Y=A-1;if(N.carryCJKAfterClosingQuote&&P&&A>0&&$[Y]==="text"&&L&&X[Y]&&R[Y])z();else if(P&&A>0&&$[Y]==="text"&&gx(U.text)&&X[Y])z();else if(P&&A>0&&$[Y]==="text"&&V[Y])z();else if(P&&A>0&&$[Y]==="text"&&U.isWordLike&&W&&C[Y])z(),O[Y]=!0;else if(y!==null&&A>0&&$[Y]==="text"&&S[Y]===y)Z[Y]=(Z[Y]??1)+1;else if(P&&!U.isWordLike&&A>0&&$[Y]==="text"&&!X[Y]&&(hx(U.text)||U.text==="-"&&O[Y]))z();else D[A]=U.text,E[A]=[U.text],O[A]=U.isWordLike,$[A]=U.kind,B[A]=U.start,S[A]=y,Z[A]=y===null?0:1,X[A]=L,Q[A]=W,R[A]=j,V[A]=w,C[A]=q1(W,H),A++}for(let q=0;q<A;q++){if(S[q]!==null){D[q]=Y1(D,S,Z,q);continue}D[q]=m(E[q])}for(let q=1;q<A;q++)if($[q]==="text"&&!O[q]&&l0(D[q])&&$[q-1]==="text"&&!X[q-1])D[q-1]+=D[q],O[q-1]=O[q-1]||O[q],D[q]="";let _=Array.from({length:A},()=>null),b=-1;for(let q=A-1;q>=0;q--){let U=D[q];if(U.length===0)continue;if($[q]==="text"&&!O[q]&&kx(U)&&b>=0&&$[b]==="text"){let P=_[b]??[];P.push(U),_[b]=P,B[b]=B[q],D[q]="";continue}b=q}for(let q=0;q<A;q++){let U=_[q];if(U==null)continue;D[q]=sx(U,D[q])}let G=0;for(let q=0;q<A;q++){let U=D[q];if(U.length===0)continue;if(G!==q)D[G]=U,O[G]=O[q],$[G]=$[q],B[G]=B[q];G++}D.length=G,O.length=G,$.length=G,B.length=G;let f=MN({len:G,texts:D,isWordLike:O,kinds:$,starts:B}),K=DN(FN(AN(NN(ex(tx(f))))));for(let q=0;q<K.len-1;q++){let U=cx(K.texts[q]);if(U===null)continue;if(K.kinds[q]!=="space"&&K.kinds[q]!=="preserved-space"||K.kinds[q+1]!=="text"||!X1(K.texts[q+1]))continue;K.texts[q]=U.space,K.isWordLike[q]=!1,K.kinds[q]=K.kinds[q]==="preserved-space"?"preserved-space":"space",K.texts[q+1]=U.marks+K.texts[q+1],K.starts[q+1]=K.starts[q]+U.space.length}return K}function EN(x,N){if(x.len===0)return[];if(!N.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:x.len,consumedEndSegmentIndex:x.len}];let F=[],M=0;for(let A=0;A<x.len;A++){if(x.kinds[A]!=="hard-break")continue;F.push({startSegmentIndex:M,endSegmentIndex:A,consumedEndSegmentIndex:A+1}),M=A+1}if(M<x.len)F.push({startSegmentIndex:M,endSegmentIndex:x.len,consumedEndSegmentIndex:x.len});return F}function BN(x){if(x.len<=1)return x;let N=[],F=[],M=[],A=[],D=null,E=!1,O=0,$=!1,B=!1;function S(){if(D===null)return;N.push(m(D)),F.push(E),M.push("text"),A.push(O),D=null}for(let Z=0;Z<x.len;Z++){let X=x.texts[Z],Q=x.kinds[Z],R=x.isWordLike[Z],V=x.starts[Z];if(Q==="text"){let C=wx(X),_=H0(X);if(D!==null&&$&&B){D.push(X),E=E||R,$=$||C,B=_;continue}S(),D=[X],E=R,O=V,$=C,B=_;continue}S(),N.push(X),F.push(R),M.push(Q),A.push(V)}return S(),{len:N.length,texts:N,isWordLike:F,kinds:M,starts:A}}function z1(x,N,F="normal",M="normal"){let A=_x(F),D=A.mode==="pre-wrap"?Gx(x):Lx(x);if(D.length===0)return{normalized:D,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let E=M==="keep-all"?BN(V1(D,N,A)):V1(D,N,A);return{normalized:D,chunks:EN(E,A),...E}}var N0=null,C1=new Map,F0=null,ON=96,SN=/\p{Emoji_Presentation}/u,$N=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,p0=null,j1=new Map;function c0(){if(N0!==null)return N0;if(typeof OffscreenCanvas<"u")return N0=new OffscreenCanvas(1,1).getContext("2d"),N0;if(typeof document<"u")return N0=document.createElement("canvas").getContext("2d"),N0;throw Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function XN(x){let N=C1.get(x);if(!N)N=new Map,C1.set(x,N);return N}function o(x,N){let F=N.get(x);if(F===void 0)F={width:c0().measureText(x).width,containsCJK:l(x)},N.set(x,F);return F}function r(){if(F0!==null)return F0;if(typeof navigator>"u")return F0={lineFitEpsilon:0.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},F0;let x=navigator.userAgent,F=navigator.vendor==="Apple Computer, Inc."&&x.includes("Safari/")&&!x.includes("Chrome/")&&!x.includes("Chromium/")&&!x.includes("CriOS/")&&!x.includes("FxiOS/")&&!x.includes("EdgiOS/"),M=x.includes("Chrome/")||x.includes("Chromium/")||x.includes("CriOS/")||x.includes("Edg/");return F0={lineFitEpsilon:F?0.015625:0.005,carryCJKAfterClosingQuote:M,preferPrefixWidthsForBreakableRuns:F,preferEarlySoftHyphenBreak:F},F0}function ZN(x){let N=x.match(/(\d+(?:\.\d+)?)\s*px/);return N?parseFloat(N[1]):16}function K1(){if(p0===null)p0=new Intl.Segmenter(void 0,{granularity:"grapheme"});return p0}function YN(x){return SN.test(x)||x.includes("️")}function _1(x){return $N.test(x)}function qN(x,N){let F=j1.get(x);if(F!==void 0)return F;let M=c0();M.font=x;let A=M.measureText("\uD83D\uDE00").width;if(F=0,A>N+0.5&&typeof document<"u"&&document.body!==null){let D=document.createElement("span");D.style.font=x,D.style.display="inline-block",D.style.visibility="hidden",D.style.position="absolute",D.textContent="\uD83D\uDE00",document.body.appendChild(D);let E=D.getBoundingClientRect().width;if(document.body.removeChild(D),A-E>0.5)F=A-E}return j1.set(x,F),F}function QN(x){let N=0,F=K1();for(let M of F.segment(x))if(YN(M.segment))N++;return N}function RN(x,N){if(N.emojiCount===void 0)N.emojiCount=QN(x);return N.emojiCount}function i(x,N,F){if(F===0)return N.width;return N.width-RN(x,N)*F}function L1(x,N,F,M,A){if(N.breakableFitAdvances!==void 0&&N.breakableFitMode===A)return N.breakableFitAdvances;N.breakableFitMode=A;let D=K1(),E=[];for(let S of D.segment(x))E.push(S.segment);if(E.length<=1)return N.breakableFitAdvances=null,N.breakableFitAdvances;if(A==="sum-graphemes"){let S=[];for(let Z of E){let X=o(Z,F);S.push(i(Z,X,M))}return N.breakableFitAdvances=S,N.breakableFitAdvances}if(A==="pair-context"||E.length>ON){let S=[],Z=null,X=0;for(let Q of E){let R=o(Q,F),V=i(Q,R,M);if(Z===null)S.push(V);else{let C=Z+Q,_=o(C,F);S.push(i(C,_,M)-X)}Z=Q,X=V}return N.breakableFitAdvances=S,N.breakableFitAdvances}let O=[],$="",B=0;for(let S of E){$+=S;let Z=o($,F),X=i($,Z,M);O.push(X-B),B=X}return N.breakableFitAdvances=O,N.breakableFitAdvances}function G1(x,N){let F=c0();F.font=x;let M=XN(x),A=ZN(x),D=N?qN(x,A):0;return{cache:M,fontSize:A,emojiCorrection:D}}function VN(x){return x==="space"||x==="zero-width-break"||x==="soft-hyphen"}function _0(x){return x==="space"||x==="preserved-space"||x==="tab"||x==="zero-width-break"||x==="soft-hyphen"}function o0(x,N,F=x.widths.length){while(N<F){let M=x.kinds[N];if(!VN(M))break;N++}return N}function P1(x,N){if(N<=0)return 0;let F=x%N;if(Math.abs(F)<=0.000001)return N;return N-F}function y1(x,N,F){return x.letterSpacing!==0&&N&&x.spacingGraphemeCounts[F]>0?x.letterSpacing:0}function d0(x,N){return N===0?0:x+N}function JN(x,N){return x.letterSpacing!==0&&x.spacingGraphemeCounts[N]>0?x.letterSpacing:0}function W1(x,N,F,M,A){let D=N==="tab"?A+JN(x,F):x.lineEndFitAdvances[F];return d0(M,D)}function j0(x,N,F,M){let A=N==="tab"?0:x.lineEndFitAdvances[F];return d0(M,A)}function K0(x,N,F,M,A){let D=N==="tab"?A:x.lineEndPaintAdvances[F];return d0(M,D)}function T1(x,N,F){return x.letterSpacing!==0&&N?F+x.letterSpacing:F}function b1(x,N){return x.letterSpacing===0?N:N+x.letterSpacing}function w1(x,N,F,M,A,D){let E=0,O=N;while(E<x.length){let $=O+x[E]+D;if((E+1<x.length?$+A:$)>F+M)break;O=$,E++}return{fitCount:E,fittedWidth:O}}function HN(x,N){let F=0,M=x.chunks.length;while(F<M){let A=Math.floor((F+M)/2);if(N<x.chunks[A].consumedEndSegmentIndex)M=A;else F=A+1}return F<x.chunks.length?F:-1}function v1(x,N,F){let M=F.segmentIndex;if(F.graphemeIndex>0)return N;let A=x.chunks[N];if(A.startSegmentIndex===A.endSegmentIndex&&M===A.startSegmentIndex)return F.segmentIndex=M,F.graphemeIndex=0,N;if(M<A.startSegmentIndex)M=A.startSegmentIndex;if(M=o0(x,M,A.endSegmentIndex),M<A.endSegmentIndex)return F.segmentIndex=M,F.graphemeIndex=0,N;if(A.consumedEndSegmentIndex>=x.widths.length)return-1;return F.segmentIndex=A.consumedEndSegmentIndex,F.graphemeIndex=0,N+1}function I1(x,N){if(N.segmentIndex>=x.widths.length)return-1;let F=HN(x,N.segmentIndex);if(F<0)return-1;return v1(x,F,N)}function UN(x,N,F){if(F.segmentIndex>=x.widths.length)return-1;let M=N;while(M<x.chunks.length&&F.segmentIndex>=x.chunks[M].consumedEndSegmentIndex)M++;if(M>=x.chunks.length)return-1;return v1(x,M,F)}function f1(x,N){return L0(x,N)}function zN(x,N,F){let{widths:M,kinds:A,breakableFitAdvances:D}=x;if(M.length===0)return 0;let O=r().lineFitEpsilon,$=N+O,B=0,S=0,Z=!1,X=0,Q=0,R=0,V=0,C=-1,_=0;function b(){C=-1,_=0}function G(y=R,L=V,W=S){B++,F?.(W,X,Q,y,L),S=0,Z=!1,b()}function f(y,L){Z=!0,X=y,Q=0,R=y+1,V=0,S=L}function K(y,L,W){Z=!0,X=y,Q=L,R=y,V=L+1,S=W}function q(y,L){if(!Z){f(y,L);return}S+=L,R=y+1,V=0}function U(y,L){let W=D[y];for(let H=L;H<W.length;H++){let j=W[H];if(!Z)K(y,H,j);else if(S+j>$)G(),K(y,H,j);else S+=j,R=y,V=H+1}if(Z&&R===y&&V===W.length)R=y+1,V=0}let P=0;while(P<M.length){if(!Z){if(P=o0(x,P),P>=M.length)break}let y=M[P],L=A[P],W=_0(L);if(!Z){if(y>$&&D[P]!==null)U(P,0);else f(P,y);if(W)C=P+1,_=S-y;P++;continue}if(S+y>$){if(W){q(P,y),G(P+1,0,S-y),P++;continue}if(C>=0){if(R>C||R===C&&V>0){G();continue}G(C,0,_);continue}if(y>$&&D[P]!==null){G(),U(P,0),P++;continue}G();continue}if(q(P,y),W)C=P+1,_=S-y;P++}if(Z)G();return B}function L0(x,N,F){if(x.simpleLineWalkFastPath)return zN(x,N,F);let{widths:M,kinds:A,breakableFitAdvances:D,discretionaryHyphenWidth:E,chunks:O}=x;if(M.length===0||O.length===0)return 0;let $=r(),B=$.lineFitEpsilon,S=N+B,Z=0,X=0,Q=!1,R=0,V=0,C=0,_=0,b=-1,G=0,f=0,K=null;function q(){b=-1,G=0,f=0,K=null}function U(Y=C,z=_,J=X){Z++,F?.(J,R,V,Y,z),X=0,Q=!1,q()}function P(Y,z){Q=!0,R=Y,V=0,C=Y+1,_=0,X=z}function y(Y,z,J){Q=!0,R=Y,V=z,C=Y,_=z+1,X=J}function L(Y,z){if(!Q){P(Y,z);return}X+=z,C=Y+1,_=0}function W(Y,z,J,T,h,g){if(!z)return;let u=j0(x,Y,J,h),p=K0(x,Y,J,h,T);b=J+1,G=X-g+u,f=X-g+p,K=Y}function H(Y,z){let J=D[Y];for(let T=z;T<J.length;T++){let h=J[T];if(!Q)y(Y,T,h);else{let g=T1(x,!0,h),u=X+g;if(b1(x,u)>S)U(),y(Y,T,h);else X=u,C=Y,_=T+1}}if(Q&&C===Y&&_===J.length)C=Y+1,_=0}function j(Y){if(K!=="soft-hyphen")return!1;let z=D[Y];if(z==null)return!1;let{fitCount:J,fittedWidth:T}=w1(z,X,N,B,E,x.letterSpacing);if(J===0)return!1;if(X=T,C=Y,_=J,q(),J===z.length)return C=Y+1,_=0,!0;return U(Y,J,T+E),H(Y,J),!0}function w(Y){Z++,F?.(0,Y.startSegmentIndex,0,Y.consumedEndSegmentIndex,0),q()}for(let Y=0;Y<O.length;Y++){let z=O[Y];if(z.startSegmentIndex===z.endSegmentIndex){w(z);continue}Q=!1,X=0,R=z.startSegmentIndex,V=0,C=z.startSegmentIndex,_=0,q();let J=z.startSegmentIndex;while(J<z.endSegmentIndex){if(!Q){if(J=o0(x,J,z.endSegmentIndex),J>=z.endSegmentIndex)break}let T=A[J],h=_0(T),g=y1(x,Q,J),u=T==="tab"?P1(X+g,x.tabStopAdvance):M[J],p=g+u,x0=W1(x,T,J,g,u);if(T==="soft-hyphen"){if(Q)C=J+1,_=0,b=J+1,G=X+E,f=X+E,K=T;J++;continue}if(!Q){if(x0>S&&D[J]!==null)H(J,0);else P(J,u);W(T,h,J,u,g,p),J++;continue}if(X+x0>S){let V0=X+j0(x,T,J,g),Ux=X+K0(x,T,J,g,u);if(K==="soft-hyphen"&&$.preferEarlySoftHyphenBreak&&G<=S){U(b,0,f);continue}if(K==="soft-hyphen"&&j(J)){J++;continue}if(h&&V0<=S){L(J,p),U(J+1,0,Ux),J++;continue}if(b>=0&&G<=S){if(C>b||C===b&&_>0){U();continue}let O1=b;U(O1,0,f),J=O1;continue}if(x0>S&&D[J]!==null){U(),H(J,0),J++;continue}U();continue}L(J,p),W(T,h,J,u,g,p),J++}if(Q){let T=b===z.consumedEndSegmentIndex?f:X;U(z.consumedEndSegmentIndex,0,T)}}return Z}function u1(x,N,F,M){let A=x.chunks[F];if(A.startSegmentIndex===A.endSegmentIndex)return N.segmentIndex=A.consumedEndSegmentIndex,N.graphemeIndex=0,0;let{widths:D,kinds:E,breakableFitAdvances:O,discretionaryHyphenWidth:$}=x,B=r(),S=B.lineFitEpsilon,Z=M+S,X=0,Q=!1,R=N.segmentIndex,V=N.graphemeIndex,C=-1,_=0,b=0,G=null;function f(){C=-1,_=0,b=0,G=null}function K(H=R,j=V,w=X){if(!Q)return null;return N.segmentIndex=H,N.graphemeIndex=j,w}function q(H,j){Q=!0,R=H+1,V=0,X=j}function U(H,j,w){Q=!0,R=H,V=j+1,X=w}function P(H,j){if(!Q){q(H,j);return}X+=j,R=H+1,V=0}function y(H,j,w,Y,z,J){if(!j)return;let T=j0(x,H,w,z),h=K0(x,H,w,z,Y);C=w+1,_=X-J+T,b=X-J+h,G=H}function L(H,j){let w=O[H];for(let Y=j;Y<w.length;Y++){let z=w[Y];if(!Q)U(H,Y,z);else{let J=T1(x,!0,z),T=X+J;if(b1(x,T)>Z)return K();X=T,R=H,V=Y+1}}if(Q&&R===H&&V===w.length)R=H+1,V=0;return null}function W(H){if(G!=="soft-hyphen"||C<0)return null;let j=O[H]??null;if(j!==null){let{fitCount:w,fittedWidth:Y}=w1(j,X,M,S,$,x.letterSpacing);if(w===j.length)return X=Y,R=H+1,V=0,f(),null;if(w>0)return K(H,w,Y+$)}if(_<=Z)return K(C,0,b);return null}for(let H=N.segmentIndex;H<A.endSegmentIndex;H++){let j=E[H],w=_0(j),Y=H===N.segmentIndex?N.graphemeIndex:0,z=y1(x,Q,H),J=j==="tab"?P1(X+z,x.tabStopAdvance):D[H],T=z+J,h=W1(x,j,H,z,J);if(j==="soft-hyphen"&&Y===0){if(Q)R=H+1,V=0,C=H+1,_=X+$,b=X+$,G=j;continue}if(!Q){if(Y>0){let u=L(H,Y);if(u!==null)return u}else if(h>Z&&O[H]!==null){let u=L(H,0);if(u!==null)return u}else q(H,J);y(j,w,H,J,z,T);continue}if(X+h>Z){let u=X+j0(x,j,H,z),p=X+K0(x,j,H,z,J);if(G==="soft-hyphen"&&B.preferEarlySoftHyphenBreak&&_<=Z)return K(C,0,b);let x0=W(H);if(x0!==null)return x0;if(w&&u<=Z)return P(H,T),K(H+1,0,p);if(C>=0&&_<=Z){if(R>C||R===C&&V>0)return K();return K(C,0,b)}if(h>Z&&O[H]!==null){let u0=K();if(u0!==null)return u0;let V0=L(H,0);if(V0!==null)return V0}return K()}P(H,T),y(j,w,H,J,z,T)}if(C===A.consumedEndSegmentIndex&&V===0)return K(A.consumedEndSegmentIndex,0,b);return K(A.consumedEndSegmentIndex,0,X)}function CN(x,N,F){let{widths:M,kinds:A,breakableFitAdvances:D}=x,O=r().lineFitEpsilon,$=F+O,B=0,S=!1,Z=N.segmentIndex,X=N.graphemeIndex,Q=-1,R=0;for(let V=N.segmentIndex;V<M.length;V++){let C=A[V],_=_0(C),b=V===N.segmentIndex?N.graphemeIndex:0,G=D[V],f=M[V];if(!S){if(b>0||f>$&&G!==null){let K=G,q=K[b];S=!0,B=q,Z=V,X=b+1;for(let U=b+1;U<K.length;U++){let P=K[U];if(B+P>$)return N.segmentIndex=Z,N.graphemeIndex=X,B;B+=P,Z=V,X=U+1}if(Z===V&&X===K.length)Z=V+1,X=0}else S=!0,B=f,Z=V+1,X=0;if(_)Q=V+1,R=B-f;continue}if(B+f>$){if(_)return N.segmentIndex=V+1,N.graphemeIndex=0,B;if(Q>=0){if(Z>Q||Z===Q&&X>0)return N.segmentIndex=Z,N.graphemeIndex=X,B;return N.segmentIndex=Q,N.graphemeIndex=0,R}return N.segmentIndex=Z,N.graphemeIndex=X,B}if(B+=f,Z=V+1,X=0,_)Q=V+1,R=B-f}if(!S)return null;return N.segmentIndex=Z,N.graphemeIndex=X,B}function h1(x,N,F){let M=I1(x,N);if(M<0)return null;if(x.simpleLineWalkFastPath)return CN(x,N,F);return u1(x,N,M,F)}function g1(x,N){if(x.widths.length===0)return{lineCount:0,maxLineWidth:0};let F={segmentIndex:0,graphemeIndex:0},M=0,A=0;if(!x.simpleLineWalkFastPath){let D=I1(x,F);while(D>=0){let E=u1(x,F,D,N);if(E===null)return{lineCount:M,maxLineWidth:A};if(M++,E>A)A=E;D=UN(x,D,F)}return{lineCount:M,maxLineWidth:A}}while(!0){let D=h1(x,F,N);if(D===null)return{lineCount:M,maxLineWidth:A};if(M++,D>A)A=D}}var s0=null;function m1(){if(s0===null)s0=new Intl.Segmenter(void 0,{granularity:"grapheme"});return s0}function jN(x){if(x)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]};return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function KN(x,N){let F=[],M=[],A=0,D=!1,E=!1,O=!1;function $(){if(M.length===0)return;F.push({text:M.length===1?M[0]:M.join(""),start:A}),M=[],D=!1,E=!1,O=!1}function B(Z,X,Q){M=[Z],A=X,D=Q,E=C0(Z),O=O0.has(Z)}function S(Z,X){M.push(Z),D=D||X;let Q=C0(Z);if(Z.length===1&&a.has(Z))E=E||Q;else E=Q;O=!1}for(let Z of m1().segment(x)){let X=Z.segment,Q=l(X);if(M.length===0){B(X,Z.index,Q);continue}if(O||U0.has(X)||a.has(X)||N.carryCJKAfterClosingQuote&&Q&&E){S(X,Q);continue}if(!D&&!Q){S(X,Q);continue}$(),B(X,Z.index,Q)}return $(),F}function _N(x){if(x.length<=1)return x;let N=[],F=[x[0].text],M=x[0].start,A=l(x[0].text),D=H0(x[0].text);function E(){N.push({text:F.length===1?F[0]:F.join(""),start:M})}for(let O=1;O<x.length;O++){let $=x[O],B=l($.text),S=H0($.text);if(A&&D){F.push($.text),A=A||B,D=S;continue}E(),F=[$.text],M=$.start,A=B,D=S}return E(),N}function k1(x,N){if(N==="zero-width-break"||N==="soft-hyphen"||N==="hard-break")return 0;if(N==="tab")return 1;let F=0,M=m1();for(let A of M.segment(x))F++;return F}function LN(x,N,F){return N>1?x+(N-1)*F:x}function GN(x,N,F,M,A){let D=r(),{cache:E,emojiCorrection:O}=G1(N,_1(x.normalized)),$=i("-",o("-",E),O)+(A===0?0:A),S=i(" ",o(" ",E),O)*8,Z=A!==0;if(x.len===0)return jN(F);let X=[],Q=[],R=[],V=[],C=x.chunks.length<=1&&!Z,_=F?[]:null,b=[],G=[],f=F?[]:null,K=Array.from({length:x.len});function q(L,W,H,j,w,Y,z,J){if(w!=="text"&&w!=="space"&&w!=="zero-width-break")C=!1;if(X.push(W),Q.push(H),R.push(j),V.push(w),_?.push(Y),b.push(z),Z)G.push(J);if(f!==null)f.push(L)}function U(L,W,H,j,w){let Y=o(L,E),z=Z?k1(L,W):0,J=LN(i(L,Y,O),z,A),T=W==="space"||W==="preserved-space"||W==="zero-width-break"?0:J,h=T===0?0:T+(z>0?A:0),g=W==="space"||W==="zero-width-break"?0:J;if(w&&j&&L.length>1){let u="sum-graphemes";if(A!==0)u="segment-prefixes";else if(B0(L))u="pair-context";else if(D.preferPrefixWidthsForBreakableRuns)u="segment-prefixes";let p=L1(L,Y,E,O,u);q(L,J,h,g,W,H,p,z);return}q(L,J,h,g,W,H,null,z)}for(let L=0;L<x.len;L++){K[L]=X.length;let W=x.texts[L],H=x.isWordLike[L],j=x.kinds[L],w=x.starts[L];if(j==="soft-hyphen"){q(W,0,$,$,j,w,null,0);continue}if(j==="hard-break"){q(W,0,0,0,j,w,null,0);continue}if(j==="tab"){q(W,0,0,0,j,w,null,Z?k1(W,j):0);continue}let Y=o(W,E);if(j==="text"&&Y.containsCJK){let z=KN(W,D),J=M==="keep-all"?_N(z):z;for(let T=0;T<J.length;T++){let h=J[T];U(h.text,"text",w+h.start,H,M==="keep-all"||!l(h.text))}continue}U(W,j,w,H,!0)}let P=PN(x.chunks,K,X.length),y=_===null?null:$1(x.normalized,_);if(f!==null)return{widths:X,lineEndFitAdvances:Q,lineEndPaintAdvances:R,kinds:V,simpleLineWalkFastPath:C,segLevels:y,breakableFitAdvances:b,letterSpacing:A,spacingGraphemeCounts:G,discretionaryHyphenWidth:$,tabStopAdvance:S,chunks:P,segments:f};return{widths:X,lineEndFitAdvances:Q,lineEndPaintAdvances:R,kinds:V,simpleLineWalkFastPath:C,segLevels:y,breakableFitAdvances:b,letterSpacing:A,spacingGraphemeCounts:G,discretionaryHyphenWidth:$,tabStopAdvance:S,chunks:P}}function PN(x,N,F){let M=[];for(let A=0;A<x.length;A++){let D=x[A],E=D.startSegmentIndex<N.length?N[D.startSegmentIndex]:F,O=D.endSegmentIndex<N.length?N[D.endSegmentIndex]:F,$=D.consumedEndSegmentIndex<N.length?N[D.consumedEndSegmentIndex]:F;M.push({startSegmentIndex:E,endSegmentIndex:O,consumedEndSegmentIndex:$})}return M}function l1(x,N,F,M){let A=M?.wordBreak??"normal",D=M?.letterSpacing??0,E=z1(x,r(),M?.whiteSpace,A);return GN(E,N,F,A,D)}function p1(x,N,F){return l1(x,N,!1,F)}function a0(x,N,F){return l1(x,N,!0,F)}function G0(x){return x}function c1(x,N,F){let M=f1(G0(x),N);return{lineCount:M,height:M*F}}function yN(x,N,F,M,A){return{width:x,start:{segmentIndex:N,graphemeIndex:F},end:{segmentIndex:M,graphemeIndex:A}}}function o1(x,N,F){if(x.widths.length===0)return 0;return L0(G0(x),N,(M,A,D,E,O)=>{F(yN(M,A,D,E,O))})}function d1(x,N){return g1(G0(x),N)}function s1(x){let N=0;return L0(G0(x),Number.POSITIVE_INFINITY,(F)=>{if(F>N)N=F}),N}function r0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var t=r0();function e1(x){t=x}var X0={exec:()=>null};function I(x,N=""){let F=typeof x==="string"?x:x.source,M={replace:(A,D)=>{let E=typeof D==="string"?D:D.source;return E=E.replace(k.caret,"$1"),F=F.replace(A,E),M},getRegex:()=>{return new RegExp(F,N)}};return M}var k={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(x)=>new RegExp(`^( {0,3}${x})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(x)=>new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(x)=>new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(x)=>new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(x)=>new RegExp(`^ {0,${Math.min(3,x-1)}}#`),htmlBeginRegex:(x)=>new RegExp(`^ {0,${Math.min(3,x-1)}}<(?:[a-z].*>|!--)`,"i")},WN=/^(?:[ \t]*(?:\n|$))+/,TN=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bN=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Z0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wN=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,n0=/(?:[*+-]|\d{1,9}[.)])/,xx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Nx=I(xx).replace(/bull/g,n0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vN=I(xx).replace(/bull/g,n0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),t0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,IN=/^[^\n]+/,e0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,fN=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",e0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uN=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,n0).getRegex(),w0="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hN=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",x1).replace("tag",w0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fx=I(t0).replace("hr",Z0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w0).getRegex(),gN=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fx).getRegex(),N1={blockquote:gN,code:TN,def:fN,fences:bN,heading:wN,hr:Z0,html:hN,lheading:Nx,list:uN,newline:WN,paragraph:Fx,table:X0,text:IN},a1=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Z0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w0).getRegex(),kN={...N1,lheading:vN,table:a1,paragraph:I(t0).replace("hr",Z0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",a1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w0).getRegex()},mN={...N1,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",x1).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:X0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(t0).replace("hr",Z0).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Nx).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ax=/^( {2,}|\\)\n(?!\s*$)/,cN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v0=/[\p{P}\p{S}]/u,F1=/[\s\p{P}\p{S}]/u,Mx=/[^\s\p{P}\p{S}]/u,oN=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,F1).getRegex(),Dx=/(?!~)[\p{P}\p{S}]/u,dN=/(?!~)[\s\p{P}\p{S}]/u,sN=/(?:[^\s\p{P}\p{S}]|~)/u,aN=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ex=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,iN=I(Ex,"u").replace(/punct/g,v0).getRegex(),rN=I(Ex,"u").replace(/punct/g,Dx).getRegex(),Bx="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nN=I(Bx,"gu").replace(/notPunctSpace/g,Mx).replace(/punctSpace/g,F1).replace(/punct/g,v0).getRegex(),tN=I(Bx,"gu").replace(/notPunctSpace/g,sN).replace(/punctSpace/g,dN).replace(/punct/g,Dx).getRegex(),eN=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mx).replace(/punctSpace/g,F1).replace(/punct/g,v0).getRegex(),xF=I(/\\(punct)/,"gu").replace(/punct/g,v0).getRegex(),NF=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),FF=I(x1).replace("(?:-->|$)","-->").getRegex(),AF=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",FF).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),W0=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,MF=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",W0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ox=I(/^!?\[(label)\]\[(ref)\]/).replace("label",W0).replace("ref",e0).getRegex(),Sx=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",e0).getRegex(),DF=I("reflink|nolink(?!\\()","g").replace("reflink",Ox).replace("nolink",Sx).getRegex(),A1={_backpedal:X0,anyPunctuation:xF,autolink:NF,blockSkip:aN,br:Ax,code:pN,del:X0,emStrongLDelim:iN,emStrongRDelimAst:nN,emStrongRDelimUnd:eN,escape:lN,link:MF,nolink:Sx,punctuation:oN,reflink:Ox,reflinkSearch:DF,tag:AF,text:cN,url:X0},EF={...A1,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",W0).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W0).getRegex()},i0={...A1,emStrongRDelimAst:tN,emStrongLDelim:rN,url:I(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},BF={...i0,br:I(Ax).replace("{2,}","*").getRegex(),text:I(i0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},P0={normal:N1,gfm:kN,pedantic:mN},S0={normal:A1,gfm:i0,breaks:BF,pedantic:EF},OF={"&":"&","<":"<",">":">",'"':""","'":"'"},i1=(x)=>OF[x];function c(x,N){if(N){if(k.escapeTest.test(x))return x.replace(k.escapeReplace,i1)}else if(k.escapeTestNoEncode.test(x))return x.replace(k.escapeReplaceNoEncode,i1);return x}function r1(x){try{x=encodeURI(x).replace(k.percentDecode,"%")}catch{return null}return x}function n1(x,N){let F=x.replace(k.findPipe,(D,E,O)=>{let $=!1,B=E;while(--B>=0&&O[B]==="\\")$=!$;if($)return"|";else return" |"}),M=F.split(k.splitPipe),A=0;if(!M[0].trim())M.shift();if(M.length>0&&!M.at(-1)?.trim())M.pop();if(N)if(M.length>N)M.splice(N);else while(M.length<N)M.push("");for(;A<M.length;A++)M[A]=M[A].trim().replace(k.slashPipe,"|");return M}function $0(x,N,F){let M=x.length;if(M===0)return"";let A=0;while(A<M){let D=x.charAt(M-A-1);if(D===N&&!F)A++;else if(D!==N&&F)A++;else break}return x.slice(0,M-A)}function SF(x,N){if(x.indexOf(N[1])===-1)return-1;let F=0;for(let M=0;M<x.length;M++)if(x[M]==="\\")M++;else if(x[M]===N[0])F++;else if(x[M]===N[1]){if(F--,F<0)return M}if(F>0)return-2;return-1}function t1(x,N,F,M,A){let D=N.href,E=N.title||null,O=x[1].replace(A.other.outputLinkReplace,"$1");M.state.inLink=!0;let $={type:x[0].charAt(0)==="!"?"image":"link",raw:F,href:D,title:E,text:O,tokens:M.inlineTokens(O)};return M.state.inLink=!1,$}function $F(x,N,F){let M=x.match(F.other.indentCodeCompensation);if(M===null)return N;let A=M[1];return N.split(`
`).map((D)=>{let E=D.match(F.other.beginningSpace);if(E===null)return D;let[O]=E;if(O.length>=A.length)return D.slice(A.length);return D}).join(`
`)}var T0=class{options;rules;lexer;constructor(x){this.options=x||t}space(x){let N=this.rules.block.newline.exec(x);if(N&&N[0].length>0)return{type:"space",raw:N[0]}}code(x){let N=this.rules.block.code.exec(x);if(N){let F=N[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:N[0],codeBlockStyle:"indented",text:!this.options.pedantic?$0(F,`
`):F}}}fences(x){let N=this.rules.block.fences.exec(x);if(N){let F=N[0],M=$F(F,N[3]||"",this.rules);return{type:"code",raw:F,lang:N[2]?N[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):N[2],text:M}}}heading(x){let N=this.rules.block.heading.exec(x);if(N){let F=N[2].trim();if(this.rules.other.endingHash.test(F)){let M=$0(F,"#");if(this.options.pedantic)F=M.trim();else if(!M||this.rules.other.endingSpaceChar.test(M))F=M.trim()}return{type:"heading",raw:N[0],depth:N[1].length,text:F,tokens:this.lexer.inline(F)}}}hr(x){let N=this.rules.block.hr.exec(x);if(N)return{type:"hr",raw:$0(N[0],`
`)}}blockquote(x){let N=this.rules.block.blockquote.exec(x);if(N){let F=$0(N[0],`
`).split(`
`),M="",A="",D=[];while(F.length>0){let E=!1,O=[],$;for($=0;$<F.length;$++)if(this.rules.other.blockquoteStart.test(F[$]))O.push(F[$]),E=!0;else if(!E)O.push(F[$]);else break;F=F.slice($);let B=O.join(`
`),S=B.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");M=M?`${M}
${B}`:B,A=A?`${A}
${S}`:S;let Z=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,D,!0),this.lexer.state.top=Z,F.length===0)break;let X=D.at(-1);if(X?.type==="code")break;else if(X?.type==="blockquote"){let Q=X,R=Q.raw+`
`+F.join(`
`),V=this.blockquote(R);D[D.length-1]=V,M=M.substring(0,M.length-Q.raw.length)+V.raw,A=A.substring(0,A.length-Q.text.length)+V.text;break}else if(X?.type==="list"){let Q=X,R=Q.raw+`
`+F.join(`
`),V=this.list(R);D[D.length-1]=V,M=M.substring(0,M.length-X.raw.length)+V.raw,A=A.substring(0,A.length-Q.raw.length)+V.raw,F=R.substring(D.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:M,tokens:D,text:A}}}list(x){let N=this.rules.block.list.exec(x);if(N){let F=N[1].trim(),M=F.length>1,A={type:"list",raw:"",ordered:M,start:M?+F.slice(0,-1):"",loose:!1,items:[]};if(F=M?`\\d{1,9}\\${F.slice(-1)}`:`\\${F}`,this.options.pedantic)F=M?F:"[*+-]";let D=this.rules.other.listItemRegex(F),E=!1;while(x){let $=!1,B="",S="";if(!(N=D.exec(x)))break;if(this.rules.block.hr.test(x))break;B=N[0],x=x.substring(B.length);let Z=N[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),X=x.split(`
`,1)[0],Q=!Z.trim(),R=0;if(this.options.pedantic)R=2,S=Z.trimStart();else if(Q)R=N[1].length+1;else R=N[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,S=Z.slice(R),R+=N[1].length;if(Q&&this.rules.other.blankLine.test(X))B+=X+`
`,x=x.substring(X.length+1),$=!0;if(!$){let _=this.rules.other.nextBulletRegex(R),b=this.rules.other.hrRegex(R),G=this.rules.other.fencesBeginRegex(R),f=this.rules.other.headingBeginRegex(R),K=this.rules.other.htmlBeginRegex(R);while(x){let q=x.split(`
`,1)[0],U;if(X=q,this.options.pedantic)X=X.replace(this.rules.other.listReplaceNesting," "),U=X;else U=X.replace(this.rules.other.tabCharGlobal," ");if(G.test(X))break;if(f.test(X))break;if(K.test(X))break;if(_.test(X))break;if(b.test(X))break;if(U.search(this.rules.other.nonSpaceChar)>=R||!X.trim())S+=`
`+U.slice(R);else{if(Q)break;if(Z.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(G.test(Z))break;if(f.test(Z))break;if(b.test(Z))break;S+=`
`+X}if(!Q&&!X.trim())Q=!0;B+=q+`
`,x=x.substring(q.length+1),Z=U.slice(R)}}if(!A.loose){if(E)A.loose=!0;else if(this.rules.other.doubleBlankLine.test(B))E=!0}let V=null,C;if(this.options.gfm){if(V=this.rules.other.listIsTask.exec(S),V)C=V[0]!=="[ ] ",S=S.replace(this.rules.other.listReplaceTask,"")}A.items.push({type:"list_item",raw:B,task:!!V,checked:C,loose:!1,text:S,tokens:[]}),A.raw+=B}let O=A.items.at(-1);if(O)O.raw=O.raw.trimEnd(),O.text=O.text.trimEnd();else return;A.raw=A.raw.trimEnd();for(let $=0;$<A.items.length;$++)if(this.lexer.state.top=!1,A.items[$].tokens=this.lexer.blockTokens(A.items[$].text,[]),!A.loose){let B=A.items[$].tokens.filter((Z)=>Z.type==="space"),S=B.length>0&&B.some((Z)=>this.rules.other.anyLine.test(Z.raw));A.loose=S}if(A.loose)for(let $=0;$<A.items.length;$++)A.items[$].loose=!0;return A}}html(x){let N=this.rules.block.html.exec(x);if(N)return{type:"html",block:!0,raw:N[0],pre:N[1]==="pre"||N[1]==="script"||N[1]==="style",text:N[0]}}def(x){let N=this.rules.block.def.exec(x);if(N){let F=N[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),M=N[2]?N[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",A=N[3]?N[3].substring(1,N[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):N[3];return{type:"def",tag:F,raw:N[0],href:M,title:A}}}table(x){let N=this.rules.block.table.exec(x);if(!N)return;if(!this.rules.other.tableDelimiter.test(N[2]))return;let F=n1(N[1]),M=N[2].replace(this.rules.other.tableAlignChars,"").split("|"),A=N[3]?.trim()?N[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],D={type:"table",raw:N[0],header:[],align:[],rows:[]};if(F.length!==M.length)return;for(let E of M)if(this.rules.other.tableAlignRight.test(E))D.align.push("right");else if(this.rules.other.tableAlignCenter.test(E))D.align.push("center");else if(this.rules.other.tableAlignLeft.test(E))D.align.push("left");else D.align.push(null);for(let E=0;E<F.length;E++)D.header.push({text:F[E],tokens:this.lexer.inline(F[E]),header:!0,align:D.align[E]});for(let E of A)D.rows.push(n1(E,D.header.length).map((O,$)=>{return{text:O,tokens:this.lexer.inline(O),header:!1,align:D.align[$]}}));return D}lheading(x){let N=this.rules.block.lheading.exec(x);if(N)return{type:"heading",raw:N[0],depth:N[2].charAt(0)==="="?1:2,text:N[1],tokens:this.lexer.inline(N[1])}}paragraph(x){let N=this.rules.block.paragraph.exec(x);if(N){let F=N[1].charAt(N[1].length-1)===`
`?N[1].slice(0,-1):N[1];return{type:"paragraph",raw:N[0],text:F,tokens:this.lexer.inline(F)}}}text(x){let N=this.rules.block.text.exec(x);if(N)return{type:"text",raw:N[0],text:N[0],tokens:this.lexer.inline(N[0])}}escape(x){let N=this.rules.inline.escape.exec(x);if(N)return{type:"escape",raw:N[0],text:N[1]}}tag(x){let N=this.rules.inline.tag.exec(x);if(N){if(!this.lexer.state.inLink&&this.rules.other.startATag.test(N[0]))this.lexer.state.inLink=!0;else if(this.lexer.state.inLink&&this.rules.other.endATag.test(N[0]))this.lexer.state.inLink=!1;if(!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(N[0]))this.lexer.state.inRawBlock=!0;else if(this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(N[0]))this.lexer.state.inRawBlock=!1;return{type:"html",raw:N[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:N[0]}}}link(x){let N=this.rules.inline.link.exec(x);if(N){let F=N[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(F)){if(!this.rules.other.endAngleBracket.test(F))return;let D=$0(F.slice(0,-1),"\\");if((F.length-D.length)%2===0)return}else{let D=SF(N[2],"()");if(D===-2)return;if(D>-1){let O=(N[0].indexOf("!")===0?5:4)+N[1].length+D;N[2]=N[2].substring(0,D),N[0]=N[0].substring(0,O).trim(),N[3]=""}}let M=N[2],A="";if(this.options.pedantic){let D=this.rules.other.pedanticHrefTitle.exec(M);if(D)M=D[1],A=D[3]}else A=N[3]?N[3].slice(1,-1):"";if(M=M.trim(),this.rules.other.startAngleBracket.test(M))if(this.options.pedantic&&!this.rules.other.endAngleBracket.test(F))M=M.slice(1);else M=M.slice(1,-1);return t1(N,{href:M?M.replace(this.rules.inline.anyPunctuation,"$1"):M,title:A?A.replace(this.rules.inline.anyPunctuation,"$1"):A},N[0],this.lexer,this.rules)}}reflink(x,N){let F;if((F=this.rules.inline.reflink.exec(x))||(F=this.rules.inline.nolink.exec(x))){let M=(F[2]||F[1]).replace(this.rules.other.multipleSpaceGlobal," "),A=N[M.toLowerCase()];if(!A){let D=F[0].charAt(0);return{type:"text",raw:D,text:D}}return t1(F,A,F[0],this.lexer,this.rules)}}emStrong(x,N,F=""){let M=this.rules.inline.emStrongLDelim.exec(x);if(!M)return;if(M[3]&&F.match(this.rules.other.unicodeAlphaNumeric))return;if(!(M[1]||M[2])||!F||this.rules.inline.punctuation.exec(F)){let D=[...M[0]].length-1,E,O,$=D,B=0,S=M[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;S.lastIndex=0,N=N.slice(-1*x.length+D);while((M=S.exec(N))!=null){if(E=M[1]||M[2]||M[3]||M[4]||M[5]||M[6],!E)continue;if(O=[...E].length,M[3]||M[4]){$+=O;continue}else if(M[5]||M[6]){if(D%3&&!((D+O)%3)){B+=O;continue}}if($-=O,$>0)continue;O=Math.min(O,O+$+B);let Z=[...M[0]][0].length,X=x.slice(0,D+M.index+Z+O);if(Math.min(D,O)%2){let R=X.slice(1,-1);return{type:"em",raw:X,text:R,tokens:this.lexer.inlineTokens(R)}}let Q=X.slice(2,-2);return{type:"strong",raw:X,text:Q,tokens:this.lexer.inlineTokens(Q)}}}}codespan(x){let N=this.rules.inline.code.exec(x);if(N){let F=N[2].replace(this.rules.other.newLineCharGlobal," "),M=this.rules.other.nonSpaceChar.test(F),A=this.rules.other.startingSpaceChar.test(F)&&this.rules.other.endingSpaceChar.test(F);if(M&&A)F=F.substring(1,F.length-1);return{type:"codespan",raw:N[0],text:F}}}br(x){let N=this.rules.inline.br.exec(x);if(N)return{type:"br",raw:N[0]}}del(x){let N=this.rules.inline.del.exec(x);if(N)return{type:"del",raw:N[0],text:N[2],tokens:this.lexer.inlineTokens(N[2])}}autolink(x){let N=this.rules.inline.autolink.exec(x);if(N){let F,M;if(N[2]==="@")F=N[1],M="mailto:"+F;else F=N[1],M=F;return{type:"link",raw:N[0],text:F,href:M,tokens:[{type:"text",raw:F,text:F}]}}}url(x){let N;if(N=this.rules.inline.url.exec(x)){let F,M;if(N[2]==="@")F=N[0],M="mailto:"+F;else{let A;do A=N[0],N[0]=this.rules.inline._backpedal.exec(N[0])?.[0]??"";while(A!==N[0]);if(F=N[0],N[1]==="www.")M="http://"+N[0];else M=N[0]}return{type:"link",raw:N[0],text:F,href:M,tokens:[{type:"text",raw:F,text:F}]}}}inlineText(x){let N=this.rules.inline.text.exec(x);if(N){let F=this.lexer.state.inRawBlock;return{type:"text",raw:N[0],text:N[0],escaped:F}}}},d=class x{tokens;options;state;tokenizer;inlineQueue;constructor(N){this.tokens=[],this.tokens.links=Object.create(null),this.options=N||t,this.options.tokenizer=this.options.tokenizer||new T0,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let F={other:k,block:P0.normal,inline:S0.normal};if(this.options.pedantic)F.block=P0.pedantic,F.inline=S0.pedantic;else if(this.options.gfm)if(F.block=P0.gfm,this.options.breaks)F.inline=S0.breaks;else F.inline=S0.gfm;this.tokenizer.rules=F}static get rules(){return{block:P0,inline:S0}}static lex(N,F){return new x(F).lex(N)}static lexInline(N,F){return new x(F).inlineTokens(N)}lex(N){N=N.replace(k.carriageReturn,`
`),this.blockTokens(N,this.tokens);for(let F=0;F<this.inlineQueue.length;F++){let M=this.inlineQueue[F];this.inlineTokens(M.src,M.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(N,F=[],M=!1){if(this.options.pedantic)N=N.replace(k.tabCharGlobal," ").replace(k.spaceLine,"");while(N){let A;if(this.options.extensions?.block?.some((E)=>{if(A=E.call({lexer:this},N,F))return N=N.substring(A.raw.length),F.push(A),!0;return!1}))continue;if(A=this.tokenizer.space(N)){N=N.substring(A.raw.length);let E=F.at(-1);if(A.raw.length===1&&E!==void 0)E.raw+=`
`;else F.push(A);continue}if(A=this.tokenizer.code(N)){N=N.substring(A.raw.length);let E=F.at(-1);if(E?.type==="paragraph"||E?.type==="text")E.raw+=`
`+A.raw,E.text+=`
`+A.text,this.inlineQueue.at(-1).src=E.text;else F.push(A);continue}if(A=this.tokenizer.fences(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.heading(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.hr(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.blockquote(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.list(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.html(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.def(N)){N=N.substring(A.raw.length);let E=F.at(-1);if(E?.type==="paragraph"||E?.type==="text")E.raw+=`
`+A.raw,E.text+=`
`+A.raw,this.inlineQueue.at(-1).src=E.text;else if(!this.tokens.links[A.tag])this.tokens.links[A.tag]={href:A.href,title:A.title};continue}if(A=this.tokenizer.table(N)){N=N.substring(A.raw.length),F.push(A);continue}if(A=this.tokenizer.lheading(N)){N=N.substring(A.raw.length),F.push(A);continue}let D=N;if(this.options.extensions?.startBlock){let E=1/0,O=N.slice(1),$;if(this.options.extensions.startBlock.forEach((B)=>{if($=B.call({lexer:this},O),typeof $==="number"&&$>=0)E=Math.min(E,$)}),E<1/0&&E>=0)D=N.substring(0,E+1)}if(this.state.top&&(A=this.tokenizer.paragraph(D))){let E=F.at(-1);if(M&&E?.type==="paragraph")E.raw+=`
`+A.raw,E.text+=`
`+A.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=E.text;else F.push(A);M=D.length!==N.length,N=N.substring(A.raw.length);continue}if(A=this.tokenizer.text(N)){N=N.substring(A.raw.length);let E=F.at(-1);if(E?.type==="text")E.raw+=`
`+A.raw,E.text+=`
`+A.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=E.text;else F.push(A);continue}if(N){let E="Infinite loop on byte: "+N.charCodeAt(0);if(this.options.silent){console.error(E);break}else throw Error(E)}}return this.state.top=!0,F}inline(N,F=[]){return this.inlineQueue.push({src:N,tokens:F}),F}inlineTokens(N,F=[]){let M=N,A=null;if(this.tokens.links){let O=Object.keys(this.tokens.links);if(O.length>0){while((A=this.tokenizer.rules.inline.reflinkSearch.exec(M))!=null)if(O.includes(A[0].slice(A[0].lastIndexOf("[")+1,-1)))M=M.slice(0,A.index)+"["+"a".repeat(A[0].length-2)+"]"+M.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)}}while((A=this.tokenizer.rules.inline.anyPunctuation.exec(M))!=null)M=M.slice(0,A.index)+"++"+M.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);while((A=this.tokenizer.rules.inline.blockSkip.exec(M))!=null)M=M.slice(0,A.index)+"["+"a".repeat(A[0].length-2)+"]"+M.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let D=!1,E="";while(N){if(!D)E="";D=!1;let O;if(this.options.extensions?.inline?.some((B)=>{if(O=B.call({lexer:this},N,F))return N=N.substring(O.raw.length),F.push(O),!0;return!1}))continue;if(O=this.tokenizer.escape(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.tag(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.link(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.reflink(N,this.tokens.links)){N=N.substring(O.raw.length);let B=F.at(-1);if(O.type==="text"&&B?.type==="text")B.raw+=O.raw,B.text+=O.text;else F.push(O);continue}if(O=this.tokenizer.emStrong(N,M,E)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.codespan(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.br(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.del(N)){N=N.substring(O.raw.length),F.push(O);continue}if(O=this.tokenizer.autolink(N)){N=N.substring(O.raw.length),F.push(O);continue}if(!this.state.inLink&&(O=this.tokenizer.url(N))){N=N.substring(O.raw.length),F.push(O);continue}let $=N;if(this.options.extensions?.startInline){let B=1/0,S=N.slice(1),Z;if(this.options.extensions.startInline.forEach((X)=>{if(Z=X.call({lexer:this},S),typeof Z==="number"&&Z>=0)B=Math.min(B,Z)}),B<1/0&&B>=0)$=N.substring(0,B+1)}if(O=this.tokenizer.inlineText($)){if(N=N.substring(O.raw.length),O.raw.slice(-1)!=="_")E=O.raw.slice(-1);D=!0;let B=F.at(-1);if(B?.type==="text")B.raw+=O.raw,B.text+=O.text;else F.push(O);continue}if(N){let B="Infinite loop on byte: "+N.charCodeAt(0);if(this.options.silent){console.error(B);break}else throw Error(B)}}return F}},b0=class{options;parser;constructor(x){this.options=x||t}space(x){return""}code({text:x,lang:N,escaped:F}){let M=(N||"").match(k.notSpaceStart)?.[0],A=x.replace(k.endingNewline,"")+`
`;if(!M)return"<pre><code>"+(F?A:c(A,!0))+`</code></pre>
`;return'<pre><code class="language-'+c(M)+'">'+(F?A:c(A,!0))+`</code></pre>
`}blockquote({tokens:x}){return`<blockquote>
${this.parser.parse(x)}</blockquote>
`}html({text:x}){return x}heading({tokens:x,depth:N}){return`<h${N}>${this.parser.parseInline(x)}</h${N}>
`}hr(x){return`<hr>
`}list(x){let{ordered:N,start:F}=x,M="";for(let E=0;E<x.items.length;E++){let O=x.items[E];M+=this.listitem(O)}let A=N?"ol":"ul",D=N&&F!==1?' start="'+F+'"':"";return"<"+A+D+`>
`+M+"</"+A+`>
`}listitem(x){let N="";if(x.task){let F=this.checkbox({checked:!!x.checked});if(x.loose)if(x.tokens[0]?.type==="paragraph"){if(x.tokens[0].text=F+" "+x.tokens[0].text,x.tokens[0].tokens&&x.tokens[0].tokens.length>0&&x.tokens[0].tokens[0].type==="text")x.tokens[0].tokens[0].text=F+" "+c(x.tokens[0].tokens[0].text),x.tokens[0].tokens[0].escaped=!0}else x.tokens.unshift({type:"text",raw:F+" ",text:F+" ",escaped:!0});else N+=F+" "}return N+=this.parser.parse(x.tokens,!!x.loose),`<li>${N}</li>
`}checkbox({checked:x}){return"<input "+(x?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:x}){return`<p>${this.parser.parseInline(x)}</p>
`}table(x){let N="",F="";for(let A=0;A<x.header.length;A++)F+=this.tablecell(x.header[A]);N+=this.tablerow({text:F});let M="";for(let A=0;A<x.rows.length;A++){let D=x.rows[A];F="";for(let E=0;E<D.length;E++)F+=this.tablecell(D[E]);M+=this.tablerow({text:F})}if(M)M=`<tbody>${M}</tbody>`;return`<table>
<thead>
`+N+`</thead>
`+M+`</table>
`}tablerow({text:x}){return`<tr>
${x}</tr>
`}tablecell(x){let N=this.parser.parseInline(x.tokens),F=x.header?"th":"td";return(x.align?`<${F} align="${x.align}">`:`<${F}>`)+N+`</${F}>
`}strong({tokens:x}){return`<strong>${this.parser.parseInline(x)}</strong>`}em({tokens:x}){return`<em>${this.parser.parseInline(x)}</em>`}codespan({text:x}){return`<code>${c(x,!0)}</code>`}br(x){return"<br>"}del({tokens:x}){return`<del>${this.parser.parseInline(x)}</del>`}link({href:x,title:N,tokens:F}){let M=this.parser.parseInline(F),A=r1(x);if(A===null)return M;x=A;let D='<a href="'+x+'"';if(N)D+=' title="'+c(N)+'"';return D+=">"+M+"</a>",D}image({href:x,title:N,text:F,tokens:M}){if(M)F=this.parser.parseInline(M,this.parser.textRenderer);let A=r1(x);if(A===null)return c(F);x=A;let D=`<img src="${x}" alt="${F}"`;if(N)D+=` title="${c(N)}"`;return D+=">",D}text(x){return"tokens"in x&&x.tokens?this.parser.parseInline(x.tokens):("escaped"in x)&&x.escaped?x.text:c(x.text)}},M1=class{strong({text:x}){return x}em({text:x}){return x}codespan({text:x}){return x}del({text:x}){return x}html({text:x}){return x}text({text:x}){return x}link({text:x}){return""+x}image({text:x}){return""+x}br(){return""}},s=class x{options;renderer;textRenderer;constructor(N){this.options=N||t,this.options.renderer=this.options.renderer||new b0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new M1}static parse(N,F){return new x(F).parse(N)}static parseInline(N,F){return new x(F).parseInline(N)}parse(N,F=!0){let M="";for(let A=0;A<N.length;A++){let D=N[A];if(this.options.extensions?.renderers?.[D.type]){let O=D,$=this.options.extensions.renderers[O.type].call({parser:this},O);if($!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(O.type)){M+=$||"";continue}}let E=D;switch(E.type){case"space":{M+=this.renderer.space(E);continue}case"hr":{M+=this.renderer.hr(E);continue}case"heading":{M+=this.renderer.heading(E);continue}case"code":{M+=this.renderer.code(E);continue}case"table":{M+=this.renderer.table(E);continue}case"blockquote":{M+=this.renderer.blockquote(E);continue}case"list":{M+=this.renderer.list(E);continue}case"html":{M+=this.renderer.html(E);continue}case"paragraph":{M+=this.renderer.paragraph(E);continue}case"text":{let O=E,$=this.renderer.text(O);while(A+1<N.length&&N[A+1].type==="text")O=N[++A],$+=`
`+this.renderer.text(O);if(F)M+=this.renderer.paragraph({type:"paragraph",raw:$,text:$,tokens:[{type:"text",raw:$,text:$,escaped:!0}]});else M+=$;continue}default:{let O='Token with "'+E.type+'" type was not found.';if(this.options.silent)return console.error(O),"";else throw Error(O)}}}return M}parseInline(N,F=this.renderer){let M="";for(let A=0;A<N.length;A++){let D=N[A];if(this.options.extensions?.renderers?.[D.type]){let O=this.options.extensions.renderers[D.type].call({parser:this},D);if(O!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(D.type)){M+=O||"";continue}}let E=D;switch(E.type){case"escape":{M+=F.text(E);break}case"html":{M+=F.html(E);break}case"link":{M+=F.link(E);break}case"image":{M+=F.image(E);break}case"strong":{M+=F.strong(E);break}case"em":{M+=F.em(E);break}case"codespan":{M+=F.codespan(E);break}case"br":{M+=F.br(E);break}case"del":{M+=F.del(E);break}case"text":{M+=F.text(E);break}default:{let O='Token with "'+E.type+'" type was not found.';if(this.options.silent)return console.error(O),"";else throw Error(O)}}}return M}},y0=class{options;block;constructor(x){this.options=x||t}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(x){return x}postprocess(x){return x}processAllTokens(x){return x}provideLexer(){return this.block?d.lex:d.lexInline}provideParser(){return this.block?s.parse:s.parseInline}},XF=class{defaults=r0();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=s;Renderer=b0;TextRenderer=M1;Lexer=d;Tokenizer=T0;Hooks=y0;constructor(...x){this.use(...x)}walkTokens(x,N){let F=[];for(let M of x)switch(F=F.concat(N.call(this,M)),M.type){case"table":{let A=M;for(let D of A.header)F=F.concat(this.walkTokens(D.tokens,N));for(let D of A.rows)for(let E of D)F=F.concat(this.walkTokens(E.tokens,N));break}case"list":{let A=M;F=F.concat(this.walkTokens(A.items,N));break}default:{let A=M;if(this.defaults.extensions?.childTokens?.[A.type])this.defaults.extensions.childTokens[A.type].forEach((D)=>{let E=A[D].flat(1/0);F=F.concat(this.walkTokens(E,N))});else if(A.tokens)F=F.concat(this.walkTokens(A.tokens,N))}}return F}use(...x){let N=this.defaults.extensions||{renderers:{},childTokens:{}};return x.forEach((F)=>{let M={...F};if(M.async=this.defaults.async||M.async||!1,F.extensions)F.extensions.forEach((A)=>{if(!A.name)throw Error("extension name required");if("renderer"in A){let D=N.renderers[A.name];if(D)N.renderers[A.name]=function(...E){let O=A.renderer.apply(this,E);if(O===!1)O=D.apply(this,E);return O};else N.renderers[A.name]=A.renderer}if("tokenizer"in A){if(!A.level||A.level!=="block"&&A.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let D=N[A.level];if(D)D.unshift(A.tokenizer);else N[A.level]=[A.tokenizer];if(A.start){if(A.level==="block")if(N.startBlock)N.startBlock.push(A.start);else N.startBlock=[A.start];else if(A.level==="inline")if(N.startInline)N.startInline.push(A.start);else N.startInline=[A.start]}}if("childTokens"in A&&A.childTokens)N.childTokens[A.name]=A.childTokens}),M.extensions=N;if(F.renderer){let A=this.defaults.renderer||new b0(this.defaults);for(let D in F.renderer){if(!(D in A))throw Error(`renderer '${D}' does not exist`);if(["options","parser"].includes(D))continue;let E=D,O=F.renderer[E],$=A[E];A[E]=(...B)=>{let S=O.apply(A,B);if(S===!1)S=$.apply(A,B);return S||""}}M.renderer=A}if(F.tokenizer){let A=this.defaults.tokenizer||new T0(this.defaults);for(let D in F.tokenizer){if(!(D in A))throw Error(`tokenizer '${D}' does not exist`);if(["options","rules","lexer"].includes(D))continue;let E=D,O=F.tokenizer[E],$=A[E];A[E]=(...B)=>{let S=O.apply(A,B);if(S===!1)S=$.apply(A,B);return S}}M.tokenizer=A}if(F.hooks){let A=this.defaults.hooks||new y0;for(let D in F.hooks){if(!(D in A))throw Error(`hook '${D}' does not exist`);if(["options","block"].includes(D))continue;let E=D,O=F.hooks[E],$=A[E];if(y0.passThroughHooks.has(D))A[E]=(B)=>{if(this.defaults.async)return Promise.resolve(O.call(A,B)).then((Z)=>{return $.call(A,Z)});let S=O.call(A,B);return $.call(A,S)};else A[E]=(...B)=>{let S=O.apply(A,B);if(S===!1)S=$.apply(A,B);return S}}M.hooks=A}if(F.walkTokens){let A=this.defaults.walkTokens,D=F.walkTokens;M.walkTokens=function(E){let O=[];if(O.push(D.call(this,E)),A)O=O.concat(A.call(this,E));return O}}this.defaults={...this.defaults,...M}}),this}setOptions(x){return this.defaults={...this.defaults,...x},this}lexer(x,N){return d.lex(x,N??this.defaults)}parser(x,N){return s.parse(x,N??this.defaults)}parseMarkdown(x){return(F,M)=>{let A={...M},D={...this.defaults,...A},E=this.onError(!!D.silent,!!D.async);if(this.defaults.async===!0&&A.async===!1)return E(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof F>"u"||F===null)return E(Error("marked(): input parameter is undefined or null"));if(typeof F!=="string")return E(Error("marked(): input parameter is of type "+Object.prototype.toString.call(F)+", string expected"));if(D.hooks)D.hooks.options=D,D.hooks.block=x;let O=D.hooks?D.hooks.provideLexer():x?d.lex:d.lexInline,$=D.hooks?D.hooks.provideParser():x?s.parse:s.parseInline;if(D.async)return Promise.resolve(D.hooks?D.hooks.preprocess(F):F).then((B)=>O(B,D)).then((B)=>D.hooks?D.hooks.processAllTokens(B):B).then((B)=>D.walkTokens?Promise.all(this.walkTokens(B,D.walkTokens)).then(()=>B):B).then((B)=>$(B,D)).then((B)=>D.hooks?D.hooks.postprocess(B):B).catch(E);try{if(D.hooks)F=D.hooks.preprocess(F);let B=O(F,D);if(D.hooks)B=D.hooks.processAllTokens(B);if(D.walkTokens)this.walkTokens(B,D.walkTokens);let S=$(B,D);if(D.hooks)S=D.hooks.postprocess(S);return S}catch(B){return E(B)}}}onError(x,N){return(F)=>{if(F.message+=`
Please report this to https://github.com/markedjs/marked.`,x){let M="<p>An error occurred:</p><pre>"+c(F.message+"",!0)+"</pre>";if(N)return Promise.resolve(M);return M}if(N)return Promise.reject(F);throw F}}},n=new XF;function v(x,N){return n.parse(x,N)}v.options=v.setOptions=function(x){return n.setOptions(x),v.defaults=n.defaults,e1(v.defaults),v};v.getDefaults=r0;v.defaults=t;v.use=function(...x){return n.use(...x),v.defaults=n.defaults,e1(v.defaults),v};v.walkTokens=function(x,N){return n.walkTokens(x,N)};v.parseInline=n.parseInline;v.Parser=s;v.parser=s.parse;v.Renderer=b0;v.TextRenderer=M1;v.Lexer=d;v.lexer=d.lex;v.Tokenizer=T0;v.Hooks=y0;v.parse=v;var{options:dF,setOptions:sF,use:aF,walkTokens:iF,parseInline:rF}=v;var nF=s.parse,tF=d.lex;var ZF="500 13px Inter",YF=20,qF="500 13px Inter",QF=20,$x="400 14px Inter",Xx=24.5,RF="700 18px Inter",VF=24,Y0=58,Zx=6;function qx(x,N,F,M){let A=p1(x,N);return c1(A,F,M)}function Yx(x,N,F,M){let A=a0(x,N),D=d1(A,F),E=s1(A);return{lineCount:D.lineCount,maxLineWidth:D.maxLineWidth,natW:E}}function JF(x,N,F,M,A=80,D=600){let E=a0(x,N),O=A,$=D;for(let B=0;B<12;B++){let S=Math.ceil((O+$)/2),Z=0;if(o1(E,S,()=>Z++),Z<=M)$=S;else O=S+1}return Math.ceil($/4)*4}var E0=[{id:"all",label:"All Resources",icon:"◈",files:[]},{id:"web",label:"Web Applications",icon:"\uD83C\uDF10",files:[["2023 Book For Web Pentesting","Web Applications/2023 Book For Web Pentesting.pdf","pdf"],["Web App Pentest Methodology","Web Applications/Web Application Pentest Methodology.pdf","pdf"],["TOP 100 Vulnerabilities Handbook","Web Applications/TOP 100 Vulnerabilities Step-by-Step Guide Handbook.pdf","pdf"],["Test Cases per Functionalities","Web Applications/Test Cases As per Funtionalities.pdf","pdf"],["Cybersecurity Tips","Web Applications/Cybersecurity Tips.pdf","pdf"],["Cookies Concept","Web Applications/cookies concept.pdf","pdf"],["Cookies","Web Applications/Cookies.pdf","pdf"],["Type of Cookies","Web Applications/Type of cookies.pdf","pdf"],["IDOR","Web Applications/Insecure Direct Object References (IDOR).pdf","pdf"],["README","Web Applications/README.md","md"],["About XSS","Web Applications/XSS/About XSS.pdf","pdf"],["XSS","Web Applications/XSS/XSS.pdf","pdf"],["XSS Bypass","Web Applications/XSS/XSS Bypass.pdf","pdf"],["Cross Site Scripting Guide","Web Applications/XSS/Cross Site Scripting.md","md"],["XSS README","Web Applications/XSS/README.md","md"],["About SQL Injection","Web Applications/SQL Injection/About SQL injection.pdf","pdf"],["SQL Injection","Web Applications/SQL Injection/SQL injection.pdf","pdf"],["SQL_INJECTION","Web Applications/SQL Injection/SQL_INJECTION.pdf","pdf"],["Quick Revision MySQL","Web Applications/SQL Injection/Quick Revision of MySQL.pdf","pdf"],["SSRF","Web Applications/SSRF/SSRF.pdf","pdf"],["CORS","Web Applications/CORS/CROSS-ORIGIN RESOURCE SHARING (CORS).pdf","pdf"],["Business Logic Bugs","Web Applications/Business Logic Flaw/Business Logic Bugs.pdf","pdf"],["Business Logic Bugs v2","Web Applications/Business Logic Flaw/Business Logic bugs-1.pdf","pdf"],["ClickJacking Vulnerability","Web Applications/Clickjacking/ClickJacking Vuln.md","md"],["File Inclusion Vulnerabilities","Web Applications/File Inclusion/File Inclusion Vulnerabilities.pdf","pdf"],["HTML Injection","Web Applications/HTML Injection/HTML_INJECTION.pdf","pdf"],["IDOR Detail","Web Applications/IDOR/Insecure Direct Object References (IDOR).pdf","pdf"],["No Rate Limit Vulnerability","Web Applications/Rate Limiting/About No Rate limit vulnerability.pdf","pdf"],["Reverse Shell","Web Applications/Reverse Shell/Reverse Shell.pdf","pdf"],["Subdomain Takeover","Web Applications/SubdomainTakeOver/subdomain takeover.pdf","pdf"],["Subdomain Takeover v2","Web Applications/SubdomainTakeOver/Subdomain Takeover-1.pdf","pdf"],["Subdomain Takeover v3","Web Applications/SubdomainTakeOver/subdomain_takeover.pdf","pdf"],["Web App Exploit Checklist","Web Applications/Cheack Llist and Exploit/Web Application Exploit Check List .pdf","pdf"],["Testing Checklist","Web Applications/Cheack Llist and Exploit/Checklist for Testing of Web Application.pdf","pdf"],["Web App Pentest Checklist","Web Applications/Cheack Llist and Exploit/web application penetration testing.pdf","pdf"],["Advanced Hacking","Web Applications/Advance Hacking/Web Application Advanced Hacking.pdf","pdf"],["Complete Pentest Guide","Web Applications/Advance Hacking/Web Application Penetration Testing Complete Guide. .pdf","pdf"],["Web App Pentest Advanced","Web Applications/Advance Hacking/web application penetration testing.pdf","pdf"],["WordPress Vulnerabilities","Web Applications/WordPress/About WordPress Vulnerabilities.pdf","pdf"],["WordPress","Web Applications/WordPress/WordPress.pdf","pdf"],["WordPress v2","Web Applications/WordPress/WordPress-1.pdf","pdf"],["WordPress Session Task","Web Applications/WordPress/Session_Task_7.pdf","pdf"],["XXE","Web Applications/XXE/XXE.pdf","pdf"]]},{id:"api",label:"API Pentesting",icon:"\uD83D\uDD0C",files:[["2023 API Security","API Pentesting/Rest API/2023 API Security.pdf","pdf"],["API 2019","API Pentesting/Rest API/api 2019.pdf","pdf"],["API Fundamentals","API Pentesting/Rest API/API .pdf","pdf"],["API Penetration Examples","API Pentesting/Rest API/API_Penetration_Examples.pdf","pdf"],["API PT with Basic Concepts","API Pentesting/Rest API/API PT with Basics concepts.pdf","pdf"],["API Security Checklist","API Pentesting/Rest API/API Security Checklist .pdf","pdf"],["API Security Testing","API Pentesting/Rest API/API SECURITY TESTING .pdf","pdf"],["API Terminology Master","API Pentesting/Rest API/API Terminology Master.pdf","pdf"],["API Testing","API Pentesting/Rest API/API Testing .pdf","pdf"],["OWASP Top 10 API Risks","API Pentesting/Rest API/OWASP Top 10 API Security Risks.pdf","pdf"],["OWASP Top 10 API v2","API Pentesting/Rest API/OWASP top 10 API security risks-1.pdf","pdf"],["REST API README","API Pentesting/Rest API/README.md","md"],["GraphQL Guide","API Pentesting/GraphQL/Readme.md","md"],["API README","API Pentesting/README.md","md"]]},{id:"mobile",label:"Mobile Pentesting",icon:"\uD83D\uDCF1",files:[["eLearnSecurity Mobile Pentest","Mobile Pentesting/Android Pentesting/Learn Basics/eLearnSecurity Mobile Application Penetration Testing.pdf","pdf"],["Mobile Testing Guide","Mobile Pentesting/Android Pentesting/Learn Basics/Mobile Testing Gudie.pdf","pdf"],["Basic Android Learning","Mobile Pentesting/Android Pentesting/Basic Learn.md","md"],["Dynamic Testing Guide","Mobile Pentesting/Android Pentesting/Dynamic_Testing.md","md"],["Android README","Mobile Pentesting/Android Pentesting/README.md","md"],["iOS Pentesting Guide","Mobile Pentesting/iOS Pentesting/README.md","md"],["iOS Pentesting Image","Mobile Pentesting/iOS Pentesting/IOS Pentesting_page-0005.jpg","img"]]},{id:"network",label:"Network Pentesting",icon:"\uD83D\uDD17",files:[["Computer Networking Basics","Network Pentesting/Basics Learn/Computer Networking Basics Concept.pdf","pdf"],["Computer Networking","Network Pentesting/Basics Learn/Computer networking.pdf","pdf"],["Linux for Networking","Network Pentesting/Basics Learn/Linux_For_Networking_Professional__1692037154.pdf","pdf"],["External Network Pentest","Network Pentesting/External Network Penetration Testing.pdf","pdf"],["Network PT with Wireshark","Network Pentesting/Network PT with Wireshark.pdf","pdf"],["Network Security Checklist","Network Pentesting/Network Security Check List.pdf","pdf"],["Network Penetration Course","Network Pentesting/Ntwork-Penetration Course.pdf","pdf"],["Network README","Network Pentesting/README.md","md"]]},{id:"cloud",label:"Cloud Pentesting",icon:"☁️",files:[["AWS Pentesting","Cloud Pentesting/AWS/AWS Pentesting.pdf","pdf"],["AWS Security Incident Response","Cloud Pentesting/AWS/AWS Security Incident Response Guide.pdf","pdf"],["AWS README","Cloud Pentesting/AWS/README.md","md"],["Azure Pentest Guide","Cloud Pentesting/Azure/Cloud - Azure Pentestesting Guide.pdf","pdf"],["Cloud Pentest Cheatsheet","Cloud Pentesting/Azure/Cloud Pentesting cheatsheet.pdf","pdf"],["Getting Started Azure","Cloud Pentesting/Azure/Getting_Started_in_Pentesting_Azure_1622190241.pdf","pdf"],["Azure README","Cloud Pentesting/Azure/README.md","md"],["GCP README","Cloud Pentesting/GCP/README.md","md"]]},{id:"ad",label:"Active Directory",icon:"\uD83C\uDFE2",files:[["Active Directory Attacks","Active Directory Pentesting/Active Directory Attacks.pdf","pdf"],["AD Penetration Testing Topics","Active Directory Pentesting/Active Directory Penetration Testing Topic.pdf","pdf"],["Offensive Enumeration AD","Active Directory Pentesting/Offensive Enumeration AD.pdf","pdf"],["AD Checklist","Active Directory Pentesting/AD with Linux/AD with Windows/Active Directory Check List.pdf","pdf"],["Attacking AD with Linux","Active Directory Pentesting/AD with Linux/Attacking Active Directory With LInux.pdf","pdf"],["Windows Privilege Escalation","Active Directory Pentesting/Windows Privilege Escalation/Windows - Privilege Escalation.pdf","pdf"],["Windows Sensitive Files","Active Directory Pentesting/Windows Privilege Escalation/WindowsSensitive File.md","md"],["AD with Linux Guide","Active Directory Pentesting/AD with Linux/README.md","md"],["AD README","Active Directory Pentesting/README.md","md"]]},{id:"wifi",label:"WiFi Pentesting",icon:"\uD83D\uDCE1",files:[["Wifi Hacking","Wifi Pentesting/Wifi Hacking.pdf","pdf"],["Wireless Pentesting","Wifi Pentesting/Wireless Pentesting.pdf","pdf"],["WiFi README","Wifi Pentesting/README.md","md"]]},{id:"cicd",label:"CI/CD Pentesting",icon:"\uD83D\uDD04",files:[["CI/CD OWASP Top 10","CI-CD Pentesting/CI_CD OWASP TOP 10 .pdf","pdf"],["CI/CD README","CI-CD Pentesting/README.md","md"]]},{id:"docker",label:"Docker / Container",icon:"\uD83D\uDC33",files:[["Container Security Checklist","DockerContainer Pentesting/Container Security Checklist.pdf","pdf"],["Docker README","DockerContainer Pentesting/README.md","md"]]},{id:"forensic",label:"Forensics",icon:"\uD83D\uDD0D",files:[["Windows Forensic","Forensic/Windows/Windows Forensic.pdf","pdf"],["Windows Forensic README","Forensic/Windows/README.md","md"],["Mobile Forensic README","Forensic/Mobile/README.md","md"],["Forensic Overview","Forensic/Readme.md","md"]]},{id:"osint",label:"OSINT",icon:"\uD83D\uDC41️",files:[["Awesome OSINT","OSINT/Awesome OSINT(Open-Source Intelligence).pdf","pdf"],["AWESOME OSINT","OSINT/AWESOME OSINT.pdf","pdf"],["Image OSINT","OSINT/Image OSINT.pdf.pdf","pdf"],["OSINT Fundamentals","OSINT/Osint.pdf","pdf"],["Recon Like A Boss","OSINT/Recon Like A Boss.pdf","pdf"],["Social Media OSINT","OSINT/Social Media OSINT.pdf","pdf"],["OSINT README","OSINT/README.md","md"]]},{id:"code",label:"Secure Code Review",icon:"\uD83D\uDCDD",files:[["Source Code Review Guide","Secure Code Review/Source Code Review Guide from Cobalt.pdf","pdf"],["Vulnerable Code Challenges","Secure Code Review/Challenge.md","md"],["Code Review README","Secure Code Review/README.md","md"]]},{id:"thick",label:"Thick Client",icon:"\uD83D\uDCBB",files:[["Thick Client Pentest Checklist","Thick Client Pentesting/Thick Client Pentesting Checklist.pdf","pdf"],["Thick Client README","Thick Client Pentesting/readme.md","md"]]},{id:"threat",label:"Threat Modeling",icon:"⚠️",files:[["Threat Model","Threat Model/Threat Model.pdf","pdf"],["Threat Model README","Threat Model/README.md","md"]]},{id:"blockchain",label:"Blockchain",icon:"⛓️",files:[["Blockchain README","BlockChain Pentesting/README.md","md"]]},{id:"infra",label:"Infrastructure",icon:"\uD83C\uDFD7️",files:[["Infrastructure PT","Infrastucture Pentesting/Infrastucture PT.pdf","pdf"],["Infrastructure README","Infrastucture Pentesting/README.md","md"]]},{id:"iot",label:"IoT Pentesting",icon:"\uD83D\uDD27",files:[["IoT README","iOT Pentesting/README.md","md"]]},{id:"phishing",label:"Phishing",icon:"\uD83C\uDFA3",files:[["Phishing README","Phishing Penetration Testing/README.md","md"]]},{id:"social",label:"Social Engineering",icon:"\uD83C\uDFAD",files:[["Social Engineering Guide","Social Engineering/README.md","md"]]},{id:"physical",label:"Physical Pentesting",icon:"\uD83D\uDEAA",files:[["Physical Pentesting Guide","Physical Pentesting/README.md","md"]]},{id:"hardware",label:"Hardware Hacking",icon:"\uD83D\uDD29",files:[["Hardware Hacking Guide","Hardware Hacking/README.md","md"]]},{id:"firmware",label:"Firmware Analysis",icon:"\uD83D\uDCBE",files:[["Firmware Analysis Guide","Firmware Analysis/README.md","md"]]},{id:"k8s",label:"Kubernetes",icon:"☸️",files:[["Kubernetes Pentesting Guide","Kubernetes Pentesting/README.md","md"]]},{id:"database",label:"Database Pentesting",icon:"\uD83D\uDDC4️",files:[["Database Pentesting Guide","Database Pentesting/README.md","md"]]},{id:"reveng",label:"Reverse Engineering",icon:"\uD83D\uDD2C",files:[["Reverse Engineering Guide","Reverse Engineering/README.md","md"]]},{id:"redteam",label:"Red Team Ops",icon:"\uD83C\uDFAF",files:[["Red Team Operations Guide","Red Team Operations/README.md","md"]]},{id:"bugbounty",label:"Bug Bounty",icon:"\uD83D\uDCB0",files:[["Bug Bounty Guide","Bug Bounty/README.md","md"]]},{id:"scada",label:"SCADA / ICS",icon:"⚙️",files:[["SCADA ICS Pentesting Guide","SCADA-ICS Pentesting/README.md","md"]]},{id:"crypto",label:"Cryptography Attacks",icon:"\uD83D\uDD10",files:[["Cryptography Attacks Guide","Cryptography Attacks/README.md","md"]]},{id:"supplychain",label:"Supply Chain",icon:"\uD83D\uDCE6",files:[["Supply Chain Security Guide","Supply Chain Security/README.md","md"]]},{id:"purple",label:"Purple Team",icon:"\uD83D\uDFE3",files:[["Purple Team Guide","Purple Team/README.md","md"]]},{id:"vulnmgmt",label:"Vuln Management",icon:"\uD83D\uDCCA",files:[["Vulnerability Management Guide","Vulnerability Management/README.md","md"]]}];E0.forEach((x)=>{x.files=x.files.map((N)=>Array.isArray(N)?{name:N[0],path:N[1],type:N[2]}:N)});var M0=[];E0.forEach((x)=>{if(x.id!=="all")M0.push(...x.files)});E0[0].files=M0;var D0="all",R0="grid",q0=null,Q0="",A0=new Map,I0={files:[],el:null,wrap:null,mount(x,N,F){this.files=x,this.el=N,this.wrap=F,N.className="cards-vlist",N.style.height=`${x.length*Y0}px`,this.render(),requestAnimationFrame(()=>this._measureVisible())},render(){if(!this.el)return;let x=this.wrap.scrollTop,N=this.wrap.clientHeight,F=Math.max(0,Math.floor(x/Y0)-Zx),M=Math.min(this.files.length,Math.ceil((x+N)/Y0)+Zx);this.el.innerHTML="",this.el.style.height=`${this.files.length*Y0}px`;for(let A=F;A<M;A++){let D=CF(this.files[A]);D.style.cssText=`position:absolute;top:${A*Y0}px;left:0;right:0;margin:0`,this.el.appendChild(D)}this.el.querySelectorAll(".list-item[data-path]").forEach((A)=>{let D=A.dataset.path+"|list",E=A0.get(D);if(E)D1(A.querySelector(".line-badge"),E.lineCount)})},_measureVisible(){if(!this.el)return;this.el.querySelectorAll(".list-item[data-path]").forEach((x)=>{let N=x.dataset.path+"|list";if(A0.has(N))return;let F=x.dataset.name,M=Math.max(80,x.clientWidth-110),A=qx(F,qF,M,QF);A0.set(N,A),D1(x.querySelector(".line-badge"),A.lineCount)})},destroy(){this.el=null,this.files=[]}};function B1(){let x=document.getElementById("sidebar-list");x.innerHTML="",E0.forEach((N)=>{let F=document.createElement("button");if(F.className="cat-btn"+(N.id===D0?" active":""),F.setAttribute("aria-current",N.id===D0?"page":"false"),F.innerHTML=`<span class="cat-icon">${N.icon}</span><span class="cat-name">${N.label}</span><span class="cat-count">${N.files.length}</span>`,F.addEventListener("click",()=>HF(N.id)),x.appendChild(F),N.id==="all"){let M=document.createElement("div");M.className="sidebar-sep",x.appendChild(M)}})}function HF(x){D0=x,Q0="",document.getElementById("search").value="",B1(),e();let N=E0.find((F)=>F.id===x);Qx(N.label,N.files.length)}function Qx(x,N){let F=document.getElementById("content-title"),M=document.getElementById("content-sub");F.textContent=x,M.textContent=`${N} resource${N!==1?"s":""}`;try{let A=JF(x,RF,VF,1,60,400);F.style.maxWidth=`${A}px`}catch{}}function UF(){let x=E0.find((F)=>F.id===D0);if(!x)return[];if(!Q0)return x.files;let N=Q0.toLowerCase();return M0.filter((F)=>F.name.toLowerCase().includes(N)||F.path.toLowerCase().includes(N))}function e(){let x=document.getElementById("cards-container"),N=document.getElementById("cards-wrap"),F=UF();if(I0.destroy(),R0==="grid"){if(x.className="cards-grid",x.style.height="",x.innerHTML="",!F.length){x.innerHTML='<div class="empty-state"><div class="empty-icon">\uD83D\uDD0E</div><div>No resources found</div></div>';return}F.forEach((M)=>x.appendChild(zF(M))),requestAnimationFrame(()=>Rx(x))}else x.innerHTML="",I0.mount(F,x,N);document.getElementById("pdf-count").textContent=M0.filter((M)=>M.type==="pdf").length,document.getElementById("md-count").textContent=M0.filter((M)=>M.type==="md").length}function Rx(x){x.querySelectorAll(".card[data-path]").forEach((N)=>{let F=N.dataset.path,M=N.dataset.name,A=F+"|grid",D=A0.get(A);if(!D){let O=Math.max(60,N.getBoundingClientRect().width-32);D=qx(M,ZF,O,YF),A0.set(A,D)}let E=N.querySelector(".line-badge");if(D1(E,D.lineCount),D.lineCount>2)N.setAttribute("title",M)})}function D1(x,N){if(!x)return;x.textContent=`${N}L`,x.classList.toggle("overflow",N>2),x.setAttribute("aria-label",`${N} line${N!==1?"s":""}`)}function Vx(x){return x==="pdf"?"PDF":x==="md"?"MD":"IMG"}function zF(x){let N=document.createElement("div"),F=Vx(x.type);return N.className=`card ${x.type}`,N.setAttribute("role","button"),N.setAttribute("tabindex","0"),N.setAttribute("aria-label",`Open ${x.name}`),N.dataset.path=x.path,N.dataset.name=x.name,N.innerHTML=`
<div class="card-top">
<div class="file-icon ${x.type}">${F}</div>
<button class="card-ext-btn" tabindex="-1" aria-label="Open in new tab">⤢</button>
</div>
<div class="card-name">${E1(x.name)}</div>
<div class="card-bottom">
<span class="card-tag ${x.type}">${F}</span>
<span class="card-path">${E1(x.path.split("/").slice(0,-1).join(" › "))}</span>
<span class="line-badge">…</span>
</div>`,N.addEventListener("click",(M)=>{if(M.target.closest(".card-ext-btn")){Jx(x);return}f0(x)}),N.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),f0(x)}),N}function CF(x){let N=document.createElement("div"),F=Vx(x.type);return N.className=`list-item${q0?.path===x.path?" active":""}`,N.setAttribute("role","button"),N.setAttribute("tabindex","0"),N.setAttribute("aria-label",`Open ${x.name}`),N.dataset.path=x.path,N.dataset.name=x.name,N.innerHTML=`
<div class="list-icon ${x.type}">${F}</div>
<span class="list-name">${E1(x.name)}</span>
<div class="list-meta">
<span class="line-badge">…</span>
<span class="list-type">${F}</span>
</div>`,N.addEventListener("click",()=>f0(x)),N.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),f0(x)}),N}function E1(x){return x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function f0(x){q0=x,e();let N=document.getElementById("viewer-panel"),F=document.getElementById("pdf-frame"),M=document.getElementById("md-view"),A=document.getElementById("img-view"),D=document.getElementById("img-el"),E=document.getElementById("pt-stats-bar");if(N.classList.add("open"),document.getElementById("viewer-title").textContent=x.name,F.style.display="none",M.classList.remove("show"),A.classList.remove("show"),E.classList.remove("show"),x.type==="pdf")F.style.display="block",F.src=x.path;else if(x.type==="md")M.classList.add("show"),M.innerHTML='<p class="md-loading">Loading…</p>',fetch(x.path).then((O)=>{if(!O.ok)throw Error(O.status);return O.text()}).then((O)=>{M.innerHTML=v.parse(O);let $=M.querySelector("p"),B=$?$.textContent.trim():x.name;if(B)try{let S=Yx(B,$x,600,Xx),Z=Yx(B,$x,400,Xx);E.classList.add("show"),document.getElementById("pt-lines-600").textContent=S.lineCount,document.getElementById("pt-lines-400").textContent=Z.lineCount,document.getElementById("pt-nat-w").textContent=`${Math.round(S.natW)}px`}catch{}}).catch(()=>{M.innerHTML=`<p style="color:var(--red);padding:20px">
File load failed. Serve via HTTP:<br>
<code>python3 -m http.server 8080</code>
</p>`});else if(x.type==="img")A.classList.add("show"),D.src=x.path,D.alt=x.name}function Jx(x){window.open(x.path,"_blank"),jF("Opening in new tab…")}function Hx(){document.getElementById("viewer-panel").classList.remove("open"),document.getElementById("pdf-frame").src="",document.getElementById("md-view").classList.remove("show"),document.getElementById("img-view").classList.remove("show"),document.getElementById("pt-stats-bar").classList.remove("show"),q0=null,e()}function jF(x){let N=document.getElementById("toast");N.textContent=x,N.classList.add("show"),setTimeout(()=>N.classList.remove("show"),2400)}document.getElementById("close-btn").addEventListener("click",Hx);document.getElementById("open-btn").addEventListener("click",()=>{if(q0)Jx(q0)});document.getElementById("grid-btn").addEventListener("click",()=>{R0="grid",document.getElementById("grid-btn").classList.add("active"),document.getElementById("list-btn").classList.remove("active"),e()});document.getElementById("list-btn").addEventListener("click",()=>{R0="list",document.getElementById("list-btn").classList.add("active"),document.getElementById("grid-btn").classList.remove("active"),e()});document.getElementById("search").addEventListener("input",(x)=>{Q0=x.target.value.trim(),D0=Q0?"all":D0,B1(),e()});document.getElementById("cards-wrap").addEventListener("scroll",()=>{if(R0==="list")requestAnimationFrame(()=>I0.render())},{passive:!0});new ResizeObserver(()=>{if(R0==="grid")A0.clear(),Rx(document.getElementById("cards-container"));else I0.render()}).observe(document.getElementById("cards-wrap"));document.addEventListener("keydown",(x)=>{if((x.ctrlKey||x.metaKey)&&x.key==="k")x.preventDefault(),document.getElementById("search").focus();if(x.key==="Escape")Hx()});B1();Qx("All Resources",M0.length);e();