diff --git a/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 b/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..0acaaff03d4bb7606de02a827aeee338e5a86910 Binary files /dev/null and b/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 differ diff --git a/assets/KaTeX_AMS-Regular-DMm9YOAa.woff b/assets/KaTeX_AMS-Regular-DMm9YOAa.woff new file mode 100644 index 0000000000000000000000000000000000000000..b804d7b33a3fa5b2587d2d1d55006aed678e3eb2 Binary files /dev/null and b/assets/KaTeX_AMS-Regular-DMm9YOAa.woff differ diff --git a/assets/KaTeX_AMS-Regular-DRggAlZN.ttf b/assets/KaTeX_AMS-Regular-DRggAlZN.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6f9a5e7c03f9e64e9c7b4773a8e37ade8eaf406 Binary files /dev/null and b/assets/KaTeX_AMS-Regular-DRggAlZN.ttf differ diff --git a/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf b/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4a5e04421e5107f74c28e27354e0b2a4e7ef8 Binary files /dev/null and b/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf differ diff --git a/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff b/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff new file mode 100644 index 0000000000000000000000000000000000000000..9759710d1d3e16eb10012d56babb73f2479ba9f0 Binary files /dev/null and b/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff differ diff --git a/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 b/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f390922eceffe1f6dfb81a3dc086a92d98171b02 Binary files /dev/null and b/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 differ diff --git a/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff b/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff new file mode 100644 index 0000000000000000000000000000000000000000..9bdd534fd2beb9b878f0219da9d63ffba56677e2 Binary files /dev/null and b/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff differ diff --git a/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 b/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..75344a1f98e37e2c631e178065854c3a81fb842f Binary files /dev/null and b/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 differ diff --git a/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf b/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f522294ff0f3f8c52dfdaef7ebfaa06ebfcfaabf Binary files /dev/null and b/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf differ diff --git a/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf b/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4e98259c3b54076d684bf3459baeaeae8dbce97a Binary files /dev/null and b/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf differ diff --git a/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff b/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff new file mode 100644 index 0000000000000000000000000000000000000000..e7730f66275c87c28f26530d89264cffecf90be0 Binary files /dev/null and b/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff differ diff --git a/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 b/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..395f28beac23c7b0f7f3a1e714bd8dac253dd3bc Binary files /dev/null and b/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 differ diff --git a/assets/KaTeX_Fraktur-Regular-CB_wures.ttf b/assets/KaTeX_Fraktur-Regular-CB_wures.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b8461b275fae76efd0d21fd0f1aaa696a5b10f9a Binary files /dev/null and b/assets/KaTeX_Fraktur-Regular-CB_wures.ttf differ diff --git a/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 b/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..735f6948d63c8cc7f8233735bb9c8d843c83d804 Binary files /dev/null and b/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 differ diff --git a/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff b/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff new file mode 100644 index 0000000000000000000000000000000000000000..acab069f90b6fe6301a004e6f8beaf6a0db48bce Binary files /dev/null and b/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff differ diff --git a/assets/KaTeX_Main-Bold-Cx986IdX.woff2 b/assets/KaTeX_Main-Bold-Cx986IdX.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..ab2ad21da6fbe6c171bb869240954d0ead8f68fd Binary files /dev/null and b/assets/KaTeX_Main-Bold-Cx986IdX.woff2 differ diff --git a/assets/KaTeX_Main-Bold-Jm3AIy58.woff b/assets/KaTeX_Main-Bold-Jm3AIy58.woff new file mode 100644 index 0000000000000000000000000000000000000000..f38136ac1cc2dcdc9d9b10b8521487468b1f768c Binary files /dev/null and b/assets/KaTeX_Main-Bold-Jm3AIy58.woff differ diff --git a/assets/KaTeX_Main-Bold-waoOVXN0.ttf b/assets/KaTeX_Main-Bold-waoOVXN0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4060e627dc341c1854260cbc3f7386e222a4d297 Binary files /dev/null and b/assets/KaTeX_Main-Bold-waoOVXN0.ttf differ diff --git a/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 b/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5931794de4a2a485fa70099bf2659b145976d043 Binary files /dev/null and b/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 differ diff --git a/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf b/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dc007977ee709a236d9e82719cf7d4e5577a81b9 Binary files /dev/null and b/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf differ diff --git a/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff b/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff new file mode 100644 index 0000000000000000000000000000000000000000..67807b0bd4f867853271f5917fb3adf377f93f53 Binary files /dev/null and b/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff differ diff --git a/assets/KaTeX_Main-Italic-3WenGoN9.ttf b/assets/KaTeX_Main-Italic-3WenGoN9.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0e9b0f354ad460202bba554359f5adcc8da666b7 Binary files /dev/null and b/assets/KaTeX_Main-Italic-3WenGoN9.ttf differ diff --git a/assets/KaTeX_Main-Italic-BMLOBm91.woff b/assets/KaTeX_Main-Italic-BMLOBm91.woff new file mode 100644 index 0000000000000000000000000000000000000000..6f43b594b6c1d863a0e3f93b001f8dd503316464 Binary files /dev/null and b/assets/KaTeX_Main-Italic-BMLOBm91.woff differ diff --git a/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 b/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b50920e138807f385d0b0359f4f0f09891f18406 Binary files /dev/null and b/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 differ diff --git a/assets/KaTeX_Main-Regular-B22Nviop.woff2 b/assets/KaTeX_Main-Regular-B22Nviop.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..eb24a7ba282b03d830fa6c63ee897d92a5188736 Binary files /dev/null and b/assets/KaTeX_Main-Regular-B22Nviop.woff2 differ diff --git a/assets/KaTeX_Main-Regular-Dr94JaBh.woff b/assets/KaTeX_Main-Regular-Dr94JaBh.woff new file mode 100644 index 0000000000000000000000000000000000000000..21f5812968c42392a3eaea9b0c6320870b6b8b38 Binary files /dev/null and b/assets/KaTeX_Main-Regular-Dr94JaBh.woff differ diff --git a/assets/KaTeX_Main-Regular-ypZvNtVU.ttf b/assets/KaTeX_Main-Regular-ypZvNtVU.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dd45e1ed2e18b32c516d9b481ebed3cb8bffa711 Binary files /dev/null and b/assets/KaTeX_Main-Regular-ypZvNtVU.ttf differ diff --git a/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf b/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf new file mode 100644 index 0000000000000000000000000000000000000000..728ce7a1e2cb689df32c3a6c26e1bd072dcf2acb Binary files /dev/null and b/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf differ diff --git a/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 b/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..29657023adc09956249f6295746c8ce4469b50d3 Binary files /dev/null and b/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 differ diff --git a/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff b/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff new file mode 100644 index 0000000000000000000000000000000000000000..0ae390d74c9f665cf8b1e5ea5483395da7513444 Binary files /dev/null and b/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff differ diff --git a/assets/KaTeX_Math-Italic-DA0__PXp.woff b/assets/KaTeX_Math-Italic-DA0__PXp.woff new file mode 100644 index 0000000000000000000000000000000000000000..eb5159d4c1ca83fb92b3190223698427df0e010c Binary files /dev/null and b/assets/KaTeX_Math-Italic-DA0__PXp.woff differ diff --git a/assets/KaTeX_Math-Italic-flOr_0UB.ttf b/assets/KaTeX_Math-Italic-flOr_0UB.ttf new file mode 100644 index 0000000000000000000000000000000000000000..70d559b4e937ca1b805eb39f544cbebe3c58ca6f Binary files /dev/null and b/assets/KaTeX_Math-Italic-flOr_0UB.ttf differ diff --git a/assets/KaTeX_Math-Italic-t53AETM-.woff2 b/assets/KaTeX_Math-Italic-t53AETM-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..215c143fd7805a5c2b222bd7892a1a2b09610020 Binary files /dev/null and b/assets/KaTeX_Math-Italic-t53AETM-.woff2 differ diff --git a/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf b/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2f65a8a3a6d3628d11ea9c26c9077cef672fe427 Binary files /dev/null and b/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf differ diff --git a/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 b/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..cfaa3bda59246b49e94298478d6de3b3208066c8 Binary files /dev/null and b/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 differ diff --git a/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff b/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff new file mode 100644 index 0000000000000000000000000000000000000000..8d47c02d9408d34b2a9d566c0fe0d42bf82fb735 Binary files /dev/null and b/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff differ diff --git a/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 b/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..349c06dc609f896392fd5bc8b364d3bc3efc9330 Binary files /dev/null and b/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 differ diff --git a/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff b/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff new file mode 100644 index 0000000000000000000000000000000000000000..7e02df963621a5e26d53d510f0b4992eebde1c60 Binary files /dev/null and b/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff differ diff --git a/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf b/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d5850df98ec19de2eee9ff922ef59586efe471d0 Binary files /dev/null and b/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf differ diff --git a/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf b/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf new file mode 100644 index 0000000000000000000000000000000000000000..537279f6bd2184ed32f1a5168850609147d58ee6 Binary files /dev/null and b/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf differ diff --git a/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff b/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff new file mode 100644 index 0000000000000000000000000000000000000000..31b84829b42edae20d0148eeec0d922dad2108c4 Binary files /dev/null and b/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff differ diff --git a/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 b/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..a90eea85f6f7bded69ff5d40114447a6d8b48cfe Binary files /dev/null and b/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 differ diff --git a/assets/KaTeX_Script-Regular-C5JkGWo-.ttf b/assets/KaTeX_Script-Regular-C5JkGWo-.ttf new file mode 100644 index 0000000000000000000000000000000000000000..fd679bf374af72f2a183b97b40c9c7e9e51fbe5e Binary files /dev/null and b/assets/KaTeX_Script-Regular-C5JkGWo-.ttf differ diff --git a/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 b/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b3048fc115681ee6c1bc86b0aa158cfbbf59daa3 Binary files /dev/null and b/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 differ diff --git a/assets/KaTeX_Script-Regular-D5yQViql.woff b/assets/KaTeX_Script-Regular-D5yQViql.woff new file mode 100644 index 0000000000000000000000000000000000000000..0e7da821eee0dd05a0a6f0b16c2c1345dc573a84 Binary files /dev/null and b/assets/KaTeX_Script-Regular-D5yQViql.woff differ diff --git a/assets/KaTeX_Size1-Regular-C195tn64.woff b/assets/KaTeX_Size1-Regular-C195tn64.woff new file mode 100644 index 0000000000000000000000000000000000000000..7f292d91184f257054ef77cc1cd3443db757c9cc Binary files /dev/null and b/assets/KaTeX_Size1-Regular-C195tn64.woff differ diff --git a/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf b/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf new file mode 100644 index 0000000000000000000000000000000000000000..871fd7d19d8658f64d8696ed9cdfc82c821ed76d Binary files /dev/null and b/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf differ diff --git a/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 b/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c5a8462fbfe2c39a7c1857b9e296e62500a8a8a5 Binary files /dev/null and b/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 differ diff --git a/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf b/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7a212caf91c0007e826fee2d622bf48acbd30dde Binary files /dev/null and b/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf differ diff --git a/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 b/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..e1bccfe2403a4ed770c1697ae7c15b9e1cd9bc4e Binary files /dev/null and b/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 differ diff --git a/assets/KaTeX_Size2-Regular-oD1tc_U0.woff b/assets/KaTeX_Size2-Regular-oD1tc_U0.woff new file mode 100644 index 0000000000000000000000000000000000000000..d241d9be2d317f7b39b401d96c8b18836acea0fa Binary files /dev/null and b/assets/KaTeX_Size2-Regular-oD1tc_U0.woff differ diff --git a/assets/KaTeX_Size3-Regular-CTq5MqoE.woff b/assets/KaTeX_Size3-Regular-CTq5MqoE.woff new file mode 100644 index 0000000000000000000000000000000000000000..e6e9b658dcf1cd031ac82b6b8f312444c55d4fc0 Binary files /dev/null and b/assets/KaTeX_Size3-Regular-CTq5MqoE.woff differ diff --git a/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf b/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf new file mode 100644 index 0000000000000000000000000000000000000000..00bff3495fa9d2f98c1c9ce436add6a1bcfe87fb Binary files /dev/null and b/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf differ diff --git a/assets/KaTeX_Size4-Regular-BF-4gkZK.woff b/assets/KaTeX_Size4-Regular-BF-4gkZK.woff new file mode 100644 index 0000000000000000000000000000000000000000..e1ec5457664f438ce5a1cc6dd8409bf60ca7804b Binary files /dev/null and b/assets/KaTeX_Size4-Regular-BF-4gkZK.woff differ diff --git a/assets/KaTeX_Size4-Regular-DWFBv043.ttf b/assets/KaTeX_Size4-Regular-DWFBv043.ttf new file mode 100644 index 0000000000000000000000000000000000000000..74f08921f00f71f413ca42c9d1c90202e672ef38 Binary files /dev/null and b/assets/KaTeX_Size4-Regular-DWFBv043.ttf differ diff --git a/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 b/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..680c13085076a2f6c5a7e695935ec3f21cddb65f Binary files /dev/null and b/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 differ diff --git a/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff b/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff new file mode 100644 index 0000000000000000000000000000000000000000..2432419f28936aff53ddfa2a732d027e6a6648fd Binary files /dev/null and b/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff differ diff --git a/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 b/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..771f1af705f5cef5f578b3a1e7d8eff66f9b76b0 Binary files /dev/null and b/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 differ diff --git a/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf b/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c83252c5714c71a3e0ec62195884167339a0129b Binary files /dev/null and b/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf differ diff --git a/assets/highlighted-body-OFNGDK62-lF2F3Gu1.js b/assets/highlighted-body-OFNGDK62-lF2F3Gu1.js new file mode 100644 index 0000000000000000000000000000000000000000..8fea46b2cecf84980434a31ddce6bcc5b157d93c --- /dev/null +++ b/assets/highlighted-body-OFNGDK62-lF2F3Gu1.js @@ -0,0 +1 @@ +import{a as e,n as t,o as n,r,t as i}from"./index-GZqzxFHz.js";var a=n(),o=e(),s=({code:e,language:n,raw:s,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,a.useContext)(r),p=t(),[m,h]=(0,a.useState)(s);return(0,a.useEffect)(()=>{if(!p){h(s);return}let t=p.highlight({code:e,language:n,themes:f},e=>{h(e)});t&&h(t)},[e,n,f,p,s]),(0,o.jsx)(i,{className:c,language:n,lineNumbers:u,result:m,startLine:l,...d})};export{s as HighlightedCodeBlockBody}; \ No newline at end of file diff --git a/assets/index-CqGq5jHN.css b/assets/index-CqGq5jHN.css new file mode 100644 index 0000000000000000000000000000000000000000..fb5c2cd8942508123a861f80479172815c8e927e --- /dev/null +++ b/assets/index-CqGq5jHN.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-lg:0 4px 4px #00000026;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-dm-bg:#121317;--color-dm-surface-high:#212226;--color-dm-surface-higher:#2f3034;--color-dm-text:#f8f9fc;--color-dm-text-secondary:#b2bbc5;--color-dm-outline:#e6eaf01f;--color-dm-blue:#3c90ff;--color-dm-green:#0ebc5f;--color-dm-red:#ff4c45;--animate-fade-in-up:fade-in-up .5s ease-out both;--animate-title-appear:title-appear 1.2s ease-out both;--animate-subtitle-appear:subtitle-appear 1.2s ease-out .3s both;--animate-button-appear:button-appear 1s ease-out .6s both;--animate-scan-line:scan-line 1.5s ease-in-out infinite;--animate-glisten:glisten 3.5s ease-in-out infinite;--animate-pulse-ring:pulse-ring 1.5s ease-out infinite;--animate-typing-dot:typing-dot 1.2s ease-in-out infinite;--animate-shimmer:shimmer 1.5s ease-in-out infinite;--animate-glow:glow 2s ease-in-out infinite alternate}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-8{bottom:calc(var(--spacing) * 8)}.left-0{left:calc(var(--spacing) * 0)}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-6{margin-block:calc(var(--spacing) * 6)}.-mt-10{margin-top:calc(var(--spacing) * -10)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-full{width:100%;height:100%}.h-0\.5{height:calc(var(--spacing) * .5)}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-8{height:calc(var(--spacing) * 8)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-64{height:calc(var(--spacing) * 64)}.h-\[46px\]{height:46px}.h-auto{height:auto}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\[50vh\]{max-height:50vh}.max-h-\[300px\]{max-height:300px}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-\[200px\]{min-height:200px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-8{width:calc(var(--spacing) * 8)}.w-44{width:calc(var(--spacing) * 44)}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\[80\%\]{max-width:80%}.max-w-\[400px\]{max-width:400px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[120px\]{min-width:120px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-center{transform-origin:50%}.-scale-x-100{--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-button-appear{animation:var(--animate-button-appear)}.animate-fade-in-up{animation:var(--animate-fade-in-up)}.animate-glisten{animation:var(--animate-glisten)}.animate-glow{animation:var(--animate-glow)}.animate-pulse{animation:var(--animate-pulse)}.animate-pulse-ring{animation:var(--animate-pulse-ring)}.animate-scan-line{animation:var(--animate-scan-line)}.animate-shimmer{animation:var(--animate-shimmer)}.animate-spin{animation:var(--animate-spin)}.animate-subtitle-appear{animation:var(--animate-subtitle-appear)}.animate-title-appear{animation:var(--animate-title-appear)}.animate-typing-dot{animation:var(--animate-typing-dot)}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-\[2px\]{gap:2px}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-current{border-color:currentColor}.border-dm-blue{border-color:var(--color-dm-blue)}.border-dm-outline{border-color:var(--color-dm-outline)}.bg-\[var\(--sdm-tbg\)\]{background-color:var(--sdm-tbg)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-dm-bg{background-color:var(--color-dm-bg)}.bg-dm-bg\/60{background-color:#12131799}@supports (color:color-mix(in lab, red, red)){.bg-dm-bg\/60{background-color:color-mix(in oklab, var(--color-dm-bg) 60%, transparent)}}.bg-dm-bg\/70{background-color:#121317b3}@supports (color:color-mix(in lab, red, red)){.bg-dm-bg\/70{background-color:color-mix(in oklab, var(--color-dm-bg) 70%, transparent)}}.bg-dm-blue\/70{background-color:#3c90ffb3}@supports (color:color-mix(in lab, red, red)){.bg-dm-blue\/70{background-color:color-mix(in oklab, var(--color-dm-blue) 70%, transparent)}}.bg-dm-red{background-color:var(--color-dm-red)}.bg-dm-surface-high{background-color:var(--color-dm-surface-high)}.bg-dm-surface-high\/60{background-color:#21222699}@supports (color:color-mix(in lab, red, red)){.bg-dm-surface-high\/60{background-color:color-mix(in oklab, var(--color-dm-surface-high) 60%, transparent)}}.bg-dm-surface-higher{background-color:var(--color-dm-surface-higher)}.bg-dm-text{background-color:var(--color-dm-text)}.bg-dm-text-secondary{background-color:var(--color-dm-text-secondary)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\/50{--tw-gradient-from:#00000080}@supports (color:color-mix(in lab, red, red)){.from-black\/50{--tw-gradient-from:color-mix(in oklab, var(--color-black) 50%, transparent)}}.from-black\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab, red, red)){.from-black\/60{--tw-gradient-from:color-mix(in oklab, var(--color-black) 60%, transparent)}}.from-black\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-dm-blue{--tw-gradient-from:var(--color-dm-blue);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\/30{--tw-gradient-via:#0000004d}@supports (color:color-mix(in lab, red, red)){.via-black\/30{--tw-gradient-via:color-mix(in oklab, var(--color-black) 30%, transparent)}}.via-black\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-dm-blue{--tw-gradient-via:var(--color-dm-blue);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/15{--tw-gradient-via:#ffffff26}@supports (color:color-mix(in lab, red, red)){.via-white\/15{--tw-gradient-via:color-mix(in oklab, var(--color-white) 15%, transparent)}}.via-white\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-dm-green{--tw-gradient-to:var(--color-dm-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.bg-\[length\:200\%_auto\]{background-size:200%}.bg-cover{background-size:cover}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--sdm-c\,inherit\)\]{color:var(--sdm-c,inherit)}.text-dm-bg{color:var(--color-dm-bg)}.text-dm-blue{color:var(--color-dm-blue)}.text-dm-red{color:var(--color-dm-red)}.text-dm-text{color:var(--color-dm-text)}.text-dm-text-secondary{color:var(--color-dm-text-secondary)}.text-dm-text\/80{color:#f8f9fccc}@supports (color:color-mix(in lab, red, red)){.text-dm-text\/80{color:color-mix(in oklab, var(--color-dm-text) 80%, transparent)}}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.placeholder-dm-text-secondary\/60::placeholder{color:#b2bbc599}@supports (color:color-mix(in lab, red, red)){.placeholder-dm-text-secondary\/60::placeholder{color:color-mix(in oklab, var(--color-dm-text-secondary) 60%, transparent)}}.opacity-0{opacity:0}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-dm-blue\/20{--tw-shadow-color:#3c90ff33}@supports (color:color-mix(in lab, red, red)){.shadow-dm-blue\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-dm-blue) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\[counter-increment\:line_0\]{counter-increment:line 0}.\[counter-reset\:line\]{counter-reset:line}@media (hover:hover){.group-hover\:block:is(:where(.group):hover *){display:block}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.before\:mr-4:before{content:var(--tw-content);margin-right:calc(var(--spacing) * 4)}.before\:inline-block:before{content:var(--tw-content);display:inline-block}.before\:w-6:before{content:var(--tw-content);width:calc(var(--spacing) * 6)}.before\:text-right:before{content:var(--tw-content);text-align:right}.before\:font-mono:before{content:var(--tw-content);font-family:var(--font-mono)}.before\:text-\[13px\]:before{content:var(--tw-content);font-size:13px}.before\:content-\[counter\(line\)\]:before{--tw-content:counter(line);content:var(--tw-content)}.before\:select-none:before{content:var(--tw-content);-webkit-user-select:none;user-select:none}.before\:\[counter-increment\:line\]:before{content:var(--tw-content);counter-increment:line}@media (hover:hover){.hover\:bg-dm-surface-higher:hover{background-color:var(--color-dm-surface-higher)}.hover\:text-dm-text:hover{color:var(--color-dm-text)}.hover\:text-white:hover{color:var(--color-white)}.hover\:opacity-90:hover{opacity:.9}}.active\:scale-\[0\.98\]:active{scale:.98}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.supports-\[backdrop-filter\]\:backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}@media (width>=40rem){.sm\:text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}}@media (prefers-color-scheme:dark){.dark\:bg-\[var\(--shiki-dark-bg\,var\(--sdm-tbg\)\)\]{background-color:var(--shiki-dark-bg,var(--sdm-tbg))}.dark\:text-\[var\(--shiki-dark\,var\(--sdm-c\,inherit\)\)\]{color:var(--shiki-dark,var(--sdm-c,inherit))}}.\[\&_svg\]\:h-auto svg{height:auto}.\[\&_svg\]\:w-auto svg{width:auto}.\[\&_thead\]\:sticky thead{position:sticky}.\[\&_thead\]\:top-0 thead{top:calc(var(--spacing) * 0)}.\[\&_thead\]\:z-10 thead{z-index:10}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:calc(var(--spacing) * 0)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:calc(var(--spacing) * 0)}.\[\&\>\*\:last-child\]\:after\:inline>:last-child:after{content:var(--tw-content);display:inline}.\[\&\>\*\:last-child\]\:after\:align-baseline>:last-child:after{content:var(--tw-content);vertical-align:baseline}.\[\&\>\*\:last-child\]\:after\:content-\[var\(--streamdown-caret\)\]>:last-child:after{--tw-content:var(--streamdown-caret);content:var(--tw-content)}.\[\&\>p\]\:inline>p{display:inline}li .\[li_\&\]\:pl-6{padding-left:calc(var(--spacing) * 6)}}@keyframes fade-in-up{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@keyframes scan-line{0%{opacity:1;top:0%}80%{opacity:1;top:100%}to{opacity:0;top:100%}}@keyframes pulse-ring{0%{opacity:.6;transform:scale(1)}to{opacity:0;transform:scale(1.8)}}@keyframes typing-dot{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}@keyframes glisten{0%{background-position:200%}to{background-position:-200%}}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes title-appear{0%{opacity:0;filter:blur(8px);transform:translateY(20px)}60%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:1;filter:blur();text-shadow:0 0 40px #f8f9fc26;transform:translateY(0)}}@keyframes subtitle-appear{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes button-appear{0%{opacity:0;transform:translateY(8px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes glow{0%{text-shadow:0 0 20px #f8f9fc0d}to{text-shadow:0 0 40px #f8f9fc26,0 0 80px #f8f9fc0d}}html,body{background:var(--color-dm-bg);height:100%;color:var(--color-dm-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;padding:0;font-family:Google Sans,Segoe UI,system-ui,-apple-system,sans-serif;overflow:hidden}#root{height:100%}.frosted{-webkit-backdrop-filter:blur(20px)saturate(1.2);background:#12131799;border:1px solid #e6eaf014}.chat-scroll::-webkit-scrollbar{width:4px}.chat-scroll::-webkit-scrollbar-track{background:0 0}.chat-scroll::-webkit-scrollbar-thumb{background:#e6eaf026;border-radius:2px}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.44"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/assets/index-GZqzxFHz.js b/assets/index-GZqzxFHz.js new file mode 100644 index 0000000000000000000000000000000000000000..c233a429f8a7b4630bb330c8b2391afd4b53d938 --- /dev/null +++ b/assets/index-GZqzxFHz.js @@ -0,0 +1,446 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function E(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?E(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(D,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(ne(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ne());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-Tt&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ne():S=!1}}}var ne;if(typeof y==`function`)ne=function(){y(te)};else if(typeof MessageChannel<`u`){var E=new MessageChannel,D=E.port2;E.port1.onmessage=te,ne=function(){D.postMessage(null)}}else ne=function(){_(te,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ne()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1de||(e.current=ue[de],ue[de]=null,de--)}function me(e,t){de++,ue[de]=e.current,e.current=t}var he=fe(null),ge=fe(null),_e=fe(null),ve=fe(null);function ye(e,t){switch(me(_e,t),me(ge,e),me(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?df(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=df(t),e=ff(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(he),me(he,e)}function be(){pe(he),pe(ge),pe(_e)}function xe(e){e.memoizedState!==null&&me(ve,e);var t=he.current,n=ff(t,e.type);t!==n&&(me(ge,e),me(he,n))}function Se(e){ge.current===e&&(pe(he),pe(ge)),ve.current===e&&(pe(ve),xp._currentValue=le)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ee=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Te(n):``}function Oe(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te(`Lazy`);case 13:return e.child!==t&&t!==null?Te(`Suspense Fallback`):Te(`Suspense`);case 19:return Te(`SuspenseList`);case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return Te(`Activity`);default:return``}}function ke(e){try{var t=``,n=null;do t+=Oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Ae=Object.prototype.hasOwnProperty,je=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,Pe=t.unstable_requestPaint,Fe=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,Re=t.unstable_UserBlockingPriority,ze=t.unstable_NormalPriority,Be=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,He=t.log,Ue=t.unstable_setDisableYieldValue,We=null,Ge=null;function Ke(e){if(typeof He==`function`&&Ue(e),Ge&&typeof Ge.setStrictMode==`function`)try{Ge.setStrictMode(We,e)}catch{}}var qe=Math.clz32?Math.clz32:Xe,Je=Math.log,Ye=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(Je(e)/Ye|0)|0}var Ze=256,Qe=262144,$e=4194304;function et(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=et(n))):i=et(o):i=et(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=et(n))):i=et(o)):i=et(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function nt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var e=$e;return $e<<=1,!($e&62914560)&&($e=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),bn=!1;if(yn)try{var xn={};Object.defineProperty(xn,`passive`,{get:function(){bn=!0}}),window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=null,Cn=null,wn=null;function Tn(){if(wn)return wn;var e,t=Cn,n=t.length,r,i=`value`in Sn?Sn.value:Sn.textContent,a=i.length;for(e=0;e=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=Tn(),wn=Cn=Sn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kt(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=yn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Kt(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Nr(Hr,r)||(Hr=r,r=Jd(Vr,`onSelect`),0>=o,i-=o,Ii=1<<32-qe(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Gi&&Ri(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Gi&&Ri(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Gi&&Ri(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Gi&&Ri(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&za(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ka(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=Ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Si(o.type,o.key,o.props,null,e.mode,c),Ka(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ei(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=za(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ga(o),c);if(o.$$typeof===C)return b(e,r,pa(e,o),c);qa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=wi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Wa=0;var i=b(e,t,n,r);return Ua=null,i}catch(t){if(t===Na||t===Fa)throw t;var a=vi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ya=Ja(!0),Xa=Ja(!1),Za=!1;function Qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $a(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function eo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function to(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,eu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=hi(e),mi(e,null,n),t}return di(e,r,t,n),hi(e)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}function ro(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var io=!1;function ao(){if(io){var e=wa;if(e!==null)throw e}}function oo(e,t,n,r){io=!1;var i=e.updateQueue;Za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(ru&f)===f:(r&f)===f){f!==0&&f===Ca&&(io=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Za=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),du|=o,e.lanes=o,e.memoizedState=d}}function so(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=O.T,s={};O.T=s,Js(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?qs(e,t,Da(c,r),Nu(e)):qs(e,t,r,Nu(e))}catch(n){qs(e,t,{then:function(){},status:`rejected`,reason:n},Nu())}finally{ce.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Ls(){}function Rs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=zs(e).queue;Is(e,a,t,le,n===null?Ls:function(){return Bs(e),n(r)})}function zs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bs(e){var t=zs(e);t.next===null&&(t=e.alternate.memoizedState),qs(e,t.next.queue,{},Nu())}function Vs(){return fa(xp)}function Hs(){return Wo().memoizedState}function Us(){return Wo().memoizedState}function Ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nu();e=eo(n);var r=to(t,e,n);r!==null&&(Fu(r,t,n),no(r,t,n)),t={cache:ya()},e.payload=t;return}t=t.return}}function Gs(e,t,n){var r=Nu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ys(e)?Xs(t,n):(n=fi(e,t,n,r),n!==null&&(Fu(n,e,r),Zs(n,t,r)))}function Ks(e,t,n){qs(e,t,n,Nu())}function qs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ys(e))Xs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return di(e,t,i,0),tu===null&&ui(),!1}catch{}if(n=fi(e,t,i,r),n!==null)return Fu(n,e,r),Zs(n,t,r),!0}return!1}function Js(e,t,n,r){if(r={lane:2,revertLane:Md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ys(e)){if(t)throw Error(i(479))}else t=fi(e,n,r,2),t!==null&&Fu(t,e,2)}function Ys(e){var t=e.alternate;return e===wo||t!==null&&t===wo}function Xs(e,t){Oo=Do=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var Qs={readContext:fa,use:qo,useCallback:Po,useContext:Po,useEffect:Po,useImperativeHandle:Po,useLayoutEffect:Po,useInsertionEffect:Po,useMemo:Po,useReducer:Po,useRef:Po,useState:Po,useDebugValue:Po,useDeferredValue:Po,useTransition:Po,useSyncExternalStore:Po,useId:Po,useHostTransitionStatus:Po,useFormState:Po,useActionState:Po,useOptimistic:Po,useMemoCache:Po,useCacheRefresh:Po};Qs.useEffectEvent=Po;var $s={readContext:fa,use:qo,useCallback:function(e,t){return Uo().memoizedState=[e,t===void 0?null:t],e},useContext:fa,useEffect:Cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),xs(4194308,4,ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xs(4194308,4,e,t)},useInsertionEffect:function(e,t){xs(4,2,e,t)},useMemo:function(e,t){var n=Uo();t=t===void 0?null:t;var r=e();if(ko){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Uo();if(n!==void 0){var i=n(t);if(ko){Ke(!0);try{n(t)}finally{Ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Gs.bind(null,wo,e),[r.memoizedState,e]},useRef:function(e){var t=Uo();return e={current:e},t.memoizedState=e},useState:function(e){e=as(e);var t=e.queue,n=Ks.bind(null,wo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:js,useDeferredValue:function(e,t){return Ps(Uo(),e,t)},useTransition:function(){var e=as(!1);return e=Is.bind(null,wo,e.queue,!0,!1),Uo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=wo,a=Uo();if(Gi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),tu===null)throw Error(i(349));ru&127||es(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Cs(ns.bind(null,r,o,e),[e]),r.flags|=2048,ys(9,{destroy:void 0},ts.bind(null,r,o,n,t),null),n},useId:function(){var e=Uo(),t=tu.identifierPrefix;if(Gi){var n=Li,r=Ii;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ao++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[gt]=t,o[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(rf(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&qc(t)}}return Qc(t),Jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&qc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=_e.current,Qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ui,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ef(e.nodeValue,n)),e||Yi(t,!0)}else e=uf(e).createTextNode(r),e[gt]=t,t.stateNode=e}return Qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Qi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[gt]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qc(t),e=!1}else n=ea(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(k(t),t):(k(t),null);if(t.flags&128)throw Error(i(558))}return Qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[gt]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qc(t),a=!1}else a=ea(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(k(t),t):(k(t),null)}return k(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Xc(t,t.updateQueue),Qc(t),null);case 4:return be(),e===null&&Wd(t.stateNode.containerInfo),Qc(t),null;case 10:return oa(t.type),Qc(t),null;case 19:if(pe(xo),r=t.memoizedState,r===null)return Qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Zc(r,!1);else{if(uu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=So(e),o!==null){for(t.flags|=128,Zc(r,!1),e=o.updateQueue,t.updateQueue=e,Xc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xi(n,e),n=n.sibling;return me(xo,xo.current&1|2),Gi&&Ri(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Fe()>xu&&(t.flags|=128,a=!0,Zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=So(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Xc(t,e),Zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Gi)return Qc(t),null}else 2*Fe()-r.renderingStartTime>xu&&n!==536870912&&(t.flags|=128,a=!0,Zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,n=xo.current,me(xo,a?n&1|2:n&1),Gi&&Ri(t,r.treeForkCount),e);case 22:case 23:return k(t),mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Qc(t),t.subtreeFlags&6&&(t.flags|=8192)):Qc(t),n=t.updateQueue,n!==null&&Xc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(va),Qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function el(e,t){switch(Vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(va),be(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(k(t),t.alternate===null)throw Error(i(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(k(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(xo),null;case 4:return be(),null;case 10:return oa(t.type),null;case 22:case 23:return k(t),mo(),e!==null&&pe(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(va),null;case 25:return null;default:return null}}function tl(e,t){switch(Vi(t),t.tag){case 3:oa(va),be();break;case 26:case 27:case 5:Se(t);break;case 4:be();break;case 31:t.memoizedState!==null&&k(t);break;case 13:k(t);break;case 19:pe(xo);break;case 10:oa(t.type);break;case 22:case 23:k(t),mo(),e!==null&&pe(ka);break;case 24:oa(va)}}function nl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){dd(t,t.return,e)}}function rl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){dd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){dd(t,t.return,e)}}function il(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{co(t,n)}catch(t){dd(e,e.return,t)}}}function al(e,t,n){n.props=oc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){dd(e,t,n)}}function ol(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){dd(e,t,n)}}function sl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){dd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){dd(e,t,n)}else n.current=null}function cl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){dd(e,e.return,t)}}function ll(e,t,n){try{var r=e.stateNode;af(r,e.type,n,t),r[_t]=t}catch(t){dd(e,e.return,t)}}function ul(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xf(e.type)||e.tag===4}function dl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||ul(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&xf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fl(e,t,n),e=e.sibling;e!==null;)fl(e,t,n),e=e.sibling}function pl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&xf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(pl(e,t,n),e=e.sibling;e!==null;)pl(e,t,n),e=e.sibling}function ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rf(t,r,n),t[gt]=e,t[_t]=n}catch(t){dd(e,e.return,t)}}var hl=!1,gl=!1,_l=!1,vl=typeof WeakSet==`function`?WeakSet:Set,yl=null;function bl(e,t){if(e=e.containerInfo,cf=Ap,e=Lr(e),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(lf={focusedElem:e,selectionRange:n},Ap=!1,yl=t;yl!==null;)if(t=yl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,yl=e;else for(;yl!==null;){switch(t=yl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),rf(o,r,n),o[gt]=e,kt(o),r=o;break a;case`link`:var s=up(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,O.T=null,n=ku,ku=null;var o=Tu,s=Du;if(wu=0,Eu=Tu=null,Du=0,eu&6)throw Error(i(331));var c=eu;if(eu|=4,Yl(o.current),Vl(o,o.current,s,n),eu=c,Td(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot==`function`)try{Ge.onPostCommitFiberRoot(We,o)}catch{}return!0}finally{ce.p=a,O.T=r,sd(e,t)}}function ud(e,t,n){t=Oi(n,t),t=fc(e.stateNode,t,2),e=to(e,t,2),e!==null&&(ot(e,2),wd(e))}function dd(e,t,n){if(e.tag===3)ud(e,e,n);else for(;t!==null;){if(t.tag===3){ud(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cu===null||!Cu.has(r))){e=Oi(n,e),n=pc(2),r=to(t,n,2),r!==null&&(mc(n,r,t,e),ot(r,2),wd(r));break}}t=t.return}}function fd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $l;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(cu=!0,i.add(n),e=pd.bind(null,e,t,n),t.then(e,e))}function pd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tu===e&&(ru&n)===n&&(uu===4||uu===3&&(ru&62914560)===ru&&300>Fe()-yu?!(eu&2)&&Hu(e,0):pu|=n,hu===ru&&(hu=0)),wd(e)}function md(e,t){t===0&&(t=it()),e=pi(e,t),e!==null&&(ot(e,t),wd(e))}function hd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),md(e,n)}function gd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),md(e,n)}function _d(e,t){return je(e,t)}var vd=null,yd=null,bd=!1,xd=!1,Sd=!1,Cd=0;function wd(e){e!==yd&&e.next===null&&(yd===null?vd=yd=e:yd=yd.next=e),xd=!0,bd||(bd=!0,jd())}function Td(e,t){if(!Sd&&xd){Sd=!0;do for(var n=!1,r=vd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ad(r,a))}else a=ru,a=tt(r,r===tu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||nt(r,a)||(n=!0,Ad(r,a));r=r.next}while(n);Sd=!1}}function Ed(){Dd()}function Dd(){xd=bd=!1;var e=0;Cd!==0&&hf()&&(e=Cd);for(var t=Fe(),n=null,r=vd;r!==null;){var i=r.next,a=Od(r,t);a===0?(r.next=null,n===null?vd=i:n.next=i,i===null&&(yd=n)):(n=r,(e!==0||a&3)&&(xd=!0)),r=i}wu!==0&&wu!==5||Td(e,!1),Cd!==0&&(Cd=0)}function Od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&of(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Wf(e,t,n){var r=Uf;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Rf.has(i)||(Rf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rf(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Gf(e){Bf.D(e),Wf(`dns-prefetch`,e,null)}function Kf(e,t){Bf.C(e,t),Wf(`preconnect`,e,t)}function qf(e,t,n){Bf.L(e,t,n);var r=Uf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=$f(e);break;case`script`:a=rp(e)}Lf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Lf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(ep(a))||t===`script`&&r.querySelector(ip(a))||(t=r.createElement(`link`),rf(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Jf(e,t){Bf.m(e,t);var n=Uf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=rp(e)}if(!Lf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Lf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(ip(a)))return}r=n.createElement(`link`),rf(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Yf(e,t,n){Bf.S(e,t,n);var r=Uf;if(r&&e){var i=Ot(r).hoistableStyles,a=$f(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(ep(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Lf.get(a))&&sp(e,n);var c=o=r.createElement(`link`);kt(c),rf(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,op(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Xf(e,t){Bf.X(e,t);var n=Uf;if(n&&e){var r=Ot(n).hoistableScripts,i=rp(e),a=r.get(i);a||(a=n.querySelector(ip(i)),a||(e=p({src:e,async:!0},t),(t=Lf.get(i))&&cp(e,t),a=n.createElement(`script`),kt(a),rf(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Zf(e,t){Bf.M(e,t);var n=Uf;if(n&&e){var r=Ot(n).hoistableScripts,i=rp(e),a=r.get(i);a||(a=n.querySelector(ip(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Lf.get(i))&&cp(e,t),a=n.createElement(`script`),kt(a),rf(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Qf(e,t,n,r){var a=(a=_e.current)?zf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=$f(n.href),n=Ot(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=$f(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(ep(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Lf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Lf.set(e,n),o||np(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=rp(n),n=Ot(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function $f(e){return`href="`+Jt(e)+`"`}function ep(e){return`link[rel="stylesheet"][`+e+`]`}function tp(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function np(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),rf(t,`link`,n),kt(t),e.head.appendChild(t))}function rp(e){return`[src="`+Jt(e)+`"]`}function ip(e){return`script[async]`+e}function ap(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),rf(r,`style`,a),op(r,n.precedence,e),t.instance=r;case`stylesheet`:a=$f(n.href);var o=e.querySelector(ep(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=tp(n),(a=Lf.get(a))&&sp(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),rf(o,`link`,r),t.state.loading|=4,op(o,n.precedence,e),t.instance=o;case`script`:return o=rp(n.src),(a=e.querySelector(ip(o)))?(t.instance=a,kt(a),a):(r=n,(a=Lf.get(o))&&(r=p({},n),cp(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),rf(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,op(r,n.precedence,e));return t.instance}function op(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function fp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function pp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function mp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=$f(r.href),a=t.querySelector(ep(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=_p.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=tp(r),(i=Lf.get(i))&&sp(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rf(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=_p.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var hp=0;function gp(e,t){return e.stylesheets&&e.count===0&&yp(e,e.stylesheets),0hp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function _p(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vp=null;function yp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vp=new Map,t.forEach(bp,e),vp=null,_p.call(e))}function bp(e,t){if(!(t.state.loading&4)){var n=vp.get(e);if(n)var r=n.get(null);else{n=new Map,vp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=f(),b=v(),x=`modulepreload`,S=function(e){return`/`+e},C={},w=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=S(t,n),t in C)return;C[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:x,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},T=s({InferenceSession:()=>Ze,TRACE:()=>He,TRACE_EVENT_BEGIN:()=>Ke,TRACE_EVENT_END:()=>qe,TRACE_FUNC_BEGIN:()=>We,TRACE_FUNC_END:()=>Ge,Tensor:()=>Be,default:()=>kr,env:()=>ve,registerBackend:()=>ce}),ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,ne=Object.getOwnPropertyNames,E=Object.prototype.hasOwnProperty,D=(e=>typeof u<`u`?u:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof u<`u`?u:e)[t]}):e)(function(e){if(typeof u<`u`)return u.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),re=(e,t)=>()=>(e&&(t=e(e=0)),t),ie=(e,t)=>{for(var n in t)ee(e,n,{get:t[n],enumerable:!0})},ae=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of ne(t))!E.call(e,i)&&i!==n&&ee(e,i,{get:()=>t[i],enumerable:!(r=te(t,i))||r.enumerable});return e},oe=e=>ae(ee({},`__esModule`,{value:!0}),e),se,O,ce,le,ue,de=re(()=>{se=new Map,O=[],ce=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let r=se.get(e);if(r===void 0)se.set(e,{backend:t,priority:n});else{if(r.priority>n)return;if(r.priority===n&&r.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`)}if(n>=0){let t=O.indexOf(e);t!==-1&&O.splice(t,1);for(let t=0;t{let t=se.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},ue=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?O:n,i,a=[],o=new Set;for(let e of r){let t=await le(e);typeof t==`string`?a.push({name:e,err:t}):(i||=t,i===t&&o.add(e))}if(!i)throw Error(`no available backend found. ERR: ${a.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of a)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let s=t.filter(e=>o.has(typeof e==`string`?e:e.name));return[i,new Proxy(e,{get:(e,t)=>t===`executionProviders`?s:Reflect.get(e,t)})]}}),fe=re(()=>{de()}),pe,me=re(()=>{pe=`1.24.0-dev.20251116-b39e144322`}),he,ge,_e=re(()=>{me(),he=`warning`,ge={wasm:{},webgl:{},webgpu:{},versions:{common:pe},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);he=e}},get logLevel(){return he}},Object.defineProperty(ge,`logLevel`,{enumerable:!0})}),ve,ye=re(()=>{_e(),ve=ge}),be,xe,Se=re(()=>{be=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t!==void 0&&t.format!==void 0?t.format:`RGB`,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t{ze(),Ce=(e,t)=>{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:`RGB`,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,Ce(o,s)}else throw Error(`Can not access image data`)}else{if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(Ce(e.data,s))}});throw Error(`Input data provided is not supported - aborted tensor creation`)}if(o!==void 0)return Ce(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},Te=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new Re({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},Ee=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new Re({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},De=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new Re({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},Oe=(e,t,n)=>new Re({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]})}),Ae,je,Me,Ne,Pe=re(()=>{Ae=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),je=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]),Me=!1,Ne=()=>{if(!Me){Me=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=typeof n<`u`&&n.from;e&&(Ae.set(`int64`,BigInt64Array),je.set(BigInt64Array,`int64`)),t&&(Ae.set(`uint64`,BigUint64Array),je.set(BigUint64Array,`uint64`)),r?(Ae.set(`float16`,n),je.set(n,`float16`)):Ae.set(`float16`,Uint16Array)}}}),Fe,Ie,Le=re(()=>{ze(),Fe=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new Re(e.type,e.data,t);case`cpu-pinned`:return new Re({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new Re({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new Re({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new Re({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}}}),Re,ze=re(()=>{Se(),ke(),Pe(),Le(),Re=class{constructor(e,t,n){Ne();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=Ae.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=Ae.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=je.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=Fe(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return we(e,t)}static fromTexture(e,t){return Te(e,t)}static fromGpuBuffer(e,t){return Ee(e,t)}static fromMLTensor(e,t){return De(e,t)}static fromPinnedBuffer(e,t,n){return Oe(e,t,n)}toDataURL(e){return be(this,e)}toImageData(e){return xe(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return Ie(this,e)}}}),Be,Ve=re(()=>{ze(),Be=Re}),He,Ue,We,Ge,Ke,qe,Je=re(()=>{_e(),He=(e,t)=>{(typeof ge.trace>`u`?!ge.wasm.trace:!ge.trace)||console.timeStamp(`${e}::ORT::${t}`)},Ue=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(typeof ge.trace>`u`?!ge.wasm.trace:!ge.trace)||Ue(`BEGIN`,e)},Ge=e=>{(typeof ge.trace>`u`?!ge.wasm.trace:!ge.trace)||Ue(`END`,e)},Ke=e=>{(typeof ge.trace>`u`?!ge.wasm.trace:!ge.trace)||console.time(`ORT::${e}`)},qe=e=>{(typeof ge.trace>`u`?!ge.wasm.trace:!ge.trace)||console.timeEnd(`ORT::${e}`)}}),Ye,Xe=re(()=>{de(),Ve(),Je(),Ye=class e{constructor(e){this.handler=e}async run(e,t,n){We(),Ke(`InferenceSession.run`);let r={},i={};if(typeof e!=`object`||!e||e instanceof Be||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof Be)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof Be)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else i=t}}else if(typeof t<`u`)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(typeof e[t]>`u`)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof Be?s[e]=t:s[e]=new Be(t.type,t.data,t.dims)}return qe(`InferenceSession.run`),Ge(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){We(),Ke(`InferenceSession.create`);let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(typeof i<`u`)throw TypeError(`'options' must be an object.`)}else if(typeof r<`u`)throw TypeError(`'byteLength' must be a number.`)}else if(typeof n<`u`)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[s,c]=await ue(o),l=await s.createInferenceSessionHandler(a,c);return qe(`InferenceSession.create`),Ge(),new e(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}}),Ze,Qe=re(()=>{Xe(),Ze=Ye}),$e=re(()=>{}),et=re(()=>{}),tt=re(()=>{}),nt=re(()=>{}),rt={};ie(rt,{InferenceSession:()=>Ze,TRACE:()=>He,TRACE_EVENT_BEGIN:()=>Ke,TRACE_EVENT_END:()=>qe,TRACE_FUNC_BEGIN:()=>We,TRACE_FUNC_END:()=>Ge,Tensor:()=>Be,env:()=>ve,registerBackend:()=>ce});var it=re(()=>{fe(),ye(),Qe(),Ve(),$e(),et(),Je(),tt(),nt()}),at=re(()=>{}),ot={};ie(ot,{default:()=>lt});var st,ct,lt,ut=re(()=>{$n(),Bt(),At(),st=`ort-wasm-proxy-worker`,ct=globalThis.self?.name===st,ct&&(self.onmessage=e=>{let{type:t,in:n}=e.data;try{switch(t){case`init-wasm`:Rt(n.wasm).then(()=>{Vn(n).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})})},e=>{postMessage({type:t,err:e})});break;case`init-ep`:{let{epName:e,env:r}=n;Hn(r,e).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})});break}case`copy-from`:{let{buffer:e}=n,r=Kn(e);postMessage({type:t,out:r});break}case`create`:{let{model:e,options:r}=n;qn(e,r).then(e=>{postMessage({type:t,out:e})},e=>{postMessage({type:t,err:e})});break}case`release`:Jn(n),postMessage({type:t});break;case`run`:{let{sessionId:e,inputIndices:r,inputs:i,outputIndices:a,options:o}=n;Xn(e,r,i,a,Array(a.length).fill(null),o).then(e=>{e.some(e=>e[3]!==`cpu`)?postMessage({type:t,err:`Proxy does not support non-cpu tensor location.`}):postMessage({type:t,out:e},Qn([...i,...e]))},e=>{postMessage({type:t,err:e})});break}case`end-profiling`:Zn(n),postMessage({type:t});break;default:}}catch(e){postMessage({type:t,err:e})}}),lt=ct?null:e=>new Worker(e??yt,{type:`module`,name:st})}),dt={};ie(dt,{default:()=>pt});async function ft(e={}){var t=e,n=!!globalThis.window,r=!!globalThis.WorkerGlobalScope,i=r&&self.name?.startsWith(`em-pthread`);t.mountExternalData=(e,n)=>{e.startsWith(`./`)&&(e=e.substring(2)),(t.Uc||=new Map).set(e,n)},t.unmountExternalData=()=>{delete t.Uc},globalThis.SharedArrayBuffer??new WebAssembly.Memory({initial:0,maximum:0,Be:!0}).buffer.constructor;let a=()=>{let e=e=>(...t)=>{let n=dn;return t=e(...t),dn==n?t:new Promise((e,t)=>{vn={resolve:e,reject:t}})};(()=>{for(let n of[`_OrtAppendExecutionProvider`,`_OrtCreateSession`,`_OrtRun`,`_OrtRunWithBinding`,`_OrtBindInput`])t[n]=e(t[n])})(),typeof jsepRunAsync<`u`&&(t._OrtRun=jsepRunAsync(t._OrtRun),t._OrtRunWithBinding=jsepRunAsync(t._OrtRunWithBinding)),a=void 0};t.asyncInit=()=>{a?.()};var o,s,c=(e,t)=>{throw t},l=import.meta.url,u=``;if(n||r){try{u=new URL(`.`,l).href}catch{}r&&(s=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),o=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var d,f,p,m,h,g,_=console.log.bind(console),v=console.error.bind(console),y=_,b=v,x=!1,S=e=>e.startsWith(`file://`);function C(){Me.buffer!=T.buffer&&ce()}if(i){let e=function(n){try{var r=n.data,i=r.Oc;if(i===`load`){let n=[];self.onmessage=e=>n.push(e),g=()=>{postMessage({Oc:`loaded`});for(let t of n)e(t);self.onmessage=e};for(let e of r.de)t[e]&&!t[e].proxy||(t[e]=(...t)=>{postMessage({Oc:`callHandler`,ce:e,args:t})},e==`print`&&(y=t[e]),e==`printErr`&&(b=t[e]));Me=r.je,ce(),f=r.ke,fe(),Ko()}else if(i===`run`){(function(e){var t=(C(),D)[e+52>>>2>>>0];e=(C(),D)[e+56>>>2>>>0],da(t,t-e),fa(t)})(r.Nc),ta(r.Nc,0,0,1,0,0),ke(),$t(r.Nc),w||=(Mi(),!0);try{Ne(r.he,r.Wc)}catch(e){if(e!=`unwind`)throw e}}else r.target!==`setimmediate`&&(i===`checkMailbox`?w&&en():i&&(b(`worker: received unknown command ${i}`),b(r)))}catch(e){throw na(),e}};var w=!1;self.onunhandledrejection=e=>{throw e.reason||e},self.onmessage=e}var T,ee,te,ne,E,D,re,ie,ae,oe,se,O=!1;function ce(){var e=Me.buffer;t.HEAP8=T=new Int8Array(e),te=new Int16Array(e),t.HEAPU8=ee=new Uint8Array(e),ne=new Uint16Array(e),t.HEAP32=E=new Int32Array(e),t.HEAPU32=D=new Uint32Array(e),re=new Float32Array(e),ie=new Float64Array(e),ae=new BigInt64Array(e),oe=new BigUint64Array(e)}function le(){O=!0,i?g():oo._b()}function ue(e){throw b(e=`Aborted(`+e+`)`),x=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),h?.(e),e}function de(){return{a:{f:Le,J:ze,k:We,p:Ge,l:Ke,ta:qe,b:Je,ca:Ye,Ka:Ze,q:Qe,da:rt,_a:it,Ga:at,Ia:ot,$a:st,Ya:ct,Ra:lt,Xa:ut,pa:dt,Ha:ft,Yb:pt,Za:mt,Fa:ht,eb:gt,Da:wt,Tb:Tt,Rb:Nt,Ca:Ft,M:It,I:Lt,Sb:Bt,ka:Jt,Ub:Yt,Ua:Xt,Wb:tn,La:rn,Pb:an,la:on,Ta:$t,bb:sn,U:xn,n:On,c:Ot,sb:kn,w:An,L:jn,z:Mn,j:Nn,o:Pn,tb:Fn,G:In,T:Ln,h:Rn,u:zn,m:Bn,i:Vn,Oa:Hn,Pa:Kn,Qa:qn,Ma:Jn,Na:Yn,Qb:Qn,fb:$n,db:nr,Y:ar,rb:or,ma:sr,cb:er,gb:cr,ab:lr,Xb:ur,N:Zn,hb:dr,X:fr,Vb:pr,ob:Fr,C:Ir,sa:Lr,ra:Rr,qb:zr,W:Br,v:Vr,nb:Hr,mb:Ur,lb:Wr,pb:Gr,kb:Kr,jb:qr,ib:Jr,Va:Qr,Wa:$r,Ja:Ce,ea:ei,oa:ti,Sa:ni,na:ii,Db:Wo,xa:Io,Eb:Uo,ya:Fo,F:To,e:po,s:uo,x:lo,D:So,Ib:Mo,ba:Ao,B:go,za:No,$:Lo,ha:jo,Fb:Vo,Gb:Bo,Ba:Eo,Aa:ko,Jb:Do,wa:Ho,aa:Po,d:fo,A:ho,r:mo,Cb:Go,t:vo,y:Co,H:_o,E:yo,K:wo,S:Ro,ja:xo,_:zo,Kb:k,Lb:bo,P:Oo,g:ai,a:Me,Ob:xe,Hb:oi,ia:si,O:ci,qa:li,Mb:ui,Q:di,zb:fi,Ab:pi,ua:mi,fa:hi,R:gi,Ea:_i,va:vi,Z:yi,xb:bi,Zb:xi,V:Si,Bb:Ci,ub:wi,vb:Ei,wb:Di,ga:Oi,yb:ki,Nb:Ai}}}async function fe(){function e(e,n){var r=oo=e.exports;e={};for(let[t,n]of Object.entries(r))typeof n==`function`?(r=ln(n),e[t]=r):e[t]=n;return oo=e,oo=function(){var e=oo,t=e=>t=>e(t)>>>0,n=e=>()=>e()>>>0;return(e=Object.assign({},e)).$b=t(e.$b),e.Cc=n(e.Cc),e.Ec=t(e.Ec),e.rd=(e=>(t,n)=>e(t,n)>>>0)(e.rd),e.wd=t(e.wd),e.xd=n(e.xd),e.Bd=t(e.Bd),e}(),Ee.push(oo.id),ji=(e=oo).$b,Mi=e.ac,t._OrtInit=e.bc,t._OrtGetLastError=e.cc,t._OrtCreateSessionOptions=e.dc,t._OrtAppendExecutionProvider=e.ec,t._OrtAddFreeDimensionOverride=e.fc,t._OrtAddSessionConfigEntry=e.gc,t._OrtReleaseSessionOptions=e.hc,t._OrtCreateSession=e.ic,t._OrtReleaseSession=e.jc,t._OrtGetInputOutputCount=e.kc,t._OrtGetInputOutputMetadata=e.lc,t._OrtFree=e.mc,t._OrtCreateTensor=e.nc,t._OrtGetTensorData=e.oc,t._OrtReleaseTensor=e.pc,t._OrtCreateRunOptions=e.qc,t._OrtAddRunConfigEntry=e.rc,t._OrtReleaseRunOptions=e.sc,t._OrtCreateBinding=e.tc,t._OrtBindInput=e.uc,t._OrtBindOutput=e.vc,t._OrtClearBoundOutputs=e.wc,t._OrtReleaseBinding=e.xc,t._OrtRunWithBinding=e.yc,t._OrtRun=e.zc,t._OrtEndProfiling=e.Ac,Ni=t._OrtGetWebGpuDevice=e.Bc,Pi=e.Cc,Fi=t._free=e.Dc,Ii=t._malloc=e.Ec,Li=t._wgpuBufferRelease=e.Fc,Ri=t._wgpuCreateInstance=e.Gc,zi=e.Hc,Bi=e.Ic,Vi=e.Jc,Hi=e.Kc,Ui=e.Lc,Wi=e.Pc,Gi=e.Zc,Ki=e._c,qi=e.$c,Ji=e.bd,Yi=e.cd,Xi=e.dd,Zi=e.ed,Qi=e.fd,$i=e.gd,ea=e.hd,ta=e.kd,na=e.ld,ra=e.md,ia=e.nd,aa=e.od,oa=e.pd,sa=e.qd,ca=e.rd,la=e.sd,ua=e.td,da=e.ud,fa=e.vd,pa=e.wd,ma=e.xd,ha=e.yd,ga=e.zd,_a=e.Ad,va=e.Bd,ya=e.Cd,ba=e.Dd,xa=e.Ed,Sa=e.Fd,Ca=e.Gd,wa=e.Hd,Ta=e.Id,Ea=e.Jd,Da=e.Kd,Oa=e.Ld,ka=e.Md,Aa=e.Nd,ja=e.Od,Ma=e.Pd,Na=e.Qd,Pa=e.Rd,Fa=e.Td,Ia=e.Ud,La=e.Vd,Ra=e.Wd,za=e.Yd,Ba=e.Zd,Va=e._d,Ha=e.$d,Ua=e.ae,Wa=e.be,Ga=e.pe,Ka=e.qe,qa=e.re,Ja=e.se,Ya=e.te,Xa=e.ue,Za=e.ve,Qa=e.we,$a=e.xe,eo=e.ye,to=e.ze,no=e.Xe,ro=e.Ye,io=e.Ze,ao=e._e,f=n,oo}var n,r=de();return t.instantiateWasm?new Promise(n=>{t.instantiateWasm(r,(t,r)=>{n(e(t,r))})}):i?e(new WebAssembly.Instance(f,de()),f):(se??=t.locateFile?t.locateFile?t.locateFile(`ort-wasm-simd-threaded.asyncify.wasm`,u):u+`ort-wasm-simd-threaded.asyncify.wasm`:new URL(`/assets/ort-wasm-simd-threaded.asyncify-BrebZMa_.wasm`,``+import.meta.url).href,n=await async function(e){var t=se;if(!d&&!S(t))try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){b(`wasm streaming compile failed: ${e}`),b(`falling back to ArrayBuffer instantiation`)}return async function(e,t){try{var n=await async function(e){if(!d)try{var t=await o(e);return new Uint8Array(t)}catch{}if(e==se&&d)e=new Uint8Array(d);else{if(!s)throw`both async and sync fetching of the wasm failed`;e=s(e)}return e}(e);return await WebAssembly.instantiate(n,t)}catch(e){b(`failed to asynchronously prepare wasm: ${e}`),ue(e)}}(t,e)}(r),e(n.instance,n.module))}class pe{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var me=e=>{e.terminate(),e.onmessage=()=>{}},he=[],ge=0,_e=null,ve=e=>{we.length==0&&(je(),Ae(we[0]));var t=we.pop();if(!t)return 6;Te.push(t),De[e.Nc]=t,t.Nc=e.Nc;var n={Oc:`run`,he:e.ge,Wc:e.Wc,Nc:e.Nc};return t.postMessage(n,e.Yc),0},ye=0,be=(e,t,...n)=>{var r,i=16*n.length,a=ma(),o=pa(i),s=o>>>3;for(r of n)typeof r==`bigint`?((C(),ae)[s++>>>0]=1n,(C(),ae)[s++>>>0]=r):((C(),ae)[s++>>>0]=0n,(C(),ie)[s++>>>0]=r);return e=ra(e,0,i,o,t),fa(a),e};function xe(e){if(i)return be(0,1,e);if(p=e,!(0{if(p=e,i)throw Se(e),`unwind`;xe(e)},we=[],Te=[],Ee=[],De={},Oe=e=>{var t=e.Nc;delete De[t],we.push(e),Te.splice(Te.indexOf(e),1),e.Nc=0,ia(t)};function ke(){Ee.forEach(e=>e())}var Ae=e=>new Promise(n=>{e.onmessage=r=>{var i=r.data;if(r=i.Oc,i.Vc&&i.Vc!=Pi()){var a=De[i.Vc];a?a.postMessage(i,i.Yc):b(`Internal error! Worker sent a message "${r}" to target pthread ${i.Vc}, but that thread no longer exists!`)}else r===`checkMailbox`?en():r===`spawnThread`?ve(i):r===`cleanupThread`?Zt(()=>{Oe(De[i.ie])}):r===`loaded`?(e.loaded=!0,n(e)):i.target===`setimmediate`?e.postMessage(i):r===`uncaughtException`?e.onerror(i.error):r===`callHandler`?t[i.ce](...i.args):r&&b(`worker sent an unknown command ${r}`)},e.onerror=e=>{throw b(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r,i=[];for(r of[])t.propertyIsEnumerable(r)&&i.push(r);e.postMessage({Oc:`load`,de:i,je:Me,ke:f})});function je(){var e=new Worker((()=>{let e=URL;return import.meta.url>`file:`&&import.meta.url<`file;`?new e(`ort.webgpu.bundle.min.mjs`,import.meta.url):new URL(import.meta.url)})(),{type:`module`,workerData:`em-pthread`,name:`em-pthread`});we.push(e)}var Me,Ne=(e,t)=>{ye=0,e=ba(e,t),0-9007199254740992>e||9007199254740992>>=0);return(C(),T)[t.Qc+12>>>0]==0&&(Be(t,!0),Fe--),Ve(t,!1),Pe.push(t),va(e)}var Re=0,ze=()=>{la(0,0);var e=Pe.pop();ha(e.Xc),Re=0};function Be(e,t){t=t?1:0,(C(),T)[e.Qc+12>>>0]=t}function Ve(e,t){t=t?1:0,(C(),T)[e.Qc+13>>>0]=t}class He{constructor(e){this.Xc=e,this.Qc=e-24}}var Ue=e=>{var t=Re;if(!t)return ua(0),0;var n=new He(t);(C(),D)[n.Qc+16>>>2>>>0]=t;var r=(C(),D)[n.Qc+4>>>2>>>0];if(!r)return ua(0),t;for(var i of e){if(i===0||i===r)break;if(_a(i,r,n.Qc+16))return ua(i),t}return ua(r),t};function We(){return Ue([])}function Ge(e){return Ue([e>>>0])}function Ke(e,t,n,r){return Ue([e>>>0,t>>>0,n>>>0,r>>>0])}var qe=()=>{var e=Pe.pop();e||ue(`no exception to throw`);var t=e.Xc;throw(C(),T)[e.Qc+13>>>0]==0&&(Pe.push(e),Ve(e,!0),Be(e,!1),Fe++),ga(t),Re=t};function Je(e,t,n){var r=new He(e>>>=0);throw t>>>=0,n>>>=0,(C(),D)[r.Qc+16>>>2>>>0]=0,(C(),D)[r.Qc+4>>>2>>>0]=t,(C(),D)[r.Qc+8>>>2>>>0]=n,ga(e),Fe++,Re=e}var Ye=()=>Fe;function Xe(e,t,n,r){return i?be(2,1,e,t,n,r):Ze(e,t,n,r)}function Ze(e,t,n,r){if(e>>>=0,t>>>=0,n>>>=0,r>>>=0,!globalThis.SharedArrayBuffer)return 6;var a=[];return i&&a.length===0?Xe(e,t,n,r):(e={ge:n,Nc:e,Wc:r,Yc:a},i?(e.Oc=`spawnThread`,postMessage(e,a),0):ve(e))}function Qe(e){throw Re||=e>>>0,Re}var $e=globalThis.TextDecoder&&new TextDecoder,et=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},tt=(e,t=0,n,r)=>{if(16<(n=et(e,t>>>=0,n,r))-t&&e.buffer&&$e)return $e.decode(e.buffer instanceof ArrayBuffer?e.subarray(t,n):e.slice(t,n));for(r=``;t(i=(240&i)==224?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},nt=(e,t,n)=>(e>>>=0)?tt((C(),ee),e,t,n):``;function rt(e,t,n){return i?be(3,1,e,t,n):0}function it(e,t){if(i)return be(4,1,e,t)}function at(e,t){if(i)return be(5,1,e,t)}function ot(e,t,n){if(i)return be(6,1,e,t,n)}function st(e,t,n){return i?be(7,1,e,t,n):0}function ct(e,t){if(i)return be(8,1,e,t)}function lt(e,t,n){if(i)return be(9,1,e,t,n)}function ut(e,t,n,r){if(i)return be(10,1,e,t,n,r)}function dt(e,t,n,r){if(i)return be(11,1,e,t,n,r)}function ft(e,t,n,r){if(i)return be(12,1,e,t,n,r)}function pt(e){if(i)return be(13,1,e)}function mt(e,t){if(i)return be(14,1,e,t)}function ht(e,t,n){if(i)return be(15,1,e,t,n)}var gt=()=>ue(``),_t=e=>{e>>>=0;for(var t=``;;){var n=(C(),ee)[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},vt={},yt={},bt={},xt=class extends Error{constructor(e){super(e),this.name=`BindingError`}};function St(e,t,n={}){return function(e,t,n={}){var r=t.name;if(!e)throw new xt(`type "${r}" must have a positive integer typeid pointer`);if(yt.hasOwnProperty(e)){if(n.ee)return;throw new xt(`Cannot register type '${r}' twice`)}yt[e]=t,delete bt[e],vt.hasOwnProperty(e)&&(t=vt[e],delete vt[e],t.forEach(e=>e()))}(e,t,n)}var Ct=(e,t,n)=>{switch(t){case 1:return n?e=>(C(),T)[e>>>0]:e=>(C(),ee)[e>>>0];case 2:return n?e=>(C(),te)[e>>>1>>>0]:e=>(C(),ne)[e>>>1>>>0];case 4:return n?e=>(C(),E)[e>>>2>>>0]:e=>(C(),D)[e>>>2>>>0];case 8:return n?e=>(C(),ae)[e>>>3>>>0]:e=>(C(),oe)[e>>>3>>>0];default:throw TypeError(`invalid integer width (${t}): ${e}`)}};function wt(e,t,n,r,i){e>>>=0,n>>>=0,t=_t(t>>>0);let a=e=>e;if(r=r===0n){let e=8*n;a=t=>BigInt.asUintN(e,t),i=a(i)}St(e,{name:t,Mc:a,Sc:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),Rc:Ct(t,n,!r),Tc:null})}function Tt(e,t,n,r){St(e>>>=0,{name:t=_t(t>>>0),Mc:function(e){return!!e},Sc:function(e,t){return t?n:r},Rc:function(e){return this.Mc((C(),ee)[e>>>0])},Tc:null})}var Et=[],Dt=[0,1,,1,null,1,!0,1,!1,1];function Ot(e){9<(e>>>=0)&&--Dt[e+1]==0&&(Dt[e]=void 0,Et.push(e))}var kt=e=>{if(!e)throw new xt(`Cannot use deleted val. handle = ${e}`);return Dt[e]},At=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=Et.pop()||Dt.length;return Dt[t]=e,Dt[t+1]=1,t}};function jt(e){return this.Mc((C(),D)[e>>>2>>>0])}var Mt={name:`emscripten::val`,Mc:e=>{var t=kt(e);return Ot(e),t},Sc:(e,t)=>At(t),Rc:jt,Tc:null};function Nt(e){return St(e>>>0,Mt)}var Pt=(e,t)=>{switch(t){case 4:return function(e){return this.Mc((C(),re)[e>>>2>>>0])};case 8:return function(e){return this.Mc((C(),ie)[e>>>3>>>0])};default:throw TypeError(`invalid float width (${t}): ${e}`)}};function Ft(e,t,n){n>>>=0,St(e>>>=0,{name:t=_t(t>>>0),Mc:e=>e,Sc:(e,t)=>t,Rc:Pt(t,n),Tc:null})}function It(e,t,n,r,i){e>>>=0,n>>>=0,t=_t(t>>>0);let a=e=>e;if(r===0){var o=32-8*n;a=e=>e<>>o,i=a(i)}St(e,{name:t,Mc:a,Sc:(e,t)=>t,Rc:Ct(t,n,r!==0),Tc:null})}function Lt(e,t,n){function r(e){var t=(C(),D)[e>>>2>>>0];return e=(C(),D)[e+4>>>2>>>0],new i((C(),T).buffer,e,t)}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];St(e>>>=0,{name:n=_t(n>>>0),Mc:r,Rc:r},{ee:!0})}var Rt=(e,t,n)=>{var r=(C(),ee);if(t>>>=0,0=o){if(t>=n)break;r[t++>>>0]=o}else if(2047>=o){if(t+1>=n)break;r[t++>>>0]=192|o>>6,r[t++>>>0]=128|63&o}else if(65535>=o){if(t+2>=n)break;r[t++>>>0]=224|o>>12,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o}else{if(t+3>=n)break;r[t++>>>0]=240|o>>18,r[t++>>>0]=128|o>>12&63,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o,a++}}r[t>>>0]=0,e=t-i}else e=0;return e},zt=e=>{for(var t=0,n=0;n=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t};function Bt(e,t){St(e>>>=0,{name:t=_t(t>>>0),Mc(e){var t=(C(),D)[e>>>2>>>0];return t=nt(e+4,t,!0),Fi(e),t},Sc(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n=typeof t==`string`;if(!(n||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1))throw new xt(`Cannot pass non-string to std::string`);var r=n?zt(t):t.length,i=Ii(4+r+1),a=i+4;return(C(),D)[i>>>2>>>0]=r,n?Rt(t,a,r+1):(C(),ee).set(t,a>>>0),e!==null&&e.push(Fi,i),i},Rc:jt,Tc(e){Fi(e)}})}var Vt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Ht=(e,t,n)=>{if(e>>>=1,16<(t=et((C(),ne),e,t/2,n))-e&&Vt)return Vt.decode((C(),ne).slice(e,t));for(n=``;e>>0];n+=String.fromCharCode(r)}return n},Ut=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i>>1>>>0]=a,t+=2}return(C(),te)[t>>>1>>>0]=0,t-r},Wt=e=>2*e.length,Gt=(e,t,n)=>{var r=``;e>>>=2;for(var i=0;!(i>=t/4);i++){var a=(C(),D)[e+i>>>0];if(!a&&!n)break;r+=String.fromCodePoint(a)}return r},Kt=(e,t,n)=>{if(t>>>=0,n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i>>2>>>0]=a,(t+=4)+4>n)break}return(C(),E)[t>>>2>>>0]=0,t-r},qt=e=>{for(var t=0,n=0;n>>=0,t>>>=0,n=_t(n>>>=0),t===2)var r=Ht,i=Ut,a=Wt;else r=Gt,i=Kt,a=qt;St(e,{name:n,Mc:e=>{var n=(C(),D)[e>>>2>>>0];return n=r(e+4,n*t,!0),Fi(e),n},Sc:(e,r)=>{if(typeof r!=`string`)throw new xt(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Ii(4+o+t);return(C(),D)[s>>>2>>>0]=o/t,i(r,s+4,o+t),e!==null&&e.push(Fi,s),s},Rc:jt,Tc(e){Fi(e)}})}function Yt(e,t){St(e>>>=0,{fe:!0,name:t=_t(t>>>0),Mc:()=>{},Sc:()=>{}})}function Xt(e){ta(e>>>0,!r,1,!n,131072,!1),ke()}var Zt=e=>{if(!x)try{if(e(),!(0Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]);function $t(e){e>>>=0,Qt||(Atomics.waitAsync((C(),E),e>>>2,e).value.then(en),e+=128,Atomics.store((C(),E),e>>>2,1))}var en=()=>Zt(()=>{var e=Pi();e&&($t(e),sa())});function tn(e,t){(e>>>=0)==t>>>0?setTimeout(en):i?postMessage({Vc:e,Oc:`checkMailbox`}):(e=De[e])&&e.postMessage({Oc:`checkMailbox`})}var nn=[];function rn(e,t,n,r,i){for(t>>>=0,i>>>=0,nn.length=0,n=i>>>3,r=i+r>>>3;n>>0]?(C(),ae)[n++>>>0]:(C(),ie)[n++>>>0];nn.push(a)}return(t?co[t]:so[e])(...nn)}var an=()=>{ye=0};function on(e){e>>>=0,i?postMessage({Oc:`cleanupThread`,ie:e}):Oe(De[e])}function sn(e){}var cn=e=>{try{e()}catch(e){ue(e)}};function ln(e){var t=(...t)=>{pn.push(e);try{return e(...t)}finally{x||(pn.pop(),dn&&un===1&&pn.length===0&&(un=0,ye+=1,cn(ro),typeof Fibers<`u`&&Fibers.De()))}};return gn.set(e,t),t}var un=0,dn=null,fn=0,pn=[],mn=new Map,hn=new Map,gn=new Map,_n=0,vn=null,yn=[],bn=e=>function(e){if(!x){if(un===0){var t=!1,n=!1;e((e=0)=>{if(!x&&(fn=e,t=!0,n)){un=2,cn(()=>io(dn)),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.resume(),e=!1;try{var r=function(){var e=(C(),E)[dn+8>>>2>>>0];return e=hn.get(e),e=gn.get(e),--ye,e()}()}catch(t){r=t,e=!0}var i=!1;if(!dn){var a=vn;a&&(vn=null,(e?a.reject:a.resolve)(r),i=!0)}if(e&&!i)throw r}}),n=!0,t||(un=1,dn=function(){var e=Ii(65548),t=e+12;if((C(),D)[e>>>2>>>0]=t,(C(),D)[e+4>>>2>>>0]=t+65536,t=pn[0],!mn.has(t)){var n=_n++;mn.set(t,n),hn.set(n,t)}return t=mn.get(t),(C(),E)[e+8>>>2>>>0]=t,e}(),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.pause(),cn(()=>no(dn)))}else un===2?(un=0,cn(ao),Fi(dn),dn=null,yn.forEach(Zt)):ue(`invalid state: ${un}`);return fn}}(t=>{e().then(t)});function xn(e){return e>>>=0,bn(async()=>At(await kt(e)))}var Sn=[],Cn=e=>{var t=Sn.length;return Sn.push(e),t},wn=(e,t)=>{for(var n=Array(e),r=0;r>>2>>>0],o=yt[a];if(o===void 0)throw e=`parameter ${r}`,a=ji(a),t=_t(a),Fi(a),new xt(`${e} has unknown type ${t}`);n[i]=o}return n},Tn=(e,t,n)=>{var r=[];return e=e(r,n),r.length&&((C(),D)[t>>>2>>>0]=At(r)),e},En={},Dn=e=>{var t=En[e];return t===void 0?_t(e):t};function On(e,t,n){var[r,...i]=wn(e,t>>>0);t=r.Sc.bind(r);var a=i.map(e=>e.Rc.bind(e));e--;var o={toValue:kt};switch(e=a.map((e,t)=>{var n=`argFromPtr${t}`;return o[n]=e,`${n}(args${t?`+`+8*t:``})`}),n){case 0:var s=`toValue(handle)`;break;case 2:s=`new (toValue(handle))`;break;case 3:s=``;break;case 1:o.getStringOrSymbol=Dn,s=`toValue(handle)[getStringOrSymbol(methodName)]`}return s+=`(${e})`,r.fe||(o.toReturnWire=t,o.emval_returnValue=Tn,s=`return emval_returnValue(toReturnWire, destructorsRef, ${s})`),s=`return function (handle, methodName, destructorsRef, args) { + ${s} + }`,n=Function(Object.keys(o),s)(...Object.values(o)),s=`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,Cn(Object.defineProperty(n,`name`,{value:s}))}function kn(e,t){return t>>>=0,(e=kt(e>>>0))==kt(t)}function An(e){return(e>>>=0)?(e=Dn(e),At(globalThis[e])):At(globalThis)}function jn(e){return e=Dn(e>>>0),At(t[e])}function Mn(e,t){return t>>>=0,e=kt(e>>>0),t=kt(t),At(e[t])}function Nn(e){9<(e>>>=0)&&(Dt[e+1]+=1)}function Pn(e,t,n,r,i){return Sn[e>>>0](t>>>0,n>>>0,r>>>0,i>>>0)}function Fn(e,t,n,r,i){return Pn(e>>>0,t>>>0,n>>>0,r>>>0,i>>>0)}function In(){return At([])}function Ln(e){e=kt(e>>>0);for(var t=Array(e.length),n=0;n>>0))}function zn(){return At({})}function Bn(e){for(var t=kt(e>>>=0);t.length;){var n=t.pop();t.pop()(n)}Ot(e)}function Vn(e,t,n){t>>>=0,n>>>=0,e=kt(e>>>0),t=kt(t),n=kt(n),e[t]=n}function Hn(e,t){e=Ie(e),t>>>=0,e=new Date(1e3*e),(C(),E)[t>>>2>>>0]=e.getUTCSeconds(),(C(),E)[t+4>>>2>>>0]=e.getUTCMinutes(),(C(),E)[t+8>>>2>>>0]=e.getUTCHours(),(C(),E)[t+12>>>2>>>0]=e.getUTCDate(),(C(),E)[t+16>>>2>>>0]=e.getUTCMonth(),(C(),E)[t+20>>>2>>>0]=e.getUTCFullYear()-1900,(C(),E)[t+24>>>2>>>0]=e.getUTCDay(),e=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,(C(),E)[t+28>>>2>>>0]=e}var Un=e=>e%4==0&&(e%100!=0||e%400==0),Wn=[0,31,60,91,121,152,182,213,244,274,305,335],Gn=[0,31,59,90,120,151,181,212,243,273,304,334];function Kn(e,t){e=Ie(e),t>>>=0,e=new Date(1e3*e),(C(),E)[t>>>2>>>0]=e.getSeconds(),(C(),E)[t+4>>>2>>>0]=e.getMinutes(),(C(),E)[t+8>>>2>>>0]=e.getHours(),(C(),E)[t+12>>>2>>>0]=e.getDate(),(C(),E)[t+16>>>2>>>0]=e.getMonth(),(C(),E)[t+20>>>2>>>0]=e.getFullYear()-1900,(C(),E)[t+24>>>2>>>0]=e.getDay();var n=(Un(e.getFullYear())?Wn:Gn)[e.getMonth()]+e.getDate()-1|0;(C(),E)[t+28>>>2>>>0]=n,(C(),E)[t+36>>>2>>>0]=-60*e.getTimezoneOffset(),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();e=0|(n!=r&&e.getTimezoneOffset()==Math.min(r,n)),(C(),E)[t+32>>>2>>>0]=e}function qn(e){e>>>=0;var t=new Date((C(),E)[e+20>>>2>>>0]+1900,(C(),E)[e+16>>>2>>>0],(C(),E)[e+12>>>2>>>0],(C(),E)[e+8>>>2>>>0],(C(),E)[e+4>>>2>>>0],(C(),E)[e>>>2>>>0],0),n=(C(),E)[e+32>>>2>>>0],r=t.getTimezoneOffset(),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=new Date(t.getFullYear(),0,1).getTimezoneOffset(),o=Math.min(a,i);return 0>n?(C(),E)[e+32>>>2>>>0]=+(i!=a&&o==r):0>>2>>>0]=t.getDay(),n=(Un(t.getFullYear())?Wn:Gn)[t.getMonth()]+t.getDate()-1|0,(C(),E)[e+28>>>2>>>0]=n,(C(),E)[e>>>2>>>0]=t.getSeconds(),(C(),E)[e+4>>>2>>>0]=t.getMinutes(),(C(),E)[e+8>>>2>>>0]=t.getHours(),(C(),E)[e+12>>>2>>>0]=t.getDate(),(C(),E)[e+16>>>2>>>0]=t.getMonth(),(C(),E)[e+20>>>2>>>0]=t.getYear(),e=t.getTime(),BigInt(isNaN(e)?-1:e/1e3)}function Jn(e,t,n,r,a,o,s){return i?be(16,1,e,t,n,r,a,o,s):-52}function Yn(e,t,n,r,a,o){if(i)return be(17,1,e,t,n,r,a,o)}var Xn={},Zn=()=>performance.timeOrigin+performance.now();function Qn(e,t){return i?be(18,1,e,t):(Xn[e]&&(clearTimeout(Xn[e].id),delete Xn[e]),t&&(Xn[e]={id:setTimeout(()=>{delete Xn[e],Zt(()=>oa(e,performance.timeOrigin+performance.now()))},t),Ce:t}),0)}function $n(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset();var o=Math.max(a,i);(C(),D)[e>>>2>>>0]=60*o,(C(),E)[t>>>2>>>0]=+(a!=i),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`})(a),t=t(i),iDate.now(),tr=1;function nr(e,t,n){if(n>>>=0,!(0<=e&&3>=e))return 28;if(e===0)e=Date.now();else{if(!tr)return 52;e=performance.timeOrigin+performance.now()}return e=Math.round(1e6*e),(C(),ae)[n>>>3>>>0]=BigInt(e),0}var rr=[],ir=(e,t)=>{rr.length=0;for(var n;n=(C(),ee)[e++>>>0];){var r=n!=105;t+=(r&=n!=112)&&t%8?4:0,rr.push(n==112?(C(),D)[t>>>2>>>0]:n==106?(C(),ae)[t>>>3>>>0]:n==105?(C(),E)[t>>>2>>>0]:(C(),ie)[t>>>3>>>0]),t+=r?8:4}return rr};function ar(e,t,n){return e>>>=0,t=ir(t>>>0,n>>>0),co[e](...t)}function or(e,t,n){return e>>>=0,t=ir(t>>>0,n>>>0),co[e](...t)}var sr=()=>{};function cr(e,t){return b(nt(e>>>0,t>>>0))}var lr=()=>{throw ye+=1,`unwind`};function ur(){return 4294901760}var dr=()=>1,fr=()=>navigator.hardwareConcurrency;function pr(e){e>>>=0;var t=(C(),ee).length;if(e<=t||4294901760=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);e:{r=(Math.min(4294901760,65536*Math.ceil(Math.max(e,r)/65536))-Me.buffer.byteLength+65535)/65536|0;try{Me.grow(r),ce();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1}var mr=e=>{var t=zt(e)+1,n=pa(t);return Rt(e,n,t),n},hr=(e,t)=>{(C(),D)[e>>>2>>>0]=t;var n=(C(),D)[e>>>2>>>0];(C(),D)[e+4>>>2>>>0]=(t-n)/4294967296},gr=e=>(C(),D)[e>>>2>>>0]+4294967296*(C(),E)[e+4>>>2>>>0],_r=[],vr=(e,t)=>{_r[e>>>0]=t},yr=[],br=[],xr=(e,t)=>{br[e]=new Promise(n=>t.finally(()=>n(e)))},Sr=e=>{if(e)return _r[e>>>0]},Cr=(e,t)=>{for(e=(C(),D)[e>>>2>>>0];e;e=(C(),D)[e>>>2>>>0])t[(C(),E)[e+4>>>2>>>0]](e)},wr=(e,t,n)=>{(C(),D)[e>>>2>>>0]=t,(C(),D)[e+4>>>2>>>0]=n},Tr=e=>{var t=(C(),D)[e>>>2>>>0];return e=(C(),D)[e+4>>>2>>>0],nt(t,e)},Er=e=>{var t=(C(),D)[e>>>2>>>0];return e=(C(),D)[e+4>>>2>>>0],t?nt(t,e):e===0?``:void 0},Dr=e=>{var t=Er(e+4),n=(n=(C(),D)[e+12>>>2>>>0])?Sr(n):`auto`;if(e+=16){var r=Sr((C(),D)[e+4>>>2>>>0]),i=(C(),D)[e+16>>>2>>>0],a=(C(),D)[e+20>>>2>>>0];if(i){for(var o={},s=0;s>>3>>>0]}i=o}else i=void 0;e={module:r,constants:i,entryPoint:Er(e+8)}}else e=void 0;return{label:t,layout:n,compute:e}},Or=(e,t)=>{function n(n,r){n=e[n],(C(),D)[t+r>>>2>>>0]=n}n(`maxTextureDimension1D`,4),n(`maxTextureDimension2D`,8),n(`maxTextureDimension3D`,12),n(`maxTextureArrayLayers`,16),n(`maxBindGroups`,20),n(`maxBindGroupsPlusVertexBuffers`,24),n(`maxBindingsPerBindGroup`,28),n(`maxDynamicUniformBuffersPerPipelineLayout`,32),n(`maxDynamicStorageBuffersPerPipelineLayout`,36),n(`maxSampledTexturesPerShaderStage`,40),n(`maxSamplersPerShaderStage`,44),n(`maxStorageBuffersPerShaderStage`,48),n(`maxStorageTexturesPerShaderStage`,52),n(`maxUniformBuffersPerShaderStage`,56),n(`minUniformBufferOffsetAlignment`,80),n(`minStorageBufferOffsetAlignment`,84),hr(t+64,e.maxUniformBufferBindingSize),hr(t+72,e.maxStorageBufferBindingSize),n(`maxVertexBuffers`,88),hr(t+96,e.maxBufferSize),n(`maxVertexAttributes`,104),n(`maxVertexBufferArrayStride`,108),n(`maxInterStageShaderVariables`,112),n(`maxColorAttachments`,116),n(`maxColorAttachmentBytesPerSample`,120),n(`maxComputeWorkgroupStorageSize`,124),n(`maxComputeInvocationsPerWorkgroup`,128),n(`maxComputeWorkgroupSizeX`,132),n(`maxComputeWorkgroupSizeY`,136),n(`maxComputeWorkgroupSizeZ`,140),n(`maxComputeWorkgroupsPerDimension`,144),e.Ae!==void 0&&n(`maxImmediateSize`,148)},kr=[,`validation`,`out-of-memory`,`internal`],Ar=[,`compatibility`,`core`],jr={1:`core-features-and-limits`,2:`depth-clip-control`,3:`depth32float-stencil8`,4:`texture-compression-bc`,5:`texture-compression-bc-sliced-3d`,6:`texture-compression-etc2`,7:`texture-compression-astc`,8:`texture-compression-astc-sliced-3d`,9:`timestamp-query`,10:`indirect-first-instance`,11:`shader-f16`,12:`rg11b10ufloat-renderable`,13:`bgra8unorm-storage`,14:`float32-filterable`,15:`float32-blendable`,16:`clip-distances`,17:`dual-source-blending`,18:`subgroups`,19:`texture-formats-tier1`,20:`texture-formats-tier2`,21:`primitive-index`,22:`texture-component-swizzle`,327692:`chromium-experimental-unorm16-texture-formats`,327729:`chromium-experimental-multi-draw-indirect`},Mr=[,`low-power`,`high-performance`],Nr=[,`occlusion`,`timestamp`],Pr={undefined:1,unknown:1,destroyed:2};function Fr(e,t,n,r,i,a){t=Ie(t),n=Ie(n),r>>>=0,i>>>=0,a>>>=0;var o=Sr(e>>>0);if(e={},a){var s=(C(),D)[a+12>>>2>>>0];if(s){var c=(C(),D)[a+16>>>2>>>0];e.requiredFeatures=Array.from((C(),D).subarray(c>>>2>>>0,c+4*s>>>2>>>0),e=>jr[e])}var l=(C(),D)[a+20>>>2>>>0];if(l){let t=function(e,t,n=!1){t=l+t,(t=(C(),D)[t>>>2>>>0])==4294967295||n&&t==0||(u[e]=t)},n=function(e,t){t=l+t;var n=(C(),D)[t>>>2>>>0],r=(C(),D)[t+4>>>2>>>0];n==4294967295&&r==4294967295||(u[e]=gr(t))};var u={};t(`maxTextureDimension1D`,4),t(`maxTextureDimension2D`,8),t(`maxTextureDimension3D`,12),t(`maxTextureArrayLayers`,16),t(`maxBindGroups`,20),t(`maxBindGroupsPlusVertexBuffers`,24),t(`maxDynamicUniformBuffersPerPipelineLayout`,32),t(`maxDynamicStorageBuffersPerPipelineLayout`,36),t(`maxSampledTexturesPerShaderStage`,40),t(`maxSamplersPerShaderStage`,44),t(`maxStorageBuffersPerShaderStage`,48),t(`maxStorageTexturesPerShaderStage`,52),t(`maxUniformBuffersPerShaderStage`,56),t(`minUniformBufferOffsetAlignment`,80),t(`minStorageBufferOffsetAlignment`,84),n(`maxUniformBufferBindingSize`,64),n(`maxStorageBufferBindingSize`,72),t(`maxVertexBuffers`,88),n(`maxBufferSize`,96),t(`maxVertexAttributes`,104),t(`maxVertexBufferArrayStride`,108),t(`maxInterStageShaderVariables`,112),t(`maxColorAttachments`,116),t(`maxColorAttachmentBytesPerSample`,120),t(`maxComputeWorkgroupStorageSize`,124),t(`maxComputeInvocationsPerWorkgroup`,128),t(`maxComputeWorkgroupSizeX`,132),t(`maxComputeWorkgroupSizeY`,136),t(`maxComputeWorkgroupSizeZ`,140),t(`maxComputeWorkgroupsPerDimension`,144),t(`maxImmediateSize`,148,!0),e.requiredLimits=u}(s=(C(),D)[a+24>>>2>>>0])&&(s={label:Er(s+4)},e.defaultQueue=s),e.label=Er(a+4)}ye+=1,xr(t,o.requestDevice(e).then(e=>{--ye,Zt(()=>{_r[i>>>0]=e.queue,_r[r>>>0]=e,ye+=1,xr(n,e.lost.then(t=>{Zt(()=>{e.onuncapturederror=()=>{};var r=ma(),i=mr(t.message);Yi(n,Pr[t.reason],i),fa(r)}),--ye})),e.onuncapturederror=e=>{var t=5;e.error instanceof GPUValidationError?t=2:e.error instanceof GPUOutOfMemoryError?t=3:e.error instanceof GPUInternalError&&(t=4);var n=ma();e=mr(e.error.message),ea(r,t,e),fa(n)},`adapterInfo`in e||(e.adapterInfo=o.info),$i(t,1,r,0)})},e=>{--ye,Zt(()=>{var i=ma(),a=mr(e.message);$i(t,3,r,a),n&&Yi(n,4,a),fa(i)})}))}function Ir(e){var t=Sr(e>>>=0),n=yr[e];if(n){for(var r=0;r>>=0;var r=Sr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=ca(16,i.byteLength);return(C(),ee).set(new Uint8Array(i),a>>>0),yr[e].push(()=>Fi(a)),a}function Rr(e,t,n){n>>>=0;var r=Sr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=ca(16,i.byteLength);return(C(),ee).fill(0,a,i.byteLength),yr[e].push(()=>{new Uint8Array(i).set((C(),ee).subarray(a>>>0,a+i.byteLength>>>0)),Fi(a)}),a}function zr(e,t,n,r,i){e>>>=0,t=Ie(t),n=Ie(n),i>>>=0;var a=Sr(e);yr[e]=[],i==4294967295&&(i=void 0),ye+=1,xr(t,a.mapAsync(n,r>>>0,i).then(()=>{--ye,Zt(()=>{Xi(t,1,0)})},n=>{--ye,Zt(()=>{ma();var r=mr(n.message);Xi(t,n.name===`AbortError`?4:n.name===`OperationError`?3:0,r),delete yr[e]})}))}function Br(e){var t=Sr(e>>>=0),n=yr[e];if(n){for(var r=0;r>>0]}function Hr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=!!(C(),D)[t+32>>>2>>>0];t={label:Er(t+4),usage:(C(),D)[t+16>>>2>>>0],size:gr(t+24),mappedAtCreation:r},e=Sr(e);try{var i=e.createBuffer(t)}catch{return!1}return _r[n>>>0]=i,r&&(yr[n]=[]),!0}function Ur(e,t,n,r){e>>>=0,t=Ie(t),r>>>=0,n=Dr(n>>>0),e=Sr(e),ye+=1,xr(t,e.createComputePipelineAsync(n).then(e=>{--ye,Zt(()=>{_r[r>>>0]=e,Ji(t,1,r,0)})},e=>{--ye,Zt(()=>{var n=ma(),i=mr(e.message);Ji(t,e.reason===`validation`?3:e.reason===`internal`?4:0,r,i),fa(n)})}))}function Wr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=(C(),D)[t>>>2>>>0],i=(C(),E)[r+4>>>2>>>0];t={label:Er(t+4),code:``},i===2&&(t.code=Tr(r+8)),e=Sr(e).createShaderModule(t),_r[n>>>0]=e}var Gr=e=>{(e=Sr(e)).onuncapturederror=null,e.destroy()};function Kr(e,t){t=Ie(t),e=Sr(e>>>0),ye+=1,xr(t,e.popErrorScope().then(e=>{--ye,Zt(()=>{var n=5;e?e instanceof GPUValidationError?n=2:e instanceof GPUOutOfMemoryError?n=3:e instanceof GPUInternalError&&(n=4):n=1;var r=ma(),i=e?mr(e.message):0;Zi(t,1,n,i),fa(r)})},e=>{--ye,Zt(()=>{var n=ma(),r=mr(e.message);Zi(t,1,5,r),fa(n)})}))}function qr(e,t,n,r){if(t=Ie(t),r>>>=0,n>>>=0){var i={featureLevel:Ar[(C(),E)[n+4>>>2>>>0]],powerPreference:Mr[(C(),E)[n+8>>>2>>>0]],forceFallbackAdapter:!!(C(),D)[n+12>>>2>>>0]};(e=(C(),D)[n>>>2>>>0])!==0&&(C(),i.Fe=!!(C(),D)[e+8>>>2>>>0])}`gpu`in navigator?(ye+=1,xr(t,navigator.gpu.requestAdapter(i).then(e=>{--ye,Zt(()=>{if(e)_r[r>>>0]=e,Qi(t,1,r,0);else{var n=ma(),i=mr(`WebGPU not available on this browser (requestAdapter returned null)`);Qi(t,3,r,i),fa(n)}})},e=>{--ye,Zt(()=>{var n=ma(),i=mr(e.message);Qi(t,4,r,i),fa(n)})}))):(i=ma(),e=mr(`WebGPU not available on this browser (navigator.gpu is not available)`),Qi(t,3,r,e),fa(i))}function Jr(e,t,n){return e>>>=0,t>>>=0,n>>>=0,bn(async()=>{var r=[];if(n){var i=(C(),E)[n>>>2>>>0];r.length=t+1,r[t]=new Promise(e=>setTimeout(e,i,0))}else r.length=t;for(var a=0;a{if(!Yr){var e,t={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:`./this.program`};for(e in Xr)Xr[e]===void 0?delete t[e]:t[e]=Xr[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);Yr=n}return Yr};function Qr(e,t){if(i)return be(19,1,e,t);e>>>=0,t>>>=0;var n,r=0,a=0;for(n of Zr()){var o=t+r;(C(),D)[e+a>>>2>>>0]=o,r+=Rt(n,o,1/0)+1,a+=4}return 0}function $r(e,t){if(i)return be(20,1,e,t);e>>>=0,t>>>=0;var n=Zr();for(var r of((C(),D)[e>>>2>>>0]=n.length,e=0,n))e+=zt(r)+1;return(C(),D)[t>>>2>>>0]=e,0}function ei(e){return i?be(21,1,e):52}function ti(e,t,n,r){return i?be(22,1,e,t,n,r):52}function ni(e,t,n,r){return i?be(23,1,e,t,n,r):70}var ri=[null,[],[]];function ii(e,t,n,r){if(i)return be(24,1,e,t,n,r);t>>>=0,n>>>=0,r>>>=0;for(var a=0,o=0;o>>2>>>0],c=(C(),D)[t+4>>>2>>>0];t+=8;for(var l=0;l>>0],f=ri[u];d===0||d===10?((u===1?y:b)(tt(f)),f.length=0):f.push(d)}a+=c}return(C(),D)[r>>>2>>>0]=a,0}function ai(e){return e>>>0}function oi(e,t){return Or(Sr(e>>>0).limits,t>>>0),1}function si(e,t){return Sr(e>>>0).features.has(jr[t])}function ci(e){return BigInt(Sr(e>>>0).size)}function li(e){return BigInt(Sr(e>>>0).usage)}function ui(e,t){if(e>>>=0,t>>>=0){var n=Er(t+4);n={label:n,timestampWrites:t=(t=(C(),D)[t+12>>>2>>>0])===0?void 0:{querySet:Sr((C(),D)[t+4>>>2>>>0]),beginningOfPassWriteIndex:(C(),D)[t+8>>>2>>>0],endOfPassWriteIndex:(C(),D)[t+12>>>2>>>0]}}}return t=Sr(e),e=Ui(0),n=t.beginComputePass(n),_r[e>>>0]=n,e}function di(e,t,n,r,i,a){n=Ie(n),i=Ie(i),a=Ie(a),Sr(e>>>0).copyBufferToBuffer(Sr(t>>>0),n,Sr(r>>>0),i,a)}function fi(e){var t=Sr(e>>>0);return e=Vi(0),t=t.finish(),_r[e>>>0]=t,e}function pi(e,t,n,r,i,a){a=Ie(a),Sr(e>>>0).resolveQuerySet(Sr(t>>>0),n,r,Sr(i>>>0),a)}function mi(e,t,n,r){Sr(e>>>0).dispatchWorkgroups(t,n,r)}function hi(e,t,n){n=Ie(n),Sr(e>>>0).dispatchWorkgroupsIndirect(Sr(t>>>0),n)}function gi(e){Sr(e>>>0).end()}function _i(e,t,n,r,i){r>>>=0,i>>>=0,e=Sr(e>>>0),n=Sr(n>>>0),r==0?e.setBindGroup(t,n):e.setBindGroup(t,n,(C(),D),i>>>2,r)}function vi(e,t){Sr(e>>>0).setPipeline(Sr(t>>>0))}function yi(e,t,n){Sr(e>>>0).Ee(Sr(t>>>0),n)}function bi(e,t){var n=Sr(e>>>0);return e=Bi(0),t=n.getBindGroupLayout(t),_r[e>>>0]=t,e}function xi(e,t){function n(e){var t=(C(),D)[e+8>>>2>>>0],n=(C(),D)[e+32>>>2>>>0],r=(C(),D)[e+36>>>2>>>0],i=0;return Cr(e,{327681:e=>{i=(C(),D)[e+8>>>2>>>0]}}),t?((n=gr(e+24))==-1&&(n=void 0),t={buffer:Sr(t),offset:gr(e+16),size:n}):t=Sr(n||r||i),{binding:(C(),D)[e+4>>>2>>>0],resource:t}}e>>>=0,t={label:Er(4+(t>>>=0)),layout:Sr((C(),D)[t+12>>>2>>>0]),entries:function(e,t){for(var r=[],i=0;i>>2>>>0],(C(),D)[t+20>>>2>>>0])},e=Sr(e);var r=zi(0);return vr(r,e.createBindGroup(t)),r}function Si(e,t){var n;return e>>>=0,(t>>>=0)&&(n={label:Er(t+4)}),t=Sr(e),e=Hi(0),n=t.createCommandEncoder(n),_r[e>>>0]=n,e}function Ci(e,t){e>>>=0,t>>>=0,t={type:Nr[(C(),E)[t+12>>>2>>>0]],count:(C(),D)[t+16>>>2>>>0]};var n=Sr(e);return e=Wi(0),t=n.createQuerySet(t),_r[e>>>0]=t,e}function wi(e,t){e=Sr(e>>>0).adapterInfo,t>>>=0,(C(),D)[t+52>>>2>>>0]=e.subgroupMinSize,(C(),D)[t+56>>>2>>>0]=e.subgroupMaxSize;var n=e.vendor+e.architecture+e.device+e.description,r=zt(n)+1,i=Ii(r);return i&&Rt(n,i,r),n=i,r=zt(e.vendor),wr(t+4,n,r),n+=r,r=zt(e.architecture),wr(t+12,n,r),n+=r,r=zt(e.device),wr(t+20,n,r),wr(t+28,n+r,zt(e.description)),(C(),E)[t+36>>>2>>>0]=2,e=e.isFallbackAdapter?3:4,(C(),E)[t+40>>>2>>>0]=e,(C(),D)[t+44>>>2>>>0]=0,(C(),D)[t+48>>>2>>>0]=0,1}var Ti={"core-features-and-limits":1,"depth-clip-control":2,"depth32float-stencil8":3,"texture-compression-bc":4,"texture-compression-bc-sliced-3d":5,"texture-compression-etc2":6,"texture-compression-astc":7,"texture-compression-astc-sliced-3d":8,"timestamp-query":9,"indirect-first-instance":10,"shader-f16":11,"rg11b10ufloat-renderable":12,"bgra8unorm-storage":13,"float32-filterable":14,"float32-blendable":15,"clip-distances":16,"dual-source-blending":17,subgroups:18,"texture-formats-tier1":19,"texture-formats-tier2":20,"primitive-index":21,"texture-component-swizzle":22,"chromium-experimental-unorm16-texture-formats":327692,"chromium-experimental-multi-draw-indirect":327729};function Ei(e,t){t>>>=0;var n=Sr(e>>>0);e=Ii(4*n.features.size);var r=0,i=0;for(let t of n.features)0<=(n=Ti[t])&&((C(),E)[e+r>>>2>>>0]=n,r+=4,i++);(C(),D)[t+4>>>2>>>0]=e,(C(),D)[t>>>2>>>0]=i}function Di(e,t){return Or(Sr(e>>>0).limits,t>>>0),1}function Oi(e,t){Sr(e>>>0).pushErrorScope(kr[t])}function ki(e,t,n){t>>>=0,n>>>=0,e=Sr(e>>>0),t=Array.from((C(),E).subarray(n>>>2>>>0,n+4*t>>>2>>>0),e=>Sr(e)),e.submit(t)}function Ai(e,t,n,r,i){n=Ie(n),r>>>=0,i>>>=0,e=Sr(e>>>0),t=Sr(t>>>0),r=(C(),ee).subarray(r>>>0,r+i>>>0),e.writeBuffer(t,n,r,0,i)}i||function(){for(var e=t.numThreads-1;e--;)je();he.push(async()=>{var e=async function(){if(!i)return Promise.all(we.map(Ae))}();ge++,await e,--ge==0&&_e&&(e=_e,_e=null,e())})}(),i||(Me=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),ce()),t.wasmBinary&&(d=t.wasmBinary),t.stackSave=()=>ma(),t.stackRestore=e=>fa(e),t.stackAlloc=e=>pa(e),t.setValue=function(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:case`i8`:(C(),T)[e>>>0]=t;break;case`i16`:(C(),te)[e>>>1>>>0]=t;break;case`i32`:(C(),E)[e>>>2>>>0]=t;break;case`i64`:(C(),ae)[e>>>3>>>0]=BigInt(t);break;case`float`:(C(),re)[e>>>2>>>0]=t;break;case`double`:(C(),ie)[e>>>3>>>0]=t;break;case`*`:(C(),D)[e>>>2>>>0]=t;break;default:ue(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:case`i8`:return(C(),T)[e>>>0];case`i16`:return(C(),te)[e>>>1>>>0];case`i32`:return(C(),E)[e>>>2>>>0];case`i64`:return(C(),ae)[e>>>3>>>0];case`float`:return(C(),re)[e>>>2>>>0];case`double`:return(C(),ie)[e>>>3>>>0];case`*`:return(C(),D)[e>>>2>>>0];default:ue(`invalid type for getValue: ${t}`)}},t.UTF8ToString=nt,t.stringToUTF8=Rt,t.lengthBytesUTF8=zt;var ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so=[xe,Se,Xe,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,Jn,Yn,Qn,Qr,$r,ei,ti,ni,ii],co={937076:(e,n,r,i,a)=>{if(t===void 0||!t.Uc)return 1;if((e=nt(Number(e>>>0))).startsWith(`./`)&&(e=e.substring(2)),!(e=t.Uc.get(e)))return 2;if(n=Number(n>>>0),r=Number(r>>>0),i=Number(i>>>0),n+r>e.byteLength)return 3;try{let o=e.subarray(n,n+r);switch(a){case 0:(C(),ee).set(o,i>>>0);break;case 1:t.ad?t.ad(i,o):t.oe(i,o);break;default:return 4}return 0}catch{return 4}},937900:(e,n,r)=>{t.Sd(e,(C(),ee).subarray(n>>>0,n+r>>>0))},937964:()=>t.me(),938006:e=>{t.jd(e)},938043:()=>typeof wasmOffsetConverter<`u`};function lo(e,t,n,r){var i=ma();try{return Oa(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function uo(e,t,n){var r=ma();try{return Ta(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;la(1,0)}}function fo(e){var t=ma();try{xa(e)}catch(e){if(fa(t),e!==e+0)throw e;la(1,0)}}function po(e,t){var n=ma();try{return ba(e,t)}catch(e){if(fa(n),e!==e+0)throw e;la(1,0)}}function mo(e,t,n){var r=ma();try{ya(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;la(1,0)}}function ho(e,t){var n=ma();try{ka(e,t)}catch(e){if(fa(n),e!==e+0)throw e;la(1,0)}}function go(e,t,n,r,i,a,o){var s=ma();try{return wa(e,t,n,r,i,a,o)}catch(e){if(fa(s),e!==e+0)throw e;la(1,0)}}function _o(e,t,n,r,i,a){var o=ma();try{Sa(e,t,n,r,i,a)}catch(e){if(fa(o),e!==e+0)throw e;la(1,0)}}function vo(e,t,n,r){var i=ma();try{Da(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function yo(e,t,n,r,i,a,o){var s=ma();try{ja(e,t,n,r,i,a,o)}catch(e){if(fa(s),e!==e+0)throw e;la(1,0)}}function bo(e,t,n,r,i,a,o){var s=ma();try{Ma(e,t,n,r,i,a,o)}catch(e){if(fa(s),e!==e+0)throw e;la(1,0)}}function k(e,t,n,r,i,a,o,s){var c=ma();try{Va(e,t,n,r,i,a,o,s)}catch(e){if(fa(c),e!==e+0)throw e;la(1,0)}}function xo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ma();try{Na(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(fa(f),e!==e+0)throw e;la(1,0)}}function So(e,t,n,r,i){var a=ma();try{return Aa(e,t,n,r,i)}catch(e){if(fa(a),e!==e+0)throw e;la(1,0)}}function Co(e,t,n,r,i){var a=ma();try{Ca(e,t,n,r,i)}catch(e){if(fa(a),e!==e+0)throw e;la(1,0)}}function wo(e,t,n,r,i,a,o,s){var c=ma();try{Ea(e,t,n,r,i,a,o,s)}catch(e){if(fa(c),e!==e+0)throw e;la(1,0)}}function To(e){var t=ma();try{return Ha(e)}catch(e){if(fa(t),e!==e+0)throw e;la(1,0)}}function Eo(e,t,n){var r=ma();try{return Ua(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;la(1,0)}}function Do(e,t){var n=ma();try{return to(e,t)}catch(e){if(fa(n),e!==e+0)throw e;return la(1,0),0n}}function Oo(e,t,n,r,i){var a=ma();try{Wa(e,t,n,r,i)}catch(e){if(fa(a),e!==e+0)throw e;la(1,0)}}function ko(e){var t=ma();try{return Pa(e)}catch(e){if(fa(t),e!==e+0)throw e;return la(1,0),0n}}function Ao(e,t,n,r,i,a){var o=ma();try{return za(e,t,n,r,i,a)}catch(e){if(fa(o),e!==e+0)throw e;la(1,0)}}function jo(e,t,n,r,i,a){var o=ma();try{return Ga(e,t,n,r,i,a)}catch(e){if(fa(o),e!==e+0)throw e;la(1,0)}}function Mo(e,t,n,r,i,a){var o=ma();try{return Ka(e,t,n,r,i,a)}catch(e){if(fa(o),e!==e+0)throw e;la(1,0)}}function No(e,t,n,r,i,a,o,s){var c=ma();try{return Ba(e,t,n,r,i,a,o,s)}catch(e){if(fa(c),e!==e+0)throw e;la(1,0)}}function Po(e,t,n,r,i){var a=ma();try{return qa(e,t,n,r,i)}catch(e){if(fa(a),e!==e+0)throw e;return la(1,0),0n}}function Fo(e,t,n,r){var i=ma();try{return Ja(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function Io(e,t,n,r){var i=ma();try{return Ya(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function Lo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ma();try{return Xa(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(fa(f),e!==e+0)throw e;la(1,0)}}function Ro(e,t,n,r,i,a,o,s,c,l,u){var d=ma();try{Za(e,t,n,r,i,a,o,s,c,l,u)}catch(e){if(fa(d),e!==e+0)throw e;la(1,0)}}function zo(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=ma();try{Qa(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(fa(g),e!==e+0)throw e;la(1,0)}}function Bo(e,t,n,r){var i=ma();try{return $a(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function Vo(e,t,n,r,i){var a=ma();try{return eo(e,t,n,r,i)}catch(e){if(fa(a),e!==e+0)throw e;la(1,0)}}function Ho(e,t,n){var r=ma();try{return Ia(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;return la(1,0),0n}}function Uo(e,t,n){var r=ma();try{return Fa(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;la(1,0)}}function Wo(e,t,n){var r=ma();try{return La(e,t,n)}catch(e){if(fa(r),e!==e+0)throw e;la(1,0)}}function Go(e,t,n,r){var i=ma();try{Ra(e,t,n,r)}catch(e){if(fa(i),e!==e+0)throw e;la(1,0)}}function Ko(){if(0{let n=new WeakMap,r,i,a=1;t.webgpuRegisterDevice=e=>{if(i!==void 0)throw Error(`another WebGPU EP inference session is being created.`);if(e){var t=n.get(e);if(!t){let r=((e,t=0)=>{var n=qi(t);return t=Ki(t,n),_r[n>>>0]=e.queue,_r[t>>>0]=e,t})(e,t=Ri(0));t=[a++,t,r],n.set(e,t)}return r=e,i=t[0],t}r=void 0,i=0};let o=new Map;t.webgpuOnCreateSession=t=>{if(i!==void 0){var n=i;if(i=void 0,t){let i=Ni(n);o.set(t,i),n===0&&e(r??Sr(i))}r=void 0}},t.webgpuOnReleaseSession=e=>{o.delete(e)};let s=Symbol(`gpuBufferMetadata`);t.webgpuRegisterBuffer=(e,t,n)=>{if(n)return e[s]=[n,NaN],n;if(n=e[s])return n[1]++,n[0];if((t=o.get(t))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);return t=((e,t=0)=>(e.mapState===`unmapped`||ue(),t=Gi(t),_r[t>>>0]=e,t))(e,t),e[s]=[t,1],t},t.webgpuUnregisterBuffer=e=>{let t=e[s];if(!t)throw Error(`Buffer is not registered`);t[1]--,t[1]===0&&(Li(t[0]),delete e[s])},t.webgpuGetBuffer=e=>Sr(e),t.webgpuCreateDownloader=(e,t,n)=>{if((n=o.get(n))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);let r=Sr(n),i=16*Math.ceil(Number(t)/16);return async()=>{let n=r.createBuffer({size:i,usage:9});try{let a=r.createCommandEncoder();return a.copyBufferToBuffer(e,0,n,0,i),r.queue.submit([a.finish()]),await n.mapAsync(GPUMapMode.READ),n.getMappedRange().slice(0,t)}finally{n.destroy()}}},t.ad=(e,t)=>{var n=t.buffer;let a=t.byteOffset,o=t.byteLength;if(t=16*Math.ceil(Number(o)/16),e=Sr(e),!r){var s=Ni(i);r=Sr(s)}let c=(s=r.createBuffer({mappedAtCreation:!0,size:t,usage:6})).getMappedRange();new Uint8Array(c).set(new Uint8Array(n,a,o)),s.unmap(),(n=r.createCommandEncoder()).copyBufferToBuffer(s,0,e,0,t),r.queue.submit([n.finish()]),s.destroy()}},t.webnnInit=e=>{let n=e[0];[t.me,t.jd,t.webnnEnsureTensor,t.Sd,t.webnnDownloadTensor,t.le,t.webnnEnableTraceEvent]=e.slice(1),t.webnnReleaseTensorId=t.jd,t.webnnUploadTensor=t.Sd,t.webnnRegisterMLContext=t.le,t.webnnOnRunStart=e=>n.onRunStart(e),t.webnnOnRunEnd=n.onRunEnd.bind(n),t.webnnOnReleaseSession=e=>{n.onReleaseSession(e)},t.webnnCreateMLTensorDownloader=(e,t)=>n.createMLTensorDownloader(e,t),t.webnnRegisterMLTensor=(e,t,r,i)=>n.registerMLTensor(e,t,r,i),t.webnnCreateMLContext=e=>n.createMLContext(e),t.webnnRegisterMLConstant=(e,r,i,a,o,s)=>n.registerMLConstant(e,r,i,a,o,t.Uc,s),t.webnnRegisterGraphInput=n.registerGraphInput.bind(n),t.webnnIsGraphInput=n.isGraphInput.bind(n),t.webnnRegisterGraphOutput=n.registerGraphOutput.bind(n),t.webnnIsGraphOutput=n.isGraphOutput.bind(n),t.webnnCreateTemporaryTensor=n.createTemporaryTensor.bind(n),t.webnnIsGraphInputOutputTypeSupported=n.isGraphInputOutputTypeSupported.bind(n)},O?t:new Promise((e,t)=>{m=e,h=t})}var pt,mt,ht=re(()=>{pt=ft,mt=globalThis.self?.name?.startsWith(`em-pthread`),mt&&ft()}),gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At=re(()=>{at(),gt=typeof location>`u`?void 0:location.origin,_t=import.meta.url>`file:`&&import.meta.url<`file;`,vt=()=>_t?new URL(new URL(`ort.webgpu.bundle.min.mjs`,import.meta.url).href,gt).href:import.meta.url,yt=vt(),bt=()=>{if(yt&&!yt.startsWith(`blob:`))return yt.substring(0,yt.lastIndexOf(`/`)+1)},xt=(e,t)=>{try{let n=t??yt;return(n?new URL(e,n):new URL(e)).origin===gt}catch{return!1}},St=(e,t)=>{let n=t??yt;try{return(n?new URL(e,n):new URL(e)).href}catch{return}},Ct=(e,t)=>`${t??`./`}${e}`,wt=async e=>{let t=await(await fetch(e,{credentials:`same-origin`})).blob();return URL.createObjectURL(t)},Tt=async e=>(await w(async()=>{let{default:t}=await import(e);return{default:t}},[])).default,Et=(ut(),oe(ot)).default,Dt=async()=>{if(!yt)throw Error(`Failed to load proxy worker: cannot determine the script source URL.`);if(xt(yt))return[void 0,Et()];let e=await wt(yt);return[e,Et(e)]},Ot=(ht(),oe(dt)).default,kt=async(e,t,n,r)=>{let i=Ot&&!(e||t);if(i)if(yt)i=xt(yt)||r&&!n;else if(r&&!n)i=!0;else throw Error(`cannot determine the script source URL.`);if(i)return[void 0,Ot];{let r=`ort-wasm-simd-threaded.asyncify.mjs`,i=e??St(r,t),a=n&&i&&!xt(i,t),o=a?await wt(i):i??Ct(r,t);return[a?o:void 0,await Tt(o)]}}}),jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt=re(()=>{At(),Mt=!1,Nt=!1,Pt=!1,Ft=()=>{if(typeof SharedArrayBuffer>`u`)return!1;try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},It=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},Lt=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},Rt=async e=>{if(Mt)return Promise.resolve();if(Nt)throw Error(`multiple calls to 'initializeWebAssembly()' detected.`);if(Pt)throw Error(`previous call to 'initializeWebAssembly()' failed.`);Nt=!0;let t=e.initTimeout,n=e.numThreads;if(e.simd!==!1){if(e.simd===`relaxed`){if(!Lt())throw Error(`Relaxed WebAssembly SIMD is not supported in the current environment.`)}else if(!It())throw Error(`WebAssembly SIMD is not supported in the current environment.`)}let r=Ft();n>1&&!r&&(typeof self<`u`&&!self.crossOriginIsolated&&console.warn(`env.wasm.numThreads is set to `+n+`, but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info.`),console.warn(`WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading.`),e.numThreads=n=1);let i=e.wasmPaths,a=typeof i==`string`?i:void 0,o=i?.mjs,s=o?.href??o,c=i?.wasm,l=c?.href??c,u=e.wasmBinary,[d,f]=await kt(s,a,n>1,!!u||!!l),p=!1,m=[];if(t>0&&m.push(new Promise(e=>{setTimeout(()=>{p=!0,e()},t)})),m.push(new Promise((e,t)=>{let r={numThreads:n};if(u)r.wasmBinary=u,r.locateFile=e=>e;else if(l||a)r.locateFile=e=>l??a+e;else if(s&&s.indexOf(`blob:`)!==0)r.locateFile=e=>new URL(e,s).href;else if(d){let e=bt();e&&(r.locateFile=t=>e+t)}f(r).then(t=>{Nt=!1,Mt=!0,jt=t,e(),d&&URL.revokeObjectURL(d)},e=>{Nt=!1,Pt=!0,t(e)})})),await Promise.race(m),p)throw Error(`WebAssembly backend initializing failed due to timeout: ${t}ms`)},zt=()=>{if(Mt&&jt)return jt;throw Error(`WebAssembly is not initialized yet.`)}}),Vt,Ht,Ut,Wt=re(()=>{Bt(),Vt=(e,t)=>{let n=zt(),r=n.lengthBytesUTF8(e)+1,i=n._malloc(r);return n.stringToUTF8(e,i,r),t.push(i),i},Ht=(e,t,n,r)=>{if(typeof e==`object`&&e){if(n.has(e))throw Error(`Circular reference in options`);n.add(e)}Object.entries(e).forEach(([e,i])=>{let a=t?t+e:e;if(typeof i==`object`)Ht(i,a+`.`,n,r);else if(typeof i==`string`||typeof i==`number`)r(a,i.toString());else if(typeof i==`boolean`)r(a,i?`1`:`0`);else throw Error(`Can't handle extra config type: ${typeof i}`)})},Ut=e=>{let t=zt(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetLastError(r,r+n);let i=Number(t.getValue(r,n===4?`i32`:`i64`)),a=t.getValue(r+n,`*`),o=a?t.UTF8ToString(a):``;throw Error(`${e} ERROR_CODE: ${i}, ERROR_MESSAGE: ${o}`)}finally{t.stackRestore(n)}}}),Gt,Kt=re(()=>{Bt(),Wt(),Gt=e=>{let t=zt(),n=0,r=[],i=e||{};try{if(e?.logSeverityLevel===void 0)i.logSeverityLevel=2;else if(typeof e.logSeverityLevel!=`number`||!Number.isInteger(e.logSeverityLevel)||e.logSeverityLevel<0||e.logSeverityLevel>4)throw Error(`log severity level is not valid: ${e.logSeverityLevel}`);if(e?.logVerbosityLevel===void 0)i.logVerbosityLevel=0;else if(typeof e.logVerbosityLevel!=`number`||!Number.isInteger(e.logVerbosityLevel))throw Error(`log verbosity level is not valid: ${e.logVerbosityLevel}`);e?.terminate===void 0&&(i.terminate=!1);let a=0;return e?.tag!==void 0&&(a=Vt(e.tag,r)),n=t._OrtCreateRunOptions(i.logSeverityLevel,i.logVerbosityLevel,!!i.terminate,a),n===0&&Ut(`Can't create run options.`),e?.extra!==void 0&&Ht(e.extra,``,new WeakSet,(e,i)=>{let a=Vt(e,r),o=Vt(i,r);t._OrtAddRunConfigEntry(n,a,o)!==0&&Ut(`Can't set a run config entry: ${e} - ${i}.`)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseRunOptions(n),r.forEach(e=>t._free(e)),e}}}),qt,Jt,Yt,Xt,Zt,Qt,$t,en=re(()=>{Bt(),Wt(),qt=e=>{switch(e){case`disabled`:return 0;case`basic`:return 1;case`extended`:return 2;case`layout`:return 3;case`all`:return 99;default:throw Error(`unsupported graph optimization level: ${e}`)}},Jt=e=>{switch(e){case`sequential`:return 0;case`parallel`:return 1;default:throw Error(`unsupported execution mode: ${e}`)}},Yt=e=>{e.extra||={},e.extra.session||(e.extra.session={});let t=e.extra.session;t.use_ort_model_bytes_directly||=`1`,e.executionProviders&&e.executionProviders.some(e=>(typeof e==`string`?e:e.name)===`webgpu`)&&(e.enableMemPattern=!1)},Xt=(e,t,n,r)=>{let i=Vt(t,r),a=Vt(n,r);zt()._OrtAddSessionConfigEntry(e,i,a)!==0&&Ut(`Can't set a session config entry: ${t} - ${n}.`)},Zt=(e,t,n,r)=>{let i=Vt(t,r),a=Vt(n,r);e.push([i,a])},Qt=async(e,t,n)=>{let r=t.executionProviders;for(let i of r){let r=typeof i==`string`?i:i.name,a=[];switch(r){case`webnn`:if(r=`WEBNN`,typeof i!=`string`){let t=i?.deviceType;t&&Xt(e,`deviceType`,t,n)}break;case`webgpu`:{r=`WebGPU`;let e;if(typeof i!=`string`){let r=i;if(r.device)if(typeof GPUDevice<`u`&&r.device instanceof GPUDevice)e=r.device;else throw Error(`Invalid GPU device set in WebGPU EP options.`);let{enableGraphCapture:o}=t;if(typeof o==`boolean`&&o&&Zt(a,`enableGraphCapture`,`1`,n),typeof r.preferredLayout==`string`&&Zt(a,`preferredLayout`,r.preferredLayout,n),r.forceCpuNodeNames){let e=Array.isArray(r.forceCpuNodeNames)?r.forceCpuNodeNames:[r.forceCpuNodeNames];Zt(a,`forceCpuNodeNames`,e.join(` +`),n)}r.validationMode&&Zt(a,`validationMode`,r.validationMode,n)}let o=zt().webgpuRegisterDevice(e);if(o){let[e,t,r]=o;Zt(a,`deviceId`,e.toString(),n),Zt(a,`webgpuInstance`,t.toString(),n),Zt(a,`webgpuDevice`,r.toString(),n)}}break;case`wasm`:case`cpu`:continue;default:throw Error(`not supported execution provider: ${r}`)}let o=Vt(r,n),s=a.length,c=0,l=0;if(s>0){c=zt()._malloc(s*zt().PTR_SIZE),n.push(c),l=zt()._malloc(s*zt().PTR_SIZE),n.push(l);for(let e=0;e{let t=zt(),n=0,r=[],i=e||{};Yt(i);try{let e=qt(i.graphOptimizationLevel??`all`),a=Jt(i.executionMode??`sequential`),o=typeof i.logId==`string`?Vt(i.logId,r):0,s=i.logSeverityLevel??2;if(!Number.isInteger(s)||s<0||s>4)throw Error(`log severity level is not valid: ${s}`);let c=i.logVerbosityLevel??0;if(!Number.isInteger(c)||c<0||c>4)throw Error(`log verbosity level is not valid: ${c}`);let l=typeof i.optimizedModelFilePath==`string`?Vt(i.optimizedModelFilePath,r):0;if(n=t._OrtCreateSessionOptions(e,!!i.enableCpuMemArena,!!i.enableMemPattern,a,!!i.enableProfiling,0,o,s,c,l),n===0&&Ut(`Can't create session options.`),i.executionProviders&&await Qt(n,i,r),i.enableGraphCapture!==void 0){if(typeof i.enableGraphCapture!=`boolean`)throw Error(`enableGraphCapture must be a boolean value: ${i.enableGraphCapture}`);Xt(n,`enableGraphCapture`,i.enableGraphCapture.toString(),r)}if(i.freeDimensionOverrides)for(let[e,a]of Object.entries(i.freeDimensionOverrides)){if(typeof e!=`string`)throw Error(`free dimension override name must be a string: ${e}`);if(typeof a!=`number`||!Number.isInteger(a)||a<0)throw Error(`free dimension override value must be a non-negative integer: ${a}`);let i=Vt(e,r);t._OrtAddFreeDimensionOverride(n,i,a)!==0&&Ut(`Can't set a free dimension override: ${e} - ${a}.`)}return i.extra!==void 0&&Ht(i.extra,``,new WeakSet,(e,t)=>{Xt(n,e,t,r)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseSessionOptions(n)!==0&&Ut(`Can't release session options.`),r.forEach(e=>t._free(e)),e}}}),tn,nn,rn,an,on,sn,cn,ln,un=re(()=>{tn=e=>{switch(e){case`int8`:return 3;case`uint8`:return 2;case`bool`:return 9;case`int16`:return 5;case`uint16`:return 4;case`int32`:return 6;case`uint32`:return 12;case`float16`:return 10;case`float32`:return 1;case`float64`:return 11;case`string`:return 8;case`int64`:return 7;case`uint64`:return 13;case`int4`:return 22;case`uint4`:return 21;default:throw Error(`unsupported data type: ${e}`)}},nn=e=>{switch(e){case 3:return`int8`;case 2:return`uint8`;case 9:return`bool`;case 5:return`int16`;case 4:return`uint16`;case 6:return`int32`;case 12:return`uint32`;case 10:return`float16`;case 1:return`float32`;case 11:return`float64`;case 8:return`string`;case 7:return`int64`;case 13:return`uint64`;case 22:return`int4`;case 21:return`uint4`;default:throw Error(`unsupported data type: ${e}`)}},rn=(e,t)=>{let n=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][e],r=typeof t==`number`?t:t.reduce((e,t)=>e*t,1);return n>0?Math.ceil(r*n):void 0},an=e=>{switch(e){case`float16`:return typeof Float16Array<`u`&&Float16Array.from?Float16Array:Uint16Array;case`float32`:return Float32Array;case`uint8`:return Uint8Array;case`int8`:return Int8Array;case`uint16`:return Uint16Array;case`int16`:return Int16Array;case`int32`:return Int32Array;case`bool`:return Uint8Array;case`float64`:return Float64Array;case`uint32`:return Uint32Array;case`int64`:return BigInt64Array;case`uint64`:return BigUint64Array;default:throw Error(`unsupported type: ${e}`)}},on=e=>{switch(e){case`verbose`:return 0;case`info`:return 1;case`warning`:return 2;case`error`:return 3;case`fatal`:return 4;default:throw Error(`unsupported logging level: ${e}`)}},sn=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,cn=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint64`||e===`int8`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,ln=e=>{switch(e){case`none`:return 0;case`cpu`:return 1;case`cpu-pinned`:return 2;case`texture`:return 3;case`gpu-buffer`:return 4;case`ml-tensor`:return 5;default:throw Error(`unsupported data location: ${e}`)}}}),dn,fn=re(()=>{at(),dn=async e=>{if(typeof e==`string`){let t=await fetch(e);if(!t.ok)throw Error(`failed to load external data file: ${e}`);let n=t.headers.get(`Content-Length`),r=n?parseInt(n,10):0;if(r<1073741824)return new Uint8Array(await t.arrayBuffer());{if(!t.body)throw Error(`failed to load external data file: ${e}, no response body.`);let n=t.body.getReader(),i;try{i=new ArrayBuffer(r)}catch(e){if(e instanceof RangeError){let e=Math.ceil(r/65536);i=new WebAssembly.Memory({initial:e,maximum:e}).buffer}else throw e}let a=0;for(;;){let{done:e,value:t}=await n.read();if(e)break;let r=t.byteLength;new Uint8Array(i,a,r).set(t),a+=r}return new Uint8Array(i,0,r)}}else return e instanceof Blob?new Uint8Array(await e.arrayBuffer()):e instanceof Uint8Array?e:new Uint8Array(e)}}),pn,mn=re(()=>{un(),pn=(e,t)=>new(an(t))(e)}),hn,gn,_n,vn,yn,bn,xn,Sn=re(()=>{un(),hn=[`V`,`I`,`W`,`E`,`F`],gn=(e,t)=>{console.log(`[${hn[e]},${new Date().toISOString()}]${t}`)},yn=(e,t)=>{_n=e,vn=t},bn=(e,t)=>{let n=on(e);n>=on(_n)&&gn(n,typeof t==`function`?t():t)},xn=(...e)=>{vn&&bn(...e)}}),Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn=re(()=>{un(),Sn(),Cn=new Map([[`float32`,32],[`float16`,16],[`int32`,32],[`uint32`,32],[`int64`,64],[`uint64`,64],[`int8`,8],[`uint8`,8],[`int4`,4],[`uint4`,4]]),wn=(e,t)=>{if(t===`int32`)return e;let n=Cn.get(t);if(!n)throw Error(`WebNN backend does not support data type: ${t}`);let r=n/8;if(e.byteLength%r!==0)throw Error(`Invalid Uint8Array length - must be a multiple of ${r}.`);let i=e.byteLength/r,a=new(an(t))(e.buffer,e.byteOffset,i);switch(t){case`int64`:case`uint64`:{let e=new Int32Array(i);for(let t=0;t2147483647n||n<-2147483648n)throw Error(`Can not convert int64 data to int32 - value out of range.`);e[t]=Number(n)}return new Uint8Array(e.buffer)}case`int8`:case`uint8`:case`uint32`:{if(t===`uint32`&&a.some(e=>e>2147483647))throw Error(`Can not convert uint32 data to int32 - value out of range.`);let e=Int32Array.from(a,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from ${t} to 'int32'`)}},Tn=(e,t)=>{if(t===`int32`)return e;if(e.byteLength%4!=0)throw Error(`Invalid Uint8Array length - must be a multiple of 4 (int32).`);let n=e.byteLength/4,r=new Int32Array(e.buffer,e.byteOffset,n);switch(t){case`int64`:{let e=BigInt64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`uint64`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uin64 - negative value found.`);let e=BigUint64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`int8`:{if(r.some(e=>e<-128||e>127))throw Error(`Can not convert int32 data to int8 - value out of range.`);let e=Int8Array.from(r,Number);return new Uint8Array(e.buffer)}case`uint8`:if(r.some(e=>e<0||e>255))throw Error(`Can not convert int32 data to uint8 - value out of range.`);return Uint8Array.from(r,Number);case`uint32`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uint32 - negative value found.`);let e=Uint32Array.from(r,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from 'int32' to ${t}`)}},En=1,Dn=()=>En++,On=new Map([[`int8`,`int32`],[`uint8`,`int32`],[`uint32`,`int32`],[`int64`,`int32`]]),kn=(e,t)=>{let n=Cn.get(e);if(!n)throw Error(`WebNN backend does not support data type: ${e}`);return t.length>0?Math.ceil(t.reduce((e,t)=>e*t)*n/8):0},An=class{constructor(e){this.isDataConverted=!1;let{sessionId:t,context:n,tensor:r,dataType:i,shape:a,fallbackDataType:o}=e;this.sessionId=t,this.mlContext=n,this.mlTensor=r,this.dataType=i,this.tensorShape=a,this.fallbackDataType=o}get tensor(){return this.mlTensor}get type(){return this.dataType}get fallbackType(){return this.fallbackDataType}get shape(){return this.tensorShape}get byteLength(){return kn(this.dataType,this.tensorShape)}destroy(){xn(`verbose`,()=>`[WebNN] TensorWrapper.destroy`),this.mlTensor.destroy()}write(e){this.mlContext.writeTensor(this.mlTensor,e)}async read(e){if(this.fallbackDataType){let t=await this.mlContext.readTensor(this.mlTensor),n=Tn(new Uint8Array(t),this.dataType);if(e){(e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).set(n);return}else return n.buffer}else return e?this.mlContext.readTensor(this.mlTensor,e):this.mlContext.readTensor(this.mlTensor)}canReuseTensor(e,t,n){return this.mlContext===e&&this.dataType===t&&this.tensorShape.length===n.length&&this.tensorShape.every((e,t)=>e===n[t])}setIsDataConverted(e){this.isDataConverted=e}},jn=class{constructor(e,t){this.tensorManager=e,this.wrapper=t}get tensorWrapper(){return this.wrapper}releaseTensor(){this.tensorWrapper&&(this.tensorManager.releaseTensor(this.tensorWrapper),this.wrapper=void 0)}async ensureTensor(e,t,n,r){let i=this.tensorManager.getMLContext(e),a=this.tensorManager.getMLOpSupportLimits(e),o;if(!a?.input.dataTypes.includes(t)){if(o=On.get(t),!o||a?.input.dataTypes.includes(o))throw Error(`WebNN backend does not support data type: ${t}`);xn(`verbose`,()=>`[WebNN] TensorIdTracker.ensureTensor: fallback dataType from ${t} to ${o}`)}if(this.wrapper){if(this.wrapper.canReuseTensor(i,t,n))return this.wrapper.tensor;if(r){if(this.wrapper.byteLength!==kn(t,n))throw Error(`Unable to copy data to tensor with different size.`);this.activeUpload=new Uint8Array(await this.wrapper.read())}this.tensorManager.releaseTensor(this.wrapper)}let s=typeof MLTensorUsage>`u`?void 0:MLTensorUsage.READ|MLTensorUsage.WRITE;return this.wrapper=await this.tensorManager.getCachedTensor(e,t,n,s,!0,!0,o),r&&this.activeUpload&&(this.wrapper.write(this.activeUpload),this.activeUpload=void 0),this.wrapper.tensor}upload(e){let t=e;if(this.wrapper){if(this.wrapper.fallbackType)if(this.wrapper.fallbackType===`int32`)t=wn(e,this.wrapper.type),this.wrapper.setIsDataConverted(!0);else throw Error(`Unsupported fallback data type: ${this.wrapper.fallbackType}`);if(e.byteLength===this.wrapper.byteLength){this.wrapper.write(t);return}else xn(`verbose`,()=>`Data size does not match tensor size. Releasing tensor.`),this.releaseTensor()}this.activeUpload?this.activeUpload.set(t):this.activeUpload=new Uint8Array(t)}async download(e){if(this.activeUpload){let t=this.wrapper?.isDataConverted?Tn(this.activeUpload,this.wrapper?.type):this.activeUpload;if(e){e instanceof ArrayBuffer?new Uint8Array(e).set(t):new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(t);return}else return t.buffer}if(!this.wrapper)throw Error(`Tensor has not been created.`);return e?this.wrapper.read(e):this.wrapper.read()}},Mn=class{constructor(e){this.backend=e,this.tensorTrackersById=new Map,this.freeTensors=[],this.externalTensors=new Set}getMLContext(e){let t=this.backend.getMLContext(e);if(!t)throw Error(`MLContext not found for session.`);return t}getMLOpSupportLimits(e){return this.backend.getMLOpSupportLimits(e)}reserveTensorId(){let e=Dn();return this.tensorTrackersById.set(e,new jn(this)),e}releaseTensorId(e){let t=this.tensorTrackersById.get(e);t&&(this.tensorTrackersById.delete(e),t.tensorWrapper&&this.releaseTensor(t.tensorWrapper))}async ensureTensor(e,t,n,r,i){xn(`verbose`,()=>`[WebNN] TensorManager.ensureTensor {tensorId: ${t}, dataType: ${n}, shape: ${r}, copyOld: ${i}}`);let a=this.tensorTrackersById.get(t);if(!a)throw Error(`Tensor not found.`);return a.ensureTensor(e,n,r,i)}upload(e,t){let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);n.upload(t)}async download(e,t){xn(`verbose`,()=>`[WebNN] TensorManager.download {tensorId: ${e}, dstBuffer: ${t?.byteLength}}`);let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);return n.download(t)}releaseTensorsForSession(e){for(let t of this.freeTensors)t.sessionId===e&&t.destroy();this.freeTensors=this.freeTensors.filter(t=>t.sessionId!==e)}registerTensor(e,t,n,r){let i=this.getMLContext(e),a=Dn(),o=new An({sessionId:e,context:i,tensor:t,dataType:n,shape:r});return this.tensorTrackersById.set(a,new jn(this,o)),this.externalTensors.add(o),a}async getCachedTensor(e,t,n,r,i,a,o){let s=this.getMLContext(e);for(let[r,i]of this.freeTensors.entries())if(i.canReuseTensor(s,t,n)){xn(`verbose`,()=>`[WebNN] Reusing tensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}`);let i=this.freeTensors.splice(r,1)[0];return i.sessionId=e,i}xn(`verbose`,()=>`[WebNN] MLContext.createTensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}}`);let c=await s.createTensor({dataType:o??t,shape:n,dimensions:n,usage:r,writable:i,readable:a});return new An({sessionId:e,context:s,tensor:c,dataType:t,shape:n,fallbackDataType:o})}releaseTensor(e){this.externalTensors.has(e)&&this.externalTensors.delete(e),this.freeTensors.push(e)}},Nn=(...e)=>new Mn(...e)}),Fn={};ie(Fn,{WebNNBackend:()=>Rn});var In,Ln,Rn,zn=re(()=>{un(),Bt(),mn(),Pn(),Sn(),In=new Map([[1,`float32`],[10,`float16`],[6,`int32`],[12,`uint32`],[7,`int64`],[13,`uint64`],[22,`int4`],[21,`uint4`],[3,`int8`],[2,`uint8`],[9,`uint8`]]),Ln=(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((n,i)=>n===r[i]&&e[n]===t[n])},Rn=class{constructor(e){this.tensorManager=Nn(this),this.mlContextBySessionId=new Map,this.sessionIdsByMLContext=new Map,this.mlContextCache=[],this.sessionGraphInputs=new Map,this.sessionGraphOutputs=new Map,this.temporaryGraphInputs=[],this.temporaryGraphOutputs=[],this.temporarySessionTensorIds=new Map,this.mlOpSupportLimitsBySessionId=new Map,yn(e.logLevel,!!e.debug)}get currentSessionId(){if(this.activeSessionId===void 0)throw Error(`No active session`);return this.activeSessionId}onRunStart(e){xn(`verbose`,()=>`[WebNN] onRunStart {sessionId: ${e}}`),this.activeSessionId=e}onRunEnd(e){xn(`verbose`,()=>`[WebNN] onRunEnd {sessionId: ${e}}`);let t=this.temporarySessionTensorIds.get(e);if(t){for(let e of t)xn(`verbose`,()=>`[WebNN] releasing temporary tensor {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e);this.temporarySessionTensorIds.delete(e),this.activeSessionId=void 0}}async createMLContext(e){if(e instanceof GPUDevice){let t=this.mlContextCache.findIndex(t=>t.gpuDevice===e);if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({gpuDevice:e,mlContext:t}),t}}else if(e===void 0){let e=this.mlContextCache.findIndex(e=>e.options===void 0&&e.gpuDevice===void 0);if(e!==-1)return this.mlContextCache[e].mlContext;{let e=await navigator.ml.createContext();return this.mlContextCache.push({mlContext:e}),e}}let t=this.mlContextCache.findIndex(t=>Ln(t.options,e));if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({options:e,mlContext:t}),t}}registerMLContext(e,t){this.mlContextBySessionId.set(e,t);let n=this.sessionIdsByMLContext.get(t);n||(n=new Set,this.sessionIdsByMLContext.set(t,n)),n.add(e),this.mlOpSupportLimitsBySessionId.has(e)||this.mlOpSupportLimitsBySessionId.set(e,t.opSupportLimits()),this.temporaryGraphInputs.length>0&&(this.sessionGraphInputs.set(e,this.temporaryGraphInputs),this.temporaryGraphInputs=[]),this.temporaryGraphOutputs.length>0&&(this.sessionGraphOutputs.set(e,this.temporaryGraphOutputs),this.temporaryGraphOutputs=[])}onReleaseSession(e){this.sessionGraphInputs.delete(e),this.sessionGraphOutputs.delete(e);let t=this.mlContextBySessionId.get(e);if(!t)return;this.tensorManager.releaseTensorsForSession(e),this.mlContextBySessionId.delete(e),this.mlOpSupportLimitsBySessionId.delete(e);let n=this.sessionIdsByMLContext.get(t);if(n.delete(e),n.size===0){this.sessionIdsByMLContext.delete(t);let e=this.mlContextCache.findIndex(e=>e.mlContext===t);e!==-1&&this.mlContextCache.splice(e,1)}}getMLContext(e){return this.mlContextBySessionId.get(e)}getMLOpSupportLimits(e){return this.mlOpSupportLimitsBySessionId.get(e)}reserveTensorId(){return this.tensorManager.reserveTensorId()}releaseTensorId(e){xn(`verbose`,()=>`[WebNN] releaseTensorId {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e)}async ensureTensor(e,t,n,r,i){let a=In.get(n);if(!a)throw Error(`Unsupported ONNX data type: ${n}`);return this.tensorManager.ensureTensor(e??this.currentSessionId,t,a,r,i)}async createTemporaryTensor(e,t,n){xn(`verbose`,()=>`[WebNN] createTemporaryTensor {onnxDataType: ${t}, shape: ${n}}`);let r=In.get(t);if(!r)throw Error(`Unsupported ONNX data type: ${t}`);let i=this.tensorManager.reserveTensorId();await this.tensorManager.ensureTensor(e,i,r,n,!1);let a=this.temporarySessionTensorIds.get(e);return a?a.push(i):this.temporarySessionTensorIds.set(e,[i]),i}uploadTensor(e,t){if(!zt().shouldTransferToMLTensor)throw Error(`Trying to upload to a MLTensor while shouldTransferToMLTensor is false`);xn(`verbose`,()=>`[WebNN] uploadTensor {tensorId: ${e}, data: ${t.byteLength}}`),this.tensorManager.upload(e,t)}async downloadTensor(e,t){return this.tensorManager.download(e,t)}createMLTensorDownloader(e,t){return async()=>{let n=await this.tensorManager.download(e);return pn(n,t)}}registerMLTensor(e,t,n,r){let i=In.get(n);if(!i)throw Error(`Unsupported ONNX data type: ${n}`);let a=this.tensorManager.registerTensor(e,t,i,r);return xn(`verbose`,()=>`[WebNN] registerMLTensor {tensor: ${t}, dataType: ${i}, dimensions: ${r}} -> {tensorId: ${a}}`),a}registerMLConstant(e,t,n,r,i,a,o=!1){if(!a)throw Error(`External mounted files are not available.`);let s=e;e.startsWith(`./`)&&(s=e.substring(2));let c=a.get(s);if(!c)throw Error(`File with name ${s} not found in preloaded files.`);if(t+n>c.byteLength)throw Error(`Out of bounds: data offset and length exceed the external file data size.`);let l=c.slice(t,t+n).buffer,u;switch(i.dataType){case`float32`:u=new Float32Array(l);break;case`float16`:u=typeof Float16Array<`u`&&Float16Array.from?new Float16Array(l):new Uint16Array(l);break;case`int32`:u=new Int32Array(l);break;case`uint32`:u=new Uint32Array(l);break;case`int64`:if(o){let e=wn(new Uint8Array(l),`int64`);u=new Int32Array(e.buffer),i.dataType=`int32`}else u=new BigInt64Array(l);break;case`uint64`:u=new BigUint64Array(l);break;case`int8`:u=new Int8Array(l);break;case`int4`:case`uint4`:case`uint8`:u=new Uint8Array(l);break;default:throw Error(`Unsupported data type: ${i.dataType} in creating WebNN Constant from external data.`)}return xn(`verbose`,()=>`[WebNN] registerMLConstant {dataType: ${i.dataType}, shape: ${i.shape}}} ${o?`(Note: it was int64 data type and registered to int32 as workaround)`:``}`),r.constant(i,u)}registerGraphInput(e){this.temporaryGraphInputs.push(e)}registerGraphOutput(e){this.temporaryGraphOutputs.push(e)}isGraphInput(e,t){let n=this.sessionGraphInputs.get(e);return n?n.includes(t):!1}isGraphOutput(e,t){let n=this.sessionGraphOutputs.get(e);return n?n.includes(t):!1}isGraphInputOutputTypeSupported(e,t,n=!0){let r=In.get(tn(t)),i=this.mlOpSupportLimitsBySessionId.get(e);return typeof r>`u`?!1:n?!!i?.input.dataTypes.includes(r):!!i?.output.dataTypes.includes(r)}flush(){}}}),Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n=re(()=>{it(),Kt(),en(),un(),Bt(),Wt(),fn(),Bn=(e,t)=>{zt()._OrtInit(e,t)!==0&&Ut(`Can't initialize onnxruntime.`)},Vn=async e=>{Bn(e.wasm.numThreads,on(e.logLevel))},Hn=async(e,t)=>{zt().asyncInit?.();let n=e.webgpu.adapter;if(t===`webgpu`){if(typeof navigator>`u`||!navigator.gpu)throw Error(`WebGPU is not supported in current environment`);if(n){if(typeof n.limits!=`object`||typeof n.features!=`object`||typeof n.requestDevice!=`function`)throw Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let t=e.webgpu.powerPreference;if(t!==void 0&&t!==`low-power`&&t!==`high-performance`)throw Error(`Invalid powerPreference setting: "${t}"`);let r=e.webgpu.forceFallbackAdapter;if(r!==void 0&&typeof r!=`boolean`)throw Error(`Invalid forceFallbackAdapter setting: "${r}"`);if(n=await navigator.gpu.requestAdapter({powerPreference:t,forceFallbackAdapter:r}),!n)throw Error(`Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.`)}}if(t===`webnn`&&(typeof navigator>`u`||!navigator.ml))throw Error(`WebNN is not supported in current environment`);if(t===`webgpu`&&zt().webgpuInit(t=>{e.webgpu.device=t}),t===`webnn`){let t=new(zn(),oe(Fn)).WebNNBackend(e);zt().webnnInit([t,()=>t.reserveTensorId(),e=>t.releaseTensorId(e),async(e,n,r,i,a)=>t.ensureTensor(e,n,r,i,a),(e,n)=>{t.uploadTensor(e,n)},async(e,n)=>t.downloadTensor(e,n),(e,n)=>t.registerMLContext(e,n),!!e.trace])}},Un=new Map,Wn=e=>{let t=zt(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetInputOutputCount(e,r,r+n)!==0&&Ut(`Can't get session input/output count.`);let i=n===4?`i32`:`i64`;return[Number(t.getValue(r,i)),Number(t.getValue(r+n,i))]}finally{t.stackRestore(n)}},Gn=(e,t)=>{let n=zt(),r=n.stackSave(),i=0;try{let r=n.PTR_SIZE,a=n.stackAlloc(2*r);n._OrtGetInputOutputMetadata(e,t,a,a+r)!==0&&Ut(`Can't get session input/output metadata.`);let o=Number(n.getValue(a,`*`));i=Number(n.getValue(a+r,`*`));let s=n.HEAP32[i/4];if(s===0)return[o,0];let c=n.HEAPU32[i/4+1],l=[];for(let e=0;e{let t=zt(),n=t._malloc(e.byteLength);if(n===0)throw Error(`Can't create a session. failed to allocate a buffer of size ${e.byteLength}.`);return t.HEAPU8.set(e,n),[n,e.byteLength]},qn=async(e,t)=>{let n,r,i=zt();Array.isArray(e)?[n,r]=e:e.buffer===i.HEAPU8.buffer?[n,r]=[e.byteOffset,e.byteLength]:[n,r]=Kn(e);let a=0,o=0,s=0,c=[],l=[],u=[];try{if([o,c]=await $t(t),t?.externalData&&i.mountExternalData){let e=[];for(let n of t.externalData){let t=typeof n==`string`?n:n.path;e.push(dn(typeof n==`string`?n:n.data).then(e=>{i.mountExternalData(t,e)}))}await Promise.all(e)}for(let e of t?.executionProviders??[])if((typeof e==`string`?e:e.name)===`webnn`){if(i.shouldTransferToMLTensor=!1,typeof e!=`string`){let t=e,n=t?.context,r=t?.gpuDevice,a=t?.deviceType,o=t?.powerPreference;n?i.currentContext=n:r?i.currentContext=await i.webnnCreateMLContext(r):i.currentContext=await i.webnnCreateMLContext({deviceType:a,powerPreference:o})}else i.currentContext=await i.webnnCreateMLContext();break}a=await i._OrtCreateSession(n,r,o),i.webgpuOnCreateSession?.(a),a===0&&Ut(`Can't create a session.`),i.jsepOnCreateSession?.(),i.currentContext&&(i.webnnRegisterMLContext(a,i.currentContext),i.currentContext=void 0,i.shouldTransferToMLTensor=!0);let[e,d]=Wn(a),f=!!t?.enableGraphCapture,p=[],m=[],h=[],g=[],_=[];for(let t=0;te===`gpu-buffer`||e===`ml-tensor`||e===`ml-tensor-cpu-output`)&&(s=i._OrtCreateBinding(a),s===0&&Ut(`Can't create IO binding.`),v={handle:s,outputPreferredLocations:_,outputPreferredLocationsEncoded:_.map(e=>e===`ml-tensor-cpu-output`?`ml-tensor`:e).map(e=>ln(e))}),Un.set(a,[a,l,u,v,f,!1]),[a,p,m,h,g]}catch(e){throw l.forEach(e=>i._OrtFree(e)),u.forEach(e=>i._OrtFree(e)),s!==0&&i._OrtReleaseBinding(s)!==0&&Ut(`Can't release IO binding.`),a!==0&&i._OrtReleaseSession(a)!==0&&Ut(`Can't release session.`),e}finally{i._free(n),o!==0&&i._OrtReleaseSessionOptions(o)!==0&&Ut(`Can't release session options.`),c.forEach(e=>i._free(e)),i.unmountExternalData?.()}},Jn=e=>{let t=zt(),n=Un.get(e);if(!n)throw Error(`cannot release session. invalid session id: ${e}`);let[r,i,a,o,s]=n;o&&(s&&t._OrtClearBoundOutputs(o.handle)!==0&&Ut(`Can't clear bound outputs.`),t._OrtReleaseBinding(o.handle)!==0&&Ut(`Can't release IO binding.`)),t.jsepOnReleaseSession?.(e),t.webnnOnReleaseSession?.(e),t.webgpuOnReleaseSession?.(e),i.forEach(e=>t._OrtFree(e)),a.forEach(e=>t._OrtFree(e)),t._OrtReleaseSession(r)!==0&&Ut(`Can't release session.`),Un.delete(e)},Yn=async(e,t,n,r,i,a,o=!1)=>{if(!e){t.push(0);return}let s=zt(),c=s.PTR_SIZE,l=e[0],u=e[1],d=e[3],f=d,p,m;if(l===`string`&&(d===`gpu-buffer`||d===`ml-tensor`))throw Error(`String tensor is not supported on GPU.`);if(o&&d!==`gpu-buffer`)throw Error(`External buffer must be provided for input/output index ${a} when enableGraphCapture is true.`);if(d===`gpu-buffer`){let t=e[2].gpuBuffer;m=rn(tn(l),u);{let e=s.webgpuRegisterBuffer;if(!e)throw Error(`Tensor location "gpu-buffer" is not supported without using WebGPU.`);p=e(t,r)}}else if(d===`ml-tensor`){let t=e[2].mlTensor;m=rn(tn(l),u);let n=s.webnnRegisterMLTensor;if(!n)throw Error(`Tensor location "ml-tensor" is not supported without using WebNN.`);p=n(r,t,tn(l),u)}else{let t=e[2];if(Array.isArray(t)){m=c*t.length,p=s._malloc(m),n.push(p);for(let e=0;es.setValue(g+t*c,e,c===4?`i32`:`i64`));let e=s._OrtCreateTensor(tn(l),p,m,g,u.length,ln(f));e===0&&Ut(`Can't create tensor for input/output. session=${r}, index=${a}.`),t.push(e)}finally{s.stackRestore(h)}},Xn=async(e,t,n,r,i,a)=>{let o=zt(),s=o.PTR_SIZE,c=Un.get(e);if(!c)throw Error(`cannot run inference. invalid session id: ${e}`);let l=c[0],u=c[1],d=c[2],f=c[3],p=c[4],m=c[5],h=t.length,g=r.length,_=0,v=[],y=[],b=[],x=[],S=[],C=o.stackSave(),w=o.stackAlloc(h*s),T=o.stackAlloc(h*s),ee=o.stackAlloc(g*s),te=o.stackAlloc(g*s);try{[_,v]=Gt(a),Ke(`wasm prepareInputOutputTensor`);for(let r=0;re*t,1);u=nn(a);let _=f?.outputPreferredLocations[r[t]];if(u===`string`){if(_===`gpu-buffer`||_===`ml-tensor`)throw Error(`String tensor is not supported on GPU.`);let e=[];for(let t=0;t0){let t=o.webgpuGetBuffer;if(!t)throw Error(`preferredLocation "gpu-buffer" is not supported without using WebGPU.`);let r=t(d),i=rn(a,g);if(i===void 0||!sn(u))throw Error(`Unsupported data type: ${u}`);l=!0;{o.webgpuRegisterBuffer(r,e,d);let t=o.webgpuCreateDownloader(r,i,e);C.push([u,h,{gpuBuffer:r,download:async()=>{let e=await t();return new(an(u))(e)},dispose:()=>{o._OrtReleaseTensor(n)!==0&&Ut(`Can't release tensor.`)}},`gpu-buffer`])}}else if(_===`ml-tensor`&&g>0){let t=o.webnnEnsureTensor,r=o.webnnIsGraphInputOutputTypeSupported;if(!t||!r)throw Error(`preferredLocation "ml-tensor" is not supported without using WebNN.`);if(rn(a,g)===void 0||!cn(u))throw Error(`Unsupported data type: ${u}`);if(!r(e,u,!1))throw Error(`preferredLocation "ml-tensor" for ${u} output is not supported by current WebNN Context.`);let i=await t(e,d,a,h,!1);l=!0,C.push([u,h,{mlTensor:i,download:o.webnnCreateMLTensorDownloader(d,u),dispose:()=>{o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n)}},`ml-tensor`])}else if(_===`ml-tensor-cpu-output`&&g>0){let e=o.webnnCreateMLTensorDownloader(d,u)(),t=C.length;l=!0,ne.push((async()=>{let r=[t,await e];return o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n),r})()),C.push([u,h,[],`cpu`])}else{let e=new(an(u))(g);new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(o.HEAPU8.subarray(d,d+e.byteLength)),C.push([u,h,e,`cpu`])}}finally{o.stackRestore(a),u===`string`&&d&&o._free(d),l||o._OrtReleaseTensor(n)}}f&&!p&&(o._OrtClearBoundOutputs(f.handle)!==0&&Ut(`Can't clear bound outputs.`),Un.set(e,[l,u,d,f,p,!1]));for(let[e,t]of await Promise.all(ne))C[e][2]=t;return qe(`wasm ProcessOutputTensor`),C}finally{o.webnnOnRunEnd?.(l),o.stackRestore(C),n.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),i.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),y.forEach(e=>o._OrtReleaseTensor(e)),b.forEach(e=>o._OrtReleaseTensor(e)),x.forEach(e=>o._free(e)),_!==0&&o._OrtReleaseRunOptions(_),v.forEach(e=>o._free(e))}},Zn=e=>{let t=zt(),n=Un.get(e);if(!n)throw Error(`invalid session id`);let r=n[0],i=t._OrtEndProfiling(r);i===0&&Ut(`Can't get an profile file name.`),t._OrtFree(i)},Qn=e=>{let t=[];for(let n of e){let e=n[2];!Array.isArray(e)&&`buffer`in e&&t.push(e.buffer)}return t}}),er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr=re(()=>{it(),$n(),Bt(),At(),er=()=>!!ve.wasm.proxy&&typeof document<`u`,nr=!1,rr=!1,ir=!1,sr=new Map,cr=(e,t)=>{let n=sr.get(e);n?n.push(t):sr.set(e,[t])},lr=()=>{if(nr||!rr||ir||!tr)throw Error(`worker not ready`)},ur=e=>{switch(e.data.type){case`init-wasm`:nr=!1,e.data.err?(ir=!0,or[1](e.data.err)):(rr=!0,or[0]()),ar&&=(URL.revokeObjectURL(ar),void 0);break;case`init-ep`:case`copy-from`:case`create`:case`release`:case`run`:case`end-profiling`:{let t=sr.get(e.data.type);e.data.err?t.shift()[1](e.data.err):t.shift()[0](e.data.out);break}default:}},dr=async()=>{if(!rr){if(nr)throw Error(`multiple calls to 'initWasm()' detected.`);if(ir)throw Error(`previous call to 'initWasm()' failed.`);if(nr=!0,er())return new Promise((e,t)=>{tr?.terminate(),Dt().then(([n,r])=>{try{tr=r,tr.onerror=e=>t(e),tr.onmessage=ur,or=[e,t];let i={type:`init-wasm`,in:ve};!i.in.wasm.wasmPaths&&(n||_t)&&(i.in.wasm.wasmPaths={wasm:new URL(`/assets/ort-wasm-simd-threaded.asyncify-BrebZMa_.wasm`,``+import.meta.url).href}),tr.postMessage(i),ar=n}catch(e){t(e)}},t)});try{await Rt(ve.wasm),await Vn(ve),rr=!0}catch(e){throw ir=!0,e}finally{nr=!1}}},fr=async e=>{if(er())return lr(),new Promise((t,n)=>{cr(`init-ep`,[t,n]);let r={type:`init-ep`,in:{epName:e,env:ve}};tr.postMessage(r)});await Hn(ve,e)},pr=async e=>er()?(lr(),new Promise((t,n)=>{cr(`copy-from`,[t,n]);let r={type:`copy-from`,in:{buffer:e}};tr.postMessage(r,[e.buffer])})):Kn(e),mr=async(e,t)=>{if(er()){if(t?.preferredOutputLocation)throw Error(`session option "preferredOutputLocation" is not supported for proxy.`);return lr(),new Promise((n,r)=>{cr(`create`,[n,r]);let i={type:`create`,in:{model:e,options:{...t}}},a=[];e instanceof Uint8Array&&a.push(e.buffer),tr.postMessage(i,a)})}else return qn(e,t)},hr=async e=>{if(er())return lr(),new Promise((t,n)=>{cr(`release`,[t,n]);let r={type:`release`,in:e};tr.postMessage(r)});Jn(e)},gr=async(e,t,n,r,i,a)=>{if(er()){if(n.some(e=>e[3]!==`cpu`))throw Error(`input tensor on GPU is not supported for proxy.`);if(i.some(e=>e))throw Error(`pre-allocated output tensor is not supported for proxy.`);return lr(),new Promise((i,o)=>{cr(`run`,[i,o]);let s=n,c={type:`run`,in:{sessionId:e,inputIndices:t,inputs:s,outputIndices:r,options:a}};tr.postMessage(c,Qn(s))})}else return Xn(e,t,n,r,i,a)},_r=async e=>{if(er())return lr(),new Promise((t,n)=>{cr(`end-profiling`,[t,n]);let r={type:`end-profiling`,in:e};tr.postMessage(r)});Zn(e)}}),yr,br,xr,Sr=re(()=>{it(),vr(),un(),at(),fn(),yr=(e,t)=>{switch(e.location){case`cpu`:return[e.type,e.dims,e.data,`cpu`];case`gpu-buffer`:return[e.type,e.dims,{gpuBuffer:e.gpuBuffer},`gpu-buffer`];case`ml-tensor`:return[e.type,e.dims,{mlTensor:e.mlTensor},`ml-tensor`];default:throw Error(`invalid data location: ${e.location} for ${t()}`)}},br=e=>{switch(e[3]){case`cpu`:return new Be(e[0],e[2],e[1]);case`gpu-buffer`:{let t=e[0];if(!sn(t))throw Error(`not supported data type: ${t} for deserializing GPU tensor`);let{gpuBuffer:n,download:r,dispose:i}=e[2];return Be.fromGpuBuffer(n,{dataType:t,dims:e[1],download:r,dispose:i})}case`ml-tensor`:{let t=e[0];if(!cn(t))throw Error(`not supported data type: ${t} for deserializing MLTensor tensor`);let{mlTensor:n,download:r,dispose:i}=e[2];return Be.fromMLTensor(n,{dataType:t,dims:e[1],download:r,dispose:i})}default:throw Error(`invalid data location: ${e[3]}`)}},xr=class{async fetchModelAndCopyToWasmMemory(e){return pr(await dn(e))}async loadModel(e,t){We();let n;n=typeof e==`string`?await this.fetchModelAndCopyToWasmMemory(e):e,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await mr(n,t),Ge()}async dispose(){return hr(this.sessionId)}async run(e,t,n){We();let r=[],i=[];Object.entries(e).forEach(e=>{let t=e[0],n=e[1],a=this.inputNames.indexOf(t);if(a===-1)throw Error(`invalid input '${t}'`);r.push(n),i.push(a)});let a=[],o=[];Object.entries(t).forEach(e=>{let t=e[0],n=e[1],r=this.outputNames.indexOf(t);if(r===-1)throw Error(`invalid output '${t}'`);a.push(n),o.push(r)});let s=r.map((e,t)=>yr(e,()=>`input "${this.inputNames[i[t]]}"`)),c=a.map((e,t)=>e?yr(e,()=>`output "${this.outputNames[o[t]]}"`):null),l=await gr(this.sessionId,i,s,o,c,n),u={};for(let e=0;eTr,initializeFlags:()=>wr,wasmBackend:()=>Er});var wr,Tr,Er,Dr=re(()=>{it(),vr(),Sr(),wr=()=>{(typeof ve.wasm.initTimeout!=`number`||ve.wasm.initTimeout<0)&&(ve.wasm.initTimeout=0);let e=ve.wasm.simd;if(typeof e!=`boolean`&&e!==void 0&&e!==`fixed`&&e!==`relaxed`&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${e}". Reset it to \`false\` and ignore SIMD feature checking.`),ve.wasm.simd=!1),typeof ve.wasm.proxy!=`boolean`&&(ve.wasm.proxy=!1),typeof ve.wasm.trace!=`boolean`&&(ve.wasm.trace=!1),typeof ve.wasm.numThreads!=`number`||!Number.isInteger(ve.wasm.numThreads)||ve.wasm.numThreads<=0)if(typeof self<`u`&&!self.crossOriginIsolated)ve.wasm.numThreads=1;else{let e=typeof navigator>`u`?D(`node:os`).cpus().length:navigator.hardwareConcurrency;ve.wasm.numThreads=Math.min(4,Math.ceil((e||1)/2))}},Tr=class{async init(e){wr(),await dr(),await fr(e)}async createInferenceSessionHandler(e,t){let n=new xr;return await n.loadModel(e,t),n}},Er=new Tr});it(),it(),it();var Or=`1.25.0-dev.20260327-722743c0e2`,kr=rt;{let e=(Dr(),oe(Cr)).wasmBackend;ce(`webgpu`,e,5),ce(`webnn`,e,5),ce(`cpu`,e,10),ce(`wasm`,e,10)}Object.defineProperty(ve.versions,`web`,{value:Or,enumerable:!0});var Ar=`1.24.3`,jr=`warning`;Object.defineProperty({wasm:{},webgl:{},webgpu:{},versions:{common:Ar},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);jr=e}},get logLevel(){return jr}},`logLevel`,{enumerable:!0});var Mr=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,Pr(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(Pr(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return Pr(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},Ir=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new Kr({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},Lr=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new Kr({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},Rr=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new Kr({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},zr=(e,t,n)=>new Kr({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),Br=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),Vr=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]),Hr=!1,Ur=()=>{if(!Hr){Hr=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(Br.set(`int64`,BigInt64Array),Vr.set(BigInt64Array,`int64`)),t&&(Br.set(`uint64`,BigUint64Array),Vr.set(BigUint64Array,`uint64`)),r?(Br.set(`float16`,n),Vr.set(n,`float16`)):Br.set(`float16`,Uint16Array)}},Wr=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new Kr(e.type,e.data,t);case`cpu-pinned`:return new Kr({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new Kr({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new Kr({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new Kr({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}},Kr=class{constructor(e,t,n){Ur();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=Br.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=Br.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=Vr.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=Wr(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return Fr(e,t)}static fromTexture(e,t){return Ir(e,t)}static fromGpuBuffer(e,t){return Lr(e,t)}static fromMLTensor(e,t){return Rr(e,t)}static fromPinnedBuffer(e,t,n){return zr(e,t,n)}toDataURL(e){return Mr(this,e)}toImageData(e){return Nr(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return Gr(this,e)}},qr=Kr,Jr=Object.defineProperty,Yr=(e,t)=>{for(var n in t)Jr(e,n,{get:t[n],enumerable:!0})},Xr={},Zr={},Qr={},$r=`4.0.1`,ei=typeof self<`u`,ti=!Di(Xr),ni=!Di(Zr),ri=ei&&`caches`in self,ii=globalThis.Deno!==void 0;globalThis.Bun;var ai=ii&&ri&&!ti,oi=typeof process<`u`,si=oi&&process?.release?.name===`node`&&!ai,ci=typeof window<`u`&&window.document!==void 0,li=ei&&[`DedicatedWorkerGlobalScope`,`ServiceWorkerGlobalScope`,`SharedWorkerGlobalScope`].includes(self.constructor?.name),ui=ci||li||ai,di=si||typeof navigator<`u`&&`gpu`in navigator,fi=typeof navigator<`u`&&`ml`in navigator,pi=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,mi=typeof chrome<`u`&&chrome.runtime!==void 0&&typeof chrome.runtime.id==`string`,hi=typeof ServiceWorkerGlobalScope<`u`&&ei&&self instanceof ServiceWorkerGlobalScope,gi=(()=>{if(typeof navigator>`u`)return!1;let e=navigator.userAgent,t=(navigator.vendor||``).indexOf(`Apple`)>-1,n=!e.match(/CriOS|FxiOS|EdgiOS|OPiOS|mercury|brave/i)&&!e.includes(`Chrome`)&&!e.includes(`Android`);return t&&n})(),_i=Object.freeze({IS_BROWSER_ENV:ci,IS_WEBWORKER_ENV:li,IS_WEB_ENV:ui,IS_SERVICE_WORKER_ENV:hi,IS_DENO_WEB_RUNTIME:ai,IS_WEB_CACHE_AVAILABLE:ri,IS_WEBGPU_AVAILABLE:di,IS_WEBNN_AVAILABLE:fi,IS_SAFARI:gi,IS_PROCESS_AVAILABLE:oi,IS_NODE_ENV:si,IS_FS_AVAILABLE:ti,IS_PATH_AVAILABLE:ni,IS_CRYPTO_AVAILABLE:pi,IS_CHROME_AVAILABLE:mi}),vi=ti&&ni,yi=`./`;if(vi){let e=Object(import.meta).url;e?yi=Zr.dirname(Zr.dirname(Qr.fileURLToPath(e))):typeof __dirname<`u`&&(yi=Zr.dirname(__dirname))}var bi=vi?Zr.join(yi,`/.cache/`):null,xi=`/models/`,Si=vi?Zr.join(yi,xi):xi,Ci=typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0,wi=Object.freeze({DEBUG:10,INFO:20,WARNING:30,ERROR:40,NONE:50}),Ti=wi.WARNING,Ei={version:$r,backends:{onnx:{}},get logLevel(){return Ti},set logLevel(e){Ti=e,Ei.backends.onnx?.setLogLevel?.(e)},allowRemoteModels:!0,remoteHost:`https://huggingface.co/`,remotePathTemplate:`{model}/resolve/{revision}/`,allowLocalModels:!(ci||li||ai),localModelPath:Si,useFS:ti,useBrowserCache:ri,useFSCache:ti,cacheDir:bi,useCustomCache:!1,customCache:null,useWasmCache:ri||ti,cacheKey:`transformers-cache`,experimental_useCrossOriginStorage:!1,fetch:Ci};function Di(e){return Object.keys(e).length===0}var Oi=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}_call(...e){throw Error(`Must implement _call method in subclass`)}};function ki(e,t){e&&e(t)}var Ai=class extends Oi{constructor(e,t){super(),this.callback=e,this.files_loading=t}_call(e){if(e.status===`progress`){this.files_loading[e.file]={loaded:e.loaded,total:e.total};let t=Object.values(this.files_loading).reduce((e,t)=>e+t.loaded,0),n=Object.values(this.files_loading).reduce((e,t)=>e+t.total,0),r=n>0?t/n*100:0;this.callback({status:`progress_total`,name:e.name,progress:r,loaded:t,total:n,files:structuredClone(this.files_loading)})}this.callback(e)}};function ji(e){return Number.isInteger(e)||typeof e==`bigint`}function Mi(e){return e==null||e===-1}function Ni(e){let t=[],n=e;for(;Array.isArray(n);)t.push(n.length),n=n[0];return t}function Pi(...e){return Array.prototype.concat.apply([],e)}function Fi(...e){return e.reduce((e,t)=>e.flatMap(e=>t.map(t=>[e,t])))}function Ii(e,t){return Math.abs((e+t)%(2*t)-t)}function Li(e,t){return Object.assign({},...t.map(t=>{if(e[t]!==void 0)return{[t]:e[t]}}))}function Ri(e,t){let n=0;for(let r of e)r===t&&++n;return n}var zi={error(...e){Ei.logLevel<=wi.ERROR&&console.error(...e)},warn(...e){Ei.logLevel<=wi.WARNING&&console.warn(...e)},info(...e){Ei.logLevel<=wi.INFO&&console.log(...e)},debug(...e){Ei.logLevel<=wi.DEBUG&&console.log(...e)},log(...e){this.info(...e)}},Bi=class{constructor(e){this.trie=this._build_trie(e)}_build_trie(e){let t=Object.create(null);for(let n of e){let e=t;for(let t=0;tr&&t.push(e.slice(r,i)),t.push(o),i+=o.length,r=i):++i}return r{let e=[...Array.from({length:94},(e,t)=>t+33),...Array.from({length:12},(e,t)=>t+161),...Array.from({length:82},(e,t)=>t+174)],t=e.slice(),n=0;for(let r=0;r<256;++r)e.includes(r)||(e.push(r),t.push(256+n),n+=1);let r=t.map(e=>String.fromCharCode(e));return Object.fromEntries(e.map((e,t)=>[e,r[t]]))})(),Ui=(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])))(Hi),Wi=`.,!?…。,、।۔،`,Gi=new Map([[`(?i:'s|'t|'re|'ve|'m|'ll|'d)`,`(?:'([sS]|[tT]|[rR][eE]|[vV][eE]|[mM]|[lL][lL]|[dD]))`],[`(?i:[sdmt]|ll|ve|re)`,`(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])`],[`[^\\r\\n\\p{L}\\p{N}]?+`,`[^\\r\\n\\p{L}\\p{N}]?`],[`[^\\s\\p{L}\\p{N}]++`,`[^\\s\\p{L}\\p{N}]+`],[`(?>\\p{Nd}{510})`,`(?:\\p{Nd}{510})`],[`\\p{Nd}{3}+`,`(?:\\p{Nd}{3})+`],[`\\G`,``],[` ?[^(\\s|[${Wi}])]+`,` ?[^\\s${Wi}]+`]]),Ki=`\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E`,qi=e=>e.replace(/ \./g,`.`).replace(/ \?/g,`?`).replace(/ \!/g,`!`).replace(/ ,/g,`,`).replace(/ \' /g,`'`).replace(/ n't/g,`n't`).replace(/ 'm/g,`'m`).replace(/ 's/g,`'s`).replace(/ 've/g,`'ve`).replace(/ 're/g,`'re`),Ji=(e,t=!0)=>{if(e.Regex!==void 0){let t=e.Regex.replace(/\\([#&~])/g,`$1`);t=t.replace(/\\A/g,`^`).replace(/\\z/g,`$`).replace(/\\Z/g,`(?=\\r?\\n?$)`);for(let[e,n]of Gi)t=t.replaceAll(e,n);try{return new RegExp(t,`gu`)}catch(e){if(!(e instanceof SyntaxError)||!e.message.toLowerCase().includes(`invalid property name`))throw e;let n=!1,r=t.replace(/(\\[pP])\{([^}=]+)\}/g,(e,t,r)=>{try{return RegExp(`\\p{${r}}`,`u`),`${t}{${r}}`}catch{return n=!0,`${t}{Script=${r}}`}});if(!n)throw e;try{return new RegExp(r,`gu`)}catch{throw e}}}else if(e.String!==void 0){let n=Yi(e.String);return new RegExp(t?n:`(${n})`,`gu`)}else return console.warn(`Unknown pattern type:`,e),null},Yi=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Xi=(e,t,n)=>{let r=[],i=0;for(;ie>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=63744&&e<=64255||e>=194560&&e<=195103,Qi=e=>Number.isInteger(e)||typeof e==`bigint`,$i=e=>{let t=0;for(let n of e)++t;return t},ea=e=>ia(e.toLowerCase()),ta=(...e)=>Array.prototype.concat.apply([],e),na=e=>new Map(Object.entries(e)),ra=(e,t)=>{let n=[],r=0;for(let i of e.matchAll(t)){let t=i[0];r0&&n.push(t),r=i.index+t.length}return re.replace(/\p{M}/gu,``),aa=(e,t,n=[])=>{if(!e||Array.isArray(e)||typeof e!=`object`)return`${t} must be a valid object`;for(let r of n)if(!(r in e))return`${t} must contain a "${r}" property`;return null},oa=e=>e.match(/\S+/g)||[],sa=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}},ca=class extends sa{constructor(e){super(),this.config=e}_call(e){return this.normalize(e)}},la=class extends ca{tokenize_chinese_chars(e){let t=[];for(let n=0;ne.normalize(`NFKC`)).join(`~`):e.normalize(`NFKC`),e}},da=class extends ca{constructor(e){super(e),this.normalizers=(e.normalizers??[]).map(e=>Ca(e))}normalize(e){return this.normalizers.reduce((e,t)=>t?t.normalize(e):e,e)}},fa=class extends ca{normalize(e){let t=Ji(this.config.pattern??{});return t===null?e:e.replaceAll(t,this.config.content??``)}},pa=class extends ca{constructor(){super(...arguments),this.form=`NFC`}normalize(e){return e=e.normalize(this.form),e}},ma=class extends pa{constructor(){super(...arguments),this.form=`NFC`}},ha=class extends pa{constructor(){super(...arguments),this.form=`NFD`}},ga=class extends pa{constructor(){super(...arguments),this.form=`NFKC`}},_a=class extends pa{constructor(){super(...arguments),this.form=`NFKD`}},va=class extends ca{normalize(e){return this.config.strip_left&&this.config.strip_right?e=e.trim():(this.config.strip_left&&(e=e.trimStart()),this.config.strip_right&&(e=e.trimEnd())),e}},ya=class extends ca{normalize(e){return ia(e)}},ba=class extends ca{normalize(e){return e.toLowerCase()}},xa=class extends ca{normalize(e){return e=this.config.prepend+e,e}};function Sa(e){if(e===null)return null;switch(e.type){case`BertNormalizer`:return new la(e);case`Precompiled`:return new ua(e);case`Sequence`:return new da(e);case`Replace`:return new fa(e);case`NFC`:return new ma(e);case`NFD`:return new ha(e);case`NFKC`:return new ga(e);case`NFKD`:return new _a(e);case`Strip`:return new va(e);case`StripAccents`:return new ya(e);case`Lowercase`:return new ba(e);case`Prepend`:return new xa(e);default:throw Error(`Unknown Normalizer type: ${e.type}`)}}var Ca=Sa,wa=class extends sa{pre_tokenize(e,t){return(Array.isArray(e)?e.map(e=>this.pre_tokenize_text(e,t)):this.pre_tokenize_text(e,t)).flat()}_call(e,t){return this.pre_tokenize(e,t)}},Ta=class extends wa{constructor(e){super(),this.config=e,this.add_prefix_space=this.config.add_prefix_space??!1,this.trim_offsets=this.config.trim_offsets??!1,this.use_regex=this.config.use_regex??!0,this.pattern=/'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+/gu,this.byte_encoder=Hi,this.text_encoder=new TextEncoder}pre_tokenize_text(e,t){return this.add_prefix_space&&!e.startsWith(` `)&&(e=` `+e),(this.use_regex?e.match(this.pattern)||[]:[e]).map(e=>Array.from(this.text_encoder.encode(e),e=>this.byte_encoder[e]).join(``))}},Ea=class extends wa{pre_tokenize_text(e,t){return e.match(/\w+|[^\w\s]+/g)||[]}},Da=class extends wa{constructor(e){super(),this.replacement=e.replacement??`▁`,this.str_rep=e.str_rep||this.replacement,this.prepend_scheme=e.prepend_scheme??`always`}pre_tokenize_text(e,t){let{section_index:n=void 0}=t??{},r=e.replaceAll(` `,this.str_rep);return!r.startsWith(this.replacement)&&(this.prepend_scheme===`always`||this.prepend_scheme===`first`&&n===0)&&(r=this.str_rep+r),[r]}},Oa=class extends wa{constructor(e){super(),this.config=e,this.pattern=Ji(this.config.pattern??{},this.config.invert??!0)}pre_tokenize_text(e){return this.pattern===null?[]:this.config.invert?e.match(this.pattern)||[]:this.config.behavior?.toLowerCase()===`removed`?e.split(this.pattern).filter(e=>e):ra(e,this.pattern)}},ka=class extends wa{constructor(e){super(),this.config=e,this.pattern=RegExp(`[^${Ki}]+|[${Ki}]+`,`gu`)}pre_tokenize_text(e){return e.match(this.pattern)||[]}},Aa=class extends wa{constructor(e){super(),this.config=e;let t=`[^\\d]+|\\d${this.config.individual_digits?``:`+`}`;this.pattern=new RegExp(t,`gu`)}pre_tokenize_text(e){return e.match(this.pattern)||[]}},ja=class extends wa{constructor(){super(),this.pattern=RegExp(`[^\\s${Ki}]+|[${Ki}]`,`gu`)}pre_tokenize_text(e,t){return e.trim().match(this.pattern)||[]}},Ma=class extends wa{constructor(e){super(),this.config=e,this.pattern=Ji(this.config.pattern??{}),this.content=this.config.content??``}pre_tokenize_text(e){return this.pattern===null?[e]:[e.replaceAll(this.pattern,this.config.content??``)]}},Na=class extends wa{constructor(e){super(),this.tokenizers=(e.pretokenizers??[]).map(e=>La(e))}pre_tokenize_text(e,t){return this.tokenizers.reduce((e,n)=>n?n.pre_tokenize(e,t):e,[e])}},Pa=class extends wa{pre_tokenize_text(e){return oa(e)}},Fa=class extends wa{constructor(e){super(),this.config=e,this._length=e.length}pre_tokenize_text(e){let t=[];for(let n=0;nthis.max_input_chars_per_word){t.push(this.unk_token);continue}let r=!1,i=0,a=[];for(;i0&&(r=this.config.continuing_subword_prefix+r),this.tokens_to_ids.has(r)){n=r;break}--t}if(n===null){r=!0;break}a.push(n),i=t}r?t.push(this.unk_token):t.push(...a)}return t}},Ba=class e{constructor(e,t){this.is_leaf=e,this.children=t}static default(){return new e(!1,new Map)}},Va=class{constructor(){this.root=Ba.default()}extend(e){for(let t of e)this.push(t)}push(e){let t=this.root;for(let n of e){let e=t.children.get(n);e===void 0&&(e=Ba.default(),t.children.set(n,e)),t=e}t.is_leaf=!0}*common_prefix_search(e){let t=this.root;if(t===void 0)return;let n=``;for(let r of e){if(n+=r,t=t.children.get(r),t===void 0)return;t.is_leaf&&(yield n)}}},Ha=class e{constructor(e,t,n,r,i){this.token_id=e,this.node_id=t,this.pos=n,this.length=r,this.score=i,this.prev=null,this.backtrace_score=0}clone(){let t=new e(this.token_id,this.node_id,this.pos,this.length,this.score);return t.prev=this.prev,t.backtrace_score=this.backtrace_score,t}},Ua=class{constructor(e,t,n){this.chars=Array.from(e),this.len=this.chars.length,this.bos_token_id=t,this.eos_token_id=n,this.nodes=[],this.begin_nodes=Array.from({length:this.len+1},()=>[]),this.end_nodes=Array.from({length:this.len+1},()=>[]);let r=new Ha(this.bos_token_id??0,0,0,0,0),i=new Ha(this.eos_token_id??0,1,this.len,0,0);this.nodes.push(r.clone()),this.nodes.push(i.clone()),this.begin_nodes[this.len].push(i),this.end_nodes[0].push(r)}insert(e,t,n,r){let i=this.nodes.length,a=new Ha(r,i,e,t,n);this.begin_nodes[e].push(a),this.end_nodes[e+t].push(a),this.nodes.push(a)}viterbi(){let e=this.len,t=0;for(;t<=e;){if(this.begin_nodes[t].length==0)return[];for(let e of this.begin_nodes[t]){e.prev=null;let n=0,r=null;for(let i of this.end_nodes[t]){let t=i.backtrace_score+e.score;(r===null||t>n)&&(r=i.clone(),n=t)}if(r!==null)e.prev=r,e.backtrace_score=n;else return[]}++t}let n=[],r=this.begin_nodes[e][0].prev;if(r===null)return[];let i=r.clone();for(;i.prev!==null;)n.push(i.clone()),i=i.clone().prev.clone();return n.reverse(),n}piece(e){return this.chars.slice(e.pos,e.pos+e.length).join(``)}tokens(){return this.viterbi().map(e=>this.piece(e))}token_ids(){return this.viterbi().map(e=>e.token_id)}};function Wa(e){if(e.length===0)throw Error(`Array must not be empty`);let t=e[0],n=0;for(let r=1;r[e,t])),this.bos_token=` `,this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=t,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.unk_token=this.vocab[this.unk_token_id],this.min_score=Wa(this.scores)[0],this.unk_score=this.min_score-10,this.scores[this.unk_token_id]=this.unk_score,this.trie=new Va,this.trie.extend(this.vocab),this.fuse_unk=!0}populate_nodes(e){let t=e.chars,n=0;for(;ne>t,t=1/0){this._heap=[],this._comparator=e,this._max_size=t}get size(){return this._heap.length}is_empty(){return this.size===0}peek(){return this._heap[0]}push(...e){return this.extend(e)}extend(e){for(let t of e)if(this.size0&&this._swap(0,t),this._heap.pop(),this._sift_down(),e}replace(e){let t=this.peek();return this._heap[0]=e,this._sift_down(),t}_parent(e){return(e+1>>>1)-1}_left(e){return(e<<1)+1}_right(e){return e+1<<1}_greater(e,t){return this._comparator(this._heap[e],this._heap[t])}_swap(e,t){let n=this._heap[e];this._heap[e]=this._heap[t],this._heap[t]=n}_sift_up(){this._sift_up_from(this.size-1)}_sift_up_from(e){for(;e>0&&this._greater(e,this._parent(e));)this._swap(e,this._parent(e)),e=this._parent(e)}_sift_down(){let e=0;for(;this._left(e)this.capacity&&this.cache.delete(this.cache.keys().next().value)}clear(){this.cache.clear()}},Ja=class extends Ra{constructor(e){super(e),this.tokens_to_ids=na(e.vocab),this.unk_token_id=this.tokens_to_ids.get(e.unk_token),this.unk_token=e.unk_token,this.vocab=Array(this.tokens_to_ids.size);for(let[e,t]of this.tokens_to_ids)this.vocab[t]=e;this.merges=Array.isArray(e.merges[0])?e.merges:e.merges.map(e=>e.split(` `,2)),this.bpe_ranks=new Map(this.merges.map((e,t)=>[JSON.stringify(e),t])),this.end_of_word_suffix=e.end_of_word_suffix,this.continuing_subword_suffix=e.continuing_subword_suffix??null,this.byte_fallback=this.config.byte_fallback??!1,this.byte_fallback&&(this.text_encoder=new TextEncoder),this.ignore_merges=this.config.ignore_merges??!1,this.max_length_to_cache=256,this.cache_capacity=1e4,this.cache=new qa(this.cache_capacity)}clear_cache(){this.cache.clear()}bpe(e){if(e.length===0)return[];let t=this.cache.get(e);if(t!==void 0)return t;let n=Array.from(e);this.end_of_word_suffix&&(n[n.length-1]+=this.end_of_word_suffix);let r=[];if(n.length>1){let e=new Ka((e,t)=>e.score`<0x${e.toString(16).toUpperCase().padStart(2,`0`)}>`);e.every(e=>this.tokens_to_ids.has(e))?t.push(...e):this.unk_token!=null&&t.push(this.unk_token)}else this.unk_token!=null&&t.push(this.unk_token)}return t}},Ya=class extends Ra{constructor(e,t){super(e);let n=e.vocab;this.tokens_to_ids=na(t.target_lang?n[t.target_lang]:n),this.bos_token=t.bos_token,this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=t.eos_token,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.pad_token=t.pad_token,this.pad_token_id=this.tokens_to_ids.get(this.pad_token),this.unk_token=t.unk_token,this.unk_token_id=this.tokens_to_ids.get(this.unk_token),this.vocab=Array(this.tokens_to_ids.size);for(let[e,t]of this.tokens_to_ids)this.vocab[t]=e}encode(e){return e}};function Xa(e,t){switch(e.type){case`WordPiece`:return new za(e);case`Unigram`:return new Ga(e,t.eos_token);case`BPE`:return new Ja(e);default:if(e.vocab)return Array.isArray(e.vocab)?new Ga(e,t.eos_token):Object.hasOwn(e,`continuing_subword_prefix`)&&Object.hasOwn(e,`unk_token`)?Object.hasOwn(e,`merges`)?new Ja(e):new za(e):new Ya(e,{target_lang:t.target_lang,bos_token:t.bos_token,eos_token:t.eos_token,pad_token:t.pad_token,unk_token:t.unk_token});throw Error(`Unknown TokenizerModel type: ${e?.type}`)}}var Za=Xa,Qa=class extends sa{constructor(e){super(),this.config=e}_call(e,...t){return this.post_process(e,...t)}},$a=class extends Qa{post_process(e,t=null,n=!0){let r=t===null?this.config.single:this.config.pair,i=[],a=[];for(let o of r)`SpecialToken`in o?n&&(i.push(o.SpecialToken.id),a.push(o.SpecialToken.type_id)):`Sequence`in o&&(o.Sequence.id===`A`?(i=ta(i,e),a=ta(a,Array(e.length).fill(o.Sequence.type_id))):o.Sequence.id===`B`&&(i=ta(i,t),a=ta(a,Array(t.length).fill(o.Sequence.type_id))));return{tokens:i,token_type_ids:a}}},eo=class extends Qa{post_process(e,t=null){return{tokens:e,tokens_pair:t}}},to=class extends Qa{constructor(e){super(e),this.sep=e.sep,this.cls=e.cls}post_process(e,t=null,n=!0){n&&(e=ta([this.cls[0]],e,[this.sep[0]]));let r=Array(e.length).fill(0);if(t){let i=[],a=n?[this.sep[0]]:[];e=ta(e,i,t,a),r=ta(r,Array(t.length+i.length+a.length).fill(1))}return{tokens:e,token_type_ids:r}}},no=class extends Qa{constructor(e){super(e),this.sep=e.sep,this.cls=e.cls}post_process(e,t,n=!0){n&&(e=ta([this.cls[0]],e,[this.sep[0]]));let r=Array(e.length).fill(0);if(t){let i=n?[this.sep[0]]:[],a=n?[this.sep[0]]:[];e=ta(e,i,t,a),r=ta(r,Array(t.length+i.length+a.length).fill(1))}return{tokens:e,token_type_ids:r}}},ro=class extends Qa{constructor(e){super(e),this.processors=(e.processors??[]).map(e=>ao(e))}post_process(e,t=null,n=!0){let r={tokens:e,tokens_pair:t};for(let e of this.processors)r=e.post_process(r.tokens,r.tokens_pair,n);return r}};function io(e){if(e===null)return null;switch(e.type){case`TemplateProcessing`:return new $a(e);case`ByteLevel`:return new eo(e);case`BertProcessing`:return new to(e);case`RobertaProcessing`:return new no(e);case`Sequence`:return new ro(e);default:throw Error(`Unknown PostProcessor type: ${e.type}`)}}var ao=io,oo=class extends sa{constructor(e){super(),this.config=e,this.added_tokens=[],this.end_of_word_suffix=null,this.trim_offsets=`trim_offsets`in e?e.trim_offsets:!1}_call(e){return this.decode(e)}decode(e){return this.decode_chain(e).join(``)}},so=class extends oo{constructor(e){super(e),this.byte_decoder=Ui,this.text_decoder=new TextDecoder(`utf-8`,{fatal:!1,ignoreBOM:!0}),this.end_of_word_suffix=null}convert_tokens_to_string(e){let t=e.join(``),n=new Uint8Array([...t].map(e=>this.byte_decoder[e]));return this.text_decoder.decode(n)}decode_chain(e){let t=[],n=[];for(let r of e)this.added_tokens.find(e=>e.content===r)===void 0?n.push(r):(n.length>0&&(t.push(this.convert_tokens_to_string(n)),n=[]),t.push(r));return n.length>0&&t.push(this.convert_tokens_to_string(n)),t}},co=class extends oo{constructor(e){super(e),this.cleanup=e.cleanup}decode_chain(e){return e.map((e,t)=>{if(t!==0){let t=this.config.prefix;e=t&&e.startsWith(t)?e.replace(t,``):` `+e}return this.cleanup&&(e=qi(e)),e})}},lo=class extends oo{constructor(e){super(e),this.replacement=e.replacement??`▁`}decode_chain(e){let t=[];for(let n=0;nt.replaceAll(this.suffix,n===e.length-1?``:` `))}},fo=class extends oo{constructor(e){super(e),this.pad_token=e.pad_token??``,this.word_delimiter_token=e.word_delimiter_token??``,this.cleanup=e.cleanup}convert_tokens_to_string(e){if(e.length===0)return``;let t=[e[0]];for(let n=1;ne!==this.pad_token).join(``);return this.cleanup&&(n=qi(n).replaceAll(this.word_delimiter_token,` `).trim()),n}decode_chain(e){return[this.convert_tokens_to_string(e)]}},po=class extends oo{constructor(e){super(e),this.decoders=(e.decoders??[]).map(e=>yo(e))}decode_chain(e){return this.decoders.reduce((e,t)=>t.decode_chain(e),e)}},mo=class extends oo{decode_chain(e){let t=Ji(this.config.pattern),n=this.config.content??``;return t===null?e:e.map(e=>e.replaceAll(t,n))}},ho=class extends oo{decode_chain(e){return[e.join(``)]}},go=class extends oo{constructor(e){super(e),this.content=e.content??``,this.start=e.start??0,this.stop=e.stop??0}decode_chain(e){return e.map(e=>{let t=0;for(let n=0;n`)){let t=parseInt(r.slice(3,5),16);isNaN(t)||(e=t)}if(e!==null)n.push(e);else{if(n.length>0){let e=this.text_decoder.decode(Uint8Array.from(n));t.push(e),n=[]}t.push(r)}}if(n.length>0){let e=this.text_decoder.decode(Uint8Array.from(n));t.push(e),n=[]}return t}};function vo(e){if(e===null)return null;switch(e.type){case`ByteLevel`:return new so(e);case`WordPiece`:return new co(e);case`Metaspace`:return new lo(e);case`BPEDecoder`:return new uo(e);case`CTC`:return new fo(e);case`Sequence`:return new po(e);case`Replace`:return new mo(e);case`Fuse`:return new ho(e);case`Strip`:return new go(e);case`ByteFallback`:return new _o(e);default:throw Error(`Unknown Decoder type: ${e.type}`)}}var yo=vo,bo=class{constructor(e,t){let n=aa(e,`Tokenizer`,[`model`,`decoder`,`post_processor`,`pre_tokenizer`,`normalizer`]);if(n)throw Error(n);let r=aa(t,`Config`);if(r)throw Error(r);this.tokenizer=e,this.config=t,this.normalizer=Ca(this.tokenizer.normalizer),this.pre_tokenizer=La(this.tokenizer.pre_tokenizer),this.model=Za(this.tokenizer.model,this.config),this.post_processor=ao(this.tokenizer.post_processor),this.decoder=yo(this.tokenizer.decoder),this.special_tokens=[],this.all_special_ids=[],this.added_tokens=[];let i=[],a=[];this.added_tokens_map=new Map;for(let e of this.tokenizer.added_tokens){let t=new Vi(e);if(this.added_tokens.push(t),this.model.tokens_to_ids.set(t.content,t.id),this.model.vocab[t.id]=t.content,t.special&&(this.special_tokens.push(t.content),this.all_special_ids.push(t.id)),this.added_tokens_map.set(t.content,t),t.normalized&&this.normalizer!==null){let e=this.normalizer(t.content);a.push(e),this.added_tokens_map.set(e,t)}else i.push(t.content)}(this.config.additional_special_tokens??[]).forEach(e=>{this.special_tokens.includes(e)||this.special_tokens.push(e)}),this.decoder&&(this.decoder.added_tokens=this.added_tokens,this.decoder.end_of_word_suffix=this.model.end_of_word_suffix),this.splitter_unnormalized=new Bi(i),this.splitter_normalized=new Bi(a),this.remove_space=this.config.remove_space,this.clean_up_tokenization_spaces=this.config.clean_up_tokenization_spaces??!0,this.do_lowercase_and_remove_accent=this.config.do_lowercase_and_remove_accent??!1}encode(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){let{tokens:i,token_type_ids:a}=this.tokenize_helper(e,{text_pair:t,add_special_tokens:n}),o=i.map(e=>this.added_tokens_map.get(e)?.id??this.model.tokens_to_ids.get(e)??this.model.unk_token_id),s={ids:o,tokens:i,attention_mask:Array(o.length).fill(1)};return r&&a&&(s.token_type_ids=a),s}decode(e,t={}){if(!Array.isArray(e)||e.length===0||!Qi(e[0]))throw Error(`token_ids must be a non-empty array of integers.`);let n=e.map(e=>this.model.vocab[Number(e)]??this.model.unk_token);t.skip_special_tokens&&(n=n.filter(e=>!this.special_tokens.includes(e)));let r=this.decoder?this.decoder(n):n.join(` `);return this.decoder&&this.decoder.end_of_word_suffix&&(r=r.replaceAll(this.decoder.end_of_word_suffix,` `),t.skip_special_tokens&&(r=r.trim())),(t.clean_up_tokenization_spaces??this.clean_up_tokenization_spaces)&&(r=qi(r)),r}tokenize(e,{text_pair:t=null,add_special_tokens:n=!1}={}){return this.tokenize_helper(e,{text_pair:t,add_special_tokens:n}).tokens}encode_text(e){if(e===null)return null;let t=this.splitter_unnormalized.split(e);return t.forEach((e,n)=>{let r=this.added_tokens_map.get(e);r&&(r.lstrip&&n>0&&(t[n-1]=t[n-1].trimEnd()),r.rstrip&&n{if(e.length===0)return[];if(this.added_tokens_map.has(e))return[e];if(this.remove_space===!0&&(e=e.trim().split(/\s+/).join(` `)),this.do_lowercase_and_remove_accent&&(e=ea(e)),this.normalizer!==null&&(e=this.normalizer(e)),e.length===0)return[];let n=this.splitter_normalized.split(e);return n.forEach((e,t)=>{let r=this.added_tokens_map.get(e);r&&(r.lstrip&&t>0&&(n[t-1]=n[t-1].trimEnd()),r.rstrip&&t{if(e.length===0)return[];if(this.added_tokens_map.has(e))return[e];let n=this.pre_tokenizer===null?[e]:this.pre_tokenizer(e,{section_index:t});return this.model(n)})})}tokenize_helper(e,{text_pair:t=null,add_special_tokens:n=!0}){let r=this.encode_text(e),i=this.encode_text(t||null);return this.post_processor?this.post_processor(r,i,n):{tokens:ta(r??[],i??[])}}token_to_id(e){return this.model.tokens_to_ids.get(e)}id_to_token(e){return this.model.vocab[e]}get_added_tokens_decoder(){let e=new Map;for(let t of this.added_tokens)e.set(t.id,t);return e}get_vocab(e=!0){let t=new Map;for(let n=0;n=`,k.ComparisonBinaryOperator],[`==`,k.ComparisonBinaryOperator],[`!=`,k.ComparisonBinaryOperator],[`<`,k.ComparisonBinaryOperator],[`>`,k.ComparisonBinaryOperator],[`+`,k.AdditiveBinaryOperator],[`-`,k.AdditiveBinaryOperator],[`~`,k.AdditiveBinaryOperator],[`*`,k.MultiplicativeBinaryOperator],[`/`,k.MultiplicativeBinaryOperator],[`%`,k.MultiplicativeBinaryOperator],[`=`,k.Equals]],Eo=new Map([[`n`,` +`],[`t`,` `],[`r`,`\r`],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`],[`'`,`'`],[`"`,`"`],[`\\`,`\\`]]);function Do(e,t={}){return e.endsWith(` +`)&&(e=e.slice(0,-1)),t.lstrip_blocks&&(e=e.replace(/^[ \t]*({[#%-])/gm,`$1`)),t.trim_blocks&&(e=e.replace(/([#%-]})\n/g,`$1`)),e.replace(/{%\s*(end)?generation\s*%}/gs,``)}function Oo(e,t={}){let n=[],r=Do(e,t),i=0,a=0,o=e=>{let t=``;for(;e(r[i]);){if(r[i]===`\\`){if(++i,i>=r.length)throw SyntaxError(`Unexpected end of input`);let e=r[i++],n=Eo.get(e);if(n===void 0)throw SyntaxError(`Unexpected escaped character: ${e}`);t+=n;continue}if(t+=r[i++],i>=r.length)throw SyntaxError(`Unexpected end of input`)}return t},s=()=>{let e=n.at(-1);e&&e.type===k.Text&&(e.value=e.value.trimEnd(),e.value===``&&n.pop())},c=()=>{for(;i0){n.push(new xo(e,k.Text));continue}}if(r[i]===`{`&&r[i+1]===`#`){i+=2;let e=r[i]===`-`;e&&++i;let t=``;for(;r[i]!==`#`||r[i+1]!==`}`;){if(i+2>=r.length)throw SyntaxError(`Missing end of comment tag`);t+=r[i++]}let a=t.endsWith(`-`);a&&(t=t.slice(0,-1)),e&&s(),n.push(new xo(t,k.Comment)),i+=2,a&&c();continue}if(r.slice(i,i+3)===`{%-`){s(),n.push(new xo(`{%`,k.OpenStatement)),i+=3;continue}if(r.slice(i,i+3)===`{{-`){s(),n.push(new xo(`{{`,k.OpenExpression)),a=0,i+=3;continue}if(o(wo),r.slice(i,i+3)===`-%}`){n.push(new xo(`%}`,k.CloseStatement)),i+=3,c();continue}if(r.slice(i,i+3)===`-}}`){n.push(new xo(`}}`,k.CloseExpression)),i+=3,c();continue}let t=r[i];if(t===`-`||t===`+`){let e=n.at(-1)?.type;if(e===k.Text||e===void 0)throw SyntaxError(`Unexpected character: ${t}`);switch(e){case k.Identifier:case k.NumericLiteral:case k.StringLiteral:case k.CloseParen:case k.CloseSquareBracket:break;default:{++i;let e=o(Co);n.push(new xo(`${t}${e}`,e.length>0?k.NumericLiteral:k.UnaryOperator));continue}}}for(let[e,t]of To)if(!(e===`}}`&&a>0)&&r.slice(i,i+e.length)===e){n.push(new xo(e,t)),t===k.OpenExpression?a=0:t===k.OpenCurlyBracket?++a:t===k.CloseCurlyBracket&&--a,i+=e.length;continue main}if(t===`'`||t===`"`){++i;let e=o(e=>e!==t);n.push(new xo(e,k.StringLiteral)),++i;continue}if(Co(t)){let e=o(Co);if(r[i]===`.`&&Co(r[i+1])){++i;let t=o(Co);e=`${e}.${t}`}n.push(new xo(e,k.NumericLiteral));continue}if(So(t)){let e=o(So);n.push(new xo(e,k.Identifier));continue}throw SyntaxError(`Unexpected character: ${t}`)}return n}var ko=class{type=`Statement`},Ao=class extends ko{constructor(e){super(),this.body=e}type=`Program`},jo=class extends ko{constructor(e,t,n){super(),this.test=e,this.body=t,this.alternate=n}type=`If`},Mo=class extends ko{constructor(e,t,n,r){super(),this.loopvar=e,this.iterable=t,this.body=n,this.defaultBlock=r}type=`For`},No=class extends ko{type=`Break`},Po=class extends ko{type=`Continue`},Fo=class extends ko{constructor(e,t,n){super(),this.assignee=e,this.value=t,this.body=n}type=`Set`},Io=class extends ko{constructor(e,t,n){super(),this.name=e,this.args=t,this.body=n}type=`Macro`},Lo=class extends ko{constructor(e){super(),this.value=e}type=`Comment`},Ro=class extends ko{type=`Expression`},zo=class extends Ro{constructor(e,t,n){super(),this.object=e,this.property=t,this.computed=n}type=`MemberExpression`},Bo=class extends Ro{constructor(e,t){super(),this.callee=e,this.args=t}type=`CallExpression`},Vo=class extends Ro{constructor(e){super(),this.value=e}type=`Identifier`},Ho=class extends Ro{constructor(e){super(),this.value=e}type=`Literal`},Uo=class extends Ho{type=`IntegerLiteral`},Wo=class extends Ho{type=`FloatLiteral`},Go=class extends Ho{type=`StringLiteral`},Ko=class extends Ho{type=`ArrayLiteral`},qo=class extends Ho{type=`TupleLiteral`},Jo=class extends Ho{type=`ObjectLiteral`},Yo=class extends Ro{constructor(e,t,n){super(),this.operator=e,this.left=t,this.right=n}type=`BinaryExpression`},Xo=class extends Ro{constructor(e,t){super(),this.operand=e,this.filter=t}type=`FilterExpression`},Zo=class extends ko{constructor(e,t){super(),this.filter=e,this.body=t}type=`FilterStatement`},Qo=class extends Ro{constructor(e,t){super(),this.lhs=e,this.test=t}type=`SelectExpression`},$o=class extends Ro{constructor(e,t,n){super(),this.operand=e,this.negate=t,this.test=n}type=`TestExpression`},es=class extends Ro{constructor(e,t){super(),this.operator=e,this.argument=t}type=`UnaryExpression`},ts=class extends Ro{constructor(e=void 0,t=void 0,n=void 0){super(),this.start=e,this.stop=t,this.step=n}type=`SliceExpression`},ns=class extends Ro{constructor(e,t){super(),this.key=e,this.value=t}type=`KeywordArgumentExpression`},rs=class extends Ro{constructor(e){super(),this.argument=e}type=`SpreadExpression`},is=class extends ko{constructor(e,t,n){super(),this.call=e,this.callerArgs=t,this.body=n}type=`CallStatement`},as=class extends Ro{constructor(e,t,n){super(),this.condition=e,this.trueExpr=t,this.falseExpr=n}type=`Ternary`};function os(e){let t=new Ao([]),n=0;function r(t,r){let i=e[n++];if(!i||i.type!==t)throw Error(`Parser Error: ${r}. ${i.type} !== ${t}.`);return i}function i(e){if(!c(e))throw SyntaxError(`Expected ${e}`);++n}function a(){switch(e[n].type){case k.Comment:return new Lo(e[n++].value);case k.Text:return l();case k.OpenStatement:return u();case k.OpenExpression:return d();default:throw SyntaxError(`Unexpected token type: ${e[n].type}`)}}function o(...t){return n+t.length<=e.length&&t.every((t,r)=>t===e[n+r].type)}function s(...t){return e[n]?.type===k.OpenStatement&&e[n+1]?.type===k.Identifier&&t.includes(e[n+1]?.value)}function c(...t){return n+t.length<=e.length&&t.every((t,r)=>e[n+r].type===`Identifier`&&t===e[n+r].value)}function l(){return new Go(r(k.Text,`Expected text token`).value)}function u(){if(r(k.OpenStatement,`Expected opening statement token`),e[n].type!==k.Identifier)throw SyntaxError(`Unknown statement, got ${e[n].type}`);let t=e[n].value,c;switch(t){case`set`:++n,c=f();break;case`if`:++n,c=p(),r(k.OpenStatement,`Expected {% token`),i(`endif`),r(k.CloseStatement,`Expected %} token`);break;case`macro`:++n,c=m(),r(k.OpenStatement,`Expected {% token`),i(`endmacro`),r(k.CloseStatement,`Expected %} token`);break;case`for`:++n,c=g(),r(k.OpenStatement,`Expected {% token`),i(`endfor`),r(k.CloseStatement,`Expected %} token`);break;case`call`:{++n;let e=null;o(k.OpenParen)&&(e=ee());let t=ae();if(t.type!==`Identifier`)throw SyntaxError(`Expected identifier following call statement`);let l=ee();r(k.CloseStatement,`Expected closing statement token`);let u=[];for(;!s(`endcall`);)u.push(a());r(k.OpenStatement,`Expected '{%'`),i(`endcall`),r(k.CloseStatement,`Expected closing statement token`),c=new is(new Bo(t,l),e,u);break}case`break`:++n,r(k.CloseStatement,`Expected closing statement token`),c=new No;break;case`continue`:++n,r(k.CloseStatement,`Expected closing statement token`),c=new Po;break;case`filter`:{++n;let e=ae();e instanceof Vo&&o(k.OpenParen)&&(e=T(e)),r(k.CloseStatement,`Expected closing statement token`);let t=[];for(;!s(`endfilter`);)t.push(a());r(k.OpenStatement,`Expected '{%'`),i(`endfilter`),r(k.CloseStatement,`Expected '%}'`),c=new Zo(e,t);break}default:throw SyntaxError(`Unknown statement type: ${t}`)}return c}function d(){r(k.OpenExpression,`Expected opening expression token`);let e=_();return r(k.CloseExpression,`Expected closing expression token`),e}function f(){let e=h(),t=null,c=[];if(o(k.Equals))++n,t=h();else{for(r(k.CloseStatement,`Expected %} token`);!s(`endset`);)c.push(a());r(k.OpenStatement,`Expected {% token`),i(`endset`)}return r(k.CloseStatement,`Expected closing statement token`),new Fo(e,t,c)}function p(){let e=_();r(k.CloseStatement,`Expected closing statement token`);let t=[],i=[];for(;!s(`elif`,`else`,`endif`);)t.push(a());if(s(`elif`)){++n,++n;let e=p();i.push(e)}else if(s(`else`))for(++n,++n,r(k.CloseStatement,`Expected closing statement token`);!s(`endif`);)i.push(a());return new jo(e,t,i)}function m(){let e=ae();if(e.type!==`Identifier`)throw SyntaxError(`Expected identifier following macro statement`);let t=ee();r(k.CloseStatement,`Expected closing statement token`);let n=[];for(;!s(`endmacro`);)n.push(a());return new Io(e,t,n)}function h(e=!1){let t=e?ae:_,r=[t()],i=o(k.Comma);for(;i&&(++n,r.push(t()),o(k.Comma)););return i?new qo(r):r[0]}function g(){let e=h(!0);if(!(e instanceof Vo||e instanceof qo))throw SyntaxError(`Expected identifier/tuple for the loop variable, got ${e.type} instead`);if(!c(`in`))throw SyntaxError("Expected `in` keyword following loop variable");++n;let t=_();r(k.CloseStatement,`Expected closing statement token`);let i=[];for(;!s(`endfor`,`else`);)i.push(a());let o=[];if(s(`else`))for(++n,++n,r(k.CloseStatement,`Expected closing statement token`);!s(`endfor`);)o.push(a());return new Mo(e,t,i,o)}function _(){return v()}function v(){let e=y();if(c(`if`)){++n;let t=y();return c(`else`)?(++n,new as(t,e,v())):new Qo(e,t)}return e}function y(){let t=b();for(;c(`or`);){let r=e[n];++n;let i=b();t=new Yo(r,t,i)}return t}function b(){let t=x();for(;c(`and`);){let r=e[n];++n;let i=x();t=new Yo(r,t,i)}return t}function x(){let t;for(;c(`not`);){let r=e[n];++n,t=new es(r,x())}return t??S()}function S(){let t=C();for(;;){let r;if(c(`not`,`in`))r=new xo(`not in`,k.Identifier),n+=2;else if(c(`in`))r=e[n++];else if(o(k.ComparisonBinaryOperator))r=e[n++];else break;let i=C();t=new Yo(r,t,i)}return t}function C(){let t=D();for(;o(k.AdditiveBinaryOperator);){let r=e[n];++n;let i=D();t=new Yo(r,t,i)}return t}function w(){let e=E(ae());return o(k.OpenParen)?T(e):e}function T(e){let t=new Bo(e,ee());return t=E(t),o(k.OpenParen)&&(t=T(t)),t}function ee(){r(k.OpenParen,`Expected opening parenthesis for arguments list`);let e=te();return r(k.CloseParen,`Expected closing parenthesis for arguments list`),e}function te(){let t=[];for(;!o(k.CloseParen);){let r;if(e[n].type===k.MultiplicativeBinaryOperator&&e[n].value===`*`)++n,r=new rs(_());else if(r=_(),o(k.Equals)){if(++n,!(r instanceof Vo))throw SyntaxError(`Expected identifier for keyword argument`);let e=_();r=new ns(r,e)}t.push(r),o(k.Comma)&&++n}return t}function ne(){let e=[],t=!1;for(;!o(k.CloseSquareBracket);)o(k.Colon)?(e.push(void 0),++n,t=!0):(e.push(_()),o(k.Colon)&&(++n,t=!0));if(e.length===0)throw SyntaxError(`Expected at least one argument for member/slice expression`);if(t){if(e.length>3)throw SyntaxError(`Expected 0-3 arguments for slice expression`);return new ts(...e)}return e[0]}function E(t){for(;o(k.Dot)||o(k.OpenSquareBracket);){let i=e[n];++n;let a,o=i.type===k.OpenSquareBracket;if(o)a=ne(),r(k.CloseSquareBracket,`Expected closing square bracket`);else if(a=ae(),a.type!==`Identifier`)throw SyntaxError(`Expected identifier following dot operator`);t=new zo(t,a,o)}return t}function D(){let t=re();for(;o(k.MultiplicativeBinaryOperator);){let r=e[n++],i=re();t=new Yo(r,t,i)}return t}function re(){let e=ie();for(;c(`is`);){++n;let t=c(`not`);t&&++n;let r=ae();if(!(r instanceof Vo))throw SyntaxError(`Expected identifier for the test`);e=new $o(e,t,r)}return e}function ie(){let e=w();for(;o(k.Pipe);){++n;let t=ae();if(!(t instanceof Vo))throw SyntaxError(`Expected identifier for the filter`);o(k.OpenParen)&&(t=T(t)),e=new Xo(e,t)}return e}function ae(){let t=e[n++];switch(t.type){case k.NumericLiteral:{let e=t.value;return e.includes(`.`)?new Wo(Number(e)):new Uo(Number(e))}case k.StringLiteral:{let r=t.value;for(;o(k.StringLiteral);)r+=e[n++].value;return new Go(r)}case k.Identifier:return new Vo(t.value);case k.OpenParen:{let e=h();return r(k.CloseParen,"Expected closing parenthesis, got ${tokens[current].type} instead."),e}case k.OpenSquareBracket:{let e=[];for(;!o(k.CloseSquareBracket);)e.push(_()),o(k.Comma)&&++n;return++n,new Ko(e)}case k.OpenCurlyBracket:{let e=new Map;for(;!o(k.CloseCurlyBracket);){let t=_();r(k.Colon,`Expected colon between key and value in object literal`);let i=_();e.set(t,i),o(k.Comma)&&++n}return++n,new Jo(e)}default:throw SyntaxError(`Unexpected token: ${t.type}`)}}for(;n0)for(let i=e;it;i+=n)r.push(i);return r}function cs(e,t,n,r=1){let i=Math.sign(r);i>=0?(t=(t??=0)<0?Math.max(e.length+t,0):Math.min(t,e.length),n=(n??=e.length)<0?Math.max(e.length+n,0):Math.min(n,e.length)):(t=(t??=e.length-1)<0?Math.max(e.length+t,-1):Math.min(t,e.length-1),n=(n??=-1)<-1?Math.max(e.length+n,-1):Math.min(n,e.length-1));let a=[];for(let o=t;i*oe.toUpperCase())}function us(e){return ds(new Date,e)}function ds(e,t){let n=new Intl.DateTimeFormat(void 0,{month:`long`}),r=new Intl.DateTimeFormat(void 0,{month:`short`}),i=e=>e<10?`0`+e:e.toString();return t.replace(/%[YmdbBHM%]/g,t=>{switch(t){case`%Y`:return e.getFullYear().toString();case`%m`:return i(e.getMonth()+1);case`%d`:return i(e.getDate());case`%b`:return r.format(e);case`%B`:return n.format(e);case`%H`:return i(e.getHours());case`%M`:return i(e.getMinutes());case`%%`:return`%`;default:return t}})}function fs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ps(e,t,n,r){if(r===0)return e;let i=r==null||r<0?1/0:r,a=t.length===0?RegExp(`(?=)`,`gu`):new RegExp(fs(t),`gu`);return e.replaceAll(a,e=>i>0?(--i,n):e)}var ms=class extends Error{},hs=class extends Error{},gs=class{type=`RuntimeValue`;value;builtins=new Map;constructor(e=void 0){this.value=e}__bool__(){return new bs(!!this.value)}toString(){return String(this.value)}},_s=class extends gs{type=`IntegerValue`},vs=class extends gs{type=`FloatValue`;toString(){return this.value%1==0?this.value.toFixed(1):this.value.toString()}},ys=class extends gs{type=`StringValue`;builtins=new Map([[`upper`,new Os(()=>new ys(this.value.toUpperCase()))],[`lower`,new Os(()=>new ys(this.value.toLowerCase()))],[`strip`,new Os(()=>new ys(this.value.trim()))],[`title`,new Os(()=>new ys(ls(this.value)))],[`capitalize`,new Os(()=>new ys(this.value.charAt(0).toUpperCase()+this.value.slice(1)))],[`length`,new _s(this.value.length)],[`rstrip`,new Os(()=>new ys(this.value.trimEnd()))],[`lstrip`,new Os(()=>new ys(this.value.trimStart()))],[`startswith`,new Os(e=>{if(e.length===0)throw Error(`startswith() requires at least one argument`);let t=e[0];if(t instanceof ys)return new bs(this.value.startsWith(t.value));if(t instanceof Es){for(let e of t.value){if(!(e instanceof ys))throw Error(`startswith() tuple elements must be strings`);if(this.value.startsWith(e.value))return new bs(!0)}return new bs(!1)}throw Error(`startswith() argument must be a string or tuple of strings`)})],[`endswith`,new Os(e=>{if(e.length===0)throw Error(`endswith() requires at least one argument`);let t=e[0];if(t instanceof ys)return new bs(this.value.endsWith(t.value));if(t instanceof Es){for(let e of t.value){if(!(e instanceof ys))throw Error(`endswith() tuple elements must be strings`);if(this.value.endsWith(e.value))return new bs(!0)}return new bs(!1)}throw Error(`endswith() argument must be a string or tuple of strings`)})],[`split`,new Os(e=>{let t=e[0]??new ks;if(!(t instanceof ys||t instanceof ks))throw Error(`sep argument must be a string or null`);let n=e[1]??new _s(-1);if(!(n instanceof _s))throw Error(`maxsplit argument must be a number`);let r=[];if(t instanceof ks){let e=this.value.trimStart();for(let{0:t,index:i}of e.matchAll(/\S+/g)){if(n.value!==-1&&r.length>=n.value&&i!==void 0){r.push(t+e.slice(i+t.length));break}r.push(t)}}else{if(t.value===``)throw Error(`empty separator`);r=this.value.split(t.value),n.value!==-1&&r.length>n.value&&r.push(r.splice(n.value).join(t.value))}return new Es(r.map(e=>new ys(e)))})],[`replace`,new Os(e=>{if(e.length<2)throw Error(`replace() requires at least two arguments`);let t=e[0],n=e[1];if(!(t instanceof ys&&n instanceof ys))throw Error(`replace() arguments must be strings`);let r;if(r=e.length>2?e[2].type===`KeywordArgumentsValue`?e[2].value.get(`count`)??new ks:e[2]:new ks,!(r instanceof _s||r instanceof ks))throw Error(`replace() count argument must be a number or null`);return new ys(ps(this.value,t.value,n.value,r.value))})]])},bs=class extends gs{type=`BooleanValue`},xs=/[\x7f-\uffff]/g;function Ss(e){return e.replace(xs,e=>`\\u`+e.charCodeAt(0).toString(16).padStart(4,`0`))}function Cs(e,t={},n=0,r=!0){let{indent:i=null,ensureAscii:a=!1,separators:o=null,sortKeys:s=!1}=t,c,l;switch(o?[c,l]=o:i?(c=`,`,l=`: `):(c=`, `,l=`: `),e.type){case`NullValue`:return`null`;case`UndefinedValue`:return r?`null`:`undefined`;case`IntegerValue`:case`FloatValue`:case`BooleanValue`:return JSON.stringify(e.value);case`StringValue`:{let t=JSON.stringify(e.value);return a&&(t=Ss(t)),t}case`ArrayValue`:case`ObjectValue`:{let o=i?` `.repeat(i):``,u=` +`+o.repeat(n),d=u+o;if(e.type===`ArrayValue`){let a=e.value.map(e=>Cs(e,t,n+1,r));return i?`[${d}${a.join(`${c}${d}`)}${u}]`:`[${a.join(c)}]`}else{let o=Array.from(e.value.entries());s&&(o=o.sort(([e],[t])=>e.localeCompare(t)));let f=o.map(([e,o])=>{let s=JSON.stringify(e);a&&(s=Ss(s));let c=`${s}${l}${Cs(o,t,n+1,r)}`;return i?`${d}${c}`:c});return i?`{${f.join(c)}${u}}`:`{${f.join(c)}}`}}default:throw Error(`Cannot convert to JSON: ${e.type}`)}}var ws=class extends gs{type=`ObjectValue`;__bool__(){return new bs(this.value.size>0)}builtins=new Map([[`get`,new Os(([e,t])=>{if(!(e instanceof ys))throw Error(`Object key must be a string: got ${e.type}`);return this.value.get(e.value)??t??new ks})],[`items`,new Os(()=>this.items())],[`keys`,new Os(()=>this.keys())],[`values`,new Os(()=>this.values())],[`dictsort`,new Os(e=>{let t=new Map,n=e.filter(e=>e instanceof Ts?(t=e.value,!1):!0),r=n.at(0)??t.get(`case_sensitive`)??new bs(!1);if(!(r instanceof bs))throw Error(`case_sensitive must be a boolean`);let i=n.at(1)??t.get(`by`)??new ys(`key`);if(!(i instanceof ys))throw Error(`by must be a string`);if(![`key`,`value`].includes(i.value))throw Error(`by must be either 'key' or 'value'`);let a=n.at(2)??t.get(`reverse`)??new bs(!1);if(!(a instanceof bs))throw Error(`reverse must be a boolean`);return new Es(Array.from(this.value.entries()).map(([e,t])=>new Es([new ys(e),t])).sort((e,t)=>{let n=i.value===`key`?0:1,o=e.value[n],s=t.value[n],c=Ps(o,s,r.value);return a.value?-c:c}))})]]);items(){return new Es(Array.from(this.value.entries()).map(([e,t])=>new Es([new ys(e),t])))}keys(){return new Es(Array.from(this.value.keys()).map(e=>new ys(e)))}values(){return new Es(Array.from(this.value.values()))}toString(){return Cs(this,{},0,!1)}},Ts=class extends ws{type=`KeywordArgumentsValue`},Es=class extends gs{type=`ArrayValue`;builtins=new Map([[`length`,new _s(this.value.length)]]);__bool__(){return new bs(this.value.length>0)}toString(){return Cs(this,{},0,!1)}},Ds=class extends Es{type=`TupleValue`},Os=class extends gs{type=`FunctionValue`},ks=class extends gs{type=`NullValue`},As=class extends gs{type=`UndefinedValue`},js=class{constructor(e){this.parent=e}variables=new Map([[`namespace`,new Os(e=>{if(e.length===0)return new ws(new Map);if(e.length!==1||!(e[0]instanceof ws))throw Error("`namespace` expects either zero arguments or a single object argument");return e[0]})]]);tests=new Map([[`boolean`,e=>e.type===`BooleanValue`],[`callable`,e=>e instanceof Os],[`odd`,e=>{if(!(e instanceof _s))throw Error(`cannot odd on ${e.type}`);return e.value%2!=0}],[`even`,e=>{if(!(e instanceof _s))throw Error(`cannot even on ${e.type}`);return e.value%2==0}],[`false`,e=>e.type===`BooleanValue`&&!e.value],[`true`,e=>e.type===`BooleanValue`&&e.value],[`none`,e=>e.type===`NullValue`],[`string`,e=>e.type===`StringValue`],[`number`,e=>e instanceof _s||e instanceof vs],[`integer`,e=>e instanceof _s],[`iterable`,e=>e.type===`ArrayValue`||e.type===`StringValue`],[`mapping`,e=>e instanceof ws],[`sequence`,e=>e instanceof Es||e instanceof ws||e instanceof ys],[`lower`,e=>{let t=e.value;return e.type===`StringValue`&&t===t.toLowerCase()}],[`upper`,e=>{let t=e.value;return e.type===`StringValue`&&t===t.toUpperCase()}],[`none`,e=>e.type===`NullValue`],[`defined`,e=>e.type!==`UndefinedValue`],[`undefined`,e=>e.type===`UndefinedValue`],[`equalto`,(e,t)=>e.value===t.value],[`eq`,(e,t)=>e.value===t.value]]);set(e,t){return this.declareVariable(e,Is(t))}declareVariable(e,t){if(this.variables.has(e))throw SyntaxError(`Variable already declared: ${e}`);return this.variables.set(e,t),t}setVariable(e,t){return this.variables.set(e,t),t}resolve(e){if(this.variables.has(e))return this;if(this.parent)return this.parent.resolve(e);throw Error(`Unknown variable: ${e}`)}lookupVariable(e){try{return this.resolve(e).variables.get(e)??new As}catch{return new As}}};function Ms(e){e.set(`false`,!1),e.set(`true`,!0),e.set(`none`,null),e.set(`raise_exception`,e=>{throw Error(e)}),e.set(`range`,ss),e.set(`strftime_now`,us),e.set(`True`,!0),e.set(`False`,!1),e.set(`None`,null)}function Ns(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r instanceof ws)r=r.value.get(e)??new As;else if(r instanceof Es){let t=parseInt(e,10);if(!isNaN(t)&&t>=0&&te instanceof _s||e instanceof vs||e instanceof bs,i=e=>e instanceof bs?e.value?1:0:e.value;if(r(e)&&r(t)){let n=i(e),r=i(t);return nr?1:0}if(e.type!==t.type)throw Error(`Cannot compare different types: ${e.type} and ${t.type}`);switch(e.type){case`StringValue`:{let r=e.value,i=t.value;return n||(r=r.toLowerCase(),i=i.toLowerCase()),ri?1:0}default:throw Error(`Cannot compare type: ${e.type}`)}}var Fs=class{global;constructor(e){this.global=e??new js}run(e){return this.evaluate(e,this.global)}evaluateBinaryExpression(e,t){let n=this.evaluate(e.left,t);switch(e.operator.value){case`and`:return n.__bool__().value?this.evaluate(e.right,t):n;case`or`:return n.__bool__().value?n:this.evaluate(e.right,t)}let r=this.evaluate(e.right,t);switch(e.operator.value){case`==`:return new bs(n.value==r.value);case`!=`:return new bs(n.value!=r.value)}if(n instanceof As||r instanceof As){if(r instanceof As&&[`in`,`not in`].includes(e.operator.value))return new bs(e.operator.value===`not in`);throw Error(`Cannot perform operation ${e.operator.value} on undefined values`)}else if(n instanceof ks||r instanceof ks)throw Error(`Cannot perform operation on null values`);else if(e.operator.value===`~`)return new ys(n.value.toString()+r.value.toString());else if((n instanceof _s||n instanceof vs)&&(r instanceof _s||r instanceof vs)){let t=n.value,i=r.value;switch(e.operator.value){case`+`:case`-`:case`*`:{let a=e.operator.value===`+`?t+i:e.operator.value===`-`?t-i:t*i;return n instanceof vs||r instanceof vs?new vs(a):new _s(a)}case`/`:return new vs(t/i);case`%`:{let e=t%i;return n instanceof vs||r instanceof vs?new vs(e):new _s(e)}case`<`:return new bs(t`:return new bs(t>i);case`>=`:return new bs(t>=i);case`<=`:return new bs(t<=i)}}else if(n instanceof Es&&r instanceof Es)switch(e.operator.value){case`+`:return new Es(n.value.concat(r.value))}else if(r instanceof Es){let t=r.value.find(e=>e.value===n.value)!==void 0;switch(e.operator.value){case`in`:return new bs(t);case`not in`:return new bs(!t)}}if(n instanceof ys||r instanceof ys)switch(e.operator.value){case`+`:return new ys(n.value.toString()+r.value.toString())}if(n instanceof ys&&r instanceof ys)switch(e.operator.value){case`in`:return new bs(r.value.includes(n.value));case`not in`:return new bs(!r.value.includes(n.value))}if(n instanceof ys&&r instanceof ws)switch(e.operator.value){case`in`:return new bs(r.value.has(n.value));case`not in`:return new bs(!r.value.has(n.value))}throw SyntaxError(`Unknown operator "${e.operator.value}" between ${n.type} and ${r.type}`)}evaluateArguments(e,t){let n=[],r=new Map;for(let i of e)if(i.type===`SpreadExpression`){let e=i,r=this.evaluate(e.argument,t);if(!(r instanceof Es))throw Error(`Cannot unpack non-iterable type: ${r.type}`);for(let e of r.value)n.push(e)}else if(i.type===`KeywordArgumentExpression`){let e=i;r.set(e.key.value,this.evaluate(e.value,t))}else{if(r.size>0)throw Error(`Positional arguments must come before keyword arguments`);n.push(this.evaluate(i,t))}return[n,r]}applyFilter(e,t,n){if(t.type===`Identifier`){let r=t;if(r.value===`safe`)return e;if(r.value===`tojson`)return new ys(Cs(e,{}));if(e instanceof Es)switch(r.value){case`list`:return e;case`first`:return e.value[0];case`last`:return e.value[e.value.length-1];case`length`:return new _s(e.value.length);case`reverse`:return new Es(e.value.slice().reverse());case`sort`:return new Es(e.value.slice().sort((e,t)=>Ps(e,t,!1)));case`join`:return new ys(e.value.map(e=>e.value).join(``));case`string`:return new ys(Cs(e,{},0,!1));case`unique`:{let t=new Set,n=[];for(let r of e.value)t.has(r.value)||(t.add(r.value),n.push(r));return new Es(n)}default:throw Error(`Unknown ArrayValue filter: ${r.value}`)}else if(e instanceof ys)switch(r.value){case`length`:case`upper`:case`lower`:case`title`:case`capitalize`:{let t=e.builtins.get(r.value);if(t instanceof Os)return t.value([],n);if(t instanceof _s)return t;throw Error(`Unknown StringValue filter: ${r.value}`)}case`trim`:return new ys(e.value.trim());case`indent`:return new ys(e.value.split(` +`).map((e,t)=>t===0||e.length===0?e:` `+e).join(` +`));case`join`:case`string`:return e;case`int`:{let t=parseInt(e.value,10);return new _s(isNaN(t)?0:t)}case`float`:{let t=parseFloat(e.value);return new vs(isNaN(t)?0:t)}default:throw Error(`Unknown StringValue filter: ${r.value}`)}else if(e instanceof _s||e instanceof vs)switch(r.value){case`abs`:return e instanceof _s?new _s(Math.abs(e.value)):new vs(Math.abs(e.value));case`int`:return new _s(Math.floor(e.value));case`float`:return new vs(e.value);case`string`:return new ys(e.toString());default:throw Error(`Unknown NumericValue filter: ${r.value}`)}else if(e instanceof ws)switch(r.value){case`items`:return new Es(Array.from(e.value.entries()).map(([e,t])=>new Es([new ys(e),t])));case`length`:return new _s(e.value.size);default:{let t=e.builtins.get(r.value);if(t)return t instanceof Os?t.value([],n):t;throw Error(`Unknown ObjectValue filter: ${r.value}`)}}else if(e instanceof bs)switch(r.value){case`bool`:return new bs(e.value);case`int`:return new _s(e.value?1:0);case`float`:return new vs(e.value?1:0);case`string`:return new ys(e.value?`true`:`false`);default:throw Error(`Unknown BooleanValue filter: ${r.value}`)}throw Error(`Cannot apply filter "${r.value}" to type: ${e.type}`)}else if(t.type===`CallExpression`){let r=t;if(r.callee.type!==`Identifier`)throw Error(`Unknown filter: ${r.callee.type}`);let i=r.callee.value;if(i===`tojson`){let[,t]=this.evaluateArguments(r.args,n),i=t.get(`indent`)??new ks;if(!(i instanceof _s||i instanceof ks))throw Error(`If set, indent must be a number`);let a=t.get(`ensure_ascii`)??new bs(!1);if(!(a instanceof bs))throw Error(`If set, ensure_ascii must be a boolean`);let o=t.get(`sort_keys`)??new bs(!1);if(!(o instanceof bs))throw Error(`If set, sort_keys must be a boolean`);let s=t.get(`separators`)??new ks,c=null;if(s instanceof Es||s instanceof Ds){if(s.value.length!==2)throw Error(`separators must be a tuple of two strings`);let[e,t]=s.value;if(!(e instanceof ys)||!(t instanceof ys))throw Error(`separators must be a tuple of two strings`);c=[e.value,t.value]}else if(!(s instanceof ks))throw Error(`If set, separators must be a tuple of two strings`);return new ys(Cs(e,{indent:i.value,ensureAscii:a.value,sortKeys:o.value,separators:c}))}else if(i===`join`){let t;if(e instanceof ys)t=Array.from(e.value);else if(e instanceof Es)t=e.value.map(e=>e.value);else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`);let[a,o]=this.evaluateArguments(r.args,n),s=a.at(0)??o.get(`separator`)??new ys(``);if(!(s instanceof ys))throw Error(`separator must be a string`);return new ys(t.join(s.value))}else if(i===`int`||i===`float`){let[t,a]=this.evaluateArguments(r.args,n),o=t.at(0)??a.get(`default`)??(i===`int`?new _s(0):new vs(0));if(e instanceof ys){let t=i===`int`?parseInt(e.value,10):parseFloat(e.value);return isNaN(t)?o:i===`int`?new _s(t):new vs(t)}else if(e instanceof _s||e instanceof vs)return e;else if(e instanceof bs)return i===`int`?new _s(e.value?1:0):new vs(e.value?1:0);else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`)}else if(i===`default`){let[t,i]=this.evaluateArguments(r.args,n),a=t[0]??new ys(``),o=t[1]??i.get(`boolean`)??new bs(!1);if(!(o instanceof bs))throw Error("`default` filter flag must be a boolean");return e instanceof As||o.value&&!e.__bool__().value?a:e}if(e instanceof Es){switch(i){case`sort`:{let[t,i]=this.evaluateArguments(r.args,n),a=t.at(0)??i.get(`reverse`)??new bs(!1);if(!(a instanceof bs))throw Error(`reverse must be a boolean`);let o=t.at(1)??i.get(`case_sensitive`)??new bs(!1);if(!(o instanceof bs))throw Error(`case_sensitive must be a boolean`);let s=t.at(2)??i.get(`attribute`)??new ks;if(!(s instanceof ys||s instanceof _s||s instanceof ks))throw Error(`attribute must be a string, integer, or null`);let c=e=>s instanceof ks?e:Ns(e,s instanceof _s?String(s.value):s.value);return new Es(e.value.slice().sort((e,t)=>{let n=Ps(c(e),c(t),o.value);return a.value?-n:n}))}case`selectattr`:case`rejectattr`:{let t=i===`selectattr`;if(e.value.some(e=>!(e instanceof ws)))throw Error(`\`${i}\` can only be applied to array of objects`);if(r.args.some(e=>e.type!==`StringLiteral`))throw Error(`arguments of \`${i}\` must be strings`);let[a,o,s]=r.args.map(e=>this.evaluate(e,n)),c;if(o){let e=n.tests.get(o.value);if(!e)throw Error(`Unknown test: ${o.value}`);c=e}else c=(...e)=>e[0].__bool__().value;return new Es(e.value.filter(e=>{let n=e.value.get(a.value),r=n?c(n,s):!1;return t?r:!r}))}case`map`:{let[,t]=this.evaluateArguments(r.args,n);if(t.has(`attribute`)){let n=t.get(`attribute`);if(!(n instanceof ys))throw Error(`attribute must be a string`);let r=t.get(`default`);return new Es(e.value.map(e=>{if(!(e instanceof ws))throw Error(`items in map must be an object`);let t=Ns(e,n.value);return t instanceof As?r??new As:t}))}else throw Error("`map` expressions without `attribute` set are not currently supported.")}}throw Error(`Unknown ArrayValue filter: ${i}`)}else if(e instanceof ys){switch(i){case`indent`:{let[t,i]=this.evaluateArguments(r.args,n),a=t.at(0)??i.get(`width`)??new _s(4);if(!(a instanceof _s))throw Error(`width must be a number`);let o=t.at(1)??i.get(`first`)??new bs(!1),s=t.at(2)??i.get(`blank`)??new bs(!1),c=e.value.split(` +`),l=` `.repeat(a.value);return new ys(c.map((e,t)=>!o.value&&t===0||!s.value&&e.length===0?e:l+e).join(` +`))}case`replace`:{let t=e.builtins.get(`replace`);if(!(t instanceof Os))throw Error(`replace filter not available`);let[i,a]=this.evaluateArguments(r.args,n);return t.value([...i,new Ts(a)],n)}}throw Error(`Unknown StringValue filter: ${i}`)}else if(e instanceof ws){let t=e.builtins.get(i);if(t&&t instanceof Os){let[e,i]=this.evaluateArguments(r.args,n);return i.size>0&&e.push(new Ts(i)),t.value(e,n)}throw Error(`Unknown ObjectValue filter: ${i}`)}else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`)}throw Error(`Unknown filter: ${t.type}`)}evaluateFilterExpression(e,t){let n=this.evaluate(e.operand,t);return this.applyFilter(n,e.filter,t)}evaluateTestExpression(e,t){let n=this.evaluate(e.operand,t),r=t.tests.get(e.test.value);if(!r)throw Error(`Unknown test: ${e.test.value}`);let i=r(n);return new bs(e.negate?!i:i)}evaluateSelectExpression(e,t){return this.evaluate(e.test,t).__bool__().value?this.evaluate(e.lhs,t):new As}evaluateUnaryExpression(e,t){let n=this.evaluate(e.argument,t);switch(e.operator.value){case`not`:return new bs(!n.value);default:throw SyntaxError(`Unknown operator: ${e.operator.value}`)}}evaluateTernaryExpression(e,t){return this.evaluate(e.condition,t).__bool__().value?this.evaluate(e.trueExpr,t):this.evaluate(e.falseExpr,t)}evalProgram(e,t){return this.evaluateBlock(e.body,t)}evaluateBlock(e,t){let n=``;for(let r of e){let e=this.evaluate(r,t);e.type!==`NullValue`&&e.type!==`UndefinedValue`&&(n+=e.toString())}return new ys(n)}evaluateIdentifier(e,t){return t.lookupVariable(e.value)}evaluateCallExpression(e,t){let[n,r]=this.evaluateArguments(e.args,t);r.size>0&&n.push(new Ts(r));let i=this.evaluate(e.callee,t);if(i.type!==`FunctionValue`)throw Error(`Cannot call something that is not a function: got ${i.type}`);return i.value(n,t)}evaluateSliceExpression(e,t,n){if(!(e instanceof Es||e instanceof ys))throw Error(`Slice object must be an array or string`);let r=this.evaluate(t.start,n),i=this.evaluate(t.stop,n),a=this.evaluate(t.step,n);if(!(r instanceof _s||r instanceof As))throw Error(`Slice start must be numeric or undefined`);if(!(i instanceof _s||i instanceof As))throw Error(`Slice stop must be numeric or undefined`);if(!(a instanceof _s||a instanceof As))throw Error(`Slice step must be numeric or undefined`);return e instanceof Es?new Es(cs(e.value,r.value,i.value,a.value)):new ys(cs(Array.from(e.value),r.value,i.value,a.value).join(``))}evaluateMemberExpression(e,t){let n=this.evaluate(e.object,t),r;if(e.computed){if(e.property.type===`SliceExpression`)return this.evaluateSliceExpression(n,e.property,t);r=this.evaluate(e.property,t)}else r=new ys(e.property.value);let i;if(n instanceof ws){if(!(r instanceof ys))throw Error(`Cannot access property with non-string: got ${r.type}`);i=n.value.get(r.value)??n.builtins.get(r.value)}else if(n instanceof Es||n instanceof ys)if(r instanceof _s)i=n.value.at(r.value),n instanceof ys&&(i=new ys(n.value.at(r.value)));else if(r instanceof ys)i=n.builtins.get(r.value);else throw Error(`Cannot access property with non-string/non-number: got ${r.type}`);else{if(!(r instanceof ys))throw Error(`Cannot access property with non-string: got ${r.type}`);i=n.builtins.get(r.value)}return i instanceof gs?i:new As}evaluateSet(e,t){let n=e.value?this.evaluate(e.value,t):this.evaluateBlock(e.body,t);if(e.assignee.type===`Identifier`){let r=e.assignee.value;t.setVariable(r,n)}else if(e.assignee.type===`TupleLiteral`){let r=e.assignee;if(!(n instanceof Es))throw Error(`Cannot unpack non-iterable type in set: ${n.type}`);let i=n.value;if(i.length!==r.value.length)throw Error(`Too ${r.value.length>i.length?`few`:`many`} items to unpack in set`);for(let e=0;et.setVariable(e.loopvar.value,c);else if(e.loopvar.type===`TupleLiteral`){let t=e.loopvar;if(c.type!==`ArrayValue`)throw Error(`Cannot unpack non-iterable type: ${c.type}`);let n=c;if(t.value.length!==n.value.length)throw Error(`Too ${t.value.length>n.value.length?`few`:`many`} items to unpack`);l=e=>{for(let r=0;r0?a[t-1]:new As],[`nextitem`,t{let r=new js(n);t=t.slice();let i;t.at(-1)?.type===`KeywordArgumentsValue`&&(i=t.pop());for(let n=0;n{let r=new js(n);if(e.callerArgs)for(let n=0;nthis.evaluate(e,t)));case`TupleLiteral`:return new Ds(e.value.map(e=>this.evaluate(e,t)));case`ObjectLiteral`:{let n=new Map;for(let[r,i]of e.value){let e=this.evaluate(r,t);if(!(e instanceof ys))throw Error(`Object keys must be strings: got ${e.type}`);n.set(e.value,this.evaluate(i,t))}return new ws(n)}case`Identifier`:return this.evaluateIdentifier(e,t);case`CallExpression`:return this.evaluateCallExpression(e,t);case`MemberExpression`:return this.evaluateMemberExpression(e,t);case`UnaryExpression`:return this.evaluateUnaryExpression(e,t);case`BinaryExpression`:return this.evaluateBinaryExpression(e,t);case`FilterExpression`:return this.evaluateFilterExpression(e,t);case`FilterStatement`:return this.evaluateFilterStatement(e,t);case`TestExpression`:return this.evaluateTestExpression(e,t);case`SelectExpression`:return this.evaluateSelectExpression(e,t);case`Ternary`:return this.evaluateTernaryExpression(e,t);case`Comment`:return new ks;default:throw SyntaxError(`Unknown node type: ${e.type}`)}}};function Is(e){switch(typeof e){case`number`:return Number.isInteger(e)?new _s(e):new vs(e);case`string`:return new ys(e);case`boolean`:return new bs(e);case`undefined`:return new As;case`object`:return e===null?new ks:Array.isArray(e)?new Es(e.map(Is)):new ws(new Map(Object.entries(e).map(([e,t])=>[e,Is(t)])));case`function`:return new Os((t,n)=>Is(e(...t.map(e=>e.value))??null));default:throw Error(`Cannot convert to runtime value: ${e}`)}}var Ls=` +`,Rs=`{%- `,zs=` -%}`;function Bs(e){switch(e.operator.type){case`MultiplicativeBinaryOperator`:return 4;case`AdditiveBinaryOperator`:return 3;case`ComparisonBinaryOperator`:return 2;case`Identifier`:return e.operator.value===`and`?1:e.operator.value===`in`||e.operator.value===`not in`?2:0}return 0}function Vs(e,t=` `){let n=typeof t==`number`?` `.repeat(t):t;return Us(e.body,0,n).replace(/\n$/,``)}function Hs(...e){return Rs+e.join(` `)+zs}function Us(e,t,n){return e.map(e=>Ws(e,t,n)).join(Ls)}function Ws(e,t,n){let r=n.repeat(t);switch(e.type){case`Program`:return Us(e.body,t,n);case`If`:return Gs(e,t,n);case`For`:return Ks(e,t,n);case`Set`:return qs(e,t,n);case`Macro`:return Js(e,t,n);case`Break`:return r+Hs(`break`);case`Continue`:return r+Hs(`continue`);case`CallStatement`:return Ys(e,t,n);case`FilterStatement`:return Xs(e,t,n);case`Comment`:return r+`{# `+e.value+` #}`;default:return r+`{{- `+Zs(e)+` -}}`}}function Gs(e,t,n){let r=n.repeat(t),i=[],a=e;for(;a&&(i.push({test:a.test,body:a.body}),a.alternate.length===1&&a.alternate[0].type===`If`);)a=a.alternate[0];let o=r+Hs(`if`,Zs(i[0].test))+Ls+Us(i[0].body,t+1,n);for(let e=1;e0&&(o+=Ls+r+Hs(`else`)+Ls+Us(a.alternate,t+1,n)),o+=Ls+r+Hs(`endif`),o}function Ks(e,t,n){let r=n.repeat(t),i=``;if(e.iterable.type===`SelectExpression`){let t=e.iterable;i=`${Zs(t.lhs)} if ${Zs(t.test)}`}else i=Zs(e.iterable);let a=r+Hs(`for`,Zs(e.loopvar),`in`,i)+Ls+Us(e.body,t+1,n);return e.defaultBlock.length>0&&(a+=Ls+r+Hs(`else`)+Ls+Us(e.defaultBlock,t+1,n)),a+=Ls+r+Hs(`endfor`),a}function qs(e,t,n){let r=n.repeat(t),i=Zs(e.assignee),a=e.value?Zs(e.value):``,o=r+Hs(`set`,`${i}${e.value?` = `+a:``}`);return e.body.length===0?o:o+Ls+Us(e.body,t+1,n)+Ls+r+Hs(`endset`)}function Js(e,t,n){let r=n.repeat(t),i=e.args.map(Zs).join(`, `);return r+Hs(`macro`,`${e.name.value}(${i})`)+Ls+Us(e.body,t+1,n)+Ls+r+Hs(`endmacro`)}function Ys(e,t,n){let r=n.repeat(t),i=e.callerArgs&&e.callerArgs.length>0?`(${e.callerArgs.map(Zs).join(`, `)})`:``,a=Zs(e.call),o=r+Hs(`call${i}`,a)+Ls;return o+=Us(e.body,t+1,n)+Ls,o+=r+Hs(`endcall`),o}function Xs(e,t,n){let r=n.repeat(t),i=r+Hs(`filter`,e.filter.type===`Identifier`?e.filter.value:Zs(e.filter))+Ls;return i+=Us(e.body,t+1,n)+Ls,i+=r+Hs(`endfilter`),i}function Zs(e,t=-1){switch(e.type){case`SpreadExpression`:return`*${Zs(e.argument)}`;case`Identifier`:return e.value;case`IntegerLiteral`:return`${e.value}`;case`FloatLiteral`:return`${e.value}`;case`StringLiteral`:return JSON.stringify(e.value);case`BinaryExpression`:{let n=e,r=Bs(n),i=Zs(n.left,r),a=Zs(n.right,r+1),o=`${i} ${n.operator.value} ${a}`;return r`${Zs(e)}: ${Zs(t)}`).join(`, `)}}`;case`SliceExpression`:{let t=e;return`${t.start?Zs(t.start):``}:${t.stop?Zs(t.stop):``}${t.step?`:${Zs(t.step)}`:``}`}case`KeywordArgumentExpression`:{let t=e;return`${t.key.value}=${Zs(t.value)}`}case`Ternary`:{let n=e,r=`${Zs(n.trueExpr)} if ${Zs(n.condition,0)} else ${Zs(n.falseExpr)}`;return t>-1?`(${r})`:r}default:throw Error(`Unknown expression type: ${e.type}`)}}var Qs=class{parsed;constructor(e){this.parsed=os(Oo(e,{lstrip_blocks:!0,trim_blocks:!0}))}render(e){let t=new js;if(Ms(t),e)for(let[n,r]of Object.entries(e))t.set(n,r);return new Fs(t).run(this.parsed).value}format(e){return Vs(this.parsed,e?.indent||` `)}},$s={txt:`text/plain`,html:`text/html`,css:`text/css`,js:`text/javascript`,json:`application/json`,png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`},ec=class e{constructor(e){if(this.filePath=e,this.headers=new Headers,this.exists=Xr.existsSync(e),this.exists){this.status=200,this.statusText=`OK`;let t=Xr.statSync(e);this.headers.set(`content-length`,t.size.toString()),this.updateContentType();let n=Xr.createReadStream(e);this.body=new ReadableStream({start(e){n.on(`data`,t=>e.enqueue(t)),n.on(`end`,()=>e.close()),n.on(`error`,t=>e.error(t))},cancel(){n.destroy()}})}else this.status=404,this.statusText=`Not Found`,this.body=null}updateContentType(){let e=this.filePath.toString().split(`.`).pop().toLowerCase();this.headers.set(`content-type`,$s[e]??`application/octet-stream`)}clone(){let t=new e(this.filePath);return t.exists=this.exists,t.status=this.status,t.statusText=this.statusText,t.headers=new Headers(this.headers),t}async arrayBuffer(){return(await Xr.promises.readFile(this.filePath)).buffer}async blob(){let e=await Xr.promises.readFile(this.filePath);return new Blob([e],{type:this.headers.get(`content-type`)})}async text(){return await Xr.promises.readFile(this.filePath,`utf8`)}async json(){return JSON.parse(await this.text())}},tc=class{constructor(e){this._mt=new Uint32Array(624),this._idx=625,this._gauss_next=null,this._random_fn=this.random.bind(this),this.seed(e)}seed(e){if(e==null)if(_i.IS_CRYPTO_AVAILABLE){let t=new Uint32Array(1);crypto.getRandomValues(t),e=t[0]}else e=Date.now()>>>0;let t=this._mt,n=(e,t)=>Math.imul(e,t)>>>0,r=[];for(let t=e||0;t>0;t=Math.floor(t/4294967296))r.push(t&4294967295);r.length||r.push(0),t[0]=19650218;for(let e=1;e<624;++e)t[e]=n(1812433253,t[e-1]^t[e-1]>>>30)+e>>>0;let i=1,a=0;for(let e=Math.max(624,r.length);e>0;--e,++i,++a)i>=624&&(t[0]=t[623],i=1),a>=r.length&&(a=0),t[i]=(t[i]^n(t[i-1]^t[i-1]>>>30,1664525))+r[a]+a>>>0;for(let e=623;e>0;--e,++i)i>=624&&(t[0]=t[623],i=1),t[i]=(t[i]^n(t[i-1]^t[i-1]>>>30,1566083941))-i>>>0;t[0]=2147483648,this._idx=624,this._gauss_next=null}_int32(){let e=this._mt;if(this._idx>=624){for(let t=0;t<624;++t){let n=e[t]&2147483648|e[(t+1)%624]&2147483647;e[t]=(e[(t+397)%624]^n>>>1^(n&1?2567483615:0))>>>0}this._idx=0}let t=e[this._idx++];return t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0}random(){return((this._int32()>>>5)*67108864+(this._int32()>>>6))/9007199254740992}gauss(e=0,t=1){let n=this._gauss_next;if(this._gauss_next=null,n===null){let e=this.random()*2*Math.PI,t=Math.sqrt(-2*Math.log(1-this.random()));n=Math.cos(e)*t,this._gauss_next=Math.sin(e)*t}return e+n*t}shuffle(e){for(let t=e.length-1;t>0;--t){let n=32-Math.clz32(t+1),r=this._int32()>>>32-n;for(;r>t;)r=this._int32()>>>32-n;let i=e[t];e[t]=e[r],e[r]=i}}choices(e,t){return e[nc(this._random_fn,t)]}};function nc(e,t){let n=0;for(let e=0;enc(ic.random,e),oc=new tc,sc=class{constructor(e){this.path=e}async match(e){let t=new ec(Zr.join(this.path,e));if(t.exists)return t}async put(e,t,n=void 0){let r=Zr.join(this.path,e),i=r+`.tmp.${_i.IS_PROCESS_AVAILABLE?process.pid:Date.now()}.${oc._int32().toString(36)}`;try{let e=t.headers.get(`Content-Length`),a=parseInt(e??`0`),o=0;await Xr.promises.mkdir(Zr.dirname(r),{recursive:!0});let s=Xr.createWriteStream(i),c=t.body.getReader();for(;;){let{done:e,value:t}=await c.read();if(e)break;await new Promise((e,n)=>{s.write(t,t=>{if(t){n(t);return}e()})}),o+=t.length;let r=a?o/a*100:0;n?.({progress:r,loaded:o,total:a})}await new Promise((e,t)=>{s.close(n=>n?t(n):e())}),await Xr.promises.rename(i,r)}catch(e){try{await Xr.promises.unlink(i)}catch{}throw e}}async delete(e){let t=Zr.join(this.path,e);try{return await Xr.promises.unlink(t),!0}catch{return!1}}},cc={400:`Bad request error occurred while trying to load file`,401:`Unauthorized access to file`,403:`Forbidden access to file`,404:`Could not locate file`,408:`Request timeout error occurred while trying to load file`,500:`Internal server error error occurred while trying to load file`,502:`Bad gateway error occurred while trying to load file`,503:`Service unavailable error occurred while trying to load file`,504:`Gateway timeout error occurred while trying to load file`},lc=100,uc=/^(\b[\w\-.]+\b\/)?\b[\w\-.]{1,96}\b$/;function dc(...e){return e=e.map((t,n)=>(n&&(t=t.replace(RegExp(`^/`),``)),n!==e.length-1&&(t=t.replace(RegExp(`/$`),``)),t)),e.join(`/`)}function fc(e,t=null,n=null){let r;try{r=new URL(e)}catch{return!1}return!(t&&!t.includes(r.protocol)||n&&!n.includes(r.hostname))}function pc(e){return!(!uc.test(e)||e.includes(`..`)||e.includes(`--`)||e.endsWith(`.git`)||e.endsWith(`.ipynb`))}function mc(e,t,n){if(!n)return null;let r=cc[e]??`Error (${e}) occurred while trying to load file`;throw Error(`${r}: "${t}".`)}async function hc(e,t,n){let r=e.headers.get(`Content-Length`),i=r?parseInt(r,10):n??0;r===null&&!n&&zi.warn(`Unable to determine content-length from response headers. Will expand buffer when needed.`);let a=new Uint8Array(i),o=0,s=e.body.getReader();async function c(){let{done:e,value:n}=await s.read();if(e)return;let r=o+n.length;if(r>i){i=r;let e=new Uint8Array(i);e.set(a),a=e}return a.set(n,o),o=r,t({progress:o/i*100,loaded:o,total:i}),c()}return await c(),a}function gc(e){return fc(e,[`blob:`])}function _c(e){let t;if(typeof location<`u`&&location.href)t=location.href;else if(import.meta.url)t=import.meta.url;else return e;return new URL(e,t).href}var vc=`SHA-256`,yc=`experimental_transformers-hash-cache`,bc=e=>({algorithm:vc,value:e}),xc=class{#e=null;_getHashCache=()=>(this.#e??=caches.open(yc),this.#e);static isAvailable=()=>typeof navigator<`u`&&`crossOriginStorage`in navigator;match=async e=>{let t=await this._getFileHash(e);if(t)try{let[e]=await navigator.crossOriginStorage.requestFileHandles([bc(t)]),n=await e.getFile();return new Response(n,{headers:{"Content-Length":String(n.size)}})}catch{return}};put=async(e,t)=>{let n=await this._getFileHash(e);if(n){let e=await t.blob();await this._storeBlobInCOS(e,n)}else this._processAndStore(e,t.body)};_storeBlobInCOS=async(e,t)=>{let[n]=await navigator.crossOriginStorage.requestFileHandles([bc(t)],{create:!0}),r=await n.createWritable();await r.write(e),await r.close()};_processAndStore=async(e,t)=>{try{let n=[];for await(let e of t)n.push(e);let r=new Blob(n),i=await this._getBlobHash(r);await this._storeBlobInCOS(r,i);try{await(await this._getHashCache()).put(e,new Response(i))}catch{}}catch{}};delete=async e=>{try{return await(await this._getHashCache()).delete(e)}catch{return!1}};_getFileHash=async e=>{try{let t=await this._getHashCache(),n=await t.match(e);if(n)return n.text();let r=await this._getLfsFileHash(e);return r?(await t.put(e,new Response(r)),r):null}catch{return null}};_getLfsFileHash=async e=>{if(!e.includes(`/resolve/`))return null;let t=e.replace(`/resolve/`,`/raw/`);try{let e=(await fetch(t).then(e=>e.text())).match(/^oid sha256:([0-9a-f]+)$/m);return e?e[1]:null}catch{return null}};_getBlobHash=async e=>{let t=await e.arrayBuffer(),n=await crypto.subtle.digest(vc,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}};async function Sc(e=null){let t=null;if(Ei.useCustomCache){if(!Ei.customCache)throw Error("`env.useCustomCache=true`, but `env.customCache` is not defined.");if(!Ei.customCache.match||!Ei.customCache.put)throw Error("`env.customCache` must be an object which implements the `match` and `put` functions of the Web Cache API. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Cache");t=Ei.customCache}if(!t&&Ei.experimental_useCrossOriginStorage&&xc.isAvailable()&&(t=new xc),!t&&Ei.useBrowserCache){if(typeof caches>`u`)throw Error(`Browser cache is not available in this environment.`);try{t=await caches.open(Ei.cacheKey)}catch(e){zi.warn(`An error occurred while opening the browser cache:`,e)}}if(!t&&Ei.useFSCache){if(!_i.IS_FS_AVAILABLE)throw Error(`File System Cache is not available in this environment.`);t=new sc(e??Ei.cacheDir)}return t}async function Cc(e,...t){for(let n of t)try{let t=await e.match(n);if(t)return t}catch{continue}}var wc=new class{#e;#t;constructor(e){this.#e=e,this.#t=new Map}get(e){if(!this.#t.has(e))return;let t=this.#t.get(e);return this.#t.delete(e),this.#t.set(e,t),t}put(e,t){this.#t.has(e)&&this.#t.delete(e),this.#t.set(e,t),this.#t.size>this.#e&&this.#t.delete(this.#t.keys().next().value)}delete(e){return this.#t.delete(e)}clear(){this.#t.clear()}}(100);function Tc(e,t){let n=wc.get(e);if(n!==void 0)return n;let r=t().then(e=>e,t=>(wc.delete(e),Promise.reject(t)));return wc.put(e,r),r}async function Ec(e){if(!fc(e,[`http:`,`https:`]))return null;let t=Ac(e);return t.set(`Range`,`bytes=0-0`),Ei.fetch(e,{method:`GET`,headers:t,cache:`no-store`})}function Dc(e,t,n={}){return Tc(JSON.stringify([e,t,n?.revision,n?.cache_dir,n?.local_files_only]),()=>Oc(e,t,n))}async function Oc(e,t,n){let r=await Sc(n?.cache_dir),{localPath:i,remoteURL:a,proposedCacheKey:o,validModelId:s}=jc(e,t,n,r),c=await Mc(r,i,o);if(c!==void 0&&typeof c!=`string`){let e=c.headers.get(`content-length`),t=c.headers.get(`content-type`);return{exists:!0,size:e?parseInt(e,10):void 0,contentType:t||void 0,fromCache:!0}}if(Ei.allowLocalModels&&!fc(i,[`http:`,`https:`]))try{let e=await kc(i);if(typeof e!=`string`&&e.status!==404){let t=e.headers.get(`content-length`),n=e.headers.get(`content-type`);return{exists:!0,size:t?parseInt(t,10):void 0,contentType:n||void 0,fromCache:!1}}}catch{}if(Ei.allowRemoteModels&&!n.local_files_only&&s)try{let e=await Ec(a);if(e&&e.status>=200&&e.status<300){let t,n=e.headers.get(`content-type`);if(e.status===206){let n=e.headers.get(`content-range`);if(n){let e=n.match(/bytes \d+-\d+\/(\d+)/);e&&(t=parseInt(e[1],10))}}else if(e.status===200)try{await e.body?.cancel()}catch{}if(t===void 0){let n=e.headers.get(`content-length`);t=n?parseInt(n,10):void 0}return{exists:!0,size:t,contentType:n||void 0,fromCache:!1}}}catch(e){zi.warn(`Unable to fetch file metadata for "${a}": ${e}`)}return{exists:!1,fromCache:!1}}async function kc(e){return Ei.useFS&&!fc(e,[`http:`,`https:`,`blob:`])?new ec(e instanceof URL?e.protocol===`file:`?e.pathname:e.toString():e):Ei.fetch(e,{headers:Ac(e)})}function Ac(e){let t=typeof process<`u`&&process?.release?.name===`node`,n=new Headers;if(t){let t=!!{}?.TESTING_REMOTELY,r=Ei.version;if(n.set(`User-Agent`,`transformers.js/${r}; is_ci/${t};`),fc(e,[`http:`,`https:`],[`huggingface.co`,`hf.co`])){let e={}?.HF_TOKEN??{}?.HF_ACCESS_TOKEN;e&&n.set(`Authorization`,`Bearer ${e}`)}}return n}function jc(e,t,n={},r=null){let i=n.revision??`main`,a=dc(e,t),o=pc(e),s=o?dc(Ei.localModelPath,a):a,c=dc(Ei.remoteHost,Ei.remotePathTemplate.replaceAll(`{model}`,e).replaceAll(`{revision}`,encodeURIComponent(i)),t);return{requestURL:a,localPath:s,remoteURL:c,proposedCacheKey:r instanceof sc?i===`main`?a:dc(e,i,t):c,validModelId:o}}async function Mc(e,t,n){if(e)return await Cc(e,t,n)}async function Nc(e,t,n,r,i,a,o={}){if(await n.match(r)===void 0){if(!a){let a=o.progress_callback?n=>ki(o.progress_callback,{status:`progress`,name:e,file:t,...n}):void 0;await n.put(r,i,a)}else if(typeof i!=`string`){let e=new Headers(i.headers);e.set(`content-length`,a.byteLength.toString()),await n.put(r,new Response(a,{headers:e})).catch(e=>{zi.warn(`Unable to add response to browser cache: ${e}.`)})}}}async function Pc(e,t,n=!0,r={},i=!1,a=null){let{requestURL:o,localPath:s,remoteURL:c,proposedCacheKey:l,validModelId:u}=jc(e,t,r,a),d,f=!1,p;p=await Mc(a,s,l);let m=p!==void 0;if(m)d=l;else{if(Ei.allowLocalModels){if(!fc(o,[`http:`,`https:`]))try{p=await kc(s),d=s}catch(e){zi.warn(`Unable to load from local path "${s}": "${e}"`)}else if(r.local_files_only)throw Error(`\`local_files_only=true\`, but attempted to load a remote file from: ${o}.`);else if(!Ei.allowRemoteModels)throw Error(`\`env.allowRemoteModels=false\`, but attempted to load a remote file from: ${o}.`)}if(p===void 0||typeof p!=`string`&&p.status===404){if(r.local_files_only||!Ei.allowRemoteModels){if(n)throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${s}".`);return null}if(!u)throw Error(`Local file missing at "${s}" and download aborted due to invalid model ID "${e}".`);if(p=await kc(c),p.status!==200)return mc(p.status,c,n);d=l}f=a&&typeof Response<`u`&&p instanceof Response&&p.status===200}ki(r.progress_callback,{status:`download`,name:e,file:t});let h;if(!(_i.IS_NODE_ENV&&i)){let n;if(typeof p!=`string`)if(!r.progress_callback)n=new Uint8Array(await p.arrayBuffer());else if(m&&typeof navigator<`u`&&/firefox/i.test(navigator.userAgent))n=new Uint8Array(await p.arrayBuffer()),ki(r.progress_callback,{status:`progress`,name:e,file:t,progress:100,loaded:n.length,total:n.length});else{let i,a=p.headers.get(`content-length`);if(a)i=parseInt(a,10);else try{let n=await Dc(e,t,r);n.size&&(i=n.size)}catch{}n=await hc(p,n=>{ki(r.progress_callback,{status:`progress`,name:e,file:t,...n})},i)}h=n}if(f&&d&&typeof p!=`string`&&await Nc(e,t,a,d,p,h,r),_i.IS_NODE_ENV&&i&&r.progress_callback&&typeof p!=`string`){let n=parseInt(p.headers.get(`content-length`),10)||0;ki(r.progress_callback,{status:`progress`,name:e,file:t,progress:100,loaded:n,total:n})}if(ki(r.progress_callback,{status:`done`,name:e,file:t}),h){if(!_i.IS_NODE_ENV&&i)throw Error(`Cannot return path in a browser environment.`);return h}if(p instanceof ec)return p.filePath;let g=await a?.match(d);if(g instanceof ec)return g.filePath;if(g instanceof Response)return new Uint8Array(await g.arrayBuffer());if(typeof g==`string`)return g;throw Error(`Unable to get model file path or buffer.`)}var Fc=new Map;async function Ic(e,t,n=!0,r={},i=!1){if(!Ei.allowLocalModels){if(r.local_files_only)throw Error("Invalid configuration detected: local models are disabled (`env.allowLocalModels=false`) but you have requested to only use local models (`local_files_only=true`).");if(!Ei.allowRemoteModels)throw Error("Invalid configuration detected: both local and remote models are disabled. Fix by setting `env.allowLocalModels` or `env.allowRemoteModels` to `true`.")}ki(r.progress_callback,{status:`initiate`,name:e,file:t});let a=`${e}::${t}`,o=Fc.get(a);return o||(o=Pc(e,t,n,r,i,await Sc(r?.cache_dir)).then(e=>(Fc.delete(a),e),e=>{throw Fc.delete(a),e}),Fc.set(a,o)),await o}async function Lc(e,t,n=!0,r={}){let i=await Ic(e,t,n,r,!1);return i===null?null:new TextDecoder(`utf-8`).decode(i)}async function Rc(e,t,n=!0,r={}){let i=await Lc(e,t,n,r);return i===null?{}:JSON.parse(i)}function zc(e,[t,n,r],[i,a],o=`bilinear`,s=!1){let c=a/r,l=i/n,u=new e.constructor(i*a*t),d=n*r,f=i*a;for(let o=0;o=0;--e)i[e]=a,r[e]=t[n[e]],a*=r[e];let a=n.map((e,t)=>i[n.indexOf(t)]),o=new e.constructor(e.length);for(let n=0;n=0;--e)r+=i%t[e]*a[e],i=Math.floor(i/t[e]);o[r]=e[n]}return[o,r]}function Vc(e){let t=Wc(e)[0],n=e.map(e=>Math.exp(e-t)),r=n.reduce((e,t)=>e+t,0);return n.map(e=>e/r)}function Hc(e){let t=Wc(e)[0],n=0;for(let r=0;re-t-r)}function Uc(e){if(e.length===0)throw Error(`Array must not be empty`);let t=e[0],n=0;for(let r=1;rt&&(t=e[r],n=r);return[t,n]}function Gc(e){return e>0&&(e&e-1)==0}var Kc=class{constructor(e){if(this.size=e|0,this.size<=1||!Gc(this.size))throw Error(`FFT size must be a power of two larger than 1`);this._csize=e<<1,this.table=new Float64Array(this.size*2);for(let e=0;ee;e<<=1)++t;this._width=t%2==0?t-1:t,this._bitrev=new Int32Array(1<>>t&3)<>>1);for(let t=0;t>>1]=e[t];return n}toComplexArray(e,t){let n=t||this.createComplexArray();for(let t=0;t>>1],n[t+1]=0;return n}transform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._transform4(e,t,1)}realTransform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._realTransform4(e,t,1)}inverseTransform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._transform4(e,t,-1);for(let t=0;t>=2;i>=2;i>>=2){a=r/i<<1;let t=a>>>2;for(o=0;o>>1,i>>>1)}else for(o=0,s=0;o>>1,i>>>1,n)}let l=this.table;for(i>>=2;i>=2;i>>=2){a=r/i<<1;let t=a>>>1,s=t>>>1,c=s>>>1;for(o=0;o>>1;for(let t=2;t>1;++t){let n=(t+1-e)**2/2,r=Math.sqrt(s**2+c**2)**n,o=n*Math.atan2(c,s),l=2*t;i[l]=r*Math.cos(o),i[l+1]=r*Math.sin(o),a[l]=i[l],a[l+1]=-i[l+1]}this._slicedChirpBuffer=i.subarray(t,n),this._f=new Kc(r>>1),this._f.transform(this._chirpBuffer,a)}_transform(e,t,n){let r=this._buffer1,i=this._buffer2,a=this._outBuffer1,o=this._outBuffer2,s=this._chirpBuffer,c=this._slicedChirpBuffer,l=this._a;if(n)for(let e=0;e>1];r[e]=i*c[e],r[n]=i*c[n]}else for(let e=0;e=e.length&&(i=2*(e.length-1)-i),r[a++]=e[i]}r.sort(),n[t]=r[i]}return n}function Xc(e,t){let n=10**t;return Math.round(e*n)/n}function Zc(e){let t=Math.round(e);return Math.abs(e)%1==.5?t%2==0?t:t-1:t}function Qc(e){let t=e.length,n=e[0].length,r=[t+1,n+1],i=Array.from({length:r[0]},()=>Array(r[1]).fill(1/0));i[0][0]=0;let a=Array.from({length:r[0]},()=>Array(r[1]).fill(-1));for(let t=1;t0||s>0;)switch(c.push(o-1),l.push(s-1),a[o][s]){case 0:--o,--s;break;case 1:--o;break;case 2:--s;break;default:throw Error(`Internal error in dynamic time warping. Unexpected trace[${o}, ${s}]. Please file a bug report.`)}return c.reverse(),l.reverse(),[c,l]}var $c=(function(){let e=null;return function(t){if(!e){e=new Float32Array(65536);let t=new ArrayBuffer(4),n=new Uint32Array(t),r=new Float32Array(t);for(let t=0;t>10,s=t&1023;if(o===31)i=a|2139095040|s<<13;else if(o===0)if(s===0)i=a;else{let e=113;for(;!(s&1024);)s<<=1,--e;s&=-1025,i=a|e<<23|s<<13}else i=a|o+112<<23|s<<13;n[0]=i,e[t]=r[0]}}let n=t.length,r=e,i=new Float32Array(n);for(let e=0;etl});var tl={};async function nl(e){let t=e.split(`/`).pop(),n;try{if(n=await Sc(),n){let t=await n.match(e);if(t)return t}}catch(e){zi.warn(`Failed to load ${t} from cache:`,e)}let r=await Ei.fetch(e);if(!r.ok)throw Error(`Failed to fetch ${t}: ${r.status} ${r.statusText}`);if(n)try{await n.put(e,r.clone())}catch(e){zi.warn(`Failed to cache ${t}:`,e)}return r}async function rl(e){let t=await nl(e);if(!t||typeof t==`string`)return null;try{return await t.arrayBuffer()}catch(e){return zi.warn(`Failed to read WASM binary:`,e),null}}async function il(e){if(_i.IS_SERVICE_WORKER_ENV||_i.IS_CHROME_AVAILABLE)return e;let t=await nl(e);if(!t||typeof t==`string`)return null;try{let e=await t.text();e=e.replaceAll(`globalThis.process?.versions?.node`,`false`);let n=new Blob([e],{type:`text/javascript`});return URL.createObjectURL(n)}catch(e){return zi.warn(`Failed to read WASM factory:`,e),null}}var al=Object.freeze({auto:null,gpu:null,cpu:`cpu`,wasm:`wasm`,webgpu:`webgpu`,cuda:`cuda`,dml:`dml`,coreml:`coreml`,webnn:{name:`webnn`,deviceType:`cpu`},"webnn-npu":{name:`webnn`,deviceType:`npu`},"webnn-gpu":{name:`webnn`,deviceType:`gpu`},"webnn-cpu":{name:`webnn`,deviceType:`cpu`}});function ol(e){return e<=wi.DEBUG?0:e<=wi.INFO?2:e<=wi.WARNING||e<=wi.ERROR?3:4}var sl={0:`verbose`,1:`info`,2:`warning`,3:`error`,4:`fatal`},cl=[],ll,ul,dl=Symbol.for(`onnxruntime`);if(dl in globalThis)ul=globalThis[dl];else if(_i.IS_NODE_ENV){switch(ul=el,process.platform){case`win32`:cl.push(`dml`);break;case`linux`:process.arch===`x64`&&cl.push(`cuda`);break;case`darwin`:cl.push(`coreml`);break}cl.push(`webgpu`),cl.push(`cpu`),ll=[`cpu`]}else ul=T,_i.IS_WEBNN_AVAILABLE&&cl.push(`webnn-npu`,`webnn-gpu`,`webnn-cpu`,`webnn`),_i.IS_WEBGPU_AVAILABLE&&cl.push(`webgpu`),cl.push(`wasm`),ll=[`wasm`];var fl=ul.InferenceSession;function pl(e=null){if(!e)return ll;switch(e){case`auto`:return cl;case`gpu`:return cl.filter(e=>[`webgpu`,`cuda`,`dml`,`webnn-gpu`].includes(e))}if(cl.includes(e))return[al[e]??e];throw Error(`Unsupported device: "${e}". Should be one of: ${cl.join(`, `)}.`)}var ml=Promise.resolve(),hl=null;async function gl(){if(hl)return hl;if(!(Ei.useWasmCache&&typeof xl?.wasm?.wasmPaths==`object`&&xl?.wasm?.wasmPaths?.wasm&&xl?.wasm?.wasmPaths?.mjs)){if(_i.IS_DENO_WEB_RUNTIME)throw Error(`env.useWasmCache=false is not supported in Deno's web runtime. Remove the useWasmCache override.`);return hl=Promise.resolve(),hl}return hl=(async()=>{let e=xl.wasm.wasmPaths,t=!1;await Promise.all([e.wasm&&!gc(e.wasm)?(async()=>{try{let n=await rl(_c(e.wasm));n&&(xl.wasm.wasmBinary=n,t=!0)}catch(e){zi.warn(`Failed to pre-load WASM binary:`,e)}})():Promise.resolve(),e.mjs&&!gc(e.mjs)?(async()=>{try{let t=await il(_c(e.mjs));t&&(xl.wasm.wasmPaths.mjs=t)}catch(e){zi.warn(`Failed to pre-load WASM factory:`,e)}})():Promise.resolve()]),t||(xl.wasm.wasmPaths.mjs=e.mjs)})(),hl}async function _l(e,t,n){await gl();let r=ol(Ei.logLevel??wi.WARNING),i=()=>fl.create(e,{logSeverityLevel:r,...t}),a=await(_i.IS_WEB_ENV?ml=ml.then(i):i());return a.config=n,a}var vl=Promise.resolve();async function yl(e,t){let n=()=>e.run(t);return _i.IS_WEB_ENV?vl=vl.then(n):n()}function bl(e){return e instanceof ul.Tensor}var xl=ul?.env;function Sl(){return xl?.wasm?.proxy}if(xl){let e=function(e){xl.logLevel=sl[ol(e)]};if(xl.wasm){if(!(typeof ServiceWorkerGlobalScope<`u`&&self instanceof ServiceWorkerGlobalScope)&&xl.versions?.web&&!xl.wasm.wasmPaths){let e=`https://cdn.jsdelivr.net/npm/onnxruntime-web@${xl.versions.web}/dist/`;xl.wasm.wasmPaths=_i.IS_SAFARI?{mjs:`${e}ort-wasm-simd-threaded.mjs`,wasm:`${e}ort-wasm-simd-threaded.wasm`}:{mjs:`${e}ort-wasm-simd-threaded.asyncify.mjs`,wasm:`${e}ort-wasm-simd-threaded.asyncify.wasm`}}xl.wasm.proxy=!1}xl.webgpu&&(xl.webgpu.powerPreference=`high-performance`),e(Ei.logLevel??wi.WARNING),Ei.backends.onnx={...xl,setLogLevel:e}}var Cl=async(e,t,n)=>{let r=await _l(new Uint8Array(e),t);return(async e=>{let t=Sl(),i=await yl(r,Object.fromEntries(Object.entries(e).map(([e,n])=>[e,(t?n.clone():n).ort_tensor])));return Array.isArray(n)?n.map(e=>new A(i[e])):new A(i[n])})},wl=class{static session_options={};static get nearest_interpolate_4d(){return this._nearest_interpolate_4d||=Cl([8,10,18,0,58,129,1,10,41,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,18,10,4,109,111,100,101,34,7,110,101,97,114,101,115,116,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,21],this.session_options,`y`),this._nearest_interpolate_4d}static get bilinear_interpolate_4d(){return this._bilinear_interpolate_4d||=Cl([8,9,18,0,58,128,1,10,40,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,17,10,4,109,111,100,101,34,6,108,105,110,101,97,114,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,`y`),this._bilinear_interpolate_4d}static get bicubic_interpolate_4d(){return this._bicubic_interpolate_4d||=Cl([8,9,18,0,58,127,10,39,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,16,10,4,109,111,100,101,34,5,99,117,98,105,99,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,`y`),this._bicubic_interpolate_4d}static get matmul(){return this._matmul||=Cl([8,9,18,0,58,55,10,17,10,1,97,10,1,98,18,1,99,34,6,77,97,116,77,117,108,18,1,114,90,9,10,1,97,18,4,10,2,8,1,90,9,10,1,98,18,4,10,2,8,1,98,9,10,1,99,18,4,10,2,8,1,66,2,16,20],this.session_options,`c`),this._matmul}static get stft(){return this._stft||=Cl([8,7,18,0,58,148,1,10,38,10,1,115,10,1,106,10,1,119,10,1,108,18,1,111,34,4,83,84,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,115,90,26,10,1,115,18,21,10,19,8,1,18,15,10,3,18,1,98,10,3,18,1,115,10,3,18,1,99,90,11,10,1,106,18,6,10,4,8,7,18,0,90,16,10,1,119,18,11,10,9,8,1,18,5,10,3,18,1,119,90,11,10,1,108,18,6,10,4,8,7,18,0,98,31,10,1,111,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,102,10,3,18,1,100,10,3,18,1,99,66,2,16,17],this.session_options,`o`),this._stft}static get rfft(){return this._rfft||=Cl([8,9,18,0,58,97,10,33,10,1,120,10,0,10,1,97,18,1,121,34,3,68,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,100,90,21,10,1,120,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,90,11,10,1,97,18,6,10,4,8,7,18,0,98,21,10,1,121,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,66,2,16,20],this.session_options,`y`),this._rfft}static get top_k(){return this._top_k||=Cl([8,10,18,0,58,73,10,18,10,1,120,10,1,107,18,1,118,18,1,105,34,4,84,111,112,75,18,1,116,90,9,10,1,120,18,4,10,2,8,1,90,15,10,1,107,18,10,10,8,8,7,18,4,10,2,8,1,98,9,10,1,118,18,4,10,2,8,1,98,9,10,1,105,18,4,10,2,8,7,66,2,16,21],this.session_options,[`v`,`i`]),this._top_k}static get slice(){return this._slice||=Cl([8,7,18,0,58,96,10,25,10,1,120,10,1,115,10,1,101,10,1,97,10,1,116,18,1,121,34,5,83,108,105,99,101,18,1,114,90,9,10,1,120,18,4,10,2,8,1,90,9,10,1,115,18,4,10,2,8,7,90,9,10,1,101,18,4,10,2,8,7,90,9,10,1,97,18,4,10,2,8,7,90,9,10,1,116,18,4,10,2,8,7,98,9,10,1,121,18,4,10,2,8,1,66,2,16,13],this.session_options,`y`),this._slice}},Tl=Object.freeze({auto:`auto`,gpu:`gpu`,cpu:`cpu`,wasm:`wasm`,webgpu:`webgpu`,cuda:`cuda`,dml:`dml`,coreml:`coreml`,webnn:`webnn`,"webnn-npu":`webnn-npu`,"webnn-gpu":`webnn-gpu`,"webnn-cpu":`webnn-cpu`}),El=_i.IS_NODE_ENV?`cpu`:`wasm`;function Dl(e,t,{warn:n}={}){return e?typeof e==`string`?e:e.hasOwnProperty(t)?e[t]:(n&&n(`device not specified for "${t}". Using the default device (${El}).`),El):El}var Ol=(function(){let e;return async function(){if(e===void 0)if(!_i.IS_WEBGPU_AVAILABLE)e=!1;else try{e=(await navigator.gpu.requestAdapter()).features.has(`shader-f16`)}catch{e=!1}return e}})(),kl=Object.freeze({auto:`auto`,fp32:`fp32`,fp16:`fp16`,q8:`q8`,int8:`int8`,uint8:`uint8`,q4:`q4`,bnb4:`bnb4`,q4f16:`q4f16`}),Al=kl.fp32,jl=Object.freeze({[Tl.wasm]:kl.q8}),Ml=Object.freeze({[kl.fp32]:``,[kl.fp16]:`_fp16`,[kl.int8]:`_int8`,[kl.uint8]:`_uint8`,[kl.q8]:`_quantized`,[kl.q4]:`_q4`,[kl.q4f16]:`_q4f16`,[kl.bnb4]:`_bnb4`});function Nl(e,t,n,{configDtype:r=null,warn:i}={}){let a,o=!1;e&&typeof e!=`string`?e.hasOwnProperty(t)?a=e[t]:(a=null,o=!0):a=e;let s;if(a===kl.auto){if(r){let e=typeof r==`string`?r:r?.[t];if(e&&e!==kl.auto&&kl.hasOwnProperty(e))return e}s=jl[n]??Al}else s=a&&kl.hasOwnProperty(a)?a:jl[n]??Al;return o&&i&&i(`dtype not specified for "${t}". Using the default dtype (${s}) for this device (${n}).`),s}var Pl=Object.freeze({float32:Float32Array,float16:typeof Float16Array<`u`?Float16Array:Uint16Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array,uint4:Uint8Array,int4:Int8Array}),A=class e{get dims(){return this.ort_tensor.dims}set dims(e){this.ort_tensor.dims=e}get type(){return this.ort_tensor.type}get data(){return this.ort_tensor.data}get size(){return this.ort_tensor.size}get location(){return this.ort_tensor.location}ort_tensor;constructor(...e){return bl(e[0])?this.ort_tensor=e[0]:this.ort_tensor=new qr(e[0],e[1],e[2]),new Proxy(this,{get:(e,t)=>{if(typeof t==`string`){let n=Number(t);if(Number.isInteger(n))return e._getitem(n)}return e[t]},set:(e,t,n)=>e[t]=n})}dispose(){this.ort_tensor.dispose()}*[Symbol.iterator](){let[e,...t]=this.dims;if(t.length>0){let n=t.reduce((e,t)=>e*t);for(let r=0;r0){let e=r.reduce((e,t)=>e*t);return this._subarray(t,e,r)}else return new e(this.type,[this.data[t]],r)}indexOf(e){let t=this.data;for(let n=0;na)throw Error(`Invalid slice: ${i}`);let o=[Math.max(t,0),Math.min(a,this.dims[e])];r.push(o),n.push(o[1]-o[0])}else throw Error(`Invalid slice: ${i}`)}let i=r.map(([e,t])=>t-e),a=i.reduce((e,t)=>e*t),o=this.data,s=new o.constructor(a),c=this.stride(),l=!0;for(let e=1;e=0;--n){let e=i[n];t+=(a%e+r[n][0])*c[n],a=Math.floor(a/e)}s[e]=o[t]}return new e(this.type,s,n)}permute(...e){return Il(this,e)}transpose(...e){return this.permute(...e)}sum(e=null,t=!1){return this.norm(1,e,t)}norm(t=`fro`,n=null,r=!1){if(t===`fro`)t=2;else if(typeof t==`string`)throw Error(`Unsupported norm: ${t}`);let i=this.data,a=i instanceof BigInt64Array||i instanceof BigUint64Array;if(a&&t!==1)throw Error(`Expected a floating point tensor as input. Got ${this.type}`);let o,s;if(a?(o=(e,t)=>e+t,s=0n):(o=(e,n)=>e+n**t,s=0),n===null){let n=i.reduce(o,s);return t!==1&&(n**=1/t),new e(this.type,[n],[])}let[c,l,u]=Yl(o,this,n,r);if(t!==1)for(let e=0;e=0;--r){let e=this.dims[r];if(r!==t){let t=i%e;n+=t*a,a*=this.dims[r]}i=Math.floor(i/e)}r[e]/=i[n]}return this}normalize(e=2,t=1){return this.clone().normalize_(e,t)}stride(){return Ql(this.dims)}squeeze(t=null){return new e(this.type,this.data,Wl(this.dims,t))}squeeze_(e=null){return this.dims=Wl(this.dims,e),this}unsqueeze(t){return new e(this.type,this.data,Gl(this.dims,t))}unsqueeze_(e){return this.dims=Gl(this.dims,e),this}flatten_(e=0,t=-1){t=(t+this.dims.length)%this.dims.length;let n=this.dims.slice(0,e),r=this.dims.slice(e,t+1),i=this.dims.slice(t+1);return this.dims=[...n,r.reduce((e,t)=>e*t,1),...i],this}flatten(e=0,t=-1){return this.clone().flatten_(e,t)}view(...t){let n=-1;for(let e=0;er===n?e:e*t,1);t[n]=r.length/e}return new e(this.type,r,t)}neg_(){let e=this.data;for(let t=0;tt?1:0;return new e(`bool`,n,this.dims)}lt(t){let n=new Uint8Array(this.data.length),r=this.data;for(let e=0;eMath.min(e,t),this,t,n,1/0);return new e(r,i,a)}max(t=null,n=!1){if(t===null){let t=Wc(this.data)[0];return new e(this.type,[t],[])}let[r,i,a]=Yl((e,t)=>Math.max(e,t),this,t,n,-1/0);return new e(r,i,a)}argmin(t=null,n=!1){if(t!==null)throw Error("`dim !== null` not yet implemented.");let r=Uc(this.data)[1];return new e(`int64`,[BigInt(r)],[])}argmax(t=null,n=!1){if(t!==null)throw Error("`dim !== null` not yet implemented.");let r=Wc(this.data)[1];return new e(`int64`,[BigInt(r)],[])}repeat(...t){if(t.lengthe===1)){if(t.length===this.dims.length)return this.clone();let n=t.length-this.dims.length,r=Array(n).fill(1).concat(this.dims);return new e(this.type,this.data.slice(),r)}let n=t.length-this.dims.length,r=Array(n).fill(1).concat(this.dims),i=r.map((e,n)=>e*t[n]),a=i.reduce((e,t)=>e*t,1),o=this.data,s=new o.constructor(a),c=Ql(r),l=Ql(i);for(let e=0;eBigInt(Math.floor(e)):BigInt;else if(this.type===`float16`&&t==`float32`&&this.data instanceof Uint16Array)return new e(t,$c(this.data),this.dims);return new e(t,Pl[t].from(this.data,n),this.dims)}};function Fl(e,t){let n=e.length;if(n!==t.reduce((e,t)=>e*t))throw Error(`cannot reshape array of size ${n} into shape (${t})`);let r=e;for(let e=t.length-1;e>=0;e--)r=r.reduce((n,r)=>{let i=n[n.length-1];return i.lengthnew A(`int64`,e,[e.length]);async function Hl(e,t,n,r,i){return await(await wl.slice)({x:e,s:Vl(t),e:Vl(n),a:Vl(r),t:Vl(i??Array(r.length).fill(1))})}function Ul(e,t){let n=e.data,r=t.data,i=[e.dims[0],e.dims[2]],a=new n.constructor(i[0]*i[1]),[o,s,c]=e.dims,l=0;for(let e=0;ee!==1):typeof t==`number`?e[t]===1&&e.splice(t,1):Array.isArray(t)&&(e=e.filter((e,n)=>e!==1||!t.includes(n))),e}function Gl(e,t){return t=Kl(t,e.length+1),e=e.slice(),e.splice(t,0,1),e}function Kl(e,t,n=null,r=!0){if(e<-t||e>=t){if(r)throw Error(`IndexError: index ${e} is out of bounds for dimension${n===null?``:` `+n} with size ${t}`);return e<-t?0:t}return e<0&&(e=(e%t+t)%t),e}function ql(e,t=0){t=Kl(t,e[0].dims.length);let n=e[0].dims.slice();n[t]=e.reduce((e,n)=>e+n.dims[t],0);let r=n.reduce((e,t)=>e*t,1),i=new e[0].data.constructor(r),a=e[0].type;if(t===0){let t=0;for(let n of e){let e=n.data;i.set(e,t),t+=e.length}}else{let r=0;for(let a=0;a=0;--i){let e=s[i],l=o%e;i===t&&(l+=r),a+=l*c,c*=n[i],o=Math.floor(o/e)}i[a]=o[e]}r+=s[t]}}return new A(a,i,n)}function Jl(e,t=0){return ql(e.map(e=>e.unsqueeze(t)),t)}function Yl(e,t,n,r=!1,i=null){let a=t.data,o=t.dims;n=Kl(n,o.length);let s=o.slice();s[n]=1;let c=new a.constructor(a.length/o[n]);i!==null&&c.fill(i);for(let t=0;t=0;--e){let t=o[e];if(e!==n){let n=i%t;r+=n*a,a*=s[e]}i=Math.floor(i/t)}c[r]=e(c[r],a[t],t,r)}return r||s.splice(n,1),[t.type,c,s]}function Xl(e,t=null,n=1,r=!1){let i=e.data,a=e.dims;if(t===null){let t=i.reduce((e,t)=>e+t,0)/i.length,r=Math.sqrt(i.reduce((e,n)=>e+(n-t)**2,0)/(i.length-n)),a=new A(e.type,[t],[]);return[new A(e.type,[r],[]),a]}t=Kl(t,a.length);let o=Zl(e,t,r),s=o.data,[c,l,u]=Yl((e,t,n,r)=>e+(t-s[r])**2,e,t,r);for(let e=0;ee+t,0);return new A(e.type,[t/i.length],[])}t=Kl(t,r.length);let[a,o,s]=Yl((e,t)=>e+t,e,t,n);if(r[t]!==1)for(let e=0;e=0;--n)t[n]=r,r*=e[n];return t}function $l(e,t,n,r){return new A(n,new r(e.reduce((e,t)=>e*t,1)).fill(t),e)}function eu(e,t){let n,r;if(typeof t==`number`)n=`float32`,r=Float32Array;else if(typeof t==`bigint`)n=`int64`,r=BigInt64Array;else if(typeof t==`boolean`)n=`bool`,r=Uint8Array;else throw Error(`Unsupported data type: ${typeof t}`);return $l(e,t,n,r)}function tu(e,t){return eu(e.dims,t)}function nu(e){return $l(e,1n,`int64`,BigInt64Array)}function ru(e){return nu(e.dims)}function iu(e){return $l(e,0n,`int64`,BigInt64Array)}function au(e){return iu(e.dims)}function ou(e){let t=e.reduce((e,t)=>e*t,1);return new A(`float32`,Float32Array.from({length:t},()=>ic.gauss()),e)}function su(e,t){if(e.dims.length!==2)throw Error(`The tensor must have 2 dimensions`);if(e.dims.at(-1)%8!=0)throw Error(`The last dimension of the tensor must be a multiple of 8`);if(![`binary`,`ubinary`].includes(t))throw Error(`The precision must be either 'binary' or 'ubinary'`);let n=t===`binary`,r=n?`int8`:`uint8`,i=n?Int8Array:Uint8Array,a=e.data,o=new i(a.length/8);for(let e=0;e0?1:0,r=Math.floor(e/8),i=e%8;o[r]|=t<<7-i,n&&i===0&&(o[r]-=128)}return new A(r,o,[e.dims[0],e.dims[1]/8])}async function cu(e){if(!e)throw Error(`modelId is required for get_tokenizer_files`);return(await Dc(e,`tokenizer_config.json`,{})).exists?[`tokenizer.json`,`tokenizer_config.json`]:[]}async function lu(e,t){let n=await cu(e);return await Promise.all(n.map(n=>Rc(e,n,!0,t)))}function uu(e){let t=e.dims;switch(t.length){case 1:return e.tolist();case 2:if(t[0]!==1)throw Error("Unable to decode tensor with `batch size !== 1`. Use `tokenizer.batch_decode(...)` for batched inputs.");return e.tolist()[0];default:throw Error(`Expected tensor to have 1-2 dimensions, got ${t.length}.`)}}var du=[`bos_token`,`eos_token`,`unk_token`,`sep_token`,`pad_token`,`cls_token`,`mask_token`];function fu(e,t,n,r){for(let i of Object.keys(e)){let a=t-e[i].length,o=n(i),s=Array(a).fill(o);e[i]=r===`right`?Pi(e[i],s):Pi(s,e[i])}}function pu(e,t){for(let n of Object.keys(e))e[n].length=t}function mu(e,...t){for(let n of t){if(!Object.hasOwn(e,n))continue;let t=e[n];if(t)if(typeof t==`object`){if(t.__type===`AddedToken`)return t.content;throw Error(`Unknown token: ${t}`)}else return t}return null}function hu(e){let t=[];for(let n of e.get_added_tokens_decoder().values())n.special&&t.push(n);return t}var gu=class extends Oi{return_token_type_ids=!1;padding_side=`right`;constructor(e,t){if(super(),this._tokenizerJSON=e,this._tokenizerConfig=t,this._tokenizer=new bo(e,t),this.config=t,this.padding_side=t.padding_side??this.padding_side,this.mask_token=mu(t,`mask_token`),this.mask_token_id=this._tokenizer.token_to_id(this.mask_token),this.pad_token=mu(t,`pad_token`,`eos_token`),this.pad_token_id=this._tokenizer.token_to_id(this.pad_token),this.sep_token=mu(t,`sep_token`),this.sep_token_id=this._tokenizer.token_to_id(this.sep_token),this.unk_token=mu(t,`unk_token`),this.unk_token_id=this._tokenizer.token_to_id(this.unk_token),this.bos_token=mu(t,`bos_token`),this.bos_token_id=this._tokenizer.token_to_id(this.bos_token),this.eos_token=mu(t,`eos_token`),this.eos_token_id=this._tokenizer.token_to_id(this.eos_token),this.chat_template=t.chat_template??null,Array.isArray(this.chat_template)){let e=Object.create(null);for(let{name:t,template:n}of this.chat_template){if(typeof t!=`string`||typeof n!=`string`)throw Error(`Chat template must be a list of objects with "name" and "template" properties`);e[t]=n}this.chat_template=e}this._compiled_template_cache=new Map;let n=hu(this._tokenizer);this.all_special_ids=n.map(e=>e.id),this.all_special_tokens=n.map(e=>e.content)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`}={}){let o=await lu(e,{progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a});return new this(...o)}get_vocab(){return this._tokenizer.get_vocab()}get model_max_length(){return this._tokenizerConfig.model_max_length??1/0}get add_eos_token(){return this._tokenizerConfig.add_eos_token}get add_bos_token(){return this._tokenizerConfig.add_bos_token}convert_tokens_to_ids(e){return typeof e==`string`?this._tokenizer.token_to_id(e):e.map(e=>this._tokenizer.token_to_id(e))}_call(e,{text_pair:t=null,add_special_tokens:n=!0,padding:r=!1,truncation:i=null,max_length:a=null,return_tensor:o=!0,return_token_type_ids:s=null}={}){let c=Array.isArray(e),l;if(c){if(e.length===0)throw Error(`text array must be non-empty`);if(t!==null){if(!Array.isArray(t))throw Error(`text_pair must also be an array`);if(e.length!==t.length)throw Error(`text and text_pair must have the same length`);l=e.map((e,r)=>this._encode_plus(e,{text_pair:t[r],add_special_tokens:n,return_token_type_ids:s}))}else l=e.map(e=>this._encode_plus(e,{add_special_tokens:n,return_token_type_ids:s}))}else{if(e==null)throw Error(`text may not be null or undefined`);if(Array.isArray(t))throw Error("When specifying `text_pair`, since `text` is a string, `text_pair` must also be a string (i.e., not an array).");l=[this._encode_plus(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:s})]}if(a===null?a=this.model_max_length:i===null&&(r===!0?(zi.warn("`max_length` is ignored when `padding: true` and there is no truncation strategy. To pad to max length, use `padding: 'max_length'`."),a=this.model_max_length):r===!1&&(zi.warn("Truncation was not explicitly activated but `max_length` is provided a specific value, please use `truncation: true` to explicitly truncate examples to max length."),i=!0)),r===!0&&(a=Math.min(Wc(l.map(e=>e.input_ids.length))[0],a??1/0)),a=Math.min(a,this.model_max_length??1/0),r||i)for(let e=0;ea?i&&pu(l[e],a):r&&fu(l[e],a,e=>e===`input_ids`?this.pad_token_id:0,this.padding_side);let u={};if(o){if(!(r&&i)&&l.some(e=>{for(let t of Object.keys(e))if(e[t].length!==l[0][t]?.length)return!0;return!1}))throw Error(`Unable to create tensor, you should probably activate truncation and/or padding with 'padding=true' and 'truncation=true' to have batched tensors with the same length.`);let e=[l.length,l[0].input_ids.length];for(let t of Object.keys(l[0]))u[t]=new A(`int64`,BigInt64Array.from(l.flatMap(e=>e[t]).map(BigInt)),e)}else{for(let e of Object.keys(l[0]))u[e]=l.map(t=>t[e]);if(!c)for(let e of Object.keys(u))u[e]=u[e][0]}return u}_encode_text(e){return e===null?null:this._tokenizer.encode(e).tokens}_encode_plus(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){let{ids:i,attention_mask:a,token_type_ids:o}=this._tokenizer.encode(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:r??this.return_token_type_ids});return{input_ids:i,attention_mask:a,...o?{token_type_ids:o}:{}}}tokenize(e,{pair:t=null,add_special_tokens:n=!1}={}){return this._tokenizer.tokenize(e,{text_pair:t,add_special_tokens:n})}encode(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){return this._tokenizer.encode(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:r}).ids}batch_decode(e,t={}){return e instanceof A&&(e=e.tolist()),e.map(e=>this.decode(e,t))}decode(e,t={}){if(e instanceof A&&(e=uu(e)),!Array.isArray(e)||e.length===0||!ji(e[0]))throw Error(`token_ids must be a non-empty array of integers.`);return this.decode_single(e,t)}decode_single(e,{skip_special_tokens:t=!1,clean_up_tokenization_spaces:n=null}){return this._tokenizer.decode(e,{skip_special_tokens:t,clean_up_tokenization_spaces:n})}get_chat_template({chat_template:e=null,tools:t=null}={}){if(this.chat_template&&typeof this.chat_template==`object`){let n=this.chat_template;if(e!==null&&Object.hasOwn(n,e))e=n[e];else if(e===null)if(t!==null&&`tool_use`in n)e=n.tool_use;else if(`default`in n)e=n.default;else throw Error(`This model has multiple chat templates with no default specified! Please either pass a chat template or the name of the template you wish to use to the 'chat_template' argument. Available template names are ${Object.keys(n).sort()}.`)}else if(e===null)if(this.chat_template)e=this.chat_template;else throw Error(`Cannot use apply_chat_template() because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating`);return e}apply_chat_template(e,{tools:t=null,documents:n=null,chat_template:r=null,add_generation_prompt:i=!1,tokenize:a=!0,padding:o=!1,truncation:s=!1,max_length:c=null,return_tensor:l=!0,return_dict:u=!0,tokenizer_kwargs:d={},...f}={}){if(r=this.get_chat_template({chat_template:r,tools:t}),typeof r!=`string`)throw Error(`chat_template must be a string, but got ${typeof r}`);let p=this._compiled_template_cache.get(r);p===void 0&&(p=new Qs(r),this._compiled_template_cache.set(r,p));let m=Object.create(null);for(let e of du){let t=mu(this.config,e);t&&(m[e]=t)}let h=p.render({messages:e,add_generation_prompt:i,tools:t,documents:n,...m,...f});if(a){let e=this._call(h,{add_special_tokens:!1,padding:o,truncation:s,max_length:c,return_tensor:l,...d});return u?e:e.input_ids}return h}};function _u(e,t,n,r){if(!(`language_codes`in e)||!Array.isArray(e.language_codes))throw Error("Tokenizer must have `language_codes` attribute set and it should be an array of language ids.");if(!(`languageRegex`in e)||!(e.languageRegex instanceof RegExp))throw Error("Tokenizer must have `languageRegex` attribute set and it should be a regular expression.");if(!(`lang_to_token`in e)||typeof e.lang_to_token!=`function`)throw Error("Tokenizer must have `lang_to_token` attribute set and it should be a function.");let i=r.src_lang,a=r.tgt_lang;if(!e.language_codes.includes(a))throw Error(`Target language code "${a}" is not valid. Must be one of: {${e.language_codes.join(`, `)}}`);if(i!==void 0){if(!e.language_codes.includes(i))throw Error(`Source language code "${i}" is not valid. Must be one of: {${e.language_codes.join(`, `)}}`);for(let t of e._tokenizer.post_processor.config.single)if(`SpecialToken`in t&&e.languageRegex.test(t.SpecialToken.id)){t.SpecialToken.id=e.lang_to_token(i);break}}return r.forced_bos_token_id=e._tokenizer.token_to_id(e.lang_to_token(a)),e._call(t,n)}var vu={};Yr(vu,{AlbertTokenizer:()=>yu,AutoTokenizer:()=>_d,BartTokenizer:()=>bu,BertTokenizer:()=>xu,BlenderbotSmallTokenizer:()=>Su,BlenderbotTokenizer:()=>Cu,BloomTokenizer:()=>wu,CLIPTokenizer:()=>Eu,CamembertTokenizer:()=>Tu,CodeGenTokenizer:()=>Ou,CodeLlamaTokenizer:()=>Du,CohereAsrTokenizer:()=>Au,CohereTokenizer:()=>ku,ConvBertTokenizer:()=>ju,DebertaTokenizer:()=>Nu,DebertaV2Tokenizer:()=>Mu,DistilBertTokenizer:()=>Pu,ElectraTokenizer:()=>Fu,EsmTokenizer:()=>Iu,FalconTokenizer:()=>Lu,GPT2Tokenizer:()=>Bu,GPTNeoXTokenizer:()=>zu,GemmaTokenizer:()=>Ru,HerbertTokenizer:()=>Vu,LlamaTokenizer:()=>Hu,M2M100Tokenizer:()=>Uu,MBart50Tokenizer:()=>Ku,MBartTokenizer:()=>Gu,MPNetTokenizer:()=>Yu,MarianTokenizer:()=>Wu,MgpstrTokenizer:()=>qu,MobileBertTokenizer:()=>Ju,NllbTokenizer:()=>Xu,NougatTokenizer:()=>Zu,PreTrainedTokenizer:()=>gu,Qwen2Tokenizer:()=>Qu,RoFormerTokenizer:()=>ed,RobertaTokenizer:()=>$u,SiglipTokenizer:()=>td,SpeechT5Tokenizer:()=>nd,SqueezeBertTokenizer:()=>rd,T5Tokenizer:()=>id,TokenizersBackend:()=>gu,VitsTokenizer:()=>od,Wav2Vec2CTCTokenizer:()=>sd,WhisperTokenizer:()=>md,XLMRobertaTokenizer:()=>hd,XLMTokenizer:()=>gd});var yu=class extends gu{return_token_type_ids=!0},bu=class extends gu{},xu=class extends gu{return_token_type_ids=!0},Su=class extends gu{},Cu=class extends gu{},wu=class extends gu{},Tu=class extends gu{},Eu=class extends gu{},Du=class extends gu{},Ou=class extends gu{},ku=class extends gu{},Au=class extends gu{},ju=class extends gu{return_token_type_ids=!0},Mu=class extends gu{return_token_type_ids=!0},Nu=class extends gu{return_token_type_ids=!0},Pu=class extends gu{},Fu=class extends gu{return_token_type_ids=!0},Iu=class extends gu{},Lu=class extends gu{},Ru=class extends gu{},zu=class extends gu{},Bu=class extends gu{},Vu=class extends gu{return_token_type_ids=!0},Hu=class extends gu{padding_side=`left`},Uu=class extends gu{constructor(e,t){super(e,t),this.languageRegex=/^__[a-z]{2,3}__$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)).map(e=>e.slice(2,-2)),this.lang_to_token=e=>`__${e}__`}_build_translation_inputs(e,t,n){return _u(this,e,t,n)}},Wu=class extends gu{constructor(e,t){super(e,t),this.languageRegex=/^(>>\w+<<)\s*/g,this.supported_language_codes=Array.from(this.get_vocab().keys()).filter(e=>this.languageRegex.test(e)),zi.warn('WARNING: `MarianTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}_encode_text(e){if(e===null)return null;let[t,...n]=e.trim().split(this.languageRegex);if(n.length===0)return super._encode_text(t);if(n.length===2){let[e,t]=n;return this.supported_language_codes.includes(e)||zi.warn(`Unsupported language code "${e}" detected, which may lead to unexpected behavior. Should be one of: ${JSON.stringify(this.supported_language_codes)}`),Pi([e],super._encode_text(t))}}},Gu=class extends gu{constructor(e,t){super(e,t),this.languageRegex=/^[a-z]{2}_[A-Z]{2}$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)).map(e=>e),this.lang_to_token=e=>e}_build_translation_inputs(e,t,n){return _u(this,e,t,n)}},Ku=class extends Gu{},qu=class extends gu{},Ju=class extends gu{return_token_type_ids=!0},Yu=class extends gu{},Xu=class extends gu{constructor(e,t){super(e,t),this.languageRegex=/^[a-z]{3}_[A-Z][a-z]{3}$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)),this.lang_to_token=e=>e}_build_translation_inputs(e,t,n){return _u(this,e,t,n)}},Zu=class extends gu{},Qu=class extends gu{},$u=class extends gu{},ed=class extends gu{return_token_type_ids=!0},td=class extends gu{},nd=class extends gu{},rd=class extends gu{return_token_type_ids=!0},id=class extends gu{},ad=class extends oo{decode_chain(e){let t=``;for(let n=1;n[t,e]),...[[`burmese`,`my`],[`valencian`,`ca`],[`flemish`,`nl`],[`haitian`,`ht`],[`letzeburgesch`,`lb`],[`pushto`,`ps`],[`panjabi`,`pa`],[`moldavian`,`ro`],[`moldovan`,`ro`],[`sinhalese`,`si`],[`castilian`,`es`]]]);function dd(e){e=e.toLowerCase();let t=ud.get(e);if(t===void 0){let n=e.match(/^<\|([a-z]{2})\|>$/);if(n&&(e=n[1]),ld.has(e))t=e;else{let t=e.length===2?ld.keys():ld.values();throw Error(`Language "${e}" is not supported. Must be one of: ${JSON.stringify(Array.from(t))}`)}}return t}var fd=RegExp(`^[\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E]+$`,`gu`),pd=.1,md=class extends gu{get timestamp_begin(){return this._tokenizer.token_to_id(`<|notimestamps|>`)+1}_decode_asr(e,{return_timestamps:t=!1,return_language:n=!1,time_precision:r=null,force_full_sequences:i=!0}={}){if(r===null)throw Error(`Must specify time_precision`);let a=null,o=t===`word`;function s(){return{language:a,timestamp:[null,null],text:``}}let c=[],l=s(),u=0,d=this.timestamp_begin,f=d+1500,p=[],m=[],h=!1,g=null,_=new Set(this.all_special_ids);for(let n of e){let e=n.tokens,i=o?n.token_timestamps:null,v=null,y=d;if(`stride`in n){let[t,i,a]=n.stride;if(u-=i,g=t-a,i&&(y=i/r+d),a)for(let t=e.length-1;t>=0;--t){let n=Number(e[t]);if(n>=d){if(v!==null&&(n-d)*r=d&&g<=f){let e=Xc((g-d)*r+u,2);if(v!==null&&g>=v)h=!0;else if(h||p.length>0&&g0&&l.timestamp[1]!==null))for(let e of l.words)e.timestamp[1]>l.timestamp[1]&&l.timestamp[1]>=e.timestamp[0]&&(e.timestamp[1]=l.timestamp[1]);c.push(l),p=[],b=[],m=[],x=[],l=s()}}else if(b.push(g),o){let e=Xc(i[n]+u,2),t;if(n+10?(p.push(b),o&&m.push(x)):p.every(e=>e.length===0)&&(l=s(),p=[],b=[],m=[],x=[])}if(p.length>0){if(i&&t)throw Error(`Whisper did not predict an ending timestamp, which can happen if audio is cut off in the middle of a word. Also make sure WhisperTimeStampLogitsProcessor was used during generation.`);let[e,n]=this.findLongestCommonSequence(p,m),r=this.decode(e);l.text=r,o&&(l.words=this.collateWordTimestamps(e,n,a)),c.push(l)}let v=Object.create(null),y=c.map(e=>e.text).join(``);if(t||n){for(let e=0;e0,o=a?[]:null,s=a?t[0]:null;for(let c=1;ce===g[n]&&s[i+n][0]-pd<=t[c][m+n][0]).length:p.filter((e,t)=>e===g[t]).length;let v=e/1e4,y=_/e+v;_>1&&y>u&&(u=y,d=[i,o,m,h])}let[p,m,h,g]=d,_=Math.floor((m+p)/2),v=Math.floor((g+h)/2);if(a&&u===0&&r>0){let e=s[r-1][0],n=t[c].findIndex(t=>t[0]>=e);v=n===-1?l.length:n}i.push(...n.slice(0,_)),n=l.slice(v),r=n.length,a&&(o.push(...s.slice(0,_)),s=t[c].slice(v))}return i.push(...n),a?(o.push(...s),[i,o]):[i,[]]}collateWordTimestamps(e,t,n){let[r,i,a]=this.combineTokensIntoWords(e,n),o=[];for(let e=0;e=r){let e=((t-r)*n).toFixed(2);i.push(`<|${e}|>`),i.push([])}else i[i.length-1].push(t);return i=i.map(e=>typeof e==`string`?e:super.decode(e,t)),i.join(``)}splitTokensOnUnicode(e){let t=this.decode(e,{decode_with_timestamps:!0}),n=[],r=[],i=[],a=[],o=[],s=0;for(let c=0;c=this._tokenizer.token_to_id(`<|endoftext|>`),d=s.startsWith(` `),f=s.trim(),p=fd.test(f);if(u||d||p||i.length===0)i.push(s),a.push(c),o.push(l);else{let e=i.length-1;i[e]+=s,a[e].push(...c),o[e].push(...l)}}return[i,a,o]}mergePunctuations(e,t,n,r,i){let a=structuredClone(e),o=structuredClone(t),s=structuredClone(n),c=a.length-2,l=a.length-1;for(;c>=0;)a[c].startsWith(` `)&&r.includes(a[c].trim())?(a[l]=a[c]+a[l],o[l]=Pi(o[c],o[l]),s[l]=Pi(s[c],s[l]),a[c]=``,o[c]=[],s[c]=[]):l=c,--c;for(c=0,l=1;le),o.filter(e=>e.length>0),s.filter(e=>e.length>0)]}},hd=class extends gu{},gd=class extends gu{return_token_type_ids=!0;constructor(e,t){super(e,t),zi.warn('WARNING: `XLMTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}},_d=class{static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`}={}){let[o,s]=await lu(e,{progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a}),c=s.tokenizer_class?.replace(/Fast$/,``)??`PreTrainedTokenizer`,l=vu[c];return l||=(zi.warn(`Unknown tokenizer class "${c}", attempting to construct from base class.`),gu),new l(o,s)}},vd=`https://github.com/huggingface/transformers.js/issues/new/choose`,yd=`preprocessor_config.json`,bd=yd,xd=`processor_config.json`,Sd=`chat_template.jinja`,Cd=class extends Oi{static classes=[`image_processor_class`,`tokenizer_class`,`feature_extractor_class`];static uses_processor_config=!1;static uses_chat_template_file=!1;constructor(e,t,n){super(),this.config=e,this.components=t,this.chat_template=n}get image_processor(){return this.components.image_processor}get tokenizer(){return this.components.tokenizer}get feature_extractor(){return this.components.feature_extractor}apply_chat_template(e,t={}){if(!this.tokenizer)throw Error(`Unable to apply chat template without a tokenizer.`);return this.tokenizer.apply_chat_template(e,{tokenize:!1,chat_template:this.chat_template??void 0,...t})}batch_decode(...e){if(!this.tokenizer)throw Error(`Unable to decode without a tokenizer.`);return this.tokenizer.batch_decode(...e)}decode(...e){if(!this.tokenizer)throw Error(`Unable to decode without a tokenizer.`);return this.tokenizer.decode(...e)}async _call(e,...t){for(let n of[this.image_processor,this.feature_extractor,this.tokenizer])if(n)return n(e,...t);throw Error(`No image processor, feature extractor, or tokenizer found.`)}static async from_pretrained(e,t={}){let[n,r,i]=await Promise.all([this.uses_processor_config?Rc(e,xd,!0,t):{},Promise.all(this.classes.filter(e=>e in this).map(async n=>{let r=await this[n].from_pretrained(e,t);return[n.replace(/_class$/,``),r]})).then(Object.fromEntries),this.uses_chat_template_file?Lc(e,Sd,!0,t):null]);return new this(n,r,i)}},wd={};Yr(wd,{ChatterboxProcessor:()=>vf,CohereAsrProcessor:()=>bf,Florence2Processor:()=>um,Gemma3Processor:()=>dm,Gemma3nProcessor:()=>fm,Gemma4Processor:()=>pm,Glm46VProcessor:()=>hm,GraniteSpeechProcessor:()=>gm,GroundingDinoProcessor:()=>vm,Idefics3Processor:()=>Sm,JinaCLIPProcessor:()=>wm,Lfm2VlProcessor:()=>Tm,LlavaProcessor:()=>Em,MgpstrProcessor:()=>Om,MoonshineProcessor:()=>km,OwlViTProcessor:()=>Am,PaliGemmaProcessor:()=>Nm,Phi3VProcessor:()=>Im,PixtralProcessor:()=>Lm,Processor:()=>Cd,PyAnnoteProcessor:()=>Rm,Qwen2VLProcessor:()=>mm,Qwen2_5_VLProcessor:()=>zm,Qwen3VLProcessor:()=>Bm,Sam2Processor:()=>Hm,Sam2VideoProcessor:()=>Um,SamProcessor:()=>Vm,SmolVLMProcessor:()=>Sm,SpeechT5Processor:()=>Wm,UltravoxProcessor:()=>Gm,VLChatProcessor:()=>Cm,VoxtralProcessor:()=>Xm,VoxtralRealtimeProcessor:()=>nh,Wav2Vec2Processor:()=>rh,Wav2Vec2ProcessorWithLM:()=>ih,WhisperProcessor:()=>ah});var Td=class extends Oi{constructor(e){super(),this.config=e}static async from_pretrained(e,t={}){let n=await Rc(e,yd,!0,t);return new this(n)}};function Ed(e,t){if(!(e instanceof Float32Array||e instanceof Float64Array))throw Error(`${t} expects input to be a Float32Array or a Float64Array, but got ${e?.constructor?.name??typeof e} instead. If using the feature extractor directly, remember to use \`read_audio(url, sampling_rate)\` to obtain the raw audio data of the file/url.`)}var Dd={};Yr(Dd,{ASTFeatureExtractor:()=>Xd,ChatterboxFeatureExtractor:()=>Qd,ClapFeatureExtractor:()=>$d,CohereAsrFeatureExtractor:()=>nf,DacFeatureExtractor:()=>rf,EncodecFeatureExtractor:()=>Zd,FeatureExtractor:()=>Td,Gemma3nAudioFeatureExtractor:()=>af,Gemma4AudioFeatureExtractor:()=>of,GraniteSpeechFeatureExtractor:()=>sf,MoonshineFeatureExtractor:()=>cf,ParakeetFeatureExtractor:()=>tf,PyAnnoteFeatureExtractor:()=>lf,SeamlessM4TFeatureExtractor:()=>uf,SnacFeatureExtractor:()=>df,SpeechT5FeatureExtractor:()=>ff,VoxtralRealtimeFeatureExtractor:()=>hf,Wav2Vec2FeatureExtractor:()=>pf,WeSpeakerFeatureExtractor:()=>mf,WhisperFeatureExtractor:()=>gf});var Od={fromWeb:()=>{}};async function kd(e,t){if(_i.IS_BROWSER_ENV){if(_i.IS_WEBWORKER_ENV)throw Error(`Unable to save a file from a Web Worker.`);let n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),r.remove(),URL.revokeObjectURL(n)}else if(_i.IS_FS_AVAILABLE){let n=t.stream();await(Od.fromWeb(n),Xr.createWriteStream(e),void 0)}else throw Error(`Unable to save because filesystem is disabled in this environment.`)}async function Ad(e,t){if(typeof AudioContext>`u`)throw Error("Unable to load audio from path/URL since `AudioContext` is not available in your environment. Instead, audio data should be passed directly to the pipeline/processor. For more information and some example code, see https://huggingface.co/docs/transformers.js/guides/node-audio-processing.");let n=await(await kc(e)).arrayBuffer(),r=new AudioContext({sampleRate:t});t===void 0&&zi.warn(`No sampling rate provided, using default of ${r.sampleRate}Hz.`);let i=await r.decodeAudioData(n),a;if(i.numberOfChannels===2){let e=Math.sqrt(2),t=i.getChannelData(0),n=i.getChannelData(1);a=new Float32Array(t.length);for(let r=0;r2595*Math.log10(1+e/700),kaldi:e=>1127*Math.log(1+e/700),slaney:(e,t=1e3,n=15,r=27/Math.log(6.4))=>e>=t?n+Math.log(e/t)*r:3*e/200};function Fd(e,t=`htk`){let n=Pd[t];if(!n)throw Error(`mel_scale should be one of "htk", "slaney" or "kaldi".`);return typeof e==`number`?n(e):e.map(e=>n(e))}var Id={htk:e=>700*(10**(e/2595)-1),kaldi:e=>700*(Math.exp(e/1127)-1),slaney:(e,t=1e3,n=15,r=Math.log(6.4)/27)=>e>=n?t*Math.exp(r*(e-n)):200*e/3};function Ld(e,t=`htk`){let n=Id[t];if(!n)throw Error(`mel_scale should be one of "htk", "slaney" or "kaldi".`);return typeof e==`number`?n(e):e.map(e=>n(e))}function Rd(e,t){let n=Float64Array.from({length:t.length-1},(e,n)=>t[n+1]-t[n]),r=Array.from({length:e.length},()=>Array(t.length));for(let n=0;nArray(e.length));for(let t=0;te+r*n)}function Bd(e,t,n,r,i,a=null,o=`htk`,s=!1){if(a!==null&&a!==`slaney`)throw Error(`norm must be one of null or "slaney"`);if(e<2)throw Error(`Require num_frequency_bins: ${e} >= 2`);if(n>r)throw Error(`Require min_frequency: ${n} <= max_frequency: ${r}`);let c=zd(Fd(n,o),Fd(r,o),t+2),l=Ld(c,o),u;if(s){let t=i/((e-1)*2);u=Fd(Float64Array.from({length:e},(e,n)=>n*t),o),l=c}else u=zd(0,Math.floor(i/2),e);let d=Rd(u,l);if(a!==null&&a===`slaney`)for(let n=0;ni)throw Error(`frame_length (${n}) may not be larger than fft_length (${i})`);if(T!==n)throw Error(`Length of the window (${T}) must equal frame_length (${n})`);if(r<=0)throw Error(`hop_length must be greater than zero`);if(a===null&&d!==null)throw Error("You have provided `mel_filters` but `power` is `None`. Mel spectrogram computation is not yet supported for complex-valued spectrogram. Specify `power` to fix this issue.");if(!u)throw Error("`preemphasis_htk_flavor=false` is not currently supported.");if(o){let t=Math.floor(n/2);switch(s){case`reflect`:e=Vd(e,t,t);break;case`constant`:{let n=new e.constructor(e.length+2*t);n.set(e,t),e=n;break}case`semicausal`:{let n=new e.constructor(e.length+t);n.set(e,t),e=n;break}default:throw Error(`pad_mode="${s}" not implemented yet.`)}}let ee=Math.floor(1+Math.floor((e.length-n)/r));y!==null&&eeee?x&&(E=b):E=ne=b);let D=new Jc(i),re=new Float64Array(i),ie=new Float64Array(D.outputBufferSize),ae=new Float32Array(te*E);for(let i=0;i=1;--e)re[e]-=l*re[e-1];re[0]*=1-l}for(let e=0;ee**.85);break;default:throw Error(`Unknown window type ${t}.`)}if(n&&(o=o.subarray(0,e)),r===null||e===r)return o;if(e>r)throw Error(`Length of the window (${e}) may not be larger than frame_length (${r})`);let s=new Float64Array(r),c=i?Math.floor((r-e)/2):0;return s.set(o,c),s}function qd(e,t){let n=e.reduce((e,t)=>e+t.length,0),r=new ArrayBuffer(44),i=new DataView(r);return Jd(i,0,`RIFF`),i.setUint32(4,36+n*4,!0),Jd(i,8,`WAVE`),Jd(i,12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,3,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*4,!0),i.setUint16(32,4,!0),i.setUint16(34,32,!0),Jd(i,36,`data`),i.setUint32(40,n*4,!0),new Blob([r,...e.map(e=>e.buffer)],{type:`audio/wav`})}function Jd(e,t,n){for(let r=0;re+t.length,0),t=new Float32Array(e),n=0;for(let e of this.audio)t.set(e,n),n+=e.length;return t}else return this.audio}toBlob(){let e=this.audio;return e instanceof Float32Array&&(e=[e]),qd(e,this.sampling_rate)}async save(e){return kd(e,this.toBlob())}},Xd=class extends Td{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=Bd(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=Kd(400,`hann`,{periodic:!1}),this.mean=this.config.mean,this.std=this.config.std}async _extract_fbank_features(e,t){return Gd(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,max_num_frames:t,transpose:!0})}async _call(e){Ed(e,`ASTFeatureExtractor`);let t=await this._extract_fbank_features(e,this.config.max_length);if(this.config.do_normalize){let e=this.std*2,n=t.data;for(let t=0;t0)if(n===`rand_trunc`){let n=Math.floor(ic.random()*(a+1));e=e.subarray(n,n+t),i=await this._extract_fbank_features(e,this.mel_filters_slaney,this.config.nb_max_samples)}else throw Error(`Truncation strategy "${n}" not implemented`);else{if(a<0){let n=new Float64Array(t);if(n.set(e),r===`repeat`)for(let r=e.length;r=1;--n)e[n]-=t*e[n-1];return await Gd(e,this.window,this.window.length,this.config.hop_length,{fft_length:this.config.n_fft,power:2,mel_filters:this.config.mel_filters,log_mel:`log`,mel_floor:-1/0,pad_mode:`constant`,center:!0,transpose:!0,mel_offset:2**-24})}async _call(e){Ed(e,`ParakeetFeatureExtractor`);let t=await this._extract_fbank_features(e),n=Math.floor((e.length+Math.floor(this.config.n_fft/2)*2-this.config.n_fft)/this.config.hop_length),r=t.data;r.fill(0,n*t.dims[1]);let[i,a]=t.dims,o=new Float64Array(a),s=new Float64Array(a);for(let e=0;e1?n-1:1;for(let e=0;e=l){s.push(e.slice(c,l));break}let t=Math.max(c,c+a-o),n=Math.min(c+a,l),i;i=n<=t?c+a:this._find_split_point_energy(e,t,n,r),i=Math.max(c+1,Math.min(i,l)),s.push(e.slice(c,i)),c=i}return s}_find_split_point_energy(e,t,n,r){let i=n-t;if(i<=r)return Math.floor((t+n)/2);let a=1/0,o=t,s=i-r;for(let n=0;n<=s;n+=r){let i=0;for(let a=0;at&&(e=e.slice(0,t)),r&&e.length%i!==0){let t=i-e.length%i,n=new Float64Array(e.length+t);n.set(e),this.config.padding_value!==0&&n.fill(this.config.padding_value,e.length),e=n}let a=await this._extract_fbank_features(e,this.config.max_length),o=eu([1,a.dims[0]],!0);return{input_features:a.unsqueeze_(0),input_features_mask:o}}},of=class extends af{async _extract_fbank_features(e,t){let{frame_length:n,hop_length:r,fft_length:i}=this.config,a=Math.floor(n/2),o=Math.floor((e.length+a-(n+1))/r)+1;return Gd(e,this.window,n,r,{fft_length:i,center:!0,pad_mode:`semicausal`,onesided:!0,preemphasis:this.config.preemphasis,preemphasis_htk_flavor:this.config.preemphasis_htk_flavor,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:this.config.mel_floor,mel_floor_mode:`add`,remove_dc_offset:!1,transpose:!0,max_num_frames:o})}async _call(e,t={}){Ed(e,`Gemma4AudioFeatureExtractor`);let n=e.length,r=await super._call(e,t),{input_features:i}=r,[,a,o]=i.dims,{frame_length:s,hop_length:c}=this.config,l=Math.floor(s/2),u=s+1,d=new Uint8Array(n+l+(t.pad_to_multiple_of??128));d.fill(1,l,l+n);let f=new Uint8Array(a);for(let e=0;e({id:e,start:t*n,end:r*n,confidence:i/(r-t)})))}return r}},uf=class extends Td{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=Bd(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=Kd(400,`povey`,{periodic:!1})}async _extract_fbank_features(e,t){return e=e.map(e=>e*32768),Gd(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,max_num_frames:t,transpose:!0})}async _call(e,{padding:t=!0,pad_to_multiple_of:n=2,do_normalize_per_mel_bins:r=!0,return_attention_mask:i=!0}={}){Ed(e,`SeamlessM4TFeatureExtractor`);let a=await this._extract_fbank_features(e,this.config.max_length);if(r){let[e,t]=a.dims,n=a.data;for(let r=0;r0){let n=new Float32Array(t*(e+s));n.set(r),n.fill(this.config.padding_value,r.length);let c=e+s;a=new A(a.type,n,[c,t]),i&&(o=new A(`int64`,new BigInt64Array(c),[1,c]),o.data.fill(1n,0,e))}}let[s,c]=a.dims,l=this.config.stride;if(s%l!==0)throw Error(`The number of frames (${s}) must be a multiple of the stride (${l}).`);let u=a.view(1,Math.floor(s/l),c*l),d={input_features:u};if(i){let e=u.dims[1],t=new BigInt64Array(e);if(o){let e=o.data;for(let n=1,r=0;ne+t,0)/e.length,n=e.reduce((e,n)=>e+(n-t)**2,0)/e.length;return e.map(e=>(e-t)/Math.sqrt(n+1e-7))}async _call(e){Ed(e,`Wav2Vec2FeatureExtractor`),e instanceof Float64Array&&(e=new Float32Array(e));let t=e;this.config.do_normalize&&(t=this._zero_mean_unit_var_norm(t));let n=[1,t.length];return{input_values:new A(`float32`,t,n),attention_mask:new A(`int64`,new BigInt64Array(t.length).fill(1n),n)}}},mf=class extends Td{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=Bd(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=Kd(400,`hamming`,{periodic:!1}),this.min_num_frames=this.config.min_num_frames}async _extract_fbank_features(e){return e=e.map(e=>e*32768),Gd(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,transpose:!0,min_num_frames:this.min_num_frames})}async _call(e){Ed(e,`WeSpeakerFeatureExtractor`);let t=(await this._extract_fbank_features(e)).unsqueeze_(0);if(this.config.fbank_centering_span===null){let e=t.mean(1).data,n=t.data,[r,i,a]=t.dims;for(let t=0;tr?(e.length>this.config.n_samples&&zi.warn("Attempting to extract features for audio longer than 30 seconds. If using a pipeline to extract transcript from a long audio clip, remember to specify `chunk_length_s` and/or `stride_length_s`."),n=e.slice(0,r)):(n=new Float32Array(r),n.set(e)),{input_features:(await this._extract_fbank_features(n)).unsqueeze_(0)}}},_f=class{static async from_pretrained(e,t={}){let n=await Rc(e,yd,!0,t),r=n.feature_extractor_type,i=Dd[r];if(!i)throw Error(`Unknown feature_extractor_type: '${r}'. Please report this at ${vd}.`);return new i(n)}},vf=class extends Cd{static tokenizer_class=_d;static feature_extractor_class=_f;async _call(e,t=null){let n=this.tokenizer(e),r=t?await this.feature_extractor(t):{};return{...n,...r}}},yf=new Set([`ja`,`zh`]),bf=class extends Cd{static tokenizer_class=_d;static feature_extractor_class=_f;static uses_processor_config=!0;get_decoder_prompt_ids(e=`en`){let t=[`▁`,`<|startofcontext|>`,`<|startoftranscript|>`,`<|emo:undefined|>`,`<|${e}|>`,`<|${e}|>`,`<|pnc|>`,`<|noitn|>`,`<|notimestamp|>`,`<|nodiarize|>`];return this.tokenizer.convert_tokens_to_ids(t)}static join_chunks(e,t=`en`){let n=e.filter(e=>e&&e.trim());if(n.length===0)return``;let r=yf.has(t)?``:` `;return[n[0].trimEnd(),...n.slice(1).map(e=>e.trim())].join(r)}async _call(e){return await this.feature_extractor(e)}},xf={},Sf,Cf,wf;if(_i.IS_WEB_ENV)Sf=(e,t)=>{if(!self.OffscreenCanvas)throw Error(`OffscreenCanvas not supported by this environment.`);return new self.OffscreenCanvas(e,t)},wf=self.createImageBitmap,Cf=self.ImageData;else if(xf)wf=async e=>{let t=(await e.metadata()).channels,{data:n,info:r}=await e.rotate().raw().toBuffer({resolveWithObject:!0}),i=new Df(new Uint8ClampedArray(n),r.width,r.height,r.channels);return t!==void 0&&t!==r.channels&&i.convert(t),i};else throw Error(`Unable to load image processing library.`);var Tf={0:`nearest`,1:`lanczos`,2:`bilinear`,3:`bicubic`,4:`box`,5:`hamming`},Ef=new Map([[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`gif`,`image/gif`]]),Df=class e{constructor(e,t,n,r){this.data=e,this.width=t,this.height=n,this.channels=r}get size(){return[this.width,this.height]}static async read(t){if(t instanceof e)return t;if(typeof t==`string`||t instanceof URL)return await this.fromURL(t);if(t instanceof Blob)return await this.fromBlob(t);if(typeof HTMLCanvasElement<`u`&&t instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&t instanceof OffscreenCanvas)return this.fromCanvas(t);throw Error(`Unsupported input type: ${typeof t}`)}static fromCanvas(t){if(!_i.IS_WEB_ENV)throw Error(`fromCanvas() is only supported in browser environments.`);let n=t.getContext(`2d`).getImageData(0,0,t.width,t.height).data;return new e(n,t.width,t.height,4)}static async fromURL(e){let t=await kc(e);if(t.status!==200)throw Error(`Unable to read image from "${e}" (${t.status} ${t.statusText})`);let n=await t.blob();return this.fromBlob(n)}static async fromBlob(e){if(_i.IS_WEB_ENV){let t=await wf(e),n=Sf(t.width,t.height).getContext(`2d`);return n.drawImage(t,0,0),new this(n.getImageData(0,0,t.width,t.height).data,t.width,t.height,4)}else{let t=xf(await e.arrayBuffer());return await wf(t)}}static fromTensor(t,n=`CHW`){if(t.dims.length!==3)throw Error(`Tensor should have 3 dimensions, but has ${t.dims.length} dimensions.`);if(n===`CHW`)t=t.transpose(1,2,0);else if(n!==`HWC`)throw Error(`Unsupported channel format: ${n}`);if(!(t.data instanceof Uint8ClampedArray||t.data instanceof Uint8Array))throw Error(`Unsupported tensor type: ${t.type}`);switch(t.dims[2]){case 1:case 2:case 3:case 4:return new e(t.data,t.dims[1],t.dims[0],t.dims[2]);default:throw Error(`Unsupported number of channels: ${t.dims[2]}`)}}grayscale(){if(this.channels===1)return this;let e=new Uint8ClampedArray(this.width*this.height*1);switch(this.channels){case 3:case 4:for(let t=0,n=0;t=0?c=r:u=-r,i>=0?l=i:d=-i,s.drawImage(o,c,l,t,n,u,d,t,n),new e(s.getImageData(0,0,t,n).data,t,n,4).convert(a)}else{let e=this.toSharp();if(r>=0&&i>=0)e=e.extract({left:Math.floor(r),top:Math.floor(i),width:t,height:n});else if(r<=0&&i<=0){let a=Math.floor(-i),o=Math.floor(-r);e=e.extend({top:a,left:o,right:t-this.width-o,bottom:n-this.height-a})}else{let a=[0,0],o=0;i<0?(a[0]=Math.floor(-i),a[1]=n-this.height-a[0]):o=Math.floor(i);let s=[0,0],c=0;r<0?(s[0]=Math.floor(-r),s[1]=t-this.width-s[0]):c=Math.floor(r),e=e.extend({top:a[0],bottom:a[1],left:s[0],right:s[1]}).extract({left:c,top:o,width:t,height:n})}return await wf(e)}}async toBlob(e=`image/png`,t=1){if(!_i.IS_WEB_ENV)throw Error(`toBlob() is only supported in browser environments.`);return await this.toCanvas().convertToBlob({type:e,quality:t})}toTensor(e=`CHW`){let t=new A(`uint8`,new Uint8Array(this.data),[this.height,this.width,this.channels]);if(e!==`HWC`)if(e===`CHW`)t=t.permute(2,0,1);else throw Error(`Unsupported channel format: ${e}`);return t}toCanvas(){if(!_i.IS_WEB_ENV)throw Error(`toCanvas() is only supported in browser environments.`);let e=this.clone().rgba(),t=Sf(e.width,e.height),n=new Cf(e.data,e.width,e.height);return t.getContext(`2d`).putImageData(n,0,0),t}split(){let{data:t,width:n,height:r,channels:i}=this,a=t.constructor,o=t.length/i,s=Array.from({length:i},()=>new a(o));for(let e=0;enew e(t,n,r,1))}_update(e,t,n,r=null){return this.data=e,this.width=t,this.height=n,r!==null&&(this.channels=r),this}clone(){return new e(this.data.slice(),this.width,this.height,this.channels)}convert(e){if(this.channels===e)return this;switch(e){case 1:this.grayscale();break;case 3:this.rgb();break;case 4:this.rgba();break;default:throw Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this}async save(e){if(_i.IS_WEB_ENV){if(_i.IS_WEBWORKER_ENV)throw Error(`Unable to save an image from a Web Worker.`);let t=e.split(`.`).pop().toLowerCase(),n=Ef.get(t)??`image/png`;return kd(e,await this.toBlob(n))}else if(_i.IS_FS_AVAILABLE)await this.toSharp().toFile(e);else throw Error(`Unable to save the image because filesystem is disabled in this environment.`)}toSharp(){if(_i.IS_WEB_ENV)throw Error(`toSharp() is only supported in server-side environments.`);return xf(this.data,{raw:{width:this.width,height:this.height,channels:this.channels}})}},Of=Df.read.bind(Df);function kf(e,t,n=0,r=null){let i=e/t,a=Zc(i)*t;return r!==null&&a>r&&(a=Math.floor(i)*t),at&&i.push(e)}else{let e=Wc(n.data)[1];if(e===c-1||(a=Vc(n.data),a[e]e*o[(t+1)%2])),u.boxes.push(n),u.classes.push(t),u.scores.push(a[t])}}l.push(u)}return l}function Nf(e,t=null){let n=e.logits,r=n.dims[0];if(t!==null&&t.length!==r)throw Error(`Make sure that you pass in as many target sizes as the batch dimension of the logits`);let i=[];for(let e=0;el[n]&&(l[n]=t[n],u[n]=e)}let d=Array(a.dims[0]);for(let e=0;ee!==void 0);i.push({segmentation:c,labels:f})}return i}function Pf(e,t,n,r){let i=[],a=[],o=[];for(let s=0;sn&&(i.push(l),a.push(d),o.push(u))}return[i,a,o]}function Ff(e,t,n,r=.5,i=.8){let a=[],o=0,s=0,c=t[n].data;for(let t=0;t=r&&++s;let l=o>0&&s>0;return l&&=o/s>i,[l,a]}function If(e,t,n,r,i,a=null,o=null){let[s,c]=o??e[0].dims,l=new A(`int32`,new Int32Array(s*c),[s,c]),u=[];if(o!==null)for(let t=0;tf[e]&&(d[e]=n,f[e]=i[e])}let p=0,m=l.data;for(let a=0;a200)throw Error(`absolute aspect ratio must be smaller than 200, got ${Math.max(e,t)/Math.min(e,t)}`);let o=Math.round(e/n)*n,s=Math.round(t/n)*n;if(a*o*s>i){let r=Math.sqrt(a*e*t/i);o=Math.max(n,Math.floor(e/r/n)*n),s=Math.max(n,Math.floor(t/r/n)*n)}else if(a*o*si?c=Math.floor(i*s/r):i>r&&(s=Math.floor(r*c/i)),await e.resize(c,s,{resample:n}))}async crop_margin(e,t=200){let n=e.clone().grayscale(),r=Uc(n.data)[0],i=Wc(n.data)[0]-r;if(i===0)return e;let a=t/255,o=n.width,s=n.height,c=0,l=0,u=n.data;for(let e=0;ethis.preprocess(e)));return{pixel_values:Jl(n.map(e=>e.pixel_values),0),original_sizes:n.map(e=>e.original_size),reshaped_input_sizes:n.map(e=>e.reshaped_input_size)}}static async from_pretrained(e,t={}){let n=await Rc(e,bd,!0,t);return new this(n)}},Vf={};Yr(Vf,{BeitFeatureExtractor:()=>Hf,BitImageProcessor:()=>Uf,CHMv2ImageProcessor:()=>Gf,CLIPFeatureExtractor:()=>qf,CLIPImageProcessor:()=>Kf,ChineseCLIPFeatureExtractor:()=>Wf,ConvNextFeatureExtractor:()=>Yf,ConvNextImageProcessor:()=>Jf,DINOv3ViTImageProcessor:()=>ep,DPTFeatureExtractor:()=>ip,DPTImageProcessor:()=>rp,DeiTFeatureExtractor:()=>Zf,DeiTImageProcessor:()=>Xf,DetrFeatureExtractor:()=>$f,DetrImageProcessor:()=>Qf,DonutFeatureExtractor:()=>np,DonutImageProcessor:()=>tp,EfficientNetImageProcessor:()=>ap,GLPNFeatureExtractor:()=>fp,Gemma3ImageProcessor:()=>op,Gemma4ImageProcessor:()=>lp,Glm46VImageProcessor:()=>dp,GroundingDinoImageProcessor:()=>pp,Idefics3ImageProcessor:()=>mp,ImageFeatureExtractor:()=>Bf,ImageProcessor:()=>Bf,JinaCLIPImageProcessor:()=>gp,Lfm2VlImageProcessor:()=>Sp,LlavaOnevisionImageProcessor:()=>Cp,Mask2FormerImageProcessor:()=>Ep,MaskFormerFeatureExtractor:()=>Tp,MaskFormerImageProcessor:()=>wp,MobileNetV1FeatureExtractor:()=>Op,MobileNetV1ImageProcessor:()=>Dp,MobileNetV2FeatureExtractor:()=>Ap,MobileNetV2ImageProcessor:()=>kp,MobileNetV3FeatureExtractor:()=>Mp,MobileNetV3ImageProcessor:()=>jp,MobileNetV4FeatureExtractor:()=>Pp,MobileNetV4ImageProcessor:()=>Np,MobileViTFeatureExtractor:()=>Ip,MobileViTImageProcessor:()=>Fp,NougatImageProcessor:()=>Lp,OwlViTFeatureExtractor:()=>zp,OwlViTImageProcessor:()=>Rp,Owlv2ImageProcessor:()=>Bp,Phi3VImageProcessor:()=>Kp,PixtralImageProcessor:()=>qp,PvtImageProcessor:()=>Jp,Qwen2VLImageProcessor:()=>up,RTDetrImageProcessor:()=>Yp,Sam2ImageProcessor:()=>Xp,Sam3ImageProcessor:()=>Xp,SamImageProcessor:()=>Xp,SapiensFeatureExtractor:()=>Qp,SapiensImageProcessor:()=>Zp,SegformerFeatureExtractor:()=>em,SegformerImageProcessor:()=>$p,SiglipImageProcessor:()=>tm,SmolVLMImageProcessor:()=>mp,Swin2SRImageProcessor:()=>nm,VLMImageProcessor:()=>hp,ViTFeatureExtractor:()=>im,ViTImageProcessor:()=>rm,VitMatteImageProcessor:()=>am,VitPoseImageProcessor:()=>om,YolosFeatureExtractor:()=>cm,YolosImageProcessor:()=>sm});var Hf=class extends Bf{},Uf=class extends Bf{},Wf=class extends Bf{},Gf=class extends Bf{},Kf=class extends Bf{},qf=class extends Kf{},Jf=class extends Bf{constructor(e){super(e),this.crop_pct=this.config.crop_pct??224/256}async resize(e){let t=this.size?.shortest_edge;if(t===void 0)throw Error(`Size dictionary must contain 'shortest_edge' key.`);if(t<384){let n=Math.floor(t/this.crop_pct),[r,i]=this.get_resize_output_image_size(e,{shortest_edge:n});e=await e.resize(r,i,{resample:this.resample}),e=await e.center_crop(t,t)}else e=await e.resize(t,t,{resample:this.resample});return e}},Yf=class extends Jf{},Xf=class extends Bf{},Zf=class extends Xf{},Qf=class extends Bf{async _call(e){let t=await super._call(e),n=eu([t.pixel_values.dims[0],64,64],1n);return{...t,pixel_mask:n}}post_process_object_detection(...e){return Mf(...e)}post_process_panoptic_segmentation(...e){return Rf(...e)}post_process_instance_segmentation(...e){return zf(...e)}},$f=class extends Qf{},ep=class extends Bf{},tp=class extends Bf{pad_image(e,t,n,r={}){let[i,a,o]=t,s=this.image_mean;Array.isArray(this.image_mean)||(s=Array(o).fill(s));let c=this.image_std;Array.isArray(c)||(c=Array(o).fill(s));let l=s.map((e,t)=>-e/c[t]);return super.pad_image(e,t,n,{center:!0,constant_values:l,...r})}},np=class extends tp{},rp=class extends Bf{},ip=class extends rp{},ap=class extends Bf{constructor(e){super(e),this.include_top=this.config.include_top??!0,this.include_top&&(this.image_std=this.image_std.map(e=>e*e))}},op=class extends Bf{};function sp(e,t,n,r,i){let a=r*n**2,o=Math.sqrt(a/(e*t)),s=i*n,c=Math.floor(o*e/s)*s,l=Math.floor(o*t/s)*s;if(c===0&&l===0)throw Error(`Attempting to resize to a 0 x 0 image. Resized height should be divisible by \`pooling_kernel_size * patch_size\`=${s}.`);let u=Math.floor(r/i**2)*s;return c===0?(c=s,l=Math.min(Math.floor(t/e)*s,u)):l===0&&(l=s,c=Math.min(Math.floor(e/t)*s,u)),[c,l]}function cp(e,t,n,r,i,a,o){let s=Math.floor(t/i),c=Math.floor(n/i),l=s*c,u=i*i*r,d=new Float32Array(a*u),f=0;for(let t=0;ta),0));let l=a.dims[0]/o,u=a.dims[1],d=Math.floor(a.dims[2]/c),f=Math.floor(a.dims[3]/c);return{pixel_values:a.view(l,o,u,Math.floor(d/s),s,c,Math.floor(f/s),s,c).permute(0,3,6,4,7,2,1,5,8).view(l*d*f,u*o*c*c),image_grid_thw:new A(`int64`,[l,d,f],[1,3]),original_sizes:r,reshaped_input_sizes:i}}},dp=class extends up{get_resize_output_image_size(e,t){let n=this.patch_size*this.merge_size,r=this.config.temporal_patch_size??2;return Lf(e.height,e.width,n,this.min_pixels,this.max_pixels,r)}},fp=class extends Bf{},pp=class extends Bf{async _call(e){let t=await super._call(e),n=t.pixel_values.dims,r=nu([n[0],n[2],n[3]]);return{...t,pixel_mask:r}}},mp=class extends Bf{constructor(e){super(e),this.do_image_splitting=e.do_image_splitting??!0,this.max_image_size=e.max_image_size}get_resize_for_vision_encoder(e,t){let[n,r]=e.dims.slice(-2),i=r/n;return r>=n?(r=Math.ceil(r/t)*t,n=Math.floor(r/i),n=Math.ceil(n/t)*t):(n=Math.ceil(n/t)*t,r=Math.floor(n*i),r=Math.ceil(r/t)*t),{height:n,width:r}}async _call(e,{do_image_splitting:t=null,return_row_col_info:n=!1}={}){let r;if(!Array.isArray(e))r=[[e]];else{if(e.length===0||!e[0])throw Error(`No images provided.`);r=Array.isArray(e[0])?e:[e]}let i=[],a=[],o=[],s=[],c=[];for(let e of r){let n=await Promise.all(e.map(e=>this.preprocess(e)));s.push(...n.map(e=>e.original_size)),c.push(...n.map(e=>e.reshaped_input_size)),n.forEach(e=>e.pixel_values.unsqueeze_(0));let{longest_edge:r}=this.max_image_size,l;if(t??this.do_image_splitting){let e=Array(n.length),t=Array(n.length);l=await Promise.all(n.map(async(n,i)=>{let a=this.get_resize_for_vision_encoder(n.pixel_values,r),o=await Rl(n.pixel_values,{size:[a.height,a.width]}),{frames:s,num_splits_h:c,num_splits_w:l}=await this.split_image(o,this.max_image_size);return e[i]=c,t[i]=l,ql(s,0)})),a.push(e),o.push(t)}else{let e=[r,r];l=await Promise.all(n.map(t=>Rl(t.pixel_values,{size:e}))),a.push(Array(n.length).fill(0)),o.push(Array(n.length).fill(0))}i.push(ql(l,0))}let l=i.length,[u,d,f,p]=i[0].dims,m,h;if(l===1)m=i[0].unsqueeze_(0),h=eu([l,u,f,p],!0);else{let e=Math.max(...i.map(e=>e.dims.at(0)));h=eu([l,e,f,p],!0);let t=h.data,n=e*f*p;for(let r=0;rn||o>r){s=Math.ceil(a/n),c=Math.ceil(o/r);let t=Math.ceil(a/s),l=Math.ceil(o/c);for(let n=0;ne*this.rescale_factor)}pad_image(e,t,n,r){return super.pad_image(e,t,n,{constant_values:this.constant_values,center:!0,...r})}},gp=class extends Bf{constructor(e){let{resize_mode:t,fill_color:n,interpolation:r,size:i,...a}=e,o=t===`squash`?{width:i,height:i}:t===`shortest`?{shortest_edge:i}:{longest_edge:i},s=r===`bicubic`?3:2;super({...a,size:o,resample:s,do_center_crop:!0,crop_size:i,do_normalize:!0})}};function _p(e,t){return Math.round(e/t)*t}function vp(e,t,n,r,i){let a=1/0,o=[1,1],s=n*r;for(let n of t){let t=Math.abs(e-n[0]/n[1]);t.5*i*i*n[0]*n[1]&&(o=n)}return o}function yp(e,t){let n=[],r=new Set;for(let i=e;i<=t;++i)for(let a=1;a<=i;++a)for(let o=1;o<=i;++o){let i=a*o;if(i>=e&&i<=t){let e=a<<16|o;r.has(e)||(r.add(e),n.push([a,o]))}}return n.sort((e,t)=>e[0]*e[1]-t[0]*t[1])}function bp(e,t){let[n,r,i,a]=e.dims,o=Math.floor(i/t),s=Math.floor(a/t),c=t*t*r,l=e.data,u=new Float32Array(n*o*s*c),d=i*a;for(let e=0;ethis.max_image_tokens*(this.encoder_patch_size*this.downsample_factor)**2*this.max_pixels_tolerance}_get_grid_layout(e,t){let n=yp(this.min_tiles,this.max_tiles),[r,i]=vp(t/e,n,t,e,this.tile_size);return{grid_width:r,grid_height:i,target_width:this.tile_size*r,target_height:this.tile_size*i}}async _call(e,{return_row_col_info:t=null}={}){let n;n=Array.isArray(e)?Array.isArray(e[0])?e:[e]:[[e]];let r=[],i=[],a=[],o=[],s=[],c=[];for(let e of n){let t=await Promise.all(e.map(e=>this.preprocess(e,{do_pad:!1})));for(let{pixel_values:e}of t){let[,t,n]=e.dims,l=e.unsqueeze_(0),u=this.encoder_patch_size*this.downsample_factor,d=u**2,[f,p]=Lf(Math.max(u,t),Math.max(u,n),u,this.min_image_tokens*d,this.max_image_tokens*d).map(e=>Math.max(u,e)),m,h=1,g=1,_=this._is_image_too_large(t,n),v=this.do_image_splitting&&!(this.min_tiles===1&&this.max_tiles===1);if(_&&v){let{grid_width:e,grid_height:r,target_width:i,target_height:a}=this._get_grid_layout(t,n);h=r,g=e;let o=await Rl(l,{size:[a,i]});m=[];for(let t=0;t(e-this.image_mean[t])/this.image_std[t]);return super.pad_image(e,t,{width:s,height:o},{center:!0,constant_values:c,...r})}async _call(e,{num_crops:t=null}={}){if(this._num_crops=t??=this.config.num_crops,t<4||Gp(t)%1!=0)throw Error(`num_crops must be a square number >= 4`);Array.isArray(e)||(e=[e]);let n=e.length,r=await Promise.all(e.map(e=>this.preprocess(e))),i=r.map(e=>e.original_size),a=r.map(e=>e.reshaped_input_size),o=[];for(let{pixel_values:e}of r){e.unsqueeze_(0);let[n,r]=e.dims.slice(-2),i=await Rl(e,{size:[Vp,Vp],mode:`bicubic`});if(t>0){let a=[],s=Gp(t),c=Wp(r/s),l=Wp(n/s);for(let t=0;te.map(e=>Vp*Up(e/Vp)));return{pixel_values:s,original_sizes:i,reshaped_input_sizes:a,image_sizes:new A(`int64`,c.flat(),[n,2]),num_img_tokens:c.map(([e,t])=>this.calc_num_image_tokens_from_image_size(t,e))}}},qp=class extends Bf{get_resize_output_image_size(e,t){let{longest_edge:n}=t;if(n===void 0)throw Error(`size must contain 'longest_edge'`);let[r,i]=e.size,a=Math.max(r,i)/n,o=r,s=i;a>1&&(o=Math.floor(r/a),s=Math.floor(i/a));let{patch_size:c,spatial_merge_size:l}=this.config;if(!l)throw Error(`config must contain 'spatial_merge_size'`);let u=c*l,d=Math.floor((o-1)/u)+1,f=Math.floor((s-1)/u)+1;return[d*u,f*u]}},Jp=class extends Bf{},Yp=class extends Bf{post_process_object_detection(...e){return Mf(...e)}},Xp=class extends Bf{reshape_input_points(e,t,n,r=!1){e=structuredClone(e);let i=Ni(e);if(i.length===3)r||(i=[1,...i]),e=[e];else if(i.length!==4)throw Error("The input_points must be a 4D tensor of shape `batch_size`, `point_batch_size`, `nb_points_per_image`, `2`.");for(let r=0;re!==t.dims[n]))throw Error(`The first ${n.length} dimensions of 'input_points' and 'input_labels' must be the same.`);return new A(`int64`,e.flat(1/0).map(BigInt),n)}async _call(e,{input_points:t=null,input_labels:n=null,input_boxes:r=null}={}){let i=await super._call(e);if(t&&(i.input_points=this.reshape_input_points(t,i.original_sizes,i.reshaped_input_sizes)),n){if(!i.input_points)throw Error("`input_points` must be provided if `input_labels` are provided.");i.input_labels=this.add_input_labels(n,i.input_points)}return r&&(i.input_boxes=this.reshape_input_points(r,i.original_sizes,i.reshaped_input_sizes,!0)),i}async post_process_masks(e,t,n,{mask_threshold:r=0,binarize:i=!0,pad_size:a=null}={}){let o=[];a=a??this.pad_size??this.size;let s=[a.height,a.width];for(let a=0;ar&&(t[n]=1);u=new A(`bool`,t,u.dims)}o.push(u)}return o}generate_crop_boxes(e,t,{crop_n_layers:n=0,overlap_ratio:r=512/1500,points_per_crop:i=32,crop_n_points_downscale_factor:a=1}={}){}},Zp=class extends Bf{post_process_semantic_segmentation(...e){return Nf(...e)}},Qp=class extends Zp{},$p=class extends Bf{post_process_semantic_segmentation(...e){return Nf(...e)}},em=class extends $p{},tm=class extends Bf{},nm=class extends Bf{pad_image(e,t,n,r={}){let[i,a,o]=t;return super.pad_image(e,t,{width:a+(n-a%n)%n,height:i+(n-i%n)%n},{mode:`symmetric`,center:!1,constant_values:-1,...r})}},rm=class extends Bf{},im=class extends rm{},am=class extends Bf{async _call(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);let n=await Promise.all(e.map(e=>this.preprocess(e))),r=await Promise.all(t.map(e=>this.preprocess(e,{do_normalize:!1,do_convert_rgb:!1,do_convert_grayscale:!0})));return{pixel_values:Jl(n.map((e,t)=>ql([e.pixel_values,r[t].pixel_values],0)),0),original_sizes:n.map(e=>e.original_size),reshaped_input_sizes:n.map(e=>e.reshaped_input_size)}}},om=class extends Bf{post_process_pose_estimation(e,t,{threshold:n=null}={}){let r=e.tolist(),[i,a,o,s]=e.dims,c=[];for(let e=0;e/gm,bboxes:/([^<]+)?/gm},this.size_per_bin=1e3}construct_prompts(e){typeof e==`string`&&(e=[e]);let t=[];for(let n of e)if(this.task_prompts_without_inputs.has(n))t.push(this.task_prompts_without_inputs.get(n));else{for(let[e,r]of this.task_prompts_with_input)if(n.includes(e)){t.push(r.replaceAll(`{input}`,n).replaceAll(e,``));break}t.length!==e.length&&t.push(n)}return t}post_process_generation(e,t,n){let r=this.tasks_answer_post_processing_type.get(t)??`pure_text`;e=e.replaceAll(``,``).replaceAll(``,``);let i;switch(r){case`pure_text`:i=e;break;case`description_with_bboxes`:case`bboxes`:case`phrase_grounding`:case`ocr`:let a=r===`ocr`?`quad_boxes`:`bboxes`,o=e.matchAll(this.regexes[a]),s=[],c=[];for(let[e,t,...r]of o)s.push(t?t.trim():s.at(-1)??``),c.push(r.map((e,t)=>(Number(e)+.5)/this.size_per_bin*n[t%2]));i={labels:s,[a]:c};break;default:throw Error(`Task "${t}" (of type "${r}") not yet implemented.`)}return{[t]:i}}async _call(e,t=null,n={}){if(!e&&!t)throw Error(`Either text or images must be provided`);let r=await this.image_processor(e,n),i=t?this.tokenizer(this.construct_prompts(t),n):{};return{...r,...i}}},dm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;static uses_processor_config=!0;static uses_chat_template_file=!0;constructor(e,t,n){super(e,t,n),this.image_seq_length=this.config.image_seq_length;let{boi_token:r,image_token:i,eoi_token:a}=this.tokenizer.config;this.boi_token=r,this.image_token=i,this.eoi_token=a,this.full_image_sequence=` + +${r}${i.repeat(this.image_seq_length)}${a} + +`}async _call(e,t=null,n={}){typeof e==`string`&&(e=[e]);let r;return t&&(r=await this.image_processor(t,n),e=e.map(e=>e.replaceAll(this.boi_token,this.full_image_sequence))),{...this.tokenizer(e,n),...r}}},fm=class extends Cd{static image_processor_class=lm;static feature_extractor_class=_f;static tokenizer_class=_d;static uses_processor_config=!0;static uses_chat_template_file=!0;constructor(e,t,n){super(e,t,n),this.audio_seq_length=this.config.audio_seq_length,this.image_seq_length=this.config.image_seq_length;let{audio_token_id:r,boa_token:i,audio_token:a,eoa_token:o,image_token_id:s,boi_token:c,image_token:l,eoi_token:u}=this.tokenizer.config;this.audio_token_id=r,this.boa_token=i,this.audio_token=a,this.full_audio_sequence=` + +${i}${a.repeat(this.audio_seq_length)}${o} + +`,this.image_token_id=s,this.boi_token=c,this.image_token=l,this.full_image_sequence=` + +${c}${l.repeat(this.image_seq_length)}${u} + +`}async _call(e,t=null,n=null,r={}){typeof e==`string`&&(e=[e]);let i;n&&(i=await this.feature_extractor(n,r),e=e.map(e=>e.replaceAll(this.audio_token,this.full_audio_sequence)));let a;return t&&(a=await this.image_processor(t,r),e=e.map(e=>e.replaceAll(this.image_token,this.full_image_sequence))),{...this.tokenizer(e,r),...a,...i}}},pm=class extends Cd{static uses_processor_config=!0;static uses_chat_template_file=!0;constructor(e,t,n){super(e,t,n),this.audio_ms_per_token=this.config.audio_ms_per_token??40,this.audio_seq_length=this.config.audio_seq_length??750,this.image_seq_length=this.config.image_seq_length??280;let{audio_token:r,boa_token:i,eoa_token:a,image_token:o,boi_token:s,eoi_token:c}=this.tokenizer.config;this.audio_token=r,this.boa_token=i,this.eoa_token=a,this.image_token=o,this.boi_token=s,this.eoi_token=c}static async from_pretrained(e,t={}){let[n,r,i]=await Promise.all([Rc(e,xd,!0,t),_d.from_pretrained(e,t),Lc(e,Sd,!1,t)]),a={tokenizer:r};return n.image_processor&&(a.image_processor=new lp(n.image_processor)),n.feature_extractor&&(a.feature_extractor=new of(n.feature_extractor)),new this(n,a,i)}_compute_audio_num_tokens(e,t){let n=Math.round(t*20/1e3),r=Math.round(t*10/1e3),i=Math.floor(n/2),a=Math.floor((e+i-n-1)/r)+1;if(a<=0)return 0;for(let e=0;e<2;++e)a=Math.floor((a-1)/2)+1;return Math.min(a,this.audio_seq_length)}async _call(e,t=null,n=null,r={}){typeof e==`string`&&(e=[e]);let i;if(t){i=await this.image_processor(t,r);let n=i.num_soft_tokens_per_image,a=0;e=e.map(e=>e.replaceAll(this.image_token,()=>` + +${this.boi_token}${this.image_token.repeat(n[a++])}${this.eoi_token} + +`))}let a;if(n){let t=Array.isArray(n)?n:[n];a=await this.feature_extractor(t[0],r);let i=this.feature_extractor.config.sampling_rate??16e3,o=0;e=e.map(e=>e.replaceAll(this.audio_token,()=>` + +${this.boa_token}${this.audio_token.repeat(this._compute_audio_num_tokens(t[o++].length,i))}${this.eoa_token} + +`))}return{...this.tokenizer(e,r),...i,...a}}},mm=class extends Cd{static image_processor_class=lm;static tokenizer_class=_d;static image_token=`<|image_pad|>`;async _call(e,t=null,...n){Array.isArray(e)||(e=[e]);let r,i;if(t&&(r=await this.image_processor(t),i=r.image_grid_thw),i){let t=this.image_processor.config.merge_size**2,n=0,r=this.constructor.image_token,a=i.tolist();e=e.map(e=>{for(;e.includes(r);){let i=Number(a[n++].reduce((e,t)=>e*t,1n));e=e.replace(r,`<|placeholder|>`.repeat(Math.floor(i/t)))}return e.replaceAll(`<|placeholder|>`,r)})}return{...this.tokenizer(e),...r}}},hm=class extends mm{static image_token=`<|image|>`},gm=class extends Cd{static tokenizer_class=_d;static feature_extractor_class=_f;static uses_processor_config=!0;_get_num_audio_features(e){let{hop_length:t}=this.feature_extractor.config.melspec_kwargs,{projector_window_size:n,projector_downsample_rate:r}=this.feature_extractor.config,i=Math.floor(n/r),a=Math.floor(e/t)+1,o=Math.floor(a/2);return Math.ceil(o/n)*i}async _call(e,t=null,n={}){if(Array.isArray(e))throw Error(`Batched inputs are not supported yet.`);let r={};if(t){let{input_features:n}=await this.feature_extractor(t);r.input_features=n;let i=this._get_num_audio_features(t.length);r.input_features_mask=new A(`bool`,new Uint8Array(i).fill(1),[1,i]);let a=this.config.audio_token??`<|audio|>`;if(!e.includes(a))throw Error(`The input text does not contain the audio token ${a}.`);e=e.replaceAll(a,a.repeat(i))}return{...this.tokenizer(e,{add_special_tokens:!1,...n}),...r}}};function _m(e,t){let n=e.dims.at(-1)-1,r=e.tolist();r.fill(!1,0,1),r.fill(!1,n);let i=t.tolist();return r.map((e,t)=>e?t:null).filter(e=>e!==null).map(e=>i[e])}var vm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;async _call(e,t,n={}){let r=e?await this.image_processor(e,n):{};return{...t?this.tokenizer(t,n):{},...r}}post_process_grounded_object_detection(e,t,{box_threshold:n=.25,text_threshold:r=.25,target_sizes:i=null}={}){let{logits:a,pred_boxes:o}=e,s=a.dims[0];if(i!==null&&i.length!==s)throw Error(`Make sure that you pass in as many target sizes as the batch dimension of the logits`);let c=a.dims.at(1),l=a.sigmoid(),u=l.max(-1).tolist(),d=o.tolist().map(e=>e.map(e=>jf(e))),f=[];for(let e=0;ee.map((e,t)=>e*a[(t+1)%2])));let o=u[e],s=[],p=[],m=[];for(let i=0;i`+i.repeat(e);o+=` +`}return o+=` +${r}${a}`+i.repeat(e)+`${r}`,o}function bm(e,t,n,r){return`${t}${r}`+n.repeat(e)+`${t}`}function xm(e,t,n,r,i,a){return e===0&&t===0?bm(n,r,i,a):ym(n,e,t,r,i,a)}var Sm=class extends Cd{static image_processor_class=lm;static tokenizer_class=_d;static uses_processor_config=!0;fake_image_token=``;image_token=``;global_img_token=``;async _call(e,t=null,n={}){n.return_row_col_info??=!0;let r;t&&(r=await this.image_processor(t,n)),Array.isArray(e)||(e=[e]);let i=r.rows??[Array(e.length).fill(0)],a=r.cols??[Array(e.length).fill(0)],o=this.config.image_seq_len,s=[],c=[];for(let t=0;txm(e,l[t],o,this.fake_image_token,this.image_token,this.global_img_token)),d=n.split(this.image_token);if(d.length===0)throw Error(`The image token should be present in the text.`);let f=d[0];for(let e=0;ee.images).flatMap(e=>e.images).map(e=>Df.read(e)));let r=this.tokenizer,i=r.apply_chat_template(e,{tokenize:!1,add_generation_prompt:!0,chat_template:n}),a=e=>r.encode(e,{add_special_tokens:!1}),o=i.split(this.image_tag),s=o.length-1;if(t.length!==s)throw Error(`Number of images provided (${t.length}) does not match number of "${this.image_tag}" image tags (${s})`);let[c,l,u]=r.convert_tokens_to_ids([this.image_tag,this.image_start_tag,this.image_end_tag]),d=a(o[0]),f=Array(d.length).fill(!1);for(let e=1;e0){let e=await this.image_processor(t);return e.pixel_values.unsqueeze_(0),{...m,...e}}return m}},wm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;async _call(e=null,t=null,n={}){if(!e&&!t)throw Error(`Either text or images must be provided`);let r=e?this.tokenizer(e,n):{},i=t?await this.image_processor(t,n):{};return{...r,...i}}},Tm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;async _call(e,t=null,n={}){let{image_rows:r,image_cols:i,image_sizes:a,...o}=await this.image_processor(e,{...n,return_row_col_info:!0});if(t){let e=this.config.image_token??``,{tile_size:n=512,downsample_factor:o=2,encoder_patch_size:s=16,use_thumbnail:c=!0}=this.image_processor.config,l=e=>Math.ceil(Math.floor(e/s)/o),u=l(n)**2,d=this.config.image_start_token??`<|image_start|>`,f=this.config.image_end_token??`<|image_end|>`,p=this.config.image_thumbnail??`<|img_thumbnail|>`;Array.isArray(t)||(t=[t]);let m=0;t=t.map(t=>{let n=t.split(e);return n[0]+n.slice(1).map(t=>{let n=m++,[o,s]=a[n],h=r[n],g=i[n],_=l(o)*l(s),v=d;if(h>1||g>1){let t=e.repeat(u);for(let e=0;e`+t;c&&(v+=p+e.repeat(_))}else v+=e.repeat(_);return v+f+t}).join(``)})}return{...o,...t?this.tokenizer(t,n):{}}}},Em=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;static uses_processor_config=!0;async _call(e,t=null,n={}){let r=await this.image_processor(e,n);if(t){let[e,n]=r.pixel_values.dims.slice(-2),{image_token:i,patch_size:a,num_additional_image_tokens:o}=this.config,s=Math.floor(e/a)*Math.floor(n/a)+o;t=structuredClone(t),Array.isArray(t)||(t=[t]);for(let e=0;e0?i.reduce((e,t)=>e*t,1):0;c.push(n),s.push(a)}return[i(c),s]}char_decode(e){return this.char_tokenizer.batch_decode(e).map(e=>e.replaceAll(` `,``))}bpe_decode(e){return this.bpe_tokenizer.batch_decode(e)}wp_decode(e){return this.wp_tokenizer.batch_decode(e).map(e=>e.replaceAll(` `,``))}batch_decode([e,t,n]){let[r,i]=this._decode_helper(e,`char`),[a,o]=this._decode_helper(t,`bpe`),[s,c]=this._decode_helper(n,`wp`),l=[],u=[];for(let e=0;e`;function Mm(e,t,n,r,i){return`${r.repeat(n*i)}${t}${e} +`}var Nm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;static uses_processor_config=!1;async _call(e,t=null,n={}){t||=(zi.warn(`You are using PaliGemma without a text prefix. It will perform as a picture-captioning model.`),``),Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);let r=this.tokenizer.bos_token,i=this.image_processor.config.image_seq_length,a;t.some(e=>e.includes(jm))?a=t.map(e=>{let t=e.replaceAll(jm,jm.repeat(i)),n=t.lastIndexOf(jm),a=n===-1?0:n+jm.length;return t.slice(0,a)+r+t.slice(a)+` +`}):(zi.warn("You are passing both `text` and `images` to `PaliGemmaProcessor`. The processor expects special image tokens in the text, as many tokens as there are images per each text. It is recommended to add `` tokens in the very beginning of your text. For this call, we will infer how many images each text has and add special tokens."),a=t.map(t=>Mm(t,r,i,jm,e.length)));let o=this.tokenizer(a,n);return{...await this.image_processor(e,n),...o}}},Pm=`<|image|>`,Fm=/<\|image_\d+\|>/g,Im=class extends Cd{static image_processor_class=lm;static tokenizer_class=_d;async _call(e,t=null,{padding:n=!0,truncation:r=!0,num_crops:i=null}={}){Array.isArray(e)||(e=[e]);let a,o;if(t){o=await this.image_processor(t,{num_crops:i});let{num_img_tokens:s}=o,c=e.map((e,t)=>e.split(Fm).join(Pm.repeat(s[t])));a=this.tokenizer(c,{padding:n,truncation:r});let l=this.tokenizer._tokenizer.token_to_id(Pm);a.input_ids.map_(e=>e==l?-e:e)}else a=this.tokenizer(e);return{...a,...o}}},Lm=class extends Cd{static tokenizer_class=_d;static image_processor_class=lm;static uses_processor_config=!0;async _call(e,t=null,n={}){let r=await this.image_processor(e,n);if(t){let[e,n]=r.pixel_values.dims.slice(-2),{image_token:i,image_break_token:a,image_end_token:o,patch_size:s,spatial_merge_size:c}=this.config,l=s*c,u=Math.floor(e/l),d=Math.floor(n/l);t=structuredClone(t),Array.isArray(t)||(t=[t]);for(let e=0;eYm(e,o)),c=s.map(e=>e.length),l=s.flat(),u=(await Promise.all(l.map(e=>this.feature_extractor(e,n)))).map(e=>e.input_features);r.audio_values=u.length>1?ql(u,0):u[0];let d=i[0];for(let e=0;e0){if(l>lc)throw Error(`The number of external data chunks (${l}) exceeds the maximum allowed value (${lc}).`);let t=mh(o,l);for(let n of t){let t=`${r.subfolder??``}/${n}`;c.push(new Promise(async(i,a)=>{let o=await Ic(e,t,!0,r,s);i(o instanceof Uint8Array?{path:n,data:o}:n)}))}}else a.externalData!==void 0&&(c=a.externalData.map(async t=>{if(typeof t.data==`string`){let n=await Ic(e,t.data,!0,r);return{...t,data:n}}return t}));return Promise.all(c)}async function _h(e,t,n,r=!1,i=void 0){let a=n.config?.[`transformers.js_config`]??{},o=Dl(n.device??a.device,t,{warn:e=>zi.info(e)}),s=pl(o),c=a.device_config??{};c.hasOwnProperty(o)&&(a={...a,...c[o]});let l=Nl(n.dtype??a.dtype,t,o,{configDtype:a.dtype,warn:e=>zi.info(e)});if(!Ml.hasOwnProperty(l))throw Error(`Invalid dtype: ${l}. Should be one of: ${Object.keys(kl).join(`, `)}`);if(o===`webgpu`&&!_i.IS_NODE_ENV&&l===kl.fp16&&!await Ol())throw Error(`The device (${o}) does not support fp16.`);let u=a.kv_cache_dtype,d=u?typeof u==`string`?u:u[l]??`float32`:void 0;if(d&&![`float32`,`float16`].includes(d))throw Error(`Invalid kv_cache_dtype: ${d}. Should be one of: float32, float16`);let f=Ml[l],p={...n.session_options};p.executionProviders??=s;let m=a.free_dimension_overrides;m?p.freeDimensionOverrides??=m:o.startsWith(`webnn`)&&!p.freeDimensionOverrides&&zi.warn(`WebNN does not currently support dynamic shapes and requires 'free_dimension_overrides' to be set in config.json, preferably as a field within config["transformers.js_config"]["device_config"]["${o}"]. When 'free_dimension_overrides' is not set, you may experience significant performance degradation.`);let h=hh(e,t,n,f),g=await gh(e,t,f,n,n.use_external_data_format??a.use_external_data_format,p);if(g.length>0&&(!_i.IS_NODE_ENV||g.some(e=>typeof e!=`string`))&&(p.externalData=g),r&&o===`webgpu`&&u!==!1){let e=lh(n.config,{prefix:`present`,session_name:i});if(Object.keys(e).length>0&&!Sl()){let t={};for(let n in e)t[n]=`gpu-buffer`;p.preferredOutputLocation=t}}return{buffer_or_path:await h,session_options:p,session_config:{dtype:l,kv_cache_dtype:d,device:o}}}async function vh(e,t,n,r=void 0){return Object.fromEntries(await Promise.all(Object.keys(t).map(async i=>{let a=r?.[i]??!1,{buffer_or_path:o,session_options:s,session_config:c}=await _h(e,t[i],n,a,i);return[i,await _l(o,s,c)]})))}function yh(e){for(let t in e)bl(e[t])?e[t]=new A(e[t]):typeof e[t]==`object`&&yh(e[t]);return e}async function bh(e,t){let n=xh(e,t);try{return yh(await yl(e,Object.fromEntries(Object.entries(n).map(([e,t])=>{let n=t.ort_tensor;return _i.IS_NODE_ENV&&typeof Float16Array<`u`&&n.cpuData instanceof Float16Array&&(n.cpuData=new Uint16Array(n.cpuData.buffer)),[e,n]}))))}catch(e){let t=Object.fromEntries(Object.entries(n).map(([e,t])=>{let n={type:t.type,dims:t.dims,location:t.location};return n.location!==`gpu-buffer`&&(n.data=t.data),[e,n]}));throw zi.error(`An error occurred during model execution: "${e}".`),zi.error(`Inputs given to model:`,t),e}}function xh(e,t){let n=Object.create(null),r=[];for(let i of e.inputNames){let e=t[i];if(!(e instanceof A)){r.push(i);continue}n[i]=Sl()?e.clone():e}if(r.length>0)throw Error(`An error occurred during model execution: "Missing the following inputs: ${r.join(`, `)}.`);let i=Object.keys(t).length,a=e.inputNames.length;if(i>a){let n=Object.keys(t).filter(t=>!e.inputNames.includes(t));zi.warn(`WARNING: Too many inputs were provided (${i} > ${a}). The following inputs will be ignored: "${n.join(`, `)}".`)}return n}var Sh=class{},Ch=class extends Sh{constructor({logits:e,...t}){super(),this.logits=e;let n=Object.values(t);n.length>0&&(this.attentions=n)}},wh=class extends Sh{constructor({logits:e}){super(),this.logits=e}},Th=class extends Sh{constructor({logits:e}){super(),this.logits=e}},Eh=class extends Sh{constructor({start_logits:e,end_logits:t}){super(),this.start_logits=e,this.end_logits=t}},Dh=class extends Sh{constructor({logits:e}){super(),this.logits=e}},Oh=class extends Sh{constructor({alphas:e}){super(),this.alphas=e}},kh=class extends Oi{_call(e,t){throw Error("`_call` should be implemented in a subclass")}},Ah=class extends Oi{_call(e,t){throw Error("`_call` should be implemented in a subclass")}},jh=class extends Oi{constructor(){super(),this.processors=[]}push(e){this.processors.push(e)}extend(e){this.processors.push(...e)}_call(e,t){let n=t;for(let t of this.processors)n=t(e,n);return n}[Symbol.iterator](){return this.processors.values()}},Mh=class extends kh{constructor(e){super(),this.bos_token_id=e}_call(e,t){for(let n=0;n=1&&i[i.length-1]>=this.timestamp_begin,o=i.length<2||i[i.length-2]>=this.timestamp_begin;if(a&&(o?r.subarray(this.timestamp_begin).fill(-1/0):r.subarray(0,this.eos_token_id).fill(-1/0)),e[n].length===this.begin_index&&this.max_initial_timestamp_index!==null){let e=this.timestamp_begin+this.max_initial_timestamp_index;r.subarray(e+1).fill(-1/0)}let s=Hc(r);Math.log(s.subarray(this.timestamp_begin).map(Math.exp).reduce((e,t)=>e+t))>Wc(s.subarray(0,this.timestamp_begin))[0]&&r.subarray(0,this.timestamp_begin).fill(-1/0)}return t}},Lh=class extends kh{constructor(e){super(),this.no_repeat_ngram_size=e}getNgrams(e){let t=e.length,n=[];for(let r=0;r1 to use the classifier free guidance processor, got guidance scale ${e}.`);this.guidance_scale=e}_call(e,t){if(t.dims[0]!==2*e.length)throw Error(`Logits should have twice the batch size of the input ids, the first half of batches corresponding to the conditional inputs, and the second half of batches corresponding to the unconditional inputs. Got batch size ${t.dims[0]} for the logits and ${e.length} for the input ids.`);let n=e.length,r=t.slice([0,n],null),i=t.slice([n,t.dims[0]],null);for(let e=0;ee.length>=this.max_length)}},Jh=class extends Gh{constructor(e){super(),Array.isArray(e)||(e=[e]),this.eos_token_id=e}_call(e,t){return e.map(e=>{let t=e.at(-1);return this.eos_token_id.some(e=>t==e)})}},Yh=class extends Gh{constructor(){super(),this.interrupted=!1}interrupt(){this.interrupted=!0}reset(){this.interrupted=!1}_call(e,t){return Array(e.length).fill(this.interrupted)}},Xh=class extends Oi{constructor(e){super(),this.generation_config=e}async _call(e){return this.sample(e)}async sample(e){throw Error(`sample should be implemented in subclasses.`)}getLogits(e,t){let n=e.dims.at(-1),r=e.data;if(t===-1)r=r.slice(-n);else{let e=t*n;r=r.slice(e,e+n)}return r}randomSelect(e){return ac(e)}static getSampler(e){if(e.do_sample)return new Qh(e);if(e.num_beams>1)return new $h(e);if(e.num_return_sequences>1)throw Error(`num_return_sequences has to be 1 when doing greedy search, but is ${e.num_return_sequences}.`);return new Zh(e)}},Zh=class extends Xh{async sample(e){let t=Wc(e.data)[1];return[[BigInt(t),0]]}},Qh=class extends Xh{async sample(e){let t=e.dims.at(-1);this.generation_config.top_k>0&&(t=Math.min(this.generation_config.top_k,t));let[n,r]=await Bl(e,t),i=Vc(n.data);return Array.from({length:this.generation_config.num_beams},()=>{let e=this.randomSelect(i);return[r.data[e],Math.log(i[e])]})}},$h=class extends Xh{async sample(e){let t=e.dims.at(-1);this.generation_config.top_k>0&&(t=Math.min(this.generation_config.top_k,t));let[n,r]=await Bl(e,t),i=Vc(n.data);return Array.from({length:this.generation_config.num_beams},(e,t)=>[r.data[t],Math.log(i[t])])}},eg=class{constructor(e){if(e)for(let t in e){if(t in this)throw TypeError(`Key "${t}" conflicts with an existing property on DynamicCache`);let n=e[t];if(!(n instanceof A))throw TypeError(`Expected a Tensor for key "${t}", got ${typeof n}`);this[t]=n}}get_seq_length(){let e=this;for(let t in e)if(t.startsWith(`past_key_values.`))return e[t].dims.at(-2);throw Error(`Unable to determine sequence length from the cache.`)}async dispose(){let e=[];for(let t of Object.values(this))t.location===`gpu-buffer`&&e.push(t.dispose());await Promise.all(e)}},j={EncoderOnly:0,EncoderDecoder:1,Seq2Seq:2,Vision2Seq:3,DecoderOnly:4,DecoderOnlyWithoutHead:5,MaskGeneration:6,ImageTextToText:7,Musicgen:8,MultiModality:9,Phi3V:10,AudioTextToText:11,AutoEncoder:12,ImageAudioTextToText:13,Supertonic:14,Chatterbox:15,VoxtralRealtime:16},tg={[j.DecoderOnly]:{sessions:(e,t)=>({model:t.model_file_name??`model`}),cache_sessions:{model:!0},optional_configs:{generation_config:`generation_config.json`}},[j.DecoderOnlyWithoutHead]:{sessions:(e,t)=>({model:t.model_file_name??`model`})},[j.Seq2Seq]:{sessions:()=>({model:`encoder_model`,decoder_model_merged:`decoder_model_merged`}),cache_sessions:{decoder_model_merged:!0},optional_configs:{generation_config:`generation_config.json`}},[j.Vision2Seq]:{sessions:()=>({model:`encoder_model`,decoder_model_merged:`decoder_model_merged`}),cache_sessions:{decoder_model_merged:!0},optional_configs:{generation_config:`generation_config.json`}},[j.Musicgen]:{sessions:()=>({model:`text_encoder`,decoder_model_merged:`decoder_model_merged`,encodec_decode:`encodec_decode`}),cache_sessions:{decoder_model_merged:!0},optional_configs:{generation_config:`generation_config.json`}},[j.EncoderDecoder]:{sessions:()=>({model:`encoder_model`,decoder_model_merged:`decoder_model_merged`}),cache_sessions:{decoder_model_merged:!0}},[j.MaskGeneration]:{sessions:()=>({model:`vision_encoder`,prompt_encoder_mask_decoder:`prompt_encoder_mask_decoder`})},[j.ImageTextToText]:{text_only_sessions:{embed_tokens:`embed_tokens`,decoder_model_merged:`decoder_model_merged`},sessions:(e,t,n)=>{let r={...tg[j.ImageTextToText].text_only_sessions};return n||(r.vision_encoder=`vision_encoder`),e.is_encoder_decoder&&(r.model=`encoder_model`),r},cache_sessions:{decoder_model_merged:!0},optional_configs:{generation_config:`generation_config.json`}},[j.AudioTextToText]:{text_only_sessions:{embed_tokens:`embed_tokens`,decoder_model_merged:`decoder_model_merged`},sessions:(e,t,n)=>{let r={...tg[j.AudioTextToText].text_only_sessions};return n||(r.audio_encoder=`audio_encoder`),r},cache_sessions:{decoder_model_merged:!0},optional_configs:{generation_config:`generation_config.json`}},[j.ImageAudioTextToText]:{text_only_sessions:{embed_tokens:`embed_tokens`,decoder_model_merged:`decoder_model_merged`},sessions:(e,t,n)=>{let r={...tg[j.ImageAudioTextToText].text_only_sessions};return n||(r.audio_encoder=`audio_encoder`,r.vision_encoder=`vision_encoder`),r},optional_configs:{generation_config:`generation_config.json`}},[j.Phi3V]:{sessions:()=>({prepare_inputs_embeds:`prepare_inputs_embeds`,model:`model`,vision_encoder:`vision_encoder`}),cache_sessions:{model:!0},optional_configs:{generation_config:`generation_config.json`}},[j.MultiModality]:{sessions:()=>({prepare_inputs_embeds:`prepare_inputs_embeds`,model:`language_model`,lm_head:`lm_head`,gen_head:`gen_head`,gen_img_embeds:`gen_img_embeds`,image_decode:`image_decode`}),cache_sessions:{model:!0},optional_configs:{generation_config:`generation_config.json`}},[j.AutoEncoder]:{sessions:()=>({encoder_model:`encoder_model`,decoder_model:`decoder_model`})},[j.Supertonic]:{sessions:()=>({text_encoder:`text_encoder`,latent_denoiser:`latent_denoiser`,voice_decoder:`voice_decoder`})},[j.Chatterbox]:{sessions:()=>({embed_tokens:`embed_tokens`,speech_encoder:`speech_encoder`,model:`language_model`,conditional_decoder:`conditional_decoder`}),cache_sessions:{model:!0},optional_configs:{generation_config:`generation_config.json`}},[j.VoxtralRealtime]:{text_only_sessions:{embed_tokens:`embed_tokens`,decoder_model_merged:`decoder_model_merged`},sessions:(e,t,n)=>{let r={...tg[j.VoxtralRealtime].text_only_sessions};return n||(r.audio_encoder=`audio_encoder`),r},cache_sessions:{decoder_model_merged:!0,audio_encoder:!0},optional_configs:{generation_config:`generation_config.json`}},default:{sessions:(e,t)=>({model:t.model_file_name??`model`})}};function ng(e,t,n={}){let r=tg[e]??tg.default;return{sessions:r.sessions(t,n,n.textOnly??!1),cache_sessions:r.cache_sessions,optional_configs:r.optional_configs}}function rg(e,{warn:t=!0}={}){let n=e.architectures||[];for(let e of n){let t=fg.get(e);if(t!==void 0)return t}if(e.model_type){let t=fg.get(e.model_type);if(t!==void 0)return t;for(let t of Object.values(og))if(t.has(e.model_type)){let n=fg.get(t.get(e.model_type));if(n!==void 0)return n}}if(t){let t=n.length>0?n.join(`, `):`(none)`;zi.warn(`[resolve_model_type] Architecture(s) not found in MODEL_TYPE_MAPPING: [${t}] for model type '${e.model_type}'. Falling back to EncoderOnly (single model.onnx file). If you encounter issues, please report at: ${vd}`)}return j.EncoderOnly}function ig(e,{config:t=null,cache_dir:n=null,local_files_only:r=!1,revision:i=`main`}={}){return t===null?Tc(JSON.stringify([e,n,r,i]),()=>fh.from_pretrained(e,{config:t,cache_dir:n,local_files_only:r,revision:i})):fh.from_pretrained(e,{config:t,cache_dir:n,local_files_only:r,revision:i})}async function ag(e,{config:t=null,dtype:n=null,device:r=null,model_file_name:i=null}={}){t=await ig(e,{config:t});let a=[`config.json`],o=t[`transformers.js_config`]??{},s=o.use_external_data_format,c=`onnx`,l=r??o.device,u=n??o.dtype,d=rg(t),f=(e,t=null)=>{t??=e;let n=Ml[Nl(u,e,Dl(l,e))]??``,r=`${t}${n}.onnx`,i=`${c}/${r}`;a.push(i);let o=ph(s,r,e);for(let e of mh(r,o)){let t=`${c}/${e}`;a.push(t)}},{sessions:p,optional_configs:m}=ng(d,t,{model_file_name:i});for(let[e,t]of Object.entries(p))f(e,t);if(m)for(let e of Object.values(m))a.push(e);return a}var og=null;function sg(e){og=e}function cg(e){if(e instanceof A)return e;if(e.length===0)throw Error(`items must be non-empty`);if(Array.isArray(e[0])){if(e.some(t=>t.length!==e[0].length))throw Error(`Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' and/or 'truncation=True' to have batched tensors with the same length.`);return new A(`int64`,BigInt64Array.from(e.flat().map(e=>BigInt(e))),[e.length,e[0].length])}else return new A(`int64`,BigInt64Array.from(e.map(e=>BigInt(e))),[1,e.length])}function lg(e){return new A(`bool`,[e],[1])}var ug={[j.DecoderOnly]:{can_generate:!0,forward:vg,prepare_inputs:wg},[j.DecoderOnlyWithoutHead]:{can_generate:!1,forward:vg,prepare_inputs:wg},[j.Seq2Seq]:{can_generate:!0,forward:hg,prepare_inputs:Tg},[j.Vision2Seq]:{can_generate:!0,forward:hg,prepare_inputs:Tg},[j.Musicgen]:{can_generate:!0,forward:hg},[j.EncoderDecoder]:{can_generate:!1,forward:hg},[j.ImageTextToText]:{can_generate:!0,forward:xg,prepare_inputs:Eg},[j.AudioTextToText]:{can_generate:!0,forward:bg,prepare_inputs:Eg},[j.ImageAudioTextToText]:{can_generate:!0,prepare_inputs:Eg},[j.Phi3V]:{can_generate:!0,prepare_inputs:Eg},[j.MultiModality]:{can_generate:!0},[j.AutoEncoder]:{can_generate:!1,forward:_g},[j.Chatterbox]:{can_generate:!0,forward:gg},[j.VoxtralRealtime]:{can_generate:!0,prepare_inputs:wg},default:{can_generate:!1,forward:gg}};function dg(e,t){let n=fg.get(e),r=!1,i=t?.architectures?.[0];if(i&&i!==e&&e?.endsWith(`ForCausalLM`)&&i.endsWith(`ForConditionalGeneration`)){let e=fg.get(i);e!==void 0&&(n=e,r=!0)}let a=ug[n]??ug.default,o=tg[n]??tg.default;return{typeConfig:{...a,...o},textOnly:r,modelType:n}}var fg=new Map,pg=new Map,mg=new Map,M=class extends Oi{main_input_name=`input_ids`;forward_params=[`input_ids`,`attention_mask`];_return_dict_in_generate_keys=null;constructor(e,t,n){super(),this.config=e,this.sessions=t,this.configs=n;let{typeConfig:r}=dg(mg.get(this.constructor),e);this.can_generate=r.can_generate,this._forward=r.forward,this._prepare_inputs_for_generation=r.prepare_inputs,this.can_generate&&this.forward_params.push(`past_key_values`),this.custom_config=this.config[`transformers.js_config`]??{}}async dispose(){let e=[];for(let t of Object.values(this.sessions))e.push(t.release?.());return await Promise.all(e)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`,model_file_name:o=null,subfolder:s=`onnx`,device:c=null,dtype:l=null,use_external_data_format:u=null,session_options:d={}}={}){let f={progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a,model_file_name:o,subfolder:s,device:c,dtype:l,use_external_data_format:u,session_options:d},p=mg.get(this);n=f.config=await fh.from_pretrained(e,f);let{typeConfig:m,textOnly:h,modelType:g}=dg(p,n);if(g===void 0){let e=p??n?.model_type;e!==`custom`&&zi.warn(`Model type for '${e}' not found, assuming encoder-only architecture. Please report this at ${vd}.`)}if(t&&!(t instanceof Ai)){let r={};try{let t=await ag(e,{config:n,dtype:l,device:c,model_file_name:o});(await Promise.all(t.map(t=>Dc(e,t,f)))).forEach((e,n)=>{if(e.exists){let i=t[n]===`config.json`;r[t[n]]={loaded:i?e.size??0:0,total:e.size??0}}})}catch(e){zi.warn(`Unable to fetch model file metadata for total progress tracking: ${e}`)}Object.keys(r).length>0&&(f.progress_callback=new Ai(t,r))}let _=[vh(e,m.sessions(n,f,h),f,m.cache_sessions)];m.optional_configs&&_.push(Ag(e,m.optional_configs,f));let v=await Promise.all(_);return new this(n,...v)}async _call(e){return await this.forward(e)}async forward(e){return await this._forward(this,e)}get generation_config(){return this.configs?.generation_config??null}_get_logits_processor(e,t,n=null){let r=new jh;if(e.repetition_penalty!==null&&e.repetition_penalty!==1&&r.push(new Rh(e.repetition_penalty)),e.no_repeat_ngram_size!==null&&e.no_repeat_ngram_size>0&&r.push(new Lh(e.no_repeat_ngram_size)),e.bad_words_ids!==null&&r.push(new Vh(e.bad_words_ids,e.eos_token_id)),e.min_length!==null&&e.eos_token_id!==null&&e.min_length>0&&r.push(new zh(e.min_length,e.eos_token_id)),e.min_new_tokens!==null&&e.eos_token_id!==null&&e.min_new_tokens>0&&r.push(new Bh(t,e.min_new_tokens,e.eos_token_id)),e.forced_bos_token_id!==null&&r.push(new Mh(e.forced_bos_token_id)),e.forced_eos_token_id!==null&&r.push(new Nh(e.max_length,e.forced_eos_token_id)),e.suppress_tokens!==null&&r.push(new Ph(e.suppress_tokens)),e.begin_suppress_tokens!==null){let n=t>1||e.forced_bos_token_id===null?t:t+1;r.push(new Fh(e.begin_suppress_tokens,n))}return e.guidance_scale!==null&&e.guidance_scale>1&&r.push(new Hh(e.guidance_scale)),e.temperature===0&&e.do_sample&&(zi.warn("`do_sample` changed to false because `temperature: 0` implies greedy sampling (always selecting the most likely token), which is incompatible with `do_sample: true`."),e.do_sample=!1),e.do_sample&&e.temperature!==null&&e.temperature!==1&&r.push(new Uh(e.temperature)),n!==null&&r.extend(n),r}_prepare_generation_config(e,t,n=Wh){let r={...this.config};for(let e of[`decoder`,`generator`,`text_config`])e in r&&Object.assign(r,r[e]);let i=new n(r);return Object.assign(i,this.generation_config??{}),e&&Object.assign(i,e),t&&Object.assign(i,Li(t,Object.getOwnPropertyNames(i))),i}_get_stopping_criteria(e,t=null){let n=new Kh;return e.max_length!==null&&n.push(new qh(e.max_length,this.config.max_position_embeddings??null)),e.eos_token_id!==null&&n.push(new Jh(e.eos_token_id)),t&&n.extend(t),n}_validate_model_class(){if(!this.can_generate){let e=[og.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES,og.MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES,og.MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES,og.MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES].filter(Boolean),t=mg.get(this.constructor),n=new Set,r=this.config.model_type;for(let t of e){let e=t?.get(r);e&&n.add(e)}let i=`The current model class (${t}) is not compatible with \`.generate()\`, as it doesn't have a language model head.`;throw n.size>0&&(i+=` Please use the following class instead: ${[...n].join(`, `)}`),Error(i)}}prepare_inputs_for_generation(...e){if(!this._prepare_inputs_for_generation)throw Error(`prepare_inputs_for_generation is not implemented for this model.`);return this._prepare_inputs_for_generation(this,...e)}_update_model_kwargs_for_generation({generated_input_ids:e,outputs:t,model_inputs:n,is_encoder_decoder:r}){return n.past_key_values=this.getPastKeyValues(t,n.past_key_values),n.input_ids=new A(`int64`,e.flat(),[e.length,1]),r?`decoder_attention_mask`in n&&(n.decoder_attention_mask=ql([n.decoder_attention_mask,nu([n.decoder_attention_mask.dims[0],1])],1)):n.attention_mask=ql([n.attention_mask,nu([n.attention_mask.dims[0],1])],1),n.position_ids=null,n}_prepare_model_inputs({inputs:e,bos_token_id:t,model_kwargs:n}){let r=Li(n,this.forward_params),i=this.main_input_name;if(i in r){if(e)throw Error("`inputs`: {inputs}` were passed alongside {input_name} which is not allowed. Make sure to either pass {inputs} or {input_name}=...")}else r[i]=e;return{inputs_tensor:r[i],model_inputs:r,model_input_name:i}}async _prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:e,model_inputs:t,model_input_name:n,generation_config:r}){if(this.sessions.model.inputNames.includes(`inputs_embeds`)&&!t.inputs_embeds&&`_prepare_inputs_embeds`in this){let{input_ids:e,pixel_values:n,attention_mask:r,...i}=t,a=await this._prepare_inputs_embeds(t);t={...i,...Li(a,[`inputs_embeds`,`attention_mask`])}}let{last_hidden_state:i}=await gg(this,t);if(r.guidance_scale!==null&&r.guidance_scale>1)i=ql([i,tu(i,0)],0),`attention_mask`in t&&(t.attention_mask=ql([t.attention_mask,au(t.attention_mask)],0));else if(t.decoder_input_ids){let e=cg(t.decoder_input_ids).dims[0];if(e!==i.dims[0]){if(i.dims[0]!==1)throw Error(`The encoder outputs have a different batch size (${i.dims[0]}) than the decoder inputs (${e}).`);i=ql(Array.from({length:e},()=>i),0)}}return t.encoder_outputs=i,t}_prepare_decoder_input_ids_for_generation({batch_size:e,model_input_name:t,model_kwargs:n,decoder_start_token_id:r,bos_token_id:i,generation_config:a}){let{decoder_input_ids:o,...s}=n;if(!(o instanceof A)){if(o)Array.isArray(o[0])||(o=Array.from({length:e},()=>o));else if(r??=i,this.config.model_type===`musicgen`)o=Array.from({length:e*this.config.decoder.num_codebooks},()=>[r]);else if(Array.isArray(r)){if(r.length!==e)throw Error(`\`decoder_start_token_id\` expcted to have length ${e} but got ${r.length}`);o=r}else o=Array.from({length:e},()=>[r]);o=cg(o)}return s.decoder_attention_mask=ru(o),{input_ids:o,model_inputs:s}}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,streamer:i=null,...a}){this._validate_model_class(),t=this._prepare_generation_config(t,a);let{inputs_tensor:o,model_inputs:s,model_input_name:c}=this._prepare_model_inputs({inputs:e,model_kwargs:a}),l=this.config.is_encoder_decoder;l&&(`encoder_outputs`in s||(s=await this._prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:o,model_inputs:s,model_input_name:c,generation_config:t})));let u;l?{input_ids:u,model_inputs:s}=this._prepare_decoder_input_ids_for_generation({batch_size:s[c].dims.at(0),model_input_name:c,model_kwargs:s,decoder_start_token_id:t.decoder_start_token_id,bos_token_id:t.bos_token_id,generation_config:t}):u=s[c];let d=u.dims.at(-1);t.max_new_tokens!==null&&(t.max_length=d+t.max_new_tokens);let f=this._get_logits_processor(t,d,n),p=this._get_stopping_criteria(t,r),m=s[c].dims.at(0),h=Xh.getSampler(t),g=Array(m).fill(0),_=u.tolist();i&&i.put(_);let v,y={},b={};for(;;){if(s=this.prepare_inputs_for_generation(_,s,t),v=await this.forward(s),t.return_dict_in_generate)if(t.output_attentions){let e=this.getAttentions(v);for(let t in e)t in y||(y[t]=[]),y[t].push(e[t])}else this._return_dict_in_generate_keys&&Object.assign(b,Li(v,this._return_dict_in_generate_keys));let e=f(_,v.logits.slice(null,-1,null).to(`float32`)),n=[];for(let t=0;te))break;s=this._update_model_kwargs_for_generation({generated_input_ids:n,outputs:v,model_inputs:s,is_encoder_decoder:l})}i&&i.end();let x=this.getPastKeyValues(v,s.past_key_values,!0),S=new A(`int64`,_.flat(),[_.length,_[0].length]);if(t.return_dict_in_generate)return{sequences:S,past_key_values:x,...y,...b};for(let e of Object.values(v))e.location===`gpu-buffer`&&e.dispose();return S}getPastKeyValues(e,t,n=!1){let r=Object.create(null);for(let i in e)if(i.startsWith(`present`)){let a=i.replace(`present_ssm`,`past_ssm`).replace(`present_conv`,`past_conv`).replace(`present_recurrent`,`past_recurrent`).replace(`present`,`past_key_values`),o=i.includes(`encoder`);if(o&&t?r[a]=t[a]:r[a]=e[i],t&&(!o||n)){let e=t[a];e.location===`gpu-buffer`&&e.dispose()}}return new eg(r)}getAttentions(e){let t={};for(let n of[`cross_attentions`,`encoder_attentions`,`decoder_attentions`])for(let r in e)r.startsWith(n)&&(n in t||(t[n]=[]),t[n].push(e[r]));return t}addPastKeyValues(e,t){if(t)Object.assign(e,t);else{let t=this.sessions.decoder_model_merged??this.sessions.model,n=(e[this.main_input_name]??e.attention_mask)?.dims?.[0]??1,r=t?.config?.kv_cache_dtype??`float32`,i=r===`float16`?Pl.float16:Pl.float32,a=lh(this.config,{batch_size:n});for(let t in a)e[t]=new A(r,new i(a[t].reduce((e,t)=>e*t,1)),a[t])}}async _encode_input(e,t,n){if(!Object.hasOwn(this.sessions,e))throw Error(`Model does not have a ${e} session.`);let r=this.sessions[e];return(await bh(r,Li(t,r.inputNames)))[n]}async encode_image(e){return this._encode_input(`vision_encoder`,e,`image_features`)}async encode_text(e){return this._encode_input(`embed_tokens`,e,`inputs_embeds`)}async encode_audio(e){return this._encode_input(`audio_encoder`,e,`audio_features`)}};async function hg(e,t){let{encoder_outputs:n,input_ids:r,decoder_input_ids:i,decoder_attention_mask:a,...o}=t;return n||=(await gg(e,Li(t,e.sessions.model.inputNames))).last_hidden_state,o.input_ids=i,o.encoder_hidden_states=n,e.sessions.decoder_model_merged.inputNames.includes(`encoder_attention_mask`)&&(o.encoder_attention_mask=t.attention_mask),a&&!o.attention_mask&&(o.attention_mask=a),await vg(e,o,!0)}async function gg(e,t){let n=e.sessions.model,r=Li(t,n.inputNames);if(n.inputNames.includes(`inputs_embeds`)&&!r.inputs_embeds){if(!t.input_ids)throw Error("Both `input_ids` and `inputs_embeds` are missing in the model inputs.");r.inputs_embeds=await e.encode_text({input_ids:t.input_ids})}if(n.inputNames.includes(`token_type_ids`)&&!r.token_type_ids){if(!r.input_ids)throw Error("Both `input_ids` and `token_type_ids` are missing in the model inputs.");r.token_type_ids=au(r.input_ids)}if(n.inputNames.includes(`pixel_mask`)&&!r.pixel_mask){if(!r.pixel_values)throw Error("Both `pixel_values` and `pixel_mask` are missing in the model inputs.");let e=r.pixel_values.dims;r.pixel_mask=nu([e[0],e[2],e[3]])}return await bh(n,r)}async function _g(e,t){let n=await e.encode(t);return await e.decode(n)}async function vg(e,t,n=!1){let r=e.sessions[n?`decoder_model_merged`:`model`],{past_key_values:i,...a}=t;return r.inputNames.includes(`use_cache_branch`)&&(a.use_cache_branch=lg(!!i)),r.inputNames.includes(`position_ids`)&&a.attention_mask&&!a.position_ids&&(a.position_ids=Cg(a,i,[`paligemma`,`gemma3_text`,`gemma3`].includes(e.config.model_type)?1:0)),r.inputNames.includes(`num_logits_to_keep`)&&!a.num_logits_to_keep&&(a.num_logits_to_keep=new A(`int64`,[0n],[])),e.addPastKeyValues(a,i),await bh(r,Li(a,r.inputNames))}async function yg(e,{encode_function:t,merge_function:n,modality_input_names:r,modality_output_name:i,input_ids:a=null,attention_mask:o=null,position_ids:s=null,inputs_embeds:c=null,past_key_values:l=null,generation_config:u=null,logits_processor:d=null,...f}){if(!c){c=await e.encode_text({input_ids:a,...f});let s=Li(f,r);if(Object.keys(s).length>0){if(a.dims[1]!==1){let e=await t({...s,...f});({inputs_embeds:c,attention_mask:o}=n({[i]:e,inputs_embeds:c,input_ids:a,attention_mask:o}))}else if(l&&a.dims[1]===1){let e=a.dims[1],t=l.get_seq_length();o=ql([nu([a.dims[0],t]),o.slice(null,[o.dims[1]-e,o.dims[1]])],1)}}}if(!s&&[`qwen2_vl`,`qwen2_vl_text`,`qwen2_5_vl`,`qwen2_5_vl_text`,`qwen3_vl`,`qwen3_vl_text`,`qwen3_vl_moe`,`qwen3_vl_moe_text`,`qwen3_5`,`qwen3_5_text`,`qwen3_5_moe`,`qwen3_5_moe_text`,`glm_ocr`,`glm_ocr_text`].includes(e.config.model_type)){let{image_grid_thw:t,video_grid_thw:n}=f;[s]=e.get_rope_index(a,t,n,o)}return await vg(e,{inputs_embeds:c,past_key_values:l,attention_mask:o,position_ids:s,generation_config:u,logits_processor:d},!0)}async function bg(e,t){return await yg(e,{...t,modality_input_names:[`audio_values`,`input_features`],modality_output_name:`audio_features`,encode_function:e.encode_audio.bind(e),merge_function:e._merge_input_ids_with_audio_features.bind(e)})}async function xg(e,t){return await yg(e,{...t,modality_input_names:[`pixel_values`],modality_output_name:`image_features`,encode_function:e.encode_image.bind(e),merge_function:e._merge_input_ids_with_image_features.bind(e)})}function Sg(e,t=0){let[n,r]=e.dims,i=e.data,a=new BigInt64Array(i.length);for(let e=0;ee.dims[1]||i[e.at(-1)])),{...n,decoder_input_ids:cg(t)}}function Eg(e,...t){return e.config.is_encoder_decoder?Tg(e,...t):wg(e,...t)}function Dg({modality_token_id:e,inputs_embeds:t,modality_features:n,input_ids:r,attention_mask:i}){let a=r.tolist().map(t=>t.reduce((t,n,r)=>(n==e&&t.push(r),t),[])),o=a.reduce((e,t)=>e+t.length,0),s=n.dims[0];if(o!==s)throw Error(`Number of tokens and features do not match: tokens: ${o}, features ${s}`);let c=0;for(let e=0;e[r,await Rc(e,t[r],!1,n)])))}var jg={};Yr(jg,{ASTForAudioClassification:()=>Jg,ASTModel:()=>qg,ASTPreTrainedModel:()=>Kg,AfmoeForCausalLM:()=>Hg,AfmoeModel:()=>Vg,AfmoePreTrainedModel:()=>Bg,AlbertForMaskedLM:()=>Ig,AlbertForQuestionAnswering:()=>Fg,AlbertForSequenceClassification:()=>Pg,AlbertModel:()=>Ng,AlbertPreTrainedModel:()=>Mg,ApertusForCausalLM:()=>zg,ApertusModel:()=>Rg,ApertusPreTrainedModel:()=>Lg,ArceeForCausalLM:()=>Gg,ArceeModel:()=>Wg,ArceePreTrainedModel:()=>Ug,BartForConditionalGeneration:()=>Zg,BartForSequenceClassification:()=>Qg,BartModel:()=>Xg,BartPretrainedModel:()=>Yg,BeitForImageClassification:()=>t_,BeitModel:()=>e_,BeitPreTrainedModel:()=>$g,BertForMaskedLM:()=>i_,BertForQuestionAnswering:()=>s_,BertForSequenceClassification:()=>a_,BertForTokenClassification:()=>o_,BertModel:()=>r_,BertPreTrainedModel:()=>n_,BlenderbotForConditionalGeneration:()=>u_,BlenderbotModel:()=>l_,BlenderbotPreTrainedModel:()=>c_,BlenderbotSmallForConditionalGeneration:()=>p_,BlenderbotSmallModel:()=>f_,BlenderbotSmallPreTrainedModel:()=>d_,BloomForCausalLM:()=>g_,BloomModel:()=>h_,BloomPreTrainedModel:()=>m_,CHMv2ForDepthEstimation:()=>A_,CHMv2PreTrainedModel:()=>k_,CLIPModel:()=>I_,CLIPPreTrainedModel:()=>F_,CLIPSegForImageSegmentation:()=>U_,CLIPSegModel:()=>H_,CLIPSegPreTrainedModel:()=>V_,CLIPTextModel:()=>L_,CLIPTextModelWithProjection:()=>R_,CLIPVisionModel:()=>z_,CLIPVisionModelWithProjection:()=>B_,CamembertForMaskedLM:()=>y_,CamembertForQuestionAnswering:()=>S_,CamembertForSequenceClassification:()=>b_,CamembertForTokenClassification:()=>x_,CamembertModel:()=>v_,CamembertPreTrainedModel:()=>__,ChatterboxModel:()=>E_,ChatterboxPreTrainedModel:()=>T_,ChineseCLIPModel:()=>O_,ChineseCLIPPreTrainedModel:()=>D_,ClapAudioModelWithProjection:()=>P_,ClapModel:()=>M_,ClapPreTrainedModel:()=>j_,ClapTextModelWithProjection:()=>N_,CodeGenForCausalLM:()=>K_,CodeGenModel:()=>G_,CodeGenPreTrainedModel:()=>W_,Cohere2ForCausalLM:()=>Q_,Cohere2Model:()=>Z_,Cohere2PreTrainedModel:()=>X_,CohereAsrForConditionalGeneration:()=>tv,CohereAsrModel:()=>ev,CohereAsrPreTrainedModel:()=>$_,CohereForCausalLM:()=>Y_,CohereModel:()=>J_,CoherePreTrainedModel:()=>q_,ConvBertForMaskedLM:()=>iv,ConvBertForQuestionAnswering:()=>sv,ConvBertForSequenceClassification:()=>av,ConvBertForTokenClassification:()=>ov,ConvBertModel:()=>rv,ConvBertPreTrainedModel:()=>nv,ConvNextForImageClassification:()=>uv,ConvNextModel:()=>lv,ConvNextPreTrainedModel:()=>cv,ConvNextV2ForImageClassification:()=>pv,ConvNextV2Model:()=>fv,ConvNextV2PreTrainedModel:()=>dv,DFineForObjectDetection:()=>bv,DFineModel:()=>yv,DFinePreTrainedModel:()=>vv,DINOv3ConvNextModel:()=>uy,DINOv3ConvNextPreTrainedModel:()=>ly,DINOv3ViTModel:()=>fy,DINOv3ViTPreTrainedModel:()=>dy,DPTForDepthEstimation:()=>Cy,DPTModel:()=>Sy,DPTPreTrainedModel:()=>xy,DacDecoderModel:()=>Ev,DacDecoderOutput:()=>Sv,DacEncoderModel:()=>Tv,DacEncoderOutput:()=>xv,DacModel:()=>wv,DacPreTrainedModel:()=>Cv,DebertaForMaskedLM:()=>kv,DebertaForQuestionAnswering:()=>Mv,DebertaForSequenceClassification:()=>Av,DebertaForTokenClassification:()=>jv,DebertaModel:()=>Ov,DebertaPreTrainedModel:()=>Dv,DebertaV2ForMaskedLM:()=>Rv,DebertaV2ForQuestionAnswering:()=>Vv,DebertaV2ForSequenceClassification:()=>zv,DebertaV2ForTokenClassification:()=>Bv,DebertaV2Model:()=>Lv,DebertaV2PreTrainedModel:()=>Iv,DecisionTransformerModel:()=>Uv,DecisionTransformerPreTrainedModel:()=>Hv,DeepseekV3ForCausalLM:()=>Fv,DeepseekV3Model:()=>Pv,DeepseekV3PreTrainedModel:()=>Nv,DeiTForImageClassification:()=>Kv,DeiTModel:()=>Gv,DeiTPreTrainedModel:()=>Wv,DepthAnythingForDepthEstimation:()=>Jv,DepthAnythingPreTrainedModel:()=>qv,DepthProForDepthEstimation:()=>Xv,DepthProPreTrainedModel:()=>Yv,DetrForObjectDetection:()=>$v,DetrForSegmentation:()=>ey,DetrModel:()=>Qv,DetrObjectDetectionOutput:()=>ty,DetrPreTrainedModel:()=>Zv,DetrSegmentationOutput:()=>ny,Dinov2ForImageClassification:()=>ay,Dinov2Model:()=>iy,Dinov2PreTrainedModel:()=>ry,Dinov2WithRegistersForImageClassification:()=>cy,Dinov2WithRegistersModel:()=>sy,Dinov2WithRegistersPreTrainedModel:()=>oy,DistilBertForMaskedLM:()=>vy,DistilBertForQuestionAnswering:()=>_y,DistilBertForSequenceClassification:()=>hy,DistilBertForTokenClassification:()=>gy,DistilBertModel:()=>my,DistilBertPreTrainedModel:()=>py,DonutSwinModel:()=>by,DonutSwinPreTrainedModel:()=>yy,EdgeTamModel:()=>ZT,EfficientNetForImageClassification:()=>Ey,EfficientNetModel:()=>Ty,EfficientNetPreTrainedModel:()=>wy,ElectraForMaskedLM:()=>ky,ElectraForQuestionAnswering:()=>My,ElectraForSequenceClassification:()=>Ay,ElectraForTokenClassification:()=>jy,ElectraModel:()=>Oy,ElectraPreTrainedModel:()=>Dy,Ernie4_5ForCausalLM:()=>Fy,Ernie4_5Model:()=>Py,Ernie4_5PretrainedModel:()=>Ny,EsmForMaskedLM:()=>Ry,EsmForSequenceClassification:()=>zy,EsmForTokenClassification:()=>By,EsmModel:()=>Ly,EsmPreTrainedModel:()=>Iy,EuroBertForMaskedLM:()=>Uy,EuroBertForSequenceClassification:()=>Wy,EuroBertForTokenClassification:()=>Gy,EuroBertModel:()=>Hy,EuroBertPreTrainedModel:()=>Vy,ExaoneForCausalLM:()=>Jy,ExaoneModel:()=>qy,ExaonePreTrainedModel:()=>Ky,FalconForCausalLM:()=>Zy,FalconH1ForCausalLM:()=>eb,FalconH1Model:()=>$y,FalconH1PreTrainedModel:()=>Qy,FalconModel:()=>Xy,FalconPreTrainedModel:()=>Yy,FastViTForImageClassification:()=>rb,FastViTModel:()=>nb,FastViTPreTrainedModel:()=>tb,Florence2ForConditionalGeneration:()=>ab,Florence2PreTrainedModel:()=>ib,GLPNForDepthEstimation:()=>zb,GLPNModel:()=>Rb,GLPNPreTrainedModel:()=>Lb,GPT2LMHeadModel:()=>ex,GPT2Model:()=>$b,GPT2PreTrainedModel:()=>Qb,GPTBigCodeForCausalLM:()=>Hb,GPTBigCodeModel:()=>Vb,GPTBigCodePreTrainedModel:()=>Bb,GPTJForCausalLM:()=>rx,GPTJModel:()=>nx,GPTJPreTrainedModel:()=>tx,GPTNeoForCausalLM:()=>Gb,GPTNeoModel:()=>Wb,GPTNeoPreTrainedModel:()=>Ub,GPTNeoXForCausalLM:()=>Jb,GPTNeoXModel:()=>qb,GPTNeoXPreTrainedModel:()=>Kb,Gemma2ForCausalLM:()=>db,Gemma2Model:()=>ub,Gemma2PreTrainedModel:()=>lb,Gemma3ForCausalLM:()=>yb,Gemma3ForConditionalGeneration:()=>vb,Gemma3Model:()=>_b,Gemma3PreTrainedModel:()=>gb,Gemma3nForCausalLM:()=>Sb,Gemma3nForConditionalGeneration:()=>xb,Gemma3nPreTrainedModel:()=>bb,Gemma4ForCausalLM:()=>wb,Gemma4ForConditionalGeneration:()=>Cb,GemmaForCausalLM:()=>cb,GemmaModel:()=>sb,GemmaPreTrainedModel:()=>ob,GlmForCausalLM:()=>Db,GlmModel:()=>Eb,GlmMoeDsaForCausalLM:()=>Ab,GlmMoeDsaModel:()=>kb,GlmMoeDsaPreTrainedModel:()=>Ob,GlmOcrForConditionalGeneration:()=>Ib,GlmPreTrainedModel:()=>Tb,GptOssForCausalLM:()=>Zb,GptOssModel:()=>Xb,GptOssPreTrainedModel:()=>Yb,GraniteForCausalLM:()=>ox,GraniteModel:()=>ax,GraniteMoeHybridForCausalLM:()=>lx,GraniteMoeHybridModel:()=>cx,GraniteMoeHybridPreTrainedModel:()=>sx,GranitePreTrainedModel:()=>ix,GraniteSpeechForConditionalGeneration:()=>fx,GroundingDinoForObjectDetection:()=>mx,GroundingDinoPreTrainedModel:()=>px,GroupViTModel:()=>gx,GroupViTPreTrainedModel:()=>hx,HeliumForCausalLM:()=>yx,HeliumModel:()=>vx,HeliumPreTrainedModel:()=>_x,HieraForImageClassification:()=>Sx,HieraModel:()=>xx,HieraPreTrainedModel:()=>bx,HubertForCTC:()=>Ax,HubertForSequenceClassification:()=>jx,HubertModel:()=>kx,HubertPreTrainedModel:()=>Ox,HunYuanDenseV1ForCausalLM:()=>Px,HunYuanDenseV1Model:()=>Nx,HunYuanDenseV1PreTrainedModel:()=>Mx,IJepaForImageClassification:()=>Rx,IJepaModel:()=>Lx,IJepaPreTrainedModel:()=>Ix,Idefics3ForConditionalGeneration:()=>Fx,JAISLMHeadModel:()=>Vx,JAISModel:()=>Bx,JAISPreTrainedModel:()=>zx,JinaCLIPModel:()=>Ux,JinaCLIPPreTrainedModel:()=>Hx,JinaCLIPTextModel:()=>Wx,JinaCLIPVisionModel:()=>Gx,Lfm2ForCausalLM:()=>Jx,Lfm2Model:()=>qx,Lfm2MoeForCausalLM:()=>Qx,Lfm2MoeModel:()=>Zx,Lfm2MoePreTrainedModel:()=>Xx,Lfm2PreTrainedModel:()=>Kx,Lfm2VlForConditionalGeneration:()=>$x,LightOnOcrForConditionalGeneration:()=>Yx,LiteWhisperForConditionalGeneration:()=>aO,Llama4ForCausalLM:()=>iS,Llama4PreTrainedModel:()=>rS,LlamaForCausalLM:()=>nS,LlamaModel:()=>tS,LlamaPreTrainedModel:()=>eS,LlavaForConditionalGeneration:()=>pb,LlavaOnevisionForConditionalGeneration:()=>pb,LlavaPreTrainedModel:()=>fb,LlavaQwen2ForCausalLM:()=>hb,LongT5ForConditionalGeneration:()=>sS,LongT5Model:()=>oS,LongT5PreTrainedModel:()=>aS,M2M100ForConditionalGeneration:()=>uS,M2M100Model:()=>lS,M2M100PreTrainedModel:()=>cS,MBartForCausalLM:()=>xS,MBartForConditionalGeneration:()=>yS,MBartForSequenceClassification:()=>bS,MBartModel:()=>vS,MBartPreTrainedModel:()=>_S,MPNetForMaskedLM:()=>AC,MPNetForQuestionAnswering:()=>NC,MPNetForSequenceClassification:()=>jC,MPNetForTokenClassification:()=>MC,MPNetModel:()=>kC,MPNetPreTrainedModel:()=>OC,MT5ForConditionalGeneration:()=>zC,MT5Model:()=>RC,MT5PreTrainedModel:()=>LC,MarianMTModel:()=>pS,MarianModel:()=>fS,MarianPreTrainedModel:()=>dS,MaskFormerForInstanceSegmentation:()=>gS,MaskFormerModel:()=>hS,MaskFormerPreTrainedModel:()=>mS,Metric3DForDepthEstimation:()=>CS,Metric3DPreTrainedModel:()=>SS,Metric3Dv2ForDepthEstimation:()=>TS,Metric3Dv2PreTrainedModel:()=>wS,MgpstrForSceneTextRecognition:()=>OS,MgpstrModelOutput:()=>ES,MgpstrPreTrainedModel:()=>DS,MimiDecoderModel:()=>PS,MimiDecoderOutput:()=>AS,MimiEncoderModel:()=>NS,MimiEncoderOutput:()=>kS,MimiModel:()=>MS,MimiPreTrainedModel:()=>jS,Mistral4ForCausalLM:()=>BS,Mistral4Model:()=>zS,Mistral4PreTrainedModel:()=>RS,MistralForCausalLM:()=>LS,MistralModel:()=>IS,MistralPreTrainedModel:()=>FS,MobileBertForMaskedLM:()=>US,MobileBertForQuestionAnswering:()=>GS,MobileBertForSequenceClassification:()=>WS,MobileBertModel:()=>HS,MobileBertPreTrainedModel:()=>VS,MobileLLMForCausalLM:()=>JS,MobileLLMModel:()=>qS,MobileLLMPreTrainedModel:()=>KS,MobileNetV1ForImageClassification:()=>ZS,MobileNetV1ForSemanticSegmentation:()=>QS,MobileNetV1Model:()=>XS,MobileNetV1PreTrainedModel:()=>YS,MobileNetV2ForImageClassification:()=>tC,MobileNetV2ForSemanticSegmentation:()=>nC,MobileNetV2Model:()=>eC,MobileNetV2PreTrainedModel:()=>$S,MobileNetV3ForImageClassification:()=>aC,MobileNetV3ForSemanticSegmentation:()=>oC,MobileNetV3Model:()=>iC,MobileNetV3PreTrainedModel:()=>rC,MobileNetV4ForImageClassification:()=>lC,MobileNetV4ForSemanticSegmentation:()=>uC,MobileNetV4Model:()=>cC,MobileNetV4PreTrainedModel:()=>sC,MobileViTForImageClassification:()=>pC,MobileViTModel:()=>fC,MobileViTPreTrainedModel:()=>dC,MobileViTV2ForImageClassification:()=>gC,MobileViTV2Model:()=>hC,MobileViTV2PreTrainedModel:()=>mC,ModernBertDecoderForCausalLM:()=>wC,ModernBertDecoderModel:()=>CC,ModernBertDecoderPreTrainedModel:()=>SC,ModernBertForMaskedLM:()=>yC,ModernBertForSequenceClassification:()=>bC,ModernBertForTokenClassification:()=>xC,ModernBertModel:()=>vC,ModernBertPreTrainedModel:()=>_C,Moondream1ForConditionalGeneration:()=>mb,MoonshineForConditionalGeneration:()=>DC,MoonshineModel:()=>EC,MoonshinePreTrainedModel:()=>TC,MptForCausalLM:()=>IC,MptModel:()=>FC,MptPreTrainedModel:()=>PC,MultiModalityCausalLM:()=>VC,MultiModalityPreTrainedModel:()=>BC,MusicgenForCausalLM:()=>WC,MusicgenForConditionalGeneration:()=>GC,MusicgenModel:()=>UC,MusicgenPreTrainedModel:()=>HC,NanoChatForCausalLM:()=>JC,NanoChatModel:()=>qC,NanoChatPreTrainedModel:()=>KC,NemotronHForCausalLM:()=>ZC,NemotronHModel:()=>XC,NemotronHPreTrainedModel:()=>YC,NeoBertForMaskedLM:()=>ew,NeoBertForQuestionAnswering:()=>rw,NeoBertForSequenceClassification:()=>tw,NeoBertForTokenClassification:()=>nw,NeoBertModel:()=>$C,NeoBertPreTrainedModel:()=>QC,NomicBertModel:()=>aw,NomicBertPreTrainedModel:()=>iw,OPTForCausalLM:()=>Cw,OPTModel:()=>Sw,OPTPreTrainedModel:()=>xw,Olmo2ForCausalLM:()=>dw,Olmo2Model:()=>uw,Olmo2PreTrainedModel:()=>lw,Olmo3ForCausalLM:()=>mw,Olmo3Model:()=>pw,Olmo3PreTrainedModel:()=>fw,OlmoForCausalLM:()=>cw,OlmoHybridForCausalLM:()=>_w,OlmoHybridModel:()=>gw,OlmoHybridPreTrainedModel:()=>hw,OlmoModel:()=>sw,OlmoPreTrainedModel:()=>ow,OpenELMForCausalLM:()=>bw,OpenELMModel:()=>yw,OpenELMPreTrainedModel:()=>vw,OwlViTForObjectDetection:()=>kw,OwlViTModel:()=>Ow,OwlViTPreTrainedModel:()=>Dw,Owlv2ForObjectDetection:()=>Ew,Owlv2Model:()=>Tw,Owlv2PreTrainedModel:()=>ww,PaliGemmaForConditionalGeneration:()=>Aw,ParakeetForCTC:()=>Mw,ParakeetPreTrainedModel:()=>jw,PatchTSMixerForPrediction:()=>Fw,PatchTSMixerModel:()=>Pw,PatchTSMixerPreTrainedModel:()=>Nw,PatchTSTForPrediction:()=>Rw,PatchTSTModel:()=>Lw,PatchTSTPreTrainedModel:()=>Iw,Phi3ForCausalLM:()=>Ww,Phi3Model:()=>Uw,Phi3PreTrainedModel:()=>Hw,Phi3VForCausalLM:()=>Kw,Phi3VPreTrainedModel:()=>Gw,PhiForCausalLM:()=>Vw,PhiModel:()=>Bw,PhiPreTrainedModel:()=>zw,PreTrainedModel:()=>M,PvtForImageClassification:()=>Yw,PvtModel:()=>Jw,PvtPreTrainedModel:()=>qw,PyAnnoteForAudioFrameClassification:()=>Qw,PyAnnoteModel:()=>Zw,PyAnnotePreTrainedModel:()=>Xw,Qwen2ForCausalLM:()=>tT,Qwen2Model:()=>eT,Qwen2MoeForCausalLM:()=>iT,Qwen2MoeModel:()=>rT,Qwen2MoePreTrainedModel:()=>nT,Qwen2PreTrainedModel:()=>$w,Qwen2VLForCausalLM:()=>Nb,Qwen2VLForConditionalGeneration:()=>Mb,Qwen2VLPreTrainedModel:()=>jb,Qwen2_5_VLForCausalLM:()=>Fb,Qwen2_5_VLForConditionalGeneration:()=>Pb,Qwen3ForCausalLM:()=>sT,Qwen3Model:()=>oT,Qwen3MoeForCausalLM:()=>uT,Qwen3MoeModel:()=>lT,Qwen3MoePreTrainedModel:()=>cT,Qwen3NextForCausalLM:()=>pT,Qwen3NextModel:()=>fT,Qwen3NextPreTrainedModel:()=>dT,Qwen3PreTrainedModel:()=>aT,Qwen3VLForCausalLM:()=>hT,Qwen3VLForConditionalGeneration:()=>mT,Qwen3VLMoeForCausalLM:()=>_T,Qwen3VLMoeForConditionalGeneration:()=>gT,Qwen3_5ForCausalLM:()=>yT,Qwen3_5ForConditionalGeneration:()=>vT,Qwen3_5MoeForCausalLM:()=>xT,Qwen3_5MoeForConditionalGeneration:()=>bT,RFDetrForObjectDetection:()=>DT,RFDetrModel:()=>ET,RFDetrObjectDetectionOutput:()=>OT,RFDetrPreTrainedModel:()=>TT,RTDetrForObjectDetection:()=>gv,RTDetrModel:()=>hv,RTDetrObjectDetectionOutput:()=>_v,RTDetrPreTrainedModel:()=>mv,RTDetrV2ForObjectDetection:()=>UT,RTDetrV2Model:()=>HT,RTDetrV2ObjectDetectionOutput:()=>WT,RTDetrV2PreTrainedModel:()=>VT,ResNetForImageClassification:()=>wT,ResNetModel:()=>CT,ResNetPreTrainedModel:()=>ST,RoFormerForMaskedLM:()=>LT,RoFormerForQuestionAnswering:()=>BT,RoFormerForSequenceClassification:()=>RT,RoFormerForTokenClassification:()=>zT,RoFormerModel:()=>IT,RoFormerPreTrainedModel:()=>FT,RobertaForMaskedLM:()=>jT,RobertaForQuestionAnswering:()=>PT,RobertaForSequenceClassification:()=>MT,RobertaForTokenClassification:()=>NT,RobertaModel:()=>AT,RobertaPreTrainedModel:()=>kT,Sam2ImageSegmentationOutput:()=>JT,Sam2Model:()=>XT,Sam2PreTrainedModel:()=>YT,Sam3TrackerModel:()=>QT,SamImageSegmentationOutput:()=>GT,SamModel:()=>qT,SamPreTrainedModel:()=>KT,SapiensForDepthEstimation:()=>tE,SapiensForNormalEstimation:()=>nE,SapiensForSemanticSegmentation:()=>eE,SapiensPreTrainedModel:()=>$T,SegformerForImageClassification:()=>aE,SegformerForSemanticSegmentation:()=>oE,SegformerModel:()=>iE,SegformerPreTrainedModel:()=>rE,SiglipModel:()=>cE,SiglipPreTrainedModel:()=>sE,SiglipTextModel:()=>lE,SiglipVisionModel:()=>uE,SmolLM3ForCausalLM:()=>pE,SmolLM3Model:()=>fE,SmolLM3PreTrainedModel:()=>dE,SnacDecoderModel:()=>_E,SnacEncoderModel:()=>gE,SnacModel:()=>hE,SnacPreTrainedModel:()=>mE,SolarOpenForCausalLM:()=>bE,SolarOpenModel:()=>yE,SolarOpenPreTrainedModel:()=>vE,SpeechT5ForSpeechToText:()=>CE,SpeechT5ForTextToSpeech:()=>wE,SpeechT5HifiGan:()=>TE,SpeechT5Model:()=>SE,SpeechT5PreTrainedModel:()=>xE,SqueezeBertForMaskedLM:()=>OE,SqueezeBertForQuestionAnswering:()=>AE,SqueezeBertForSequenceClassification:()=>kE,SqueezeBertModel:()=>DE,SqueezeBertPreTrainedModel:()=>EE,StableLmForCausalLM:()=>NE,StableLmModel:()=>ME,StableLmPreTrainedModel:()=>jE,Starcoder2ForCausalLM:()=>IE,Starcoder2Model:()=>FE,Starcoder2PreTrainedModel:()=>PE,StyleTextToSpeech2Model:()=>RE,StyleTextToSpeech2PreTrainedModel:()=>LE,SupertonicForConditionalGeneration:()=>BE,SupertonicPreTrainedModel:()=>zE,Swin2SRForImageSuperResolution:()=>qE,Swin2SRModel:()=>KE,Swin2SRPreTrainedModel:()=>GE,SwinForImageClassification:()=>UE,SwinForSemanticSegmentation:()=>WE,SwinModel:()=>HE,SwinPreTrainedModel:()=>VE,T5ForConditionalGeneration:()=>XE,T5Model:()=>YE,T5PreTrainedModel:()=>JE,TableTransformerForObjectDetection:()=>$E,TableTransformerModel:()=>QE,TableTransformerObjectDetectionOutput:()=>eD,TableTransformerPreTrainedModel:()=>ZE,TrOCRForCausalLM:()=>nD,TrOCRPreTrainedModel:()=>tD,UltravoxModel:()=>dx,UltravoxPreTrainedModel:()=>ux,UniSpeechForCTC:()=>aD,UniSpeechForSequenceClassification:()=>oD,UniSpeechModel:()=>iD,UniSpeechPreTrainedModel:()=>rD,UniSpeechSatForAudioFrameClassification:()=>dD,UniSpeechSatForCTC:()=>lD,UniSpeechSatForSequenceClassification:()=>uD,UniSpeechSatModel:()=>cD,UniSpeechSatPreTrainedModel:()=>sD,VaultGemmaForCausalLM:()=>mD,VaultGemmaModel:()=>pD,VaultGemmaPreTrainedModel:()=>fD,ViTForImageClassification:()=>vD,ViTMAEModel:()=>bD,ViTMAEPreTrainedModel:()=>yD,ViTMSNForImageClassification:()=>CD,ViTMSNModel:()=>SD,ViTMSNPreTrainedModel:()=>xD,ViTModel:()=>_D,ViTPreTrainedModel:()=>gD,VisionEncoderDecoderModel:()=>hD,VitMatteForImageMatting:()=>TD,VitMattePreTrainedModel:()=>wD,VitPoseForPoseEstimation:()=>DD,VitPosePreTrainedModel:()=>ED,VitsModel:()=>AD,VitsModelOutput:()=>OD,VitsPreTrainedModel:()=>kD,VoxtralForConditionalGeneration:()=>jD,VoxtralRealtimeForConditionalGeneration:()=>VD,VoxtralRealtimePreTrainedModel:()=>BD,Wav2Vec2BertForCTC:()=>WD,Wav2Vec2BertForSequenceClassification:()=>GD,Wav2Vec2BertModel:()=>UD,Wav2Vec2BertPreTrainedModel:()=>HD,Wav2Vec2ForAudioFrameClassification:()=>Dx,Wav2Vec2ForCTC:()=>Tx,Wav2Vec2ForSequenceClassification:()=>Ex,Wav2Vec2Model:()=>wx,Wav2Vec2PreTrainedModel:()=>Cx,WavLMForAudioFrameClassification:()=>QD,WavLMForCTC:()=>YD,WavLMForSequenceClassification:()=>XD,WavLMForXVector:()=>ZD,WavLMModel:()=>JD,WavLMPreTrainedModel:()=>qD,WeSpeakerResNetModel:()=>eO,WeSpeakerResNetPreTrainedModel:()=>$D,WhisperForConditionalGeneration:()=>iO,WhisperModel:()=>rO,WhisperPreTrainedModel:()=>nO,XLMForQuestionAnswering:()=>dO,XLMForSequenceClassification:()=>lO,XLMForTokenClassification:()=>uO,XLMModel:()=>sO,XLMPreTrainedModel:()=>oO,XLMRobertaForMaskedLM:()=>mO,XLMRobertaForQuestionAnswering:()=>_O,XLMRobertaForSequenceClassification:()=>hO,XLMRobertaForTokenClassification:()=>gO,XLMRobertaModel:()=>pO,XLMRobertaPreTrainedModel:()=>fO,XLMWithLMHeadModel:()=>cO,XVectorOutput:()=>KD,YolosForObjectDetection:()=>bO,YolosModel:()=>yO,YolosObjectDetectionOutput:()=>xO,YolosPreTrainedModel:()=>vO,YoutuForCausalLM:()=>wO,YoutuModel:()=>CO,YoutuPreTrainedModel:()=>SO});var Mg=class extends M{},Ng=class extends Mg{},Pg=class extends Mg{async _call(e){return new Ch(await super._call(e))}},Fg=class extends Mg{async _call(e){return new Eh(await super._call(e))}},Ig=class extends Mg{async _call(e){return new Th(await super._call(e))}},Lg=class extends M{},Rg=class extends Lg{},zg=class extends Lg{},Bg=class extends M{},Vg=class extends Bg{},Hg=class extends Bg{},Ug=class extends M{},Wg=class extends Ug{},Gg=class extends Ug{},Kg=class extends M{},qg=class extends Kg{},Jg=class extends Kg{},Yg=class extends M{},Xg=class extends Yg{},Zg=class extends Yg{},Qg=class extends Yg{async _call(e){return new Ch(await super._call(e))}},$g=class extends M{},e_=class extends $g{},t_=class extends $g{async _call(e){return new Ch(await super._call(e))}},n_=class extends M{},r_=class extends n_{},i_=class extends n_{async _call(e){return new Th(await super._call(e))}},a_=class extends n_{async _call(e){return new Ch(await super._call(e))}},o_=class extends n_{async _call(e){return new wh(await super._call(e))}},s_=class extends n_{async _call(e){return new Eh(await super._call(e))}},c_=class extends M{},l_=class extends c_{},u_=class extends c_{},d_=class extends M{},f_=class extends d_{},p_=class extends d_{},m_=class extends M{},h_=class extends m_{},g_=class extends m_{},__=class extends M{},v_=class extends __{},y_=class extends __{async _call(e){return new Th(await super._call(e))}},b_=class extends __{async _call(e){return new Ch(await super._call(e))}},x_=class extends __{async _call(e){return new wh(await super._call(e))}},S_=class extends __{async _call(e){return new Eh(await super._call(e))}},C_=4299n,w_=6561n,T_=class extends M{forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`position_ids`,`audio_values`,`exaggeration`,`audio_features`,`audio_tokens`,`speaker_embeddings`,`speaker_features`,`past_key_values`];main_input_name=`input_ids`;_return_dict_in_generate_keys=[`audio_tokens`,`speaker_embeddings`,`speaker_features`]},E_=class extends T_{async encode_speech(e){return bh(this.sessions.speech_encoder,{audio_values:e})}async forward({input_ids:e=null,attention_mask:t=null,audio_values:n=null,exaggeration:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:o=null,generation_config:s=null,logits_processor:c=null,audio_features:l=null,audio_tokens:u=null,speaker_embeddings:d=null,speaker_features:f=null,...p}){let m;if(!a){let s=this.sessions.embed_tokens.inputNames,c={input_ids:e};if(s.includes(`exaggeration`)){if(!(r instanceof A)){let t=e.dims[0];if(r==null)r=eu([t],.5);else if(typeof r==`number`)r=eu([t],r);else if(Array.isArray(r))r=new A(`float32`,r,[t]);else throw Error("Unsupported type for `exaggeration` input")}c.exaggeration=r}if(s.includes(`position_ids`)&&(c.position_ids=i),{inputs_embeds:a}=await bh(this.sessions.embed_tokens,c),l&&u&&d&&f&&(m={audio_features:l,audio_tokens:u,speaker_embeddings:d,speaker_features:f}),m||n)m??=await this.encode_speech(n),a=ql([m.audio_features,a],1),t=nu([a.dims[0],a.dims[1]]);else{let e=a.dims[1];if(!o||e!==1)throw Error(`Incorrect state encountered during generation.`);let n=o.get_seq_length();t=nu([a.dims[0],n+e])}}return{...await vg(this,{inputs_embeds:a,past_key_values:o,attention_mask:t,generation_config:s,logits_processor:c},!1),...m}}prepare_inputs_for_generation(e,t,n){return!t.position_ids&&this.sessions.embed_tokens.inputNames.includes(`position_ids`)&&(t.input_ids.dims[1]===1?t.position_ids=new A(`int64`,Array.from({length:e.length},(t,n)=>e[n].length-e[n].findLastIndex(e=>e==w_)-1),[e.length,1]):t.position_ids=new A(`int64`,t.input_ids.tolist().map(e=>{let t=0;return e.map(e=>e>=w_?0:t++)}).flat(),t.input_ids.dims)),t.input_ids.dims[1]===1&&(delete t.audio_values,delete t.audio_features,delete t.audio_tokens,delete t.speaker_embeddings,delete t.speaker_features),wg(this,e,t,n)}async generate(e){let{sequences:t,audio_tokens:n,speaker_embeddings:r,speaker_features:i}=await super.generate({...e,return_dict_in_generate:!0}),a=t.slice(null,[e.input_ids.dims[1],-1]),o=ql([n,a,eu([a.dims[0],3],C_)],1),{waveform:s}=await bh(this.sessions.conditional_decoder,{speech_tokens:o,speaker_features:i,speaker_embeddings:r});return s}},D_=class extends M{},O_=class extends D_{},k_=class extends M{},A_=class extends k_{},j_=class extends M{},M_=class extends j_{},N_=class extends j_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},P_=class extends j_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`audio_model`})}},F_=class extends M{},I_=class extends F_{},L_=class extends F_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},R_=class extends F_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},z_=class extends F_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},B_=class extends F_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},V_=class extends M{},H_=class extends V_{},U_=class extends V_{},W_=class extends M{},G_=class extends W_{},K_=class extends W_{},q_=class extends M{},J_=class extends q_{},Y_=class extends q_{},X_=class extends M{},Z_=class extends X_{},Q_=class extends X_{},$_=class extends M{requires_attention_mask=!1;main_input_name=`input_features`;forward_params=[`input_features`,`decoder_input_ids`,`decoder_attention_mask`,`past_key_values`]},ev=class extends $_{},tv=class extends $_{},nv=class extends M{},rv=class extends nv{},iv=class extends nv{async _call(e){return new Th(await super._call(e))}},av=class extends nv{async _call(e){return new Ch(await super._call(e))}},ov=class extends nv{async _call(e){return new wh(await super._call(e))}},sv=class extends nv{async _call(e){return new Eh(await super._call(e))}},cv=class extends M{},lv=class extends cv{},uv=class extends cv{async _call(e){return new Ch(await super._call(e))}},dv=class extends M{},fv=class extends dv{},pv=class extends dv{async _call(e){return new Ch(await super._call(e))}},mv=class extends M{},hv=class extends mv{},gv=class extends mv{async _call(e){return new _v(await super._call(e))}},_v=class extends Sh{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}},vv=class extends M{},yv=class extends vv{},bv=class extends vv{async _call(e){return new _v(await super._call(e))}},xv=class extends Sh{constructor({audio_codes:e}){super(),this.audio_codes=e}},Sv=class extends Sh{constructor({audio_values:e}){super(),this.audio_values=e}},Cv=class extends M{main_input_name=`input_values`;forward_params=[`input_values`]},wv=class extends Cv{async encode(e){return new xv(await bh(this.sessions.encoder_model,e))}async decode(e){return new Sv(await bh(this.sessions.decoder_model,e))}},Tv=class extends Cv{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},Ev=class extends Cv{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},Dv=class extends M{},Ov=class extends Dv{},kv=class extends Dv{async _call(e){return new Th(await super._call(e))}},Av=class extends Dv{async _call(e){return new Ch(await super._call(e))}},jv=class extends Dv{async _call(e){return new wh(await super._call(e))}},Mv=class extends Dv{async _call(e){return new Eh(await super._call(e))}},Nv=class extends M{},Pv=class extends Nv{},Fv=class extends Nv{},Iv=class extends M{},Lv=class extends Iv{},Rv=class extends Iv{async _call(e){return new Th(await super._call(e))}},zv=class extends Iv{async _call(e){return new Ch(await super._call(e))}},Bv=class extends Iv{async _call(e){return new wh(await super._call(e))}},Vv=class extends Iv{async _call(e){return new Eh(await super._call(e))}},Hv=class extends M{},Uv=class extends Hv{},Wv=class extends M{},Gv=class extends Wv{},Kv=class extends Wv{async _call(e){return new Ch(await super._call(e))}},qv=class extends M{},Jv=class extends qv{},Yv=class extends M{},Xv=class extends Yv{},Zv=class extends M{},Qv=class extends Zv{},$v=class extends Zv{async _call(e){return new ty(await super._call(e))}},ey=class extends Zv{async _call(e){return new ny(await super._call(e))}},ty=class extends Sh{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}},ny=class extends Sh{constructor({logits:e,pred_boxes:t,pred_masks:n}){super(),this.logits=e,this.pred_boxes=t,this.pred_masks=n}},ry=class extends M{},iy=class extends ry{},ay=class extends ry{async _call(e){return new Ch(await super._call(e))}},oy=class extends M{},sy=class extends oy{},cy=class extends oy{async _call(e){return new Ch(await super._call(e))}},ly=class extends M{},uy=class extends ly{},dy=class extends M{},fy=class extends dy{},py=class extends M{},my=class extends py{},hy=class extends py{async _call(e){return new Ch(await super._call(e))}},gy=class extends py{async _call(e){return new wh(await super._call(e))}},_y=class extends py{async _call(e){return new Eh(await super._call(e))}},vy=class extends py{async _call(e){return new Th(await super._call(e))}},yy=class extends M{},by=class extends yy{},xy=class extends M{},Sy=class extends xy{},Cy=class extends xy{},wy=class extends M{},Ty=class extends wy{},Ey=class extends wy{async _call(e){return new Ch(await super._call(e))}},Dy=class extends M{},Oy=class extends Dy{},ky=class extends Dy{async _call(e){return new Th(await super._call(e))}},Ay=class extends Dy{async _call(e){return new Ch(await super._call(e))}},jy=class extends Dy{async _call(e){return new wh(await super._call(e))}},My=class extends Dy{async _call(e){return new Eh(await super._call(e))}},Ny=class extends M{},Py=class extends Ny{},Fy=class extends Ny{},Iy=class extends M{},Ly=class extends Iy{},Ry=class extends Iy{async _call(e){return new Th(await super._call(e))}},zy=class extends Iy{async _call(e){return new Ch(await super._call(e))}},By=class extends Iy{async _call(e){return new wh(await super._call(e))}},Vy=class extends M{},Hy=class extends Vy{},Uy=class extends Vy{async _call(e){return new Th(await super._call(e))}},Wy=class extends Vy{async _call(e){return new Ch(await super._call(e))}},Gy=class extends Vy{async _call(e){return new wh(await super._call(e))}},Ky=class extends M{},qy=class extends Ky{},Jy=class extends Ky{},Yy=class extends M{},Xy=class extends Yy{},Zy=class extends Yy{},Qy=class extends M{},$y=class extends Qy{},eb=class extends Qy{},tb=class extends M{},nb=class extends tb{},rb=class extends tb{async _call(e){return new Ch(await super._call(e))}},ib=class extends M{forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`pixel_values`,`encoder_outputs`,`decoder_input_ids`,`decoder_inputs_embeds`,`decoder_attention_mask`,`past_key_values`];main_input_name=`inputs_embeds`},ab=class extends ib{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){return{inputs_embeds:ql([t,e],1),attention_mask:ql([nu(t.dims.slice(0,2)),r],1)}}async _prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:n,attention_mask:r}){if(!e&&!t)throw Error("Either `input_ids` or `pixel_values` should be provided.");let i,a;return e&&(i=await this.encode_text({input_ids:e})),t&&(a=await this.encode_image({pixel_values:t})),i&&a?{inputs_embeds:n,attention_mask:r}=this._merge_input_ids_with_image_features({inputs_embeds:i,image_features:a,input_ids:e,attention_mask:r}):n=i||a,{inputs_embeds:n,attention_mask:r}}async forward({input_ids:e,pixel_values:t,attention_mask:n,decoder_input_ids:r,decoder_attention_mask:i,encoder_outputs:a,past_key_values:o,inputs_embeds:s,decoder_inputs_embeds:c}){if(s||({inputs_embeds:s,attention_mask:n}=await this._prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:s,attention_mask:n})),!a){let{last_hidden_state:e}=await gg(this,{inputs_embeds:s,attention_mask:n});a=e}if(!c){if(!r)throw Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");c=await this.encode_text({input_ids:r})}return await vg(this,{inputs_embeds:c,attention_mask:i,encoder_attention_mask:n,encoder_hidden_states:a,past_key_values:o},!0)}},ob=class extends M{},sb=class extends ob{},cb=class extends ob{},lb=class extends M{},ub=class extends lb{},db=class extends lb{},fb=class extends M{forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`position_ids`,`past_key_values`]},pb=class extends fb{_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return Og({image_token_id:this.config.image_token_index??this.config.image_token_id,...e,image_features:n})}},mb=class extends pb{},hb=class extends pb{},gb=class extends M{},_b=class extends gb{},vb=class extends pb{},yb=class extends vb{},bb=class extends M{forward_params=[`input_ids`,`attention_mask`,`inputs_embeds`,`per_layer_inputs`,`position_ids`,`pixel_values`,`input_features`,`input_features_mask`,`past_key_values`]},xb=class extends bb{async forward({input_ids:e=null,attention_mask:t=null,pixel_values:n=null,input_features:r=null,input_features_mask:i=null,position_ids:a=null,inputs_embeds:o=null,per_layer_inputs:s=null,past_key_values:c=null,generation_config:l=null,logits_processor:u=null,...d}){if((!o||!s)&&({inputs_embeds:o,per_layer_inputs:s}=await bh(this.sessions.embed_tokens,{input_ids:e}),e.dims[1]!==1)){if(n){let{image_features:r}=await this._encode_vision({pixel_values:n,...d});({inputs_embeds:o,attention_mask:t}=this._merge_input_ids_with_image_features({image_features:r,inputs_embeds:o,input_ids:e,attention_mask:t}))}if(r){let{audio_features:n}=await bh(this.sessions.audio_encoder,{input_features:r,input_features_mask:i});({inputs_embeds:o,attention_mask:t}=this._merge_input_ids_with_audio_features({audio_features:n,inputs_embeds:o,input_ids:e,attention_mask:t}))}}return await vg(this,{inputs_embeds:o,per_layer_inputs:s,past_key_values:c,attention_mask:t,position_ids:a,generation_config:l,logits_processor:u},!0)}_encode_vision(e){return bh(this.sessions.vision_encoder,{pixel_values:e.pixel_values})}_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return Og({image_token_id:this.config.image_token_id,...e,image_features:n})}_merge_input_ids_with_audio_features(e){let t=e.audio_features.dims.at(-1),n=e.audio_features.view(-1,t);return kg({audio_token_id:this.config.audio_token_id,...e,audio_features:n})}},Sb=class extends xb{},Cb=class extends xb{forward_params=[`input_ids`,`attention_mask`,`inputs_embeds`,`per_layer_inputs`,`position_ids`,`pixel_values`,`image_position_ids`,`input_features`,`input_features_mask`,`past_key_values`];_encode_vision(e){return bh(this.sessions.vision_encoder,{pixel_values:e.pixel_values,pixel_position_ids:e.image_position_ids})}},wb=class extends Cb{},Tb=class extends M{},Eb=class extends Tb{},Db=class extends Tb{},Ob=class extends M{},kb=class extends Ob{},Ab=class extends Ob{},jb=class extends M{forward_params=[`input_ids`,`attention_mask`,`position_ids`,`past_key_values`,`pixel_values`,`image_grid_thw`]},Mb=class extends jb{image_grid_thw_name=`grid_thw`;_get_text_only_rope_index(e,t){if(t){let{data:e,dims:n}=Sg(t),r=BigInt64Array.from({length:3*e.length},(t,n)=>e[n%e.length]),i=Array.from({length:n[0]},(t,r)=>Wc(e.subarray(n[1]*r,n[1]*(r+1)))[0]+1n+BigInt(n[1]));return[new A(`int64`,r,[3,...n]),new A(`int64`,i,[i.length,1])]}else{let[t,n]=e.dims;return[new A(`int64`,BigInt64Array.from({length:3*t*n},(e,r)=>BigInt(Math.floor(r%n/t))),[3,...e.dims]),iu([t,1])]}}_reorder_and_write_positions(e,t,n,r){let i=e.reduce((e,t)=>e+t.length,0),a=Array(i),o=0;for(let t=0;t<3;++t)for(let n of e){let e=n.length/3;for(let r=t*e;r<(t+1)*e;++r)a[o++]=n[r]}let s=0;for(let e=0;e(t==s&&e.push(n),e),[]).map(e=>c[e+1]),u=l.filter(e=>e==a).length,d=l.filter(e=>e==o).length,f=[],p=0,m=u,h=d;for(let e=0;et>p&&e==a),s=c.findIndex((e,t)=>t>p&&e==o),l=m>0&&e!==-1?e:c.length+1,u=h>0&&s!==-1?s:c.length+1,d,g,_,v;l0?Wc(f.at(-1))[0]+1:0;f.push(Array.from({length:3*S},(e,t)=>C+t%S));let w=S+C,T=y*b*x,ee=Array.from({length:T},(e,t)=>w+Math.floor(t/(b*x))),te=Array.from({length:T},(e,t)=>w+Math.floor(t/x)%b),ne=Array.from({length:T},(e,t)=>w+t%x);f.push([ee,te,ne].flat()),p=d+T}if(p0?Wc(f.at(-1))[0]+1:0,t=c.length-p;f.push(Array.from({length:3*t},(n,r)=>e+r%t))}return f}get_rope_index(e,t,n,r){let{vision_config:i}=this.config,a=i.spatial_merge_size??2;if(t||n){let i=e.tolist();r||=ru(e);let o=r.tolist(),s=Array.from({length:3},()=>Array.from({length:e.dims[0]},()=>Array.from({length:e.dims[1]},()=>0))),c=t?t.tolist():[],l=n?n.tolist():[],u={image_index:0,video_index:0},d=[];for(let e=0;eo[e][n]==1),n=this._get_multimodal_rope_positions({filtered_ids:t,image_grid_thw_list:c,video_grid_thw_list:l,spatial_merge_size:a,state:u}),r=this._reorder_and_write_positions(n,o[e],s,e);d.push(Wc(r)[0]+1-i[e].length)}return[new A(`int64`,s.flat(1/0),[3,e.dims[0],e.dims[1]]),new A(`int64`,d,[d.length,1])]}else return this._get_text_only_rope_index(e,r)}async encode_image({pixel_values:e,image_grid_thw:t}){return(await bh(this.sessions.vision_encoder,{pixel_values:e,[this.image_grid_thw_name]:t})).image_features}_merge_input_ids_with_image_features(e){return Og({image_token_id:this.config.image_token_id,...e})}prepare_inputs_for_generation(e,t,n){if(!t.attention_mask||t.position_ids||!(this.sessions.decoder_model_merged??this.sessions.model).inputNames.includes(`position_ids`))return t;if(!t.past_key_values)[t.position_ids,t.rope_deltas]=this.get_rope_index(t.input_ids,t.image_grid_thw,t.video_grid_thw,t.attention_mask);else{t.pixel_values=null;let e=t.past_key_values.get_seq_length();if(en+e);t.position_ids=Jl([r,r,r],0)}}return t}},Nb=class extends Mb{},Pb=class extends Mb{image_grid_thw_name=`image_grid_thw`},Fb=class extends Nb{image_grid_thw_name=`image_grid_thw`},Ib=class extends Pb{get_vision_position_ids(e,t,n,r){let i=Math.floor(t[0]/n),a=Math.floor(t[1]/r),o=Math.floor(t[2]/r),s=a*o*i,c=Array.from({length:s},()=>e),l=Array.from({length:s},(t,n)=>e+Math.floor(n/(o*i))),u=Array.from({length:s},(t,n)=>e+n%o);return[...c,...l,...u]}_get_multimodal_rope_positions({filtered_ids:e,image_grid_thw_list:t,video_grid_thw_list:n,spatial_merge_size:r,state:i}){let{image_token_id:a}=this.config,o=[],s=0,c=e[0]==a?1:0;for(let t=1;t<=e.length;++t){let n=tl+n%e)),l+=e}else{let e=t[i.image_index++].map(Number),n=e[0];u.push(this.get_vision_position_ids(l,e,n,r)),l+=Math.max(e[1],e[2])/r}return u}},Lb=class extends M{},Rb=class extends Lb{},zb=class extends Lb{},Bb=class extends M{},Vb=class extends Bb{},Hb=class extends Bb{},Ub=class extends M{},Wb=class extends Ub{},Gb=class extends Ub{},Kb=class extends M{},qb=class extends Kb{},Jb=class extends Kb{},Yb=class extends M{},Xb=class extends Yb{},Zb=class extends Yb{},Qb=class extends M{},$b=class extends Qb{},ex=class extends Qb{},tx=class extends M{},nx=class extends tx{},rx=class extends tx{},ix=class extends M{},ax=class extends ix{},ox=class extends ix{},sx=class extends M{},cx=class extends sx{},lx=class extends sx{},ux=class extends M{forward_params=[`input_ids`,`attention_mask`,`position_ids`,`audio_values`,`past_key_values`]},dx=class extends ux{_merge_input_ids_with_audio_features(e){let t=e.audio_features.dims.at(-1),n=e.audio_features.view(-1,t);return kg({audio_token_id:this.config.ignore_index??this.config.audio_token_id??this.config.audio_token_index,...e,audio_features:n})}},fx=class extends dx{forward_params=[`input_ids`,`attention_mask`,`input_features`,`past_key_values`]},px=class extends M{},mx=class extends px{},hx=class extends M{},gx=class extends hx{},_x=class extends M{},vx=class extends _x{},yx=class extends _x{},bx=class extends M{},xx=class extends bx{},Sx=class extends bx{async _call(e){return new Ch(await super._call(e))}},Cx=class extends M{},wx=class extends Cx{},Tx=class extends Cx{async _call(e){return new Dh(await super._call(e))}},Ex=class extends Cx{async _call(e){return new Ch(await super._call(e))}},Dx=class extends Cx{async _call(e){return new wh(await super._call(e))}},Ox=class extends M{},kx=class extends Cx{},Ax=class extends Cx{async _call(e){return new Dh(await super._call(e))}},jx=class extends Cx{async _call(e){return new Ch(await super._call(e))}},Mx=class extends M{},Nx=class extends Mx{},Px=class extends Mx{},Fx=class extends pb{forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`pixel_attention_mask`,`position_ids`,`past_key_values`]},Ix=class extends M{},Lx=class extends Ix{},Rx=class extends Ix{async _call(e){return new Ch(await super._call(e))}},zx=class extends M{},Bx=class extends zx{},Vx=class extends zx{},Hx=class extends M{},Ux=class extends Hx{async forward(e){let t=!e.input_ids,n=!e.pixel_values;if(t&&n)throw Error("Either `input_ids` or `pixel_values` should be provided.");if(t&&(e.input_ids=nu([e.pixel_values.dims[0],1])),n){let{image_size:t}=this.config.vision_config;e.pixel_values=eu([0,3,t,t],0)}let{text_embeddings:r,image_embeddings:i,l2norm_text_embeddings:a,l2norm_image_embeddings:o}=await super.forward(e),s={};return t||(s.text_embeddings=r,s.l2norm_text_embeddings=a),n||(s.image_embeddings=i,s.l2norm_image_embeddings=o),s}},Wx=class extends Hx{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},Gx=class extends Hx{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},Kx=class extends M{},qx=class extends Kx{},Jx=class extends Kx{},Yx=class extends pb{},Xx=class extends M{},Zx=class extends Xx{},Qx=class extends Xx{},$x=class extends pb{forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`pixel_attention_mask`,`spatial_shapes`,`position_ids`,`past_key_values`]},eS=class extends M{},tS=class extends eS{},nS=class extends eS{},rS=class extends M{},iS=class extends rS{},aS=class extends M{},oS=class extends aS{},sS=class extends aS{},cS=class extends M{},lS=class extends cS{},uS=class extends cS{},dS=class extends M{},fS=class extends dS{},pS=class extends dS{},mS=class extends M{},hS=class extends mS{},gS=class extends mS{},_S=class extends M{},vS=class extends _S{},yS=class extends _S{},bS=class extends _S{async _call(e){return new Ch(await super._call(e))}},xS=class extends _S{},SS=class extends M{},CS=class extends SS{},wS=class extends M{},TS=class extends wS{},ES=class extends Sh{constructor({char_logits:e,bpe_logits:t,wp_logits:n}){super(),this.char_logits=e,this.bpe_logits=t,this.wp_logits=n}get logits(){return[this.char_logits,this.bpe_logits,this.wp_logits]}},DS=class extends M{},OS=class extends DS{async _call(e){return new ES(await super._call(e))}},kS=class extends Sh{constructor({audio_codes:e}){super(),this.audio_codes=e}},AS=class extends Sh{constructor({audio_values:e}){super(),this.audio_values=e}},jS=class extends M{main_input_name=`input_values`;forward_params=[`input_values`]},MS=class extends jS{async encode(e){return new kS(await bh(this.sessions.encoder_model,e))}async decode(e){return new AS(await bh(this.sessions.decoder_model,e))}},NS=class extends jS{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},PS=class extends jS{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},FS=class extends M{},IS=class extends FS{},LS=class extends FS{},RS=class extends M{},zS=class extends RS{},BS=class extends RS{},VS=class extends M{},HS=class extends VS{},US=class extends VS{async _call(e){return new Th(await super._call(e))}},WS=class extends VS{async _call(e){return new Ch(await super._call(e))}},GS=class extends VS{async _call(e){return new Eh(await super._call(e))}},KS=class extends M{},qS=class extends KS{},JS=class extends KS{},YS=class extends M{},XS=class extends YS{},ZS=class extends YS{async _call(e){return new Ch(await super._call(e))}},QS=class extends YS{},$S=class extends M{},eC=class extends $S{},tC=class extends $S{async _call(e){return new Ch(await super._call(e))}},nC=class extends $S{},rC=class extends M{},iC=class extends rC{},aC=class extends rC{async _call(e){return new Ch(await super._call(e))}},oC=class extends rC{},sC=class extends M{},cC=class extends sC{},lC=class extends sC{async _call(e){return new Ch(await super._call(e))}},uC=class extends sC{},dC=class extends M{},fC=class extends dC{},pC=class extends dC{async _call(e){return new Ch(await super._call(e))}},mC=class extends M{},hC=class extends mC{},gC=class extends mC{async _call(e){return new Ch(await super._call(e))}},_C=class extends M{},vC=class extends _C{},yC=class extends _C{async _call(e){return new Th(await super._call(e))}},bC=class extends _C{async _call(e){return new Ch(await super._call(e))}},xC=class extends _C{async _call(e){return new wh(await super._call(e))}},SC=class extends M{},CC=class extends SC{},wC=class extends SC{},TC=class extends M{requires_attention_mask=!1;main_input_name=`input_values`;forward_params=[`input_values`,`decoder_input_ids`,`past_key_values`]},EC=class extends TC{},DC=class extends TC{},OC=class extends M{},kC=class extends OC{},AC=class extends OC{async _call(e){return new Th(await super._call(e))}},jC=class extends OC{async _call(e){return new Ch(await super._call(e))}},MC=class extends OC{async _call(e){return new wh(await super._call(e))}},NC=class extends OC{async _call(e){return new Eh(await super._call(e))}},PC=class extends M{},FC=class extends PC{},IC=class extends PC{},LC=class extends M{},RC=class extends LC{},zC=class extends LC{},BC=class extends M{},VC=class extends BC{forward_params=[`input_ids`,`pixel_values`,`images_seq_mask`,`images_emb_mask`,`attention_mask`,`position_ids`,`past_key_values`];constructor(...e){super(...e),this._generation_mode=`text`}async forward(e){let t=this._generation_mode??`text`,n;if(t===`text`||!e.past_key_values){let t=this.sessions.prepare_inputs_embeds;n=await bh(t,Li(e,t.inputNames))}else{let t=this.sessions.gen_img_embeds;n=await bh(t,Li({image_ids:e.input_ids},t.inputNames))}let r={...e,...n},i=await vg(this,r),a=this.sessions[t===`text`?`lm_head`:`gen_head`];if(!a)throw Error(`Unable to find "${a}" generation head`);let o=await bh(a,Li(i,a.inputNames));return{...n,...i,...o}}prepare_inputs_for_generation(e,t,n){let r=!!t.past_key_values;return n.guidance_scale!==null&&n.guidance_scale>1&&(r?t.input_ids=ql([t.input_ids,t.input_ids],0):(t.input_ids=ql([t.input_ids,tu(t.input_ids,BigInt(n.pad_token_id))],0),t.attention_mask=ql([t.attention_mask,tu(t.attention_mask,0n)],0))),(r||!t.pixel_values)&&(t.pixel_values=eu([0,0,3,384,384],1)),r&&(t.images_seq_mask=new A(`bool`,[,].fill(!0).fill(!1,0,1),[1,1]),t.images_emb_mask=new A(`bool`,[].fill(!1),[1,1,0])),t}async generate(e){return this._generation_mode=`text`,super.generate(e)}async generate_images(e){this._generation_mode=`image`;let t=(e.inputs??e[this.main_input_name]).dims[1],n=(await super.generate(e)).slice(null,[t,null]),r=this.sessions.image_decode,{decoded_image:i}=await bh(r,{generated_tokens:n}),a=i.add_(1).mul_(255/2).clamp_(0,255).to(`uint8`),o=[];for(let e of a){let t=Df.fromTensor(e);o.push(t)}return o}},HC=class extends M{},UC=class extends HC{},WC=class extends HC{},GC=class extends M{forward_params=[`input_ids`,`attention_mask`,`encoder_outputs`,`decoder_input_ids`,`decoder_attention_mask`,`past_key_values`];_apply_and_filter_by_delay_pattern_mask(e){let[t,n]=e.dims,r=this.config.decoder.num_codebooks,i=n-r,a=0;for(let t=0;t0&&o<=i&&(e.data[a++]=e.data[t])}let o=Math.floor(t/r),s=a/(o*r);return new A(e.type,e.data.slice(0,a),[o,r,s])}prepare_inputs_for_generation(e,t,n){let r=BigInt(this.config.decoder.pad_token_id),i=structuredClone(e);for(let e=0;e=t&&(i[e][t]=r);return n.guidance_scale!==null&&n.guidance_scale>1&&(i=i.concat(i)),Tg(this,i,t,n)}async generate(e){let t=await super.generate(e),n=this._apply_and_filter_by_delay_pattern_mask(t).unsqueeze_(0),{audio_values:r}=await bh(this.sessions.encodec_decode,{audio_codes:n});return r}},KC=class extends M{},qC=class extends KC{},JC=class extends KC{},YC=class extends M{},XC=class extends YC{},ZC=class extends YC{},QC=class extends M{},$C=class extends QC{},ew=class extends QC{async _call(e){return new Th(await super._call(e))}},tw=class extends QC{async _call(e){return new Ch(await super._call(e))}},nw=class extends QC{async _call(e){return new wh(await super._call(e))}},rw=class extends QC{async _call(e){return new Eh(await super._call(e))}},iw=class extends M{},aw=class extends iw{},ow=class extends M{},sw=class extends ow{},cw=class extends ow{},lw=class extends M{},uw=class extends lw{},dw=class extends lw{},fw=class extends M{},pw=class extends fw{},mw=class extends fw{},hw=class extends M{},gw=class extends hw{},_w=class extends hw{},vw=class extends M{},yw=class extends vw{},bw=class extends vw{},xw=class extends M{},Sw=class extends xw{},Cw=class extends xw{},ww=class extends M{},Tw=class extends ww{},Ew=class extends ww{},Dw=class extends M{},Ow=class extends Dw{},kw=class extends Dw{},Aw=class extends pb{},jw=class extends M{},Mw=class extends jw{async _call(e){return new Dh(await super._call(e))}},Nw=class extends M{},Pw=class extends Nw{},Fw=class extends Nw{},Iw=class extends M{},Lw=class extends Iw{},Rw=class extends Iw{},zw=class extends M{},Bw=class extends zw{},Vw=class extends zw{},Hw=class extends M{},Uw=class extends Hw{},Ww=class extends Hw{},Gw=class extends M{forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`position_ids`,`pixel_values`,`image_sizes`,`past_key_values`]},Kw=class extends Gw{async forward({input_ids:e=null,attention_mask:t=null,pixel_values:n=null,image_sizes:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:o=null,generation_config:s=null,logits_processor:c=null,...l}){if(!a){let t;if(n&&e.dims[1]!==1){if(!r)throw Error("`image_sizes` must be provided when `pixel_values` is provided.");({image_features:t}=await bh(this.sessions.vision_encoder,{pixel_values:n,image_sizes:r}))}else{let e=this.config.normalized_config.hidden_size;t=new A(`float32`,[],[0,e])}({inputs_embeds:a}=await bh(this.sessions.prepare_inputs_embeds,{input_ids:e,image_features:t}))}return await vg(this,{inputs_embeds:a,past_key_values:o,attention_mask:t,position_ids:i,generation_config:s,logits_processor:c},!1)}},qw=class extends M{},Jw=class extends qw{},Yw=class extends qw{async _call(e){return new Ch(await super._call(e))}},Xw=class extends M{},Zw=class extends Xw{},Qw=class extends Xw{async _call(e){return new wh(await super._call(e))}},$w=class extends M{},eT=class extends $w{},tT=class extends $w{},nT=class extends M{},rT=class extends nT{},iT=class extends nT{},aT=class extends M{},oT=class extends aT{},sT=class extends aT{},cT=class extends M{},lT=class extends cT{},uT=class extends cT{},dT=class extends M{},fT=class extends dT{},pT=class extends dT{},mT=class extends Pb{},hT=class extends Fb{},gT=class extends mT{},_T=class extends hT{},vT=class extends mT{},yT=class extends vT{},bT=class extends vT{},xT=class extends yT{},ST=class extends M{},CT=class extends ST{},wT=class extends ST{async _call(e){return new Ch(await super._call(e))}},TT=class extends M{},ET=class extends TT{},DT=class extends TT{async _call(e){return new OT(await super._call(e))}},OT=class extends _v{},kT=class extends M{},AT=class extends kT{},jT=class extends kT{async _call(e){return new Th(await super._call(e))}},MT=class extends kT{async _call(e){return new Ch(await super._call(e))}},NT=class extends kT{async _call(e){return new wh(await super._call(e))}},PT=class extends kT{async _call(e){return new Eh(await super._call(e))}},FT=class extends M{},IT=class extends FT{},LT=class extends FT{async _call(e){return new Th(await super._call(e))}},RT=class extends FT{async _call(e){return new Ch(await super._call(e))}},zT=class extends FT{async _call(e){return new wh(await super._call(e))}},BT=class extends FT{async _call(e){return new Eh(await super._call(e))}},VT=class extends M{},HT=class extends VT{},UT=class extends VT{async _call(e){return new WT(await super._call(e))}},WT=class extends _v{},GT=class extends Sh{constructor({iou_scores:e,pred_masks:t}){super(),this.iou_scores=e,this.pred_masks=t}},KT=class extends M{},qT=class extends KT{async get_image_embeddings({pixel_values:e}){return await gg(this,{pixel_values:e})}async forward(e){e=!e.image_embeddings||!e.image_positional_embeddings?{...e,...await this.get_image_embeddings(e)}:{...e},e.input_labels??=nu(e.input_points.dims.slice(0,-1));let t={image_embeddings:e.image_embeddings,image_positional_embeddings:e.image_positional_embeddings};return e.input_points&&(t.input_points=e.input_points),e.input_labels&&(t.input_labels=e.input_labels),e.input_boxes&&(t.input_boxes=e.input_boxes),await bh(this.sessions.prompt_encoder_mask_decoder,t)}async _call(e){return new GT(await super._call(e))}},JT=class extends Sh{constructor({iou_scores:e,pred_masks:t,object_score_logits:n}){super(),this.iou_scores=e,this.pred_masks=t,this.object_score_logits=n}},YT=class extends M{},XT=class extends YT{async get_image_embeddings({pixel_values:e}){return await gg(this,{pixel_values:e})}async forward(e){let{num_feature_levels:t}=this.config.vision_config;if(e=Array.from({length:t},(e,t)=>`image_embeddings.${t}`).some(t=>!e[t])?{...e,...await this.get_image_embeddings(e)}:{...e},e.input_points){if(e.input_boxes&&e.input_boxes.dims[1]!==1)throw Error("When both `input_points` and `input_boxes` are provided, the number of boxes per image must be 1.");let t=e.input_points.dims;e.input_labels??=nu(t.slice(0,-1)),e.input_boxes??=eu([t[0],0,4],0)}else if(e.input_boxes){let t=e.input_boxes.dims;e.input_labels=eu([t[0],t[1],0],-1n),e.input_points=eu([t[0],1,0,2],0)}else throw Error("At least one of `input_points` or `input_boxes` must be provided.");let n=this.sessions.prompt_encoder_mask_decoder;return await bh(n,Li(e,n.inputNames))}async _call(e){return new JT(await super._call(e))}},ZT=class extends XT{},QT=class extends XT{},$T=class extends M{},eE=class extends $T{},tE=class extends $T{},nE=class extends $T{},rE=class extends M{},iE=class extends rE{},aE=class extends rE{},oE=class extends rE{},sE=class extends M{},cE=class extends sE{},lE=class extends sE{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},uE=class extends F_{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},dE=class extends M{},fE=class extends dE{},pE=class extends dE{},mE=class extends M{main_input_name=`input_values`;forward_params=[`input_values`]},hE=class extends mE{async encode(e){return await bh(this.sessions.encoder_model,e)}async decode(e){return await bh(this.sessions.decoder_model,e)}},gE=class extends mE{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},_E=class extends mE{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},vE=class extends M{},yE=class extends vE{},bE=class extends vE{},xE=class extends M{},SE=class extends xE{},CE=class extends xE{},wE=class extends xE{async generate_speech(e,t,{threshold:n=.5,minlenratio:r=0,maxlenratio:i=20,vocoder:a=null}={}){let{encoder_outputs:o,encoder_attention_mask:s}=await gg(this,{input_ids:e}),c=o.dims[1]/this.config.reduction_factor,l=Math.floor(c*i),u=Math.floor(c*r),d=this.config.num_mel_bins,f=[],p=null,m=null,h=0;for(;;){++h;let e=lg(!!m),r;r=m?m.output_sequence_out:new A(`float32`,new Float32Array(d),[1,1,d]);let i={use_cache_branch:e,output_sequence:r,encoder_attention_mask:s,speaker_embeddings:t,encoder_hidden_states:o};this.addPastKeyValues(i,p),m=await bh(this.sessions.decoder_model_merged,i),p=this.getPastKeyValues(m,p);let{prob:a,spectrum:c}=m;if(f.push(c),h>=u&&(Array.from(a.data).filter(e=>e>=n).length>0||h>=l))break}let g=ql(f),{waveform:_}=await bh(a.sessions.model,{spectrogram:g});return{spectrogram:g,waveform:_}}},TE=class extends M{main_input_name=`spectrogram`},EE=class extends M{},DE=class extends EE{},OE=class extends EE{async _call(e){return new Th(await super._call(e))}},kE=class extends EE{async _call(e){return new Ch(await super._call(e))}},AE=class extends EE{async _call(e){return new Eh(await super._call(e))}},jE=class extends M{},ME=class extends jE{},NE=class extends jE{},PE=class extends M{},FE=class extends PE{},IE=class extends PE{},LE=class extends M{},RE=class extends LE{},zE=class extends M{},BE=class extends zE{async generate_speech({input_ids:e,attention_mask:t,style:n,num_inference_steps:r=5,speed:i=1.05}){let{sampling_rate:a,chunk_compress_factor:o,base_chunk_size:s,latent_dim:c}=this.config,{last_hidden_state:l,durations:u}=await bh(this.sessions.text_encoder,{input_ids:e,attention_mask:t,style:n}),d=u.div(i).mul_(a),f=s*o,p=d.data,m=Int32Array.from(p,e=>Math.ceil(e/f)),h=Math.max(...m),g=e.dims[0],_=new BigInt64Array(g*h);for(let e=0;ee*t,1)),d[e]);let f=new A(l,new u(s*MD),[1,s,MD]),p=t[Symbol.asyncIterator]?.()??t[Symbol.iterator]?.();if(!p)throw Error(`input_features must be iterable or async iterable`);return{encoder_session:i,enc_kv_cache:c,enc_padding_cache:f,enc_past_seq_len:0,audio_embed_queue:[],audio_embed_total_tokens:0,audio_queue_offset:0,audio_consumed:0,stream_exhausted:!1,chunks_iter:p,text_hidden_size:n.hidden_size}}async function ID(e,t){let n=t.dims[2],r=Math.floor((ND+n-3)/2)+1,i=new A(`int64`,BigInt64Array.from({length:r},(t,n)=>BigInt(e.enc_past_seq_len+n)),[1,r]),a=e.enc_past_seq_len+r,o=nu([1,a]),{audio_embeds:s,present_padding_cache:c,...l}=await bh(e.encoder_session,{input_features:t,attention_mask:o,position_ids:i,past_padding_cache:e.enc_padding_cache,...e.enc_kv_cache});e.enc_padding_cache.location===`gpu-buffer`&&e.enc_padding_cache.dispose(),e.enc_padding_cache=c;for(let t in l)if(t.startsWith(`present.`)){let n=t.replace(`present`,`past_key_values`),r=e.enc_kv_cache[n];r?.location===`gpu-buffer`&&r.dispose(),e.enc_kv_cache[n]=l[t]}return e.enc_past_seq_len=a,s}async function LD(e,t){for(;e.audio_embed_total_tokens0&&e.audio_embed_queue.length>0;){let t=e.audio_embed_queue[0],n=t.tokens-e.audio_queue_offset,o=Math.min(a,n),s=e.audio_queue_offset*e.text_hidden_size;for(let n=0;n=t.tokens&&(e.audio_embed_queue.shift(),e.audio_queue_offset=0)}e.audio_consumed+=n-a}var zD=class extends Gh{constructor(e){super(),this._s=e}_call(e){let t=this._s.stream_exhausted&&this._s.audio_embed_queue.length===0;return e.map(()=>t)}},BD=class extends M{forward_params=[`input_ids`,`attention_mask`,`position_ids`,`past_key_values`]},VD=class extends BD{async forward({input_ids:e,past_key_values:t,...n}){let r=e.dims[1],i=PD.get(this);i&&await LD(i,i.audio_consumed+r);let{inputs_embeds:a}=await bh(this.sessions.embed_tokens,{input_ids:e});i&&RD(i,a,r);let o={inputs_embeds:a,...n};this.addPastKeyValues(o,t);let s=this.sessions.decoder_model_merged;return await bh(s,Li(o,s.inputNames))}async generate({input_features:e,stopping_criteria:t,...n}){if(!e)throw Error(`input_features (generator/iterable) must be provided`);let r=FD(this,e);PD.set(this,r);let i=new Kh;i.push(new zD(r)),t&&i.extend(t);try{return await super.generate({...n,stopping_criteria:i})}finally{r.enc_kv_cache.dispose(),PD.delete(this)}}},HD=class extends M{},UD=class extends HD{},WD=class extends HD{async _call(e){return new Dh(await super._call(e))}},GD=class extends HD{async _call(e){return new Ch(await super._call(e))}},KD=class extends Sh{constructor({logits:e,embeddings:t}){super(),this.logits=e,this.embeddings=t}},qD=class extends M{},JD=class extends qD{},YD=class extends qD{async _call(e){return new Dh(await super._call(e))}},XD=class extends qD{async _call(e){return new Ch(await super._call(e))}},ZD=class extends qD{async _call(e){return new KD(await super._call(e))}},QD=class extends qD{async _call(e){return new wh(await super._call(e))}},$D=class extends M{},eO=class extends $D{},tO=class extends Wh{return_timestamps=null;return_token_timestamps=null;num_frames=null;alignment_heads=null;task=null;language=null;no_timestamps_token_id=null;prompt_ids=null;is_multilingual=null;lang_to_id=null;task_to_id=null;max_initial_timestamp_index=1},nO=class extends M{requires_attention_mask=!1;main_input_name=`input_features`;forward_params=[`input_features`,`attention_mask`,`decoder_input_ids`,`decoder_attention_mask`,`past_key_values`]},rO=class extends nO{},iO=class extends nO{_prepare_generation_config(e,t){return super._prepare_generation_config(e,t,tO)}_retrieve_init_tokens(e){let t=[e.decoder_start_token_id],n=e.language,r=e.task;if(e.is_multilingual){n||=(zi.warn(`No language specified - defaulting to English (en).`),`en`);let i=`<|${dd(n)}|>`;t.push(e.lang_to_id[i]),t.push(e.task_to_id[r??`transcribe`])}else if(n||r)throw Error("Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, pass `is_multilingual=true` to generate, or update the generation config.");return!e.return_timestamps&&e.no_timestamps_token_id&&t.at(-1)!==e.no_timestamps_token_id?t.push(e.no_timestamps_token_id):e.return_timestamps&&t.at(-1)===e.no_timestamps_token_id&&(zi.warn("<|notimestamps|> prompt token is removed from generation_config since `return_timestamps` is set to `true`."),t.pop()),t.filter(e=>e!=null)}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,...i}){t=this._prepare_generation_config(t,i);let a=i.decoder_input_ids??this._retrieve_init_tokens(t);if(t.return_timestamps&&(n??=new jh,n.push(new Ih(t,a))),t.begin_suppress_tokens&&(n??=new jh,n.push(new Fh(t.begin_suppress_tokens,a.length))),t.return_token_timestamps){if(!t.alignment_heads)throw Error("Model generation config has no `alignment_heads`, token-level timestamps not available. See https://gist.github.com/hollance/42e32852f24243b748ae6bc1f985b13a on how to add this property to the generation config.");t.task===`translate`&&zi.warn(`Token-level timestamps may not be reliable for task 'translate'.`),t.output_attentions=!0,t.return_dict_in_generate=!0}if(t.return_timestamps&&!i.max_new_tokens)return this._generate_with_seek({inputs:e,generation_config:t,logits_processor:n,init_tokens:a,kwargs:i});let o=await super.generate({inputs:e,generation_config:t,logits_processor:n,decoder_input_ids:a,...i});return t.return_token_timestamps&&(o.token_timestamps=this._extract_token_timestamps(o,t.alignment_heads,t.num_frames,.02,a.length)),o}async _generate_with_seek({inputs:e,generation_config:t,logits_processor:n,init_tokens:r,kwargs:i}){let a=t.no_timestamps_token_id+1,o=Array.isArray(t.eos_token_id)?t.eos_token_id[0]:t.eos_token_id,s=t.return_token_timestamps,c=e,l=c.dims[2],u=2*this.config.max_source_positions,d=0,f=[],p=[];for(;de+n)}if(v.length>0&&v.at(-1)===o&&v.pop(),v.length===0)break;let b=v.map(e=>e>=a),x=v.length>=2&&b[v.length-1]&&!b[v.length-2],S=[];for(let e=0;e0)if(x)C=e-d;else{let e=S.at(-1);C=(v[e-1]-a)*2,w=e}else C=e-d;let T=Math.floor(d/2),ee=a+1500;for(let e=0;e=a&&(v[e]=Math.min(v[e]+T,ee));f.push(...v.slice(0,w)),y&&p.push(...y.slice(0,w)),d+=C}f.push(o);let m=[...r,...f];if(s){let e=new A(`int64`,m.map(BigInt),[1,m.length]),t=[...Array(r.length).fill(0),...p,0];return{sequences:e,token_timestamps:new A(`float32`,new Float32Array(t),[1,t.length])}}return new A(`int64`,m.map(BigInt),[1,m.length])}_extract_token_timestamps(e,t,n=null,r=.02,i=0){if(!e.cross_attentions)throw Error("Model outputs must contain cross attentions to extract timestamps. This is most likely because the model was not exported with `output_attentions=True`.");n??zi.warn("`num_frames` has not been set, meaning the entire audio will be analyzed. This may lead to inaccurate token-level timestamps for short audios (< 30 seconds).");let a=this.config.median_filter_width;a===void 0&&(zi.warn("Model config has no `median_filter_width`, using default value of 7."),a=7);let o=e.cross_attentions,s=Array.from({length:this.config.decoder_layers},(e,t)=>ql(o.map(e=>e[t]),2)),c=Jl(t.map(([e,t])=>{if(e>=s.length)throw Error(`Layer index ${e} is out of bounds for cross attentions (length ${s.length}).`);return n?s[e].slice(null,t,null,[0,n]):s[e].slice(null,t)})).transpose(1,0,2,3),[l,u]=Xl(c,-2,0,!0),d=c.clone();for(let e=0;e0?d.slice(null,null,[i,d.dims[2]],null):d,1)],p=e.sequences.dims,m=new A(`float32`,new Float32Array(p[0]*p[1]),p);for(let e=0;et[n+1]-t[n])).map(e=>!!e),o=[];for(let e=0;e0&&s.push(o.at(-1)),m[e].data.set(s)}return m}},aO=class extends iO{},oO=class extends M{},sO=class extends oO{},cO=class extends oO{async _call(e){return new Th(await super._call(e))}},lO=class extends oO{async _call(e){return new Ch(await super._call(e))}},uO=class extends oO{async _call(e){return new wh(await super._call(e))}},dO=class extends oO{async _call(e){return new Eh(await super._call(e))}},fO=class extends M{},pO=class extends fO{},mO=class extends fO{async _call(e){return new Th(await super._call(e))}},hO=class extends fO{async _call(e){return new Ch(await super._call(e))}},gO=class extends fO{async _call(e){return new wh(await super._call(e))}},_O=class extends fO{async _call(e){return new Eh(await super._call(e))}},vO=class extends M{},yO=class extends vO{},bO=class extends vO{async _call(e){return new xO(await super._call(e))}},xO=class extends Sh{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}},SO=class extends M{},CO=class extends SO{},wO=class extends SO{},TO=new Map([[`bert`,`BertModel`],[`eurobert`,`EuroBertModel`],[`neobert`,`NeoBertModel`],[`modernbert`,`ModernBertModel`],[`nomic_bert`,`NomicBertModel`],[`roformer`,`RoFormerModel`],[`electra`,`ElectraModel`],[`esm`,`EsmModel`],[`convbert`,`ConvBertModel`],[`camembert`,`CamembertModel`],[`deberta`,`DebertaModel`],[`deberta-v2`,`DebertaV2Model`],[`mpnet`,`MPNetModel`],[`albert`,`AlbertModel`],[`distilbert`,`DistilBertModel`],[`roberta`,`RobertaModel`],[`xlm`,`XLMModel`],[`xlm-roberta`,`XLMRobertaModel`],[`clap`,`ClapModel`],[`clip`,`CLIPModel`],[`clipseg`,`CLIPSegModel`],[`chinese_clip`,`ChineseCLIPModel`],[`siglip`,`SiglipModel`],[`jina_clip`,`JinaCLIPModel`],[`mobilebert`,`MobileBertModel`],[`squeezebert`,`SqueezeBertModel`],[`wav2vec2`,`Wav2Vec2Model`],[`wav2vec2-bert`,`Wav2Vec2BertModel`],[`unispeech`,`UniSpeechModel`],[`unispeech-sat`,`UniSpeechSatModel`],[`hubert`,`HubertModel`],[`wavlm`,`WavLMModel`],[`audio-spectrogram-transformer`,`ASTModel`],[`vits`,`VitsModel`],[`pyannote`,`PyAnnoteModel`],[`wespeaker-resnet`,`WeSpeakerResNetModel`],[`detr`,`DetrModel`],[`rt_detr`,`RTDetrModel`],[`rt_detr_v2`,`RTDetrV2Model`],[`rf_detr`,`RFDetrModel`],[`d_fine`,`DFineModel`],[`table-transformer`,`TableTransformerModel`],[`vit`,`ViTModel`],[`ijepa`,`IJepaModel`],[`pvt`,`PvtModel`],[`vit_msn`,`ViTMSNModel`],[`vit_mae`,`ViTMAEModel`],[`groupvit`,`GroupViTModel`],[`fastvit`,`FastViTModel`],[`mobilevit`,`MobileViTModel`],[`mobilevitv2`,`MobileViTV2Model`],[`owlvit`,`OwlViTModel`],[`owlv2`,`Owlv2Model`],[`beit`,`BeitModel`],[`deit`,`DeiTModel`],[`hiera`,`HieraModel`],[`convnext`,`ConvNextModel`],[`convnextv2`,`ConvNextV2Model`],[`dinov2`,`Dinov2Model`],[`dinov2_with_registers`,`Dinov2WithRegistersModel`],[`dinov3_vit`,`DINOv3ViTModel`],[`dinov3_convnext`,`DINOv3ConvNextModel`],[`resnet`,`ResNetModel`],[`swin`,`SwinModel`],[`swin2sr`,`Swin2SRModel`],[`donut-swin`,`DonutSwinModel`],[`yolos`,`YolosModel`],[`dpt`,`DPTModel`],[`glpn`,`GLPNModel`],[`hifigan`,`SpeechT5HifiGan`],[`efficientnet`,`EfficientNetModel`],[`decision_transformer`,`DecisionTransformerModel`],[`patchtst`,`PatchTSTModel`],[`patchtsmixer`,`PatchTSMixerModel`],[`mobilenet_v1`,`MobileNetV1Model`],[`mobilenet_v2`,`MobileNetV2Model`],[`mobilenet_v3`,`MobileNetV3Model`],[`mobilenet_v4`,`MobileNetV4Model`],[`maskformer`,`MaskFormerModel`],[`mgp-str`,`MgpstrForSceneTextRecognition`],[`style_text_to_speech_2`,`StyleTextToSpeech2Model`]]),EO=new Map([[`t5`,`T5Model`],[`longt5`,`LongT5Model`],[`mt5`,`MT5Model`],[`bart`,`BartModel`],[`mbart`,`MBartModel`],[`marian`,`MarianModel`],[`whisper`,`WhisperModel`],[`cohere_asr`,`CohereAsrModel`],[`m2m_100`,`M2M100Model`],[`blenderbot`,`BlenderbotModel`],[`blenderbot-small`,`BlenderbotSmallModel`]]),DO=new Map([[`mimi`,`MimiModel`],[`dac`,`DacModel`],[`snac`,`SnacModel`]]),OO=new Map([[`bloom`,`BloomModel`],[`jais`,`JAISModel`],[`gpt2`,`GPT2Model`],[`gpt_oss`,`GptOssModel`],[`gptj`,`GPTJModel`],[`gpt_bigcode`,`GPTBigCodeModel`],[`gpt_neo`,`GPTNeoModel`],[`gpt_neox`,`GPTNeoXModel`],[`codegen`,`CodeGenModel`],[`llama`,`LlamaModel`],[`apertus`,`ApertusModel`],[`nanochat`,`NanoChatModel`],[`arcee`,`ArceeModel`],[`afmoe`,`AfmoeModel`],[`lfm2`,`Lfm2Model`],[`lfm2_moe`,`Lfm2MoeModel`],[`smollm3`,`SmolLM3Model`],[`exaone`,`ExaoneModel`],[`olmo`,`OlmoModel`],[`olmo2`,`Olmo2Model`],[`olmo3`,`Olmo3Model`],[`olmo_hybrid`,`OlmoHybridModel`],[`mobilellm`,`MobileLLMModel`],[`granite`,`GraniteModel`],[`granitemoehybrid`,`GraniteMoeHybridModel`],[`cohere`,`CohereModel`],[`cohere2`,`Cohere2Model`],[`gemma`,`GemmaModel`],[`gemma2`,`Gemma2Model`],[`vaultgemma`,`VaultGemmaModel`],[`gemma3_text`,`Gemma3Model`],[`helium`,`HeliumModel`],[`glm`,`GlmModel`],[`glm_moe_dsa`,`GlmMoeDsaModel`],[`openelm`,`OpenELMModel`],[`qwen2`,`Qwen2Model`],[`qwen2_moe`,`Qwen2MoeModel`],[`qwen3`,`Qwen3Model`],[`qwen3_moe`,`Qwen3MoeModel`],[`qwen3_next`,`Qwen3NextModel`],[`phi`,`PhiModel`],[`phi3`,`Phi3Model`],[`mpt`,`MptModel`],[`opt`,`OPTModel`],[`mistral`,`MistralModel`],[`mistral4`,`Mistral4Model`],[`ministral`,`MinistralModel`],[`ministral3`,`Ministral3Model`],[`ernie4_5`,`Ernie4_5ForCausalLM`],[`starcoder2`,`Starcoder2Model`],[`deepseek_v3`,`DeepseekV3Model`],[`falcon`,`FalconModel`],[`falcon_h1`,`FalconH1Model`],[`nemotron_h`,`NemotronHModel`],[`solar_open`,`SolarOpenModel`],[`stablelm`,`StableLmModel`],[`modernbert-decoder`,`ModernBertDecoderModel`],[`hunyuan_v1_dense`,`HunYuanDenseV1Model`],[`youtu`,`YoutuModel`]]),kO=new Map([[`speecht5`,`SpeechT5ForSpeechToText`],[`whisper`,`WhisperForConditionalGeneration`],[`lite-whisper`,`LiteWhisperForConditionalGeneration`],[`moonshine`,`MoonshineForConditionalGeneration`],[`cohere_asr`,`CohereAsrForConditionalGeneration`]]),AO=new Map([[`speecht5`,`SpeechT5ForTextToSpeech`]]),jO=new Map([[`vits`,`VitsModel`],[`musicgen`,`MusicgenForConditionalGeneration`],[`supertonic`,`SupertonicForConditionalGeneration`]]),MO=new Map([[`bert`,`BertForSequenceClassification`],[`eurobert`,`EuroBertForSequenceClassification`],[`neobert`,`NeoBertForSequenceClassification`],[`modernbert`,`ModernBertForSequenceClassification`],[`roformer`,`RoFormerForSequenceClassification`],[`electra`,`ElectraForSequenceClassification`],[`esm`,`EsmForSequenceClassification`],[`convbert`,`ConvBertForSequenceClassification`],[`camembert`,`CamembertForSequenceClassification`],[`deberta`,`DebertaForSequenceClassification`],[`deberta-v2`,`DebertaV2ForSequenceClassification`],[`mpnet`,`MPNetForSequenceClassification`],[`albert`,`AlbertForSequenceClassification`],[`distilbert`,`DistilBertForSequenceClassification`],[`roberta`,`RobertaForSequenceClassification`],[`xlm`,`XLMForSequenceClassification`],[`xlm-roberta`,`XLMRobertaForSequenceClassification`],[`bart`,`BartForSequenceClassification`],[`mbart`,`MBartForSequenceClassification`],[`mobilebert`,`MobileBertForSequenceClassification`],[`squeezebert`,`SqueezeBertForSequenceClassification`]]),NO=new Map([[`bert`,`BertForTokenClassification`],[`eurobert`,`EuroBertForTokenClassification`],[`neobert`,`NeoBertForTokenClassification`],[`modernbert`,`ModernBertForTokenClassification`],[`roformer`,`RoFormerForTokenClassification`],[`electra`,`ElectraForTokenClassification`],[`esm`,`EsmForTokenClassification`],[`convbert`,`ConvBertForTokenClassification`],[`camembert`,`CamembertForTokenClassification`],[`deberta`,`DebertaForTokenClassification`],[`deberta-v2`,`DebertaV2ForTokenClassification`],[`mpnet`,`MPNetForTokenClassification`],[`distilbert`,`DistilBertForTokenClassification`],[`roberta`,`RobertaForTokenClassification`],[`xlm`,`XLMForTokenClassification`],[`xlm-roberta`,`XLMRobertaForTokenClassification`]]),PO=new Map([[`t5`,`T5ForConditionalGeneration`],[`longt5`,`LongT5ForConditionalGeneration`],[`mt5`,`MT5ForConditionalGeneration`],[`bart`,`BartForConditionalGeneration`],[`mbart`,`MBartForConditionalGeneration`],[`marian`,`MarianMTModel`],[`m2m_100`,`M2M100ForConditionalGeneration`],[`blenderbot`,`BlenderbotForConditionalGeneration`],[`blenderbot-small`,`BlenderbotSmallForConditionalGeneration`]]),FO=new Map([[`bloom`,`BloomForCausalLM`],[`gpt2`,`GPT2LMHeadModel`],[`gpt_oss`,`GptOssForCausalLM`],[`jais`,`JAISLMHeadModel`],[`gptj`,`GPTJForCausalLM`],[`gpt_bigcode`,`GPTBigCodeForCausalLM`],[`gpt_neo`,`GPTNeoForCausalLM`],[`gpt_neox`,`GPTNeoXForCausalLM`],[`codegen`,`CodeGenForCausalLM`],[`llama`,`LlamaForCausalLM`],[`nanochat`,`NanoChatForCausalLM`],[`apertus`,`ApertusForCausalLM`],[`llama4_text`,`Llama4ForCausalLM`],[`arcee`,`ArceeForCausalLM`],[`afmoe`,`AfmoeForCausalLM`],[`lfm2`,`Lfm2ForCausalLM`],[`lfm2_moe`,`Lfm2MoeForCausalLM`],[`smollm3`,`SmolLM3ForCausalLM`],[`exaone`,`ExaoneForCausalLM`],[`olmo`,`OlmoForCausalLM`],[`olmo2`,`Olmo2ForCausalLM`],[`olmo3`,`Olmo3ForCausalLM`],[`olmo_hybrid`,`OlmoHybridForCausalLM`],[`mobilellm`,`MobileLLMForCausalLM`],[`granite`,`GraniteForCausalLM`],[`granitemoehybrid`,`GraniteMoeHybridForCausalLM`],[`cohere`,`CohereForCausalLM`],[`cohere2`,`Cohere2ForCausalLM`],[`gemma`,`GemmaForCausalLM`],[`gemma2`,`Gemma2ForCausalLM`],[`vaultgemma`,`VaultGemmaForCausalLM`],[`gemma3_text`,`Gemma3ForCausalLM`],[`gemma3`,`Gemma3ForCausalLM`],[`helium`,`HeliumForCausalLM`],[`glm`,`GlmForCausalLM`],[`glm_moe_dsa`,`GlmMoeDsaForCausalLM`],[`openelm`,`OpenELMForCausalLM`],[`qwen2`,`Qwen2ForCausalLM`],[`qwen2_moe`,`Qwen2MoeForCausalLM`],[`qwen3`,`Qwen3ForCausalLM`],[`qwen3_moe`,`Qwen3MoeForCausalLM`],[`qwen3_next`,`Qwen3NextForCausalLM`],[`qwen2_vl`,`Qwen2VLForCausalLM`],[`qwen2_5_vl`,`Qwen2_5_VLForCausalLM`],[`qwen3_vl`,`Qwen3VLForCausalLM`],[`qwen3_vl_moe`,`Qwen3VLMoeForCausalLM`],[`qwen3_5`,`Qwen3_5ForCausalLM`],[`qwen3_5_text`,`Qwen3_5ForCausalLM`],[`qwen3_5_moe`,`Qwen3_5MoeForCausalLM`],[`gemma3n`,`Gemma3nForCausalLM`],[`gemma4`,`Gemma4ForCausalLM`],[`phi`,`PhiForCausalLM`],[`phi3`,`Phi3ForCausalLM`],[`mpt`,`MptForCausalLM`],[`opt`,`OPTForCausalLM`],[`mbart`,`MBartForCausalLM`],[`mistral`,`MistralForCausalLM`],[`mistral4`,`Mistral4ForCausalLM`],[`ministral`,`MinistralForCausalLM`],[`ministral3`,`Ministral3ForCausalLM`],[`ernie4_5`,`Ernie4_5ForCausalLM`],[`starcoder2`,`Starcoder2ForCausalLM`],[`deepseek_v3`,`DeepseekV3ForCausalLM`],[`falcon`,`FalconForCausalLM`],[`falcon_h1`,`FalconH1ForCausalLM`],[`nemotron_h`,`NemotronHForCausalLM`],[`trocr`,`TrOCRForCausalLM`],[`solar_open`,`SolarOpenForCausalLM`],[`stablelm`,`StableLmForCausalLM`],[`modernbert-decoder`,`ModernBertDecoderForCausalLM`],[`hunyuan_v1_dense`,`HunYuanDenseV1ForCausalLM`],[`youtu`,`YoutuForCausalLM`],[`phi3_v`,`Phi3VForCausalLM`]]),IO=new Map([[`multi_modality`,`MultiModalityCausalLM`]]),LO=new Map([[`bert`,`BertForMaskedLM`],[`eurobert`,`EuroBertForMaskedLM`],[`neobert`,`NeoBertForMaskedLM`],[`modernbert`,`ModernBertForMaskedLM`],[`roformer`,`RoFormerForMaskedLM`],[`electra`,`ElectraForMaskedLM`],[`esm`,`EsmForMaskedLM`],[`convbert`,`ConvBertForMaskedLM`],[`camembert`,`CamembertForMaskedLM`],[`deberta`,`DebertaForMaskedLM`],[`deberta-v2`,`DebertaV2ForMaskedLM`],[`mpnet`,`MPNetForMaskedLM`],[`albert`,`AlbertForMaskedLM`],[`distilbert`,`DistilBertForMaskedLM`],[`roberta`,`RobertaForMaskedLM`],[`xlm`,`XLMWithLMHeadModel`],[`xlm-roberta`,`XLMRobertaForMaskedLM`],[`mobilebert`,`MobileBertForMaskedLM`],[`squeezebert`,`SqueezeBertForMaskedLM`]]),RO=new Map([[`bert`,`BertForQuestionAnswering`],[`neobert`,`NeoBertForQuestionAnswering`],[`roformer`,`RoFormerForQuestionAnswering`],[`electra`,`ElectraForQuestionAnswering`],[`convbert`,`ConvBertForQuestionAnswering`],[`camembert`,`CamembertForQuestionAnswering`],[`deberta`,`DebertaForQuestionAnswering`],[`deberta-v2`,`DebertaV2ForQuestionAnswering`],[`mpnet`,`MPNetForQuestionAnswering`],[`albert`,`AlbertForQuestionAnswering`],[`distilbert`,`DistilBertForQuestionAnswering`],[`roberta`,`RobertaForQuestionAnswering`],[`xlm`,`XLMForQuestionAnswering`],[`xlm-roberta`,`XLMRobertaForQuestionAnswering`],[`mobilebert`,`MobileBertForQuestionAnswering`],[`squeezebert`,`SqueezeBertForQuestionAnswering`]]),zO=new Map([[`vision-encoder-decoder`,`VisionEncoderDecoderModel`],[`idefics3`,`Idefics3ForConditionalGeneration`],[`smolvlm`,`SmolVLMForConditionalGeneration`]]),BO=new Map([[`llava`,`LlavaForConditionalGeneration`],[`llava_onevision`,`LlavaOnevisionForConditionalGeneration`],[`moondream1`,`Moondream1ForConditionalGeneration`],[`florence2`,`Florence2ForConditionalGeneration`],[`qwen2_vl`,`Qwen2VLForConditionalGeneration`],[`qwen2_5_vl`,`Qwen2_5_VLForConditionalGeneration`],[`qwen3_vl`,`Qwen3VLForConditionalGeneration`],[`qwen3_vl_moe`,`Qwen3VLMoeForConditionalGeneration`],[`qwen3_5`,`Qwen3_5ForConditionalGeneration`],[`qwen3_5_moe`,`Qwen3_5MoeForConditionalGeneration`],[`lfm2_vl`,`Lfm2VlForConditionalGeneration`],[`idefics3`,`Idefics3ForConditionalGeneration`],[`smolvlm`,`SmolVLMForConditionalGeneration`],[`paligemma`,`PaliGemmaForConditionalGeneration`],[`llava_qwen2`,`LlavaQwen2ForCausalLM`],[`gemma3`,`Gemma3ForConditionalGeneration`],[`gemma3n`,`Gemma3nForConditionalGeneration`],[`gemma4`,`Gemma4ForConditionalGeneration`],[`mistral3`,`Mistral3ForConditionalGeneration`],[`lighton_ocr`,`LightOnOcrForConditionalGeneration`],[`glm_ocr`,`GlmOcrForConditionalGeneration`]]),VO=new Map([[`granite_speech`,`GraniteSpeechForConditionalGeneration`],[`ultravox`,`UltravoxModel`],[`voxtral`,`VoxtralForConditionalGeneration`],[`voxtral_realtime`,`VoxtralRealtimeForConditionalGeneration`]]),HO=new Map([[`vision-encoder-decoder`,`VisionEncoderDecoderModel`]]),UO=new Map([[`vit`,`ViTForImageClassification`],[`ijepa`,`IJepaForImageClassification`],[`pvt`,`PvtForImageClassification`],[`vit_msn`,`ViTMSNForImageClassification`],[`fastvit`,`FastViTForImageClassification`],[`mobilevit`,`MobileViTForImageClassification`],[`mobilevitv2`,`MobileViTV2ForImageClassification`],[`beit`,`BeitForImageClassification`],[`deit`,`DeiTForImageClassification`],[`hiera`,`HieraForImageClassification`],[`convnext`,`ConvNextForImageClassification`],[`convnextv2`,`ConvNextV2ForImageClassification`],[`dinov2`,`Dinov2ForImageClassification`],[`dinov2_with_registers`,`Dinov2WithRegistersForImageClassification`],[`resnet`,`ResNetForImageClassification`],[`swin`,`SwinForImageClassification`],[`segformer`,`SegformerForImageClassification`],[`efficientnet`,`EfficientNetForImageClassification`],[`mobilenet_v1`,`MobileNetV1ForImageClassification`],[`mobilenet_v2`,`MobileNetV2ForImageClassification`],[`mobilenet_v3`,`MobileNetV3ForImageClassification`],[`mobilenet_v4`,`MobileNetV4ForImageClassification`]]),WO=new Map([[`detr`,`DetrForObjectDetection`],[`rt_detr`,`RTDetrForObjectDetection`],[`rt_detr_v2`,`RTDetrV2ForObjectDetection`],[`rf_detr`,`RFDetrForObjectDetection`],[`d_fine`,`DFineForObjectDetection`],[`table-transformer`,`TableTransformerForObjectDetection`],[`yolos`,`YolosForObjectDetection`]]),GO=new Map([[`owlvit`,`OwlViTForObjectDetection`],[`owlv2`,`Owlv2ForObjectDetection`],[`grounding-dino`,`GroundingDinoForObjectDetection`]]),KO=new Map([[`detr`,`DetrForSegmentation`],[`clipseg`,`CLIPSegForImageSegmentation`]]),qO=new Map([[`segformer`,`SegformerForSemanticSegmentation`],[`sapiens`,`SapiensForSemanticSegmentation`],[`swin`,`SwinForSemanticSegmentation`],[`mobilenet_v1`,`MobileNetV1ForSemanticSegmentation`],[`mobilenet_v2`,`MobileNetV2ForSemanticSegmentation`],[`mobilenet_v3`,`MobileNetV3ForSemanticSegmentation`],[`mobilenet_v4`,`MobileNetV4ForSemanticSegmentation`]]),JO=new Map([[`detr`,`DetrForSegmentation`],[`maskformer`,`MaskFormerForInstanceSegmentation`]]),YO=new Map([[`sam`,`SamModel`],[`sam2`,`Sam2Model`],[`edgetam`,`EdgeTamModel`],[`sam3_tracker`,`Sam3TrackerModel`]]),XO=new Map([[`wav2vec2`,`Wav2Vec2ForCTC`],[`wav2vec2-bert`,`Wav2Vec2BertForCTC`],[`unispeech`,`UniSpeechForCTC`],[`unispeech-sat`,`UniSpeechSatForCTC`],[`wavlm`,`WavLMForCTC`],[`hubert`,`HubertForCTC`],[`parakeet_ctc`,`ParakeetForCTC`]]),ZO=new Map([[`wav2vec2`,`Wav2Vec2ForSequenceClassification`],[`wav2vec2-bert`,`Wav2Vec2BertForSequenceClassification`],[`unispeech`,`UniSpeechForSequenceClassification`],[`unispeech-sat`,`UniSpeechSatForSequenceClassification`],[`wavlm`,`WavLMForSequenceClassification`],[`hubert`,`HubertForSequenceClassification`],[`audio-spectrogram-transformer`,`ASTForAudioClassification`]]),QO=new Map([[`wavlm`,`WavLMForXVector`]]),$O=new Map([[`unispeech-sat`,`UniSpeechSatForAudioFrameClassification`],[`wavlm`,`WavLMForAudioFrameClassification`],[`wav2vec2`,`Wav2Vec2ForAudioFrameClassification`],[`pyannote`,`PyAnnoteForAudioFrameClassification`]]),ek=new Map([[`vitmatte`,`VitMatteForImageMatting`]]),tk=new Map([[`patchtst`,`PatchTSTForPrediction`],[`patchtsmixer`,`PatchTSMixerForPrediction`]]),nk=new Map([[`swin2sr`,`Swin2SRForImageSuperResolution`]]),rk=new Map([[`chmv2`,`CHMv2ForDepthEstimation`],[`dpt`,`DPTForDepthEstimation`],[`depth_anything`,`DepthAnythingForDepthEstimation`],[`glpn`,`GLPNForDepthEstimation`],[`sapiens`,`SapiensForDepthEstimation`],[`depth_pro`,`DepthProForDepthEstimation`],[`metric3d`,`Metric3DForDepthEstimation`],[`metric3dv2`,`Metric3Dv2ForDepthEstimation`]]),ik=new Map([[`sapiens`,`SapiensForNormalEstimation`]]),ak=new Map([[`vitpose`,`VitPoseForPoseEstimation`]]),ok=new Map([[`clip`,`CLIPVisionModelWithProjection`],[`siglip`,`SiglipVisionModel`],[`jina_clip`,`JinaCLIPVisionModel`]]),sk=[[TO,j.EncoderOnly],[EO,j.EncoderDecoder],[OO,j.DecoderOnlyWithoutHead],[DO,j.AutoEncoder],[MO,j.EncoderOnly],[NO,j.EncoderOnly],[PO,j.Seq2Seq],[kO,j.Seq2Seq],[FO,j.DecoderOnly],[IO,j.MultiModality],[LO,j.EncoderOnly],[RO,j.EncoderOnly],[zO,j.Vision2Seq],[BO,j.ImageTextToText],[VO,j.AudioTextToText],[UO,j.EncoderOnly],[KO,j.EncoderOnly],[JO,j.EncoderOnly],[qO,j.EncoderOnly],[ek,j.EncoderOnly],[tk,j.EncoderOnly],[nk,j.EncoderOnly],[rk,j.EncoderOnly],[ik,j.EncoderOnly],[ak,j.EncoderOnly],[WO,j.EncoderOnly],[GO,j.EncoderOnly],[YO,j.MaskGeneration],[XO,j.EncoderOnly],[ZO,j.EncoderOnly],[AO,j.Seq2Seq],[jO,j.EncoderOnly],[QO,j.EncoderOnly],[$O,j.EncoderOnly],[ok,j.EncoderOnly]];for(let[e,t]of sk)for(let n of e.values()){fg.set(n,t);let e=jg[n];mg.set(e,n),pg.set(n,e)}var ck=[[`MusicgenForConditionalGeneration`,GC,j.Musicgen],[`Phi3VForCausalLM`,Kw,j.Phi3V],[`CLIPTextModelWithProjection`,R_,j.EncoderOnly],[`SiglipTextModel`,lE,j.EncoderOnly],[`JinaCLIPTextModel`,Wx,j.EncoderOnly],[`ClapTextModelWithProjection`,N_,j.EncoderOnly],[`ClapAudioModelWithProjection`,P_,j.EncoderOnly],[`DacEncoderModel`,Tv,j.EncoderOnly],[`DacDecoderModel`,Ev,j.EncoderOnly],[`MimiEncoderModel`,NS,j.EncoderOnly],[`MimiDecoderModel`,PS,j.EncoderOnly],[`SnacEncoderModel`,gE,j.EncoderOnly],[`SnacDecoderModel`,_E,j.EncoderOnly],[`Gemma3nForConditionalGeneration`,xb,j.ImageAudioTextToText],[`Gemma4ForConditionalGeneration`,Cb,j.ImageAudioTextToText],[`SupertonicForConditionalGeneration`,BE,j.Supertonic],[`ChatterboxModel`,E_,j.Chatterbox],[`VoxtralRealtimeForConditionalGeneration`,VD,j.VoxtralRealtime]];for(let[e,t,n]of ck)fg.set(e,n),mg.set(t,e),pg.set(e,t);var lk=new Map([[`modnet`,KO],[`birefnet`,KO],[`isnet`,KO],[`ben`,KO]]);for(let[e,t]of lk.entries())t.set(e,`PreTrainedModel`),fg.set(e,j.EncoderOnly),pg.set(e,M);var uk=new Set(lk.keys());fg.set(`PreTrainedModel`,j.EncoderOnly),mg.set(M,`PreTrainedModel`);var dk={MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES:MO,MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES:NO,MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES:AO,MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES:jO,MODEL_FOR_MASKED_LM_MAPPING_NAMES:LO,MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES:RO,MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES:UO,MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES:KO,MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES:qO,MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES:JO,MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES:WO,MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES:GO,MODEL_FOR_MASK_GENERATION_MAPPING_NAMES:YO,MODEL_FOR_CTC_MAPPING_NAMES:XO,MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES:ZO,MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES:QO,MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES:$O,MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES:HO,MODEL_FOR_IMAGE_MATTING_MAPPING_NAMES:ek,MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES:nk,MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES:rk,MODEL_FOR_NORMAL_ESTIMATION_MAPPING_NAMES:ik,MODEL_FOR_POSE_ESTIMATION_MAPPING_NAMES:ak,MODEL_FOR_IMAGE_FEATURE_EXTRACTION_MAPPING_NAMES:ok,MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES:BO,MODEL_FOR_AUDIO_TEXT_TO_TEXT_MAPPING_NAMES:VO,MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES:PO,MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES:kO,MODEL_FOR_CAUSAL_LM_MAPPING_NAMES:FO,MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES:zO};sg(dk);var fk=class{static MODEL_CLASS_MAPPINGS=null;static BASE_IF_FAIL=!1;static supports(e){if(!this.MODEL_CLASS_MAPPINGS)return!1;for(let t of this.MODEL_CLASS_MAPPINGS)if(t.has(e))return!0;return this.BASE_IF_FAIL}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`,model_file_name:o=null,subfolder:s=`onnx`,device:c=null,dtype:l=null,use_external_data_format:u=null,session_options:d={}}={}){let f={progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a,model_file_name:o,subfolder:s,device:c,dtype:l,use_external_data_format:u,session_options:d};if(f.config=await fh.from_pretrained(e,f),!this.MODEL_CLASS_MAPPINGS)throw Error("`MODEL_CLASS_MAPPINGS` not implemented for this type of `AutoClass`: "+this.name);let{model_type:p}=f.config;for(let t of this.MODEL_CLASS_MAPPINGS){let n=t.get(p);if(!n){for(let e of t.values())if(e[0]===p){n=e;break}if(!n)continue}return await jg[n].from_pretrained(e,f)}if(this.BASE_IF_FAIL)return uk.has(p)||zi.warn(`Unknown model class "${p}", attempting to construct from base class.`),await M.from_pretrained(e,f);throw Error(`Unsupported model type: ${p}`)}},pk=class extends fk{static MODEL_CLASS_MAPPINGS=sk.map(e=>e[0]);static BASE_IF_FAIL=!0},mk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES]},hk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES]},gk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES]},_k=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES]},vk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES]},yk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES]},bk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES]},xk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_MASKED_LM_MAPPING_NAMES]},Sk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES]},Ck=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES]},wk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES]},Tk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES]},Ek=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES]},Dk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES]},Ok=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES]},kk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES]};(class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_MASK_GENERATION_MAPPING_NAMES]});var Ak=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_CTC_MAPPING_NAMES]},jk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES]};(class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES]}),class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES]};var Mk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES]};(class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_MATTING_MAPPING_NAMES]});var Nk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES]},Pk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES]};(class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_NORMAL_ESTIMATION_MAPPING_NAMES]}),class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_POSE_ESTIMATION_MAPPING_NAMES]};var Fk=class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_FEATURE_EXTRACTION_MAPPING_NAMES]};(class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES]}),class extends fk{static MODEL_CLASS_MAPPINGS=[dk.MODEL_FOR_AUDIO_TEXT_TO_TEXT_MAPPING_NAMES]};async function Ik(e){return Array.isArray(e)||(e=[e]),await Promise.all(e.map(e=>Df.read(e)))}async function Lk(e,t){return Array.isArray(e)||(e=[e]),await Promise.all(e.map(e=>typeof e==`string`||e instanceof URL?Ad(e,t):e instanceof Float64Array?new Float32Array(e):e))}function Rk(e,t){t&&(e=e.map(e=>e|0));let[n,r,i,a]=e;return{xmin:n,ymin:r,xmax:i,ymax:a}}var zk=class extends Oi{constructor({task:e,model:t,tokenizer:n=null,processor:r=null}){super(),this.task=e,this.model=t,this.tokenizer=n,this.processor=r}async dispose(){await this.model.dispose()}},Bk=class extends zk{async _call(e,{top_k:t=1}={}){let n=this.tokenizer(e,{padding:!0,truncation:!0}),r=await this.model(n),{problem_type:i,id2label:a}=this.model.config,o=i===`multi_label_classification`?e=>e.sigmoid():e=>new A(`float32`,Vc(e.data),e.dims),s=[];for(let e of r.logits){let n=await Bl(o(e),t),r=n[0].tolist(),i=n[1].tolist().map((e,t)=>({label:a?a[e]:`LABEL_${e}`,score:r[t]}));t===1?s.push(...i):s.push(i)}return Array.isArray(e)||t===1?s:s[0]}},Vk=class extends zk{async _call(e,{ignore_labels:t=[`O`]}={}){let n=Array.isArray(e),r=this.tokenizer(n?e:[e],{padding:!0,truncation:!0}),i=(await this.model(r)).logits,a=this.model.config.id2label,o=[];for(let e=0;ee==u),i=a[e].tolist(),f=o[e].tolist();for(let n=1;ne==t[n])!==-1)&&(i[n]=-1/0,f[n]=-1/0);let p=Vc(i).map((e,t)=>[e,t]),m=Vc(f).map((e,t)=>[e,t]);p[0][0]=0,m[0][0]=0;let h=Fi(p,m).filter(e=>e[0][1]<=e[1][1]).map(e=>[e[0][1],e[1][1],e[0][0]*e[1][0]]).sort((e,t)=>t[2]-e[2]),g=[];for(let e=0;ee==n);if(c===-1)throw Error(`Mask token (${r}) not found in text.`);let l=a[e][c],u=await Bl(new A(`float32`,Vc(l.data),l.dims),t),d=u[0].tolist(),f=u[1].tolist();o.push(f.map((e,t)=>{let n=i.slice();return n[c]=e,{score:d[t],token:Number(e),token_str:this.tokenizer.decode([e]),sequence:this.tokenizer.decode(n,{skip_special_tokens:!0})}}))}return Array.isArray(e)?o:o[0]}},Wk=class extends zk{_key=`generated_text`;async _call(e,t={}){Array.isArray(e)||(e=[e]),this.model.config.prefix&&(e=e.map(e=>this.model.config.prefix+e));let n=this.model.config.task_specific_params;n&&n[this.task]&&n[this.task].prefix&&(e=e.map(e=>n[this.task].prefix+e));let r=this.tokenizer,i={padding:!0,truncation:!0},a;a=this.task===`translation`&&`_build_translation_inputs`in r?r._build_translation_inputs(e,i,t):r(e,i);let o=await this.model.generate({...a,...t});return r.batch_decode(o,{skip_special_tokens:!0}).map(e=>({[this._key]:e}))}},Gk=class extends Wk{_key=`summary_text`},Kk=class extends Wk{_key=`translation_text`};function qk(e){return Array.isArray(e)&&e.every(e=>`role`in e&&`content`in e)}var Jk=class extends zk{async _call(e,t={}){let n=!1,r=!1,i=t.add_special_tokens??(this.tokenizer.add_bos_token||this.tokenizer.add_eos_token)??!1,a=t.tokenizer_encode_kwargs,o;if(typeof e==`string`)o=e=[e];else if(Array.isArray(e)&&e.every(e=>typeof e==`string`))n=!0,o=e;else{if(qk(e))e=[e];else if(Array.isArray(e)&&e.every(qk))n=!0;else throw Error(`Input must be a string, an array of strings, a Chat, or an array of Chats`);r=!0,o=e.map(e=>this.tokenizer.apply_chat_template(e,{tokenize:!1,add_generation_prompt:!0,...a})),i=!1,a=void 0}let s=r?!1:t.return_full_text??!0;this.tokenizer.padding_side=`left`;let c=this.tokenizer(o,{add_special_tokens:i,padding:!0,truncation:!0,...a}),l=await this.model.generate({...c,...t}),u=this.tokenizer.batch_decode(l,{skip_special_tokens:!0}),d;!s&&c.input_ids.dims.at(-1)>0&&(d=this.tokenizer.batch_decode(c.input_ids,{skip_special_tokens:!0}).map(e=>e.length));let f=Array.from({length:e.length},e=>[]);for(let t=0;t[e.toLowerCase(),t])),this.entailment_id=this.label2id.entailment,this.entailment_id===void 0&&(zi.warn(`Could not find 'entailment' in label2id mapping. Using 2 as entailment_id.`),this.entailment_id=2),this.contradiction_id=this.label2id.contradiction??this.label2id.not_entailment,this.contradiction_id===void 0&&(zi.warn(`Could not find 'contradiction' in label2id mapping. Using 0 as contradiction_id.`),this.contradiction_id=0)}async _call(e,t,{hypothesis_template:n=`This example is {}.`,multi_label:r=!1}={}){let i=Array.isArray(e);i||(e=[e]),Array.isArray(t)||(t=[t]);let a=t.map(e=>n.replace(`{}`,e)),o=r||t.length===1,s=[];for(let n of e){let e=[];for(let t of a){let r=this.tokenizer(n,{text_pair:t,padding:!0,truncation:!0}),i=await this.model(r);o?e.push([i.logits.data[this.contradiction_id],i.logits.data[this.entailment_id]]):e.push(i.logits.data[this.entailment_id])}let r=(o?e.map(e=>Vc(e)[1]):Vc(e)).map((e,t)=>[e,t]).sort((e,t)=>t[0]-e[0]);s.push({sequence:n,labels:r.map(e=>t[e[1]]),scores:r.map(e=>e[0])})}return i?s:s[0]}},Xk=class extends zk{async _call(e,{top_k:t=5}={}){let n=this.processor.feature_extractor.config.sampling_rate,r=await Lk(e,n),i=this.model.config.id2label,a=[];for(let e of r){let n=await this.processor(e),r=(await this.model(n)).logits[0],o=await Bl(new A(`float32`,Vc(r.data),r.dims),t),s=o[0].tolist(),c=o[1].tolist().map((e,t)=>({label:i?i[e]:`LABEL_${e}`,score:s[t]}));a.push(c)}return Array.isArray(e)?a:a[0]}},Zk=class extends zk{async _call(e,t,{hypothesis_template:n=`This is a sound of {}.`}={}){let r=!Array.isArray(e);r&&(e=[e]);let i=t.map(e=>n.replace(`{}`,e)),a=this.tokenizer(i,{padding:!0,truncation:!0}),o=this.processor.feature_extractor.config.sampling_rate,s=await Lk(e,o),c=[];for(let e of s){let n=await this.processor(e),r=Vc((await this.model({...a,...n})).logits_per_audio.data);c.push([...r].map((e,n)=>({score:e,label:t[n]})))}return r?c[0]:c}},Qk=class extends zk{async _call(e,t={}){switch(this.model.config.model_type){case`whisper`:case`lite-whisper`:return this._call_whisper(e,t);case`wav2vec2`:case`wav2vec2-bert`:case`unispeech`:case`unispeech-sat`:case`hubert`:case`parakeet_ctc`:return this._call_wav2vec2(e,t);case`moonshine`:return this._call_moonshine(e,t);case`cohere_asr`:return this._call_cohere_asr(e,t);default:throw Error(`AutomaticSpeechRecognitionPipeline does not support model type '${this.model.config.model_type}'.`)}}async _call_wav2vec2(e,t){t.language&&zi.warn('`language` parameter is not yet supported for `wav2vec2` models, defaulting to "English".'),t.task&&zi.warn('`task` parameter is not yet supported for `wav2vec2` models, defaulting to "transcribe".');let n=!Array.isArray(e),r=n?[e]:e,i=this.processor.feature_extractor.config.sampling_rate,a=await Lk(r,i),o=[];for(let e of a){let t=await this.processor(e),n=(await this.model(t)).logits[0],r=[];for(let e of n)r.push(Wc(e.data)[1]);let i=this.tokenizer.decode(r,{skip_special_tokens:!0}).trim();o.push({text:i})}return n?o[0]:o}async _call_whisper(e,t){let n=t.return_timestamps??!1,r=t.chunk_length_s??0,i=t.force_full_sequences??!1,a=t.stride_length_s??null,o={...t};n===`word`&&(o.return_token_timestamps=!0,o.return_timestamps=!0);let s=!Array.isArray(e),c=s?[e]:e,l=this.processor.feature_extractor.config,u=l.chunk_length/this.model.config.max_source_positions,d=l.hop_length,f=l.sampling_rate,p=await Lk(c,f),m=[];for(let e of p){let t=[];if(r>0){if(a===null)a=r/6;else if(r<=a)throw Error("`chunk_length_s` must be larger than `stride_length_s`.");let n=f*r,i=f*a,o=n-2*i,s=0;for(;;){let r=s+n,a=e.subarray(s,r),c=await this.processor(a),l=s===0,u=r>=e.length;if(t.push({stride:[a.length,l?0:i,u?0:i],input_features:c.input_features,is_last:u}),u)break;s+=o}}else t=[{stride:[e.length,0,0],input_features:(await this.processor(e)).input_features,is_last:!0}];for(let e of t){o.num_frames=Math.floor(e.stride[0]/d);let t=await this.model.generate({inputs:e.input_features,...o});if(n===`word`){let n=t.sequences.tolist()[0],r=t.token_timestamps.tolist()[0],i=this.tokenizer.timestamp_begin,a=Math.max(n.findIndex(e=>Number(e)>=i),0);e.tokens=n.slice(a),e.token_timestamps=r.slice(a).map(e=>Xc(e,2))}else e.tokens=t[0].tolist();e.stride=e.stride.map(e=>e/f)}let[s,c]=this.tokenizer._decode_asr(t,{time_precision:u,return_timestamps:n,force_full_sequences:i});m.push({text:s,...c})}return s?m[0]:m}async _call_moonshine(e,t){let n=!Array.isArray(e),r=n?[e]:e,i=this.processor.feature_extractor.config.sampling_rate,a=await Lk(r,i),o=[];for(let e of a){let n=await this.processor(e),r=Math.floor(e.length/i)*6,a=await this.model.generate({max_new_tokens:r,...t,...n}),s=this.processor.batch_decode(a,{skip_special_tokens:!0})[0];o.push({text:s})}return n?o[0]:o}async _call_cohere_asr(e,t){let n=!Array.isArray(e),r=n?[e]:e,i=this.processor.feature_extractor,a=i.config.sampling_rate,o=await Lk(r,a),s=t.language??`en`,c=this.processor.get_decoder_prompt_ids(s),l=[];for(let e of o){let n=i.split_audio(e),r=[];for(let e of n){let n=await this.processor(e),i=await this.model.generate({...n,decoder_input_ids:c,...t}),a=this.tokenizer.decode(i[0].tolist(),{skip_special_tokens:!0}).trim();r.push(a)}let a=this.processor.constructor.join_chunks(r,s);l.push({text:a})}return n?l[0]:l}},$k=class extends zk{DEFAULT_VOCODER_ID=`Xenova/speecht5_hifigan`;constructor(e){super(e),this.vocoder=e.vocoder??null}async _prepare_speaker_embeddings(e,t){if((typeof e==`string`||e instanceof URL)&&(e=new Float32Array(await(await Ei.fetch(e)).arrayBuffer())),e instanceof Float32Array)e=new A(`float32`,e,[e.length]);else if(!(e instanceof A))throw Error("Speaker embeddings must be a `Tensor`, `Float32Array`, `string`, or `URL`.");if(t>1){if(e.dims[0]===1)e=e.repeat(t,1);else if(e.dims[0]!==t)throw Error(`Expected speaker embeddings batch size to be 1 or ${t}, but got ${e.dims[0]}.`)}return e}_postprocess_waveform(e,t,n,r=null){let i=t.data,[a,o]=t.dims,s=r?r.data:null,c=[];for(let e=0;e({generated_text:e.trim()}));a.push(r)}return n?a:a[0]}},tA=class extends zk{async _call(e,{top_k:t=5}={}){let n=await Ik(e),{pixel_values:r}=await this.processor(n),i=await this.model({pixel_values:r}),{id2label:a}=this.model.config,o=[];for(let e of i.logits){let n=await Bl(new A(`float32`,Vc(e.data),e.dims),t),r=n[0].tolist(),i=n[1].tolist().map((e,t)=>({label:a?a[e]:`LABEL_${e}`,score:r[t]}));o.push(i)}return Array.isArray(e)?o:o[0]}},nA={panoptic:`post_process_panoptic_segmentation`,instance:`post_process_instance_segmentation`,semantic:`post_process_semantic_segmentation`},rA=class extends zk{async _call(e,{threshold:t=.5,mask_threshold:n=.5,overlap_mask_area_threshold:r=.8,label_ids_to_fuse:i=null,target_sizes:a=null,subtask:o=null}={}){if(Array.isArray(e)&&e.length!==1)throw Error(`Image segmentation pipeline currently only supports a batch size of 1.`);let s=await Ik(e),c=s.map(e=>[e.height,e.width]),l=await this.processor(s),{inputNames:u,outputNames:d}=this.model.sessions.model;if(!u.includes(`pixel_values`)){if(u.length!==1)throw Error(`Expected a single input name, but got ${u.length} inputs: ${u}.`);let e=u[0];if(e in l)throw Error(`Input name ${e} already exists in the inputs.`);l[e]=l.pixel_values}let f=await this.model(l),p=null;if(o!==null)p=nA[o];else if(this.processor.image_processor){for(let[e,t]of Object.entries(nA))if(t in this.processor.image_processor){p=this.processor.image_processor[t].bind(this.processor.image_processor),o=e;break}}let m=this.model.config.id2label,h=[];if(!o){let e=1e-5,t=f[d[0]];for(let n=0;nt<-e||t>1+e)&&i.sigmoid_();let a=await Df.fromTensor(i.mul_(255).to(`uint8`)).resize(r[1],r[0]);h.push({label:null,score:null,mask:a})}}else if(o===`panoptic`||o===`instance`){let e=p(f,t,n,r,i,a??c)[0],o=e.segmentation;for(let t of e.segments_info){let e=new Uint8ClampedArray(o.data.length);for(let n=0;n{let n=e.clone();return n.putAlpha(r[t].mask),n});return Array.isArray(e)?i:i[0]}},aA=class extends zk{async _call(e,t,{hypothesis_template:n=`This is a photo of {}`}={}){let r=Array.isArray(e),i=await Ik(e),a=t.map(e=>n.replace(`{}`,e)),o=this.tokenizer(a,{padding:this.model.config.model_type===`siglip`?`max_length`:!0,truncation:!0}),{pixel_values:s}=await this.processor(i),c=await this.model({...o,pixel_values:s}),l=this.model.config.model_type===`siglip`?e=>e.sigmoid().data:e=>Vc(e.data),u=[];for(let e of c.logits_per_image){let n=[...l(e)].map((e,n)=>({score:e,label:t[n]}));n.sort((e,t)=>t.score-e.score),u.push(n)}return r?u:u[0]}},oA=class extends zk{async _call(e,{threshold:t=.9,percentage:n=!1}={}){let r=Array.isArray(e);if(r&&e.length!==1)throw Error(`Object detection pipeline currently only supports a batch size of 1.`);let i=await Ik(e),a=n?null:i.map(e=>[e.height,e.width]),{pixel_values:o,pixel_mask:s}=await this.processor(i),c=await this.model({pixel_values:o,pixel_mask:s}),l=this.processor.image_processor.post_process_object_detection(c,t,a),{id2label:u}=this.model.config,d=l.map(e=>e.boxes.map((t,r)=>({score:e.scores[r],label:u[e.classes[r]],box:Rk(t,!n)})));return r?d:d[0]}},sA=class extends zk{async _call(e,t,{threshold:n=.1,top_k:r=null,percentage:i=!1}={}){let a=Array.isArray(e),o=await Ik(e),s=this.tokenizer(t,{padding:!0,truncation:!0}),c=await this.processor(o),l=[];for(let e=0;e({score:e.scores[n],label:e.labels[n],box:Rk(t,!i)}))}else{let e=this.processor.image_processor.post_process_object_detection(f,n,u,!0)[0];p=e.boxes.map((n,r)=>({score:e.scores[r],label:t[e.classes[r]],box:Rk(n,!i)}))}p.sort((e,t)=>t.score-e.score),r!==null&&(p=p.slice(0,r)),l.push(p)}return a?l:l[0]}},cA=class extends zk{async _call(e,t,n={}){if(Array.isArray(e)){if(e.length!==1)throw Error(`Document Question Answering pipeline currently only supports a batch size of 1.`);e=e[0]}let r=(await Ik(e))[0],{pixel_values:i}=await this.processor(r),a=`${t}`,o=this.tokenizer(a,{add_special_tokens:!1,padding:!0,truncation:!0}).input_ids,s=await this.model.generate({inputs:i,max_length:this.model.config.decoder.max_position_embeddings,decoder_input_ids:o,...n}),c=this.tokenizer.batch_decode(s)[0].match(/(.*?)<\/s_answer>/),l=null;return c&&c.length>=2&&(l=c[1].trim()),[{answer:l}]}},lA=class extends zk{async _call(e){let t=await Ik(e),n=await this.processor(t),r=await this.model(n),i=[];for(let e of r.reconstruction){let t=e.squeeze().clamp_(0,1).mul_(255).round_().to(`uint8`);i.push(Df.fromTensor(t))}return Array.isArray(e)?i:i[0]}},uA=class extends zk{async _call(e){let t=await Ik(e),n=await this.processor(t),{predicted_depth:r}=await this.model(n),i=[];for(let e=0;ee>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=63744&&e<=64255||e>=194560&&e<=195103,mA=class{put(e){throw Error(`Not implemented`)}end(){throw Error(`Not implemented`)}},hA=_i.IS_PROCESS_AVAILABLE?e=>process.stdout.write(e):e=>console.log(e),gA=class extends mA{constructor(e,{skip_prompt:t=!1,callback_function:n=null,token_callback_function:r=null,skip_special_tokens:i=!0,decode_kwargs:a={},...o}={}){super(),this.tokenizer=e,this.skip_prompt=t,this.callback_function=n??hA,this.token_callback_function=r,this.decode_kwargs={skip_special_tokens:i,...a,...o},this.token_cache=[],this.print_len=0,this.next_tokens_are_prompt=!0,this.special_ids=new Set(this.tokenizer.all_special_ids.map(BigInt))}put(e){if(e.length>1)throw Error(`TextStreamer only supports batch size of 1`);let t=this.next_tokens_are_prompt;if(t&&(this.next_tokens_are_prompt=!1,this.skip_prompt))return;let n=e[0];if(this.token_callback_function?.(n),n.length===1&&this.special_ids.has(n[0])){if(this.decode_kwargs.skip_special_tokens)return;if(this.token_cache.length>0){let e=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len);this.on_finalized_text(e,!1),this.token_cache=[],this.print_len=0}let e=this.tokenizer.decode(n,this.decode_kwargs);this.on_finalized_text(e,!1);return}this.token_cache=Pi(this.token_cache,n);let r=this.tokenizer.decode(this.token_cache,this.decode_kwargs),i;t||r.endsWith(` +`)?(i=r.slice(this.print_len),this.token_cache=[],this.print_len=0):r.length>0&&pA(r.charCodeAt(r.length-1))?(i=r.slice(this.print_len),this.print_len+=i.length):(i=r.slice(this.print_len,r.lastIndexOf(` `)+1),this.print_len+=i.length),this.on_finalized_text(i,!1)}end(){let e;this.token_cache.length>0?(e=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len),this.token_cache=[],this.print_len=0):e=``,this.next_tokens_are_prompt=!0,this.on_finalized_text(e,!0)}on_finalized_text(e,t){e.length>0&&this.callback_function?.(e),t&&this.callback_function===hA&&_i.IS_PROCESS_AVAILABLE&&this.callback_function?.(` +`)}},_A=`onnx-community/gemma-4-E2B-it-ONNX`,vA=[`What do you see?`,`Describe the scene`,`Tell me about yourself`,`What can you do?`],yA=2e3,bA=`You are Gemma 4, a helpful multimodal AI assistant running entirely in the user's browser via WebGPU. The user has a live camera or video feed. You can use the vision tool to capture and analyze the current frame whenever the user asks about what they see, what is on screen, their surroundings, or anything visual. You can also use the audio tool to listen to the user's microphone input when they ask you to listen or transcribe. Always be concise and helpful.`,xA=[{type:`function`,function:{name:`vision`,description:`Captures and analyzes the current camera/video frame. Use this when the user asks anything about what they see, what is being shown, what is on screen, their appearance, surroundings, etc.`,parameters:{type:`object`,properties:{prompt:{type:`string`,description:`The prompt describing what to analyze in the current frame.`}},required:[`prompt`]}}}],SA=(0,y.createContext)(null);function CA(){let e=(0,y.useContext)(SA);if(!e)throw Error(`useModel must be used within a ModelProvider.`);return e}var wA=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),TA=o(((e,t)=>{t.exports=wA()})),N=TA();function EA(e){let t=[],n=/<\|tool_call>call:(\w+)\{(.*?)\}/gs,r;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],i={},a=/(\w+):<\|"\|>(.*?)<\|"\|>/gs,o;for(;(o=a.exec(n))!==null;)i[o[1]]=o[2];t.push({function:{name:e,arguments:i}})}return t}function DA(e){let t=[{role:`system`,content:bA}];for(let n of e)n.role===`user`?t.push({role:`user`,content:n.content}):t.push({role:`assistant`,content:n.content});return t}async function OA(e){let t=new Image;if(t.src=e,await t.decode(),t.naturalWidth===0)return null;let n=document.createElement(`canvas`);n.width=t.naturalWidth,n.height=t.naturalHeight;let r=n.getContext(`2d`);return r?(r.drawImage(t,0,0),n):null}function kA({children:e}){let[t,n]=(0,y.useState)(`idle`),[r,i]=(0,y.useState)(0),a=(0,y.useRef)(null),o=(0,y.useRef)(null),s=(0,y.useRef)(null),c=(0,y.useRef)(new Yh),l=(0,y.useCallback)(async()=>{if(t===`ready`)return;if(s.current)return s.current;let e=(async()=>{n(`loading`),i(0);try{let[e,t]=await Promise.all([oh.from_pretrained(_A),Cb.from_pretrained(_A,{dtype:{audio_encoder:`fp16`,vision_encoder:`fp16`,embed_tokens:`q4f16`,decoder_model_merged:`q4f16`},device:`webgpu`,progress_callback:e=>{e.status===`progress_total`&&i(e.progress)}})]);o.current=e,a.current=t,i(100),n(`ready`)}catch(e){console.error(`Model load failed:`,e),n(`error`),alert(e instanceof Error?e.message:`Failed to load model`)}finally{s.current=null}})();return s.current=e,e},[t]),u=/<\|channel\|>|||||<\|channel>|<\|tool_response\|>|<\|tool_response>|/g,d=(0,y.useCallback)(async(e,t,n)=>{let r=o.current,i=a.current;if(!r||!i)throw Error(`Model not loaded`);let s=await r(r.apply_chat_template(e,{add_generation_prompt:!0,...n.tools&&{tools:xA},...n.enableThinking&&{enable_thinking:!0}}),n.image?await Of(n.image):null,n.audio??null,{add_special_tokens:!1}),l=``,d=``,f=`init`,p=new gA(r.tokenizer,{skip_prompt:!0,skip_special_tokens:!1,callback_function:e=>{if(console.log(`[DEBUG] raw token:`,JSON.stringify(e)),d+=e,f===`init`){if(d.includes(`<|channel>thought`)){f=`thinking`;let e=(d.split(`<|channel>thought`).pop()??``).replace(/^\n/,``);e&&t(e,`thinking`),d=``;return}if(d.length>12||!`<|channel>thought`.startsWith(d)){let e=d.replace(u,``);e&&(l+=e,t(e,`content`)),d=``,f=`content`;return}return}if(f===`thinking`){if(d.includes(``)){let e=d.split(``)[0];e&&t(e,`thinking`);let n=(d.split(``).pop()??``).replace(u,``);n&&(l+=n,t(n,`content`)),d=``,f=`content`;return}t(e,`thinking`),d=``;return}let n=e.replace(u,``);n&&(l+=n,t(n,`content`)),d=``}});console.log(`[DEBUG] generate (streamed)`),c.current.reset();let m=await i.generate({...s,max_new_tokens:2048,do_sample:!1,streamer:p,stopping_criteria:[c.current]});if(d){let e=d.replace(u,``);e&&(l+=e,t(e,f===`thinking`?`thinking`:`content`))}let h=r.batch_decode(m.slice(null,[s.input_ids.dims.at(-1),null]),{skip_special_tokens:!1})[0];return{text:l,rawOutput:h}},[]),f=(0,y.useCallback)(async e=>{let t=o.current,n=a.current;if(!t||!n)throw Error(`Model not loaded`);let r=await t(t.apply_chat_template([{role:`system`,content:`Transcribe the following speech segment in English into English text.`},{role:`user`,content:[{type:`audio`}]}],{add_generation_prompt:!0}),null,e,{add_special_tokens:!1});console.log(`[DEBUG] generate (transcription)`),c.current.reset();let i=await n.generate({...r,max_new_tokens:512,do_sample:!1,stopping_criteria:[c.current]});return t.batch_decode(i.slice(null,[r.input_ids.dims.at(-1),null]),{skip_special_tokens:!0})[0].trim()},[]),p=(0,y.useCallback)(async(e,t,n)=>{let{enableThinking:r=!1,captureFrame:i,onToolCall:a,onTranscription:o}=n??{},s=e[e.length-1];if(s?.image){let{text:n}=await m(e,s,t,r);return n}if(s?.audio){let r=await f(s.audio);return console.log(`[DEBUG] Transcription:`,r),o?.(r),p([...e.slice(0,-1),{...s,content:r,audio:void 0}],t,{...n,onTranscription:void 0})}let c=DA(e),{text:l,rawOutput:u}=await d(c,t,{enableThinking:r,tools:!0});console.log(`[DEBUG] Brain raw output:`,u);let h=EA(u);if(console.log(`[DEBUG] Parsed tool calls:`,h),h.length===0)return l;a?.();let g=h.find(e=>e.function.name===`vision`),_=`Could not capture frame.`;if(g&&i){let e=i();if(e){let n=await OA(e);if(n){let{text:e}=await d([{role:`user`,content:[{type:`image`},{type:`text`,text:g.function.arguments.prompt||`Describe what you see`}]}],t,{enableThinking:!1,image:n});_=e}}}let v=h.map(e=>({name:e.function.name,response:{description:_}})),{text:y}=await d([...c,{role:`assistant`,tool_calls:h},{role:`user`,tool_responses:v}],t,{enableThinking:r,tools:!0});return y},[d,f]),m=(0,y.useCallback)(async(e,t,n,r)=>{let i=await OA(t.image);if(!i)throw Error(`Failed to decode captured frame`);return d([{role:`user`,content:[{type:`image`},{type:`text`,text:t.content}]}],n,{enableThinking:r,image:i})},[d]),h=(0,y.useCallback)(()=>{c.current.interrupt()},[]);return(0,N.jsx)(SA.Provider,{value:{loadState:t,loadProgress:r,loadModel:l,generate:p,stopGeneration:h},children:e})}var AA=(0,y.createContext)(null);function jA(){let e=(0,y.useContext)(AA);if(!e)throw Error(`useMedia must be used within a MediaProvider.`);return e}function MA({children:e}){let t=(0,y.useRef)(null),n=(0,y.useRef)(null),r=(0,y.useRef)(null),i=(0,y.useRef)([]),a=(0,y.useRef)(null),o=(0,y.useRef)(null),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(!1);(0,y.useEffect)(()=>()=>{a.current?.getTracks().forEach(e=>e.stop()),o.current&&URL.revokeObjectURL(o.current)},[]);let p=(0,y.useCallback)(async()=>{a.current?.getTracks().forEach(e=>e.stop()),o.current&&=(URL.revokeObjectURL(o.current),null);let e=await navigator.mediaDevices.getUserMedia({video:{facingMode:`user`,width:{ideal:1280},height:{ideal:720}},audio:!1});a.current=e,t.current&&(t.current.srcObject=e,t.current.onloadedmetadata=()=>{u(!0),t.current?.play().catch(()=>{})}),c(`webcam`)},[]),m=(0,y.useCallback)(e=>{a.current?.getTracks().forEach(e=>e.stop()),a.current=null,o.current&&URL.revokeObjectURL(o.current);let n=URL.createObjectURL(e);o.current=n,t.current&&(t.current.srcObject=null,t.current.src=n,t.current.loop=!0,t.current.onloadedmetadata=()=>{u(!0),t.current?.play().catch(()=>{})}),c(`file`)},[]),h=(0,y.useCallback)(()=>{let e=t.current,r=n.current;if(!e||!r||e.readyState{i.current=[];let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e);r.current=t,t.ondataavailable=e=>{e.data.size>0&&i.current.push(e.data)},t.start(),f(!0)},[]),_=(0,y.useCallback)(()=>new Promise(e=>{let t=r.current;if(!t||t.state===`inactive`){f(!1),e(null);return}t.onstop=async()=>{t.stream.getTracks().forEach(e=>e.stop()),f(!1);let n=new Blob(i.current,{type:`audio/webm`});try{let t=await n.arrayBuffer(),r=new AudioContext({sampleRate:16e3}),i=await r.decodeAudioData(t);await r.close(),e(i.getChannelData(0))}catch{e(null)}},t.stop()}),[]);return(0,N.jsx)(AA.Provider,{value:{videoRef:t,canvasRef:n,videoSource:s,isVideoReady:l,isRecording:d,startWebcam:p,loadVideoFile:m,captureFrame:h,startRecording:g,stopRecording:_},children:e})}function NA({onStart:e}){return(0,N.jsxs)(`div`,{className:`relative flex h-full flex-col items-center justify-center px-6`,children:[(0,N.jsx)(`div`,{className:`absolute inset-0 bg-cover bg-center bg-no-repeat`,style:{backgroundImage:`url(/background.jpg)`}}),(0,N.jsx)(`div`,{className:`absolute inset-0 bg-dm-bg/70`}),(0,N.jsxs)(`div`,{className:`relative z-10 flex flex-col items-center gap-6 text-center`,children:[(0,N.jsx)(`h1`,{className:`text-6xl font-bold tracking-tight text-dm-text animate-title-appear sm:text-7xl animate-glow`,children:`Gemma 4 WebGPU`}),(0,N.jsx)(`p`,{className:`max-w-lg text-lg text-dm-text-secondary animate-subtitle-appear`,children:`Multimodal AI, running locally in your browser with WebGPU`}),(0,N.jsx)(`button`,{type:`button`,onClick:e,className:`mt-4 rounded-full bg-dm-text px-8 py-3 text-base font-semibold text-dm-bg transition-all hover:opacity-90 active:scale-[0.98] animate-button-appear`,children:`Load model`})]})]})}var PA=[`Loading model...`,`Cached after first load`,`Runs 100% offline`,`No data leaves your device`,`Powered by WebGPU`,`No server required`,`Private by design`,`Works without WiFi after loading`,`All inference runs locally`,`Your data stays on your machine`];function FA({onReady:e}){let{loadState:t,loadProgress:n,loadModel:r}=CA(),[i,a]=(0,y.useState)(0);return(0,y.useEffect)(()=>{r()},[r]),(0,y.useEffect)(()=>{if(t!==`ready`)return;let n=setTimeout(e,500);return()=>clearTimeout(n)},[t,e]),(0,y.useEffect)(()=>{if(t!==`loading`)return;let e=setInterval(()=>{a(e=>(e+1)%PA.length)},3e3);return()=>clearInterval(e)},[t]),(0,N.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-8 px-6 animate-fade-in-up bg-dm-bg`,children:[(0,N.jsx)(`h1`,{className:`text-3xl font-bold tracking-tight text-dm-text`,children:`Gemma 4 WebGPU`}),(0,N.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-4`,children:[(0,N.jsxs)(`div`,{className:`relative h-2 w-full overflow-hidden rounded-full bg-dm-surface-high`,children:[(0,N.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-dm-blue to-dm-green transition-all duration-300 ease-out`,style:{width:`${Math.max(n,3)}%`}}),t===`loading`&&(0,N.jsx)(`div`,{className:`absolute inset-0 animate-shimmer bg-[length:200%_100%] bg-gradient-to-r from-transparent via-white/15 to-transparent`})]}),(0,N.jsxs)(`p`,{className:`text-2xl font-semibold tabular-nums text-dm-text`,children:[Math.round(n),`%`]}),t===`loading`&&(0,N.jsx)(`p`,{className:`animate-fade-in-up text-sm font-medium bg-[length:200%_auto] bg-clip-text text-transparent animate-glisten`,style:{backgroundImage:`linear-gradient(90deg, #b2bbc5 0%, #b2bbc5 40%, #f8f9fc 50%, #b2bbc5 60%, #b2bbc5 100%)`},children:PA[i]},i)]}),(0,N.jsx)(`p`,{className:`absolute bottom-8 text-xs text-dm-text-secondary`,children:`Powered by Transformers.js`})]})}var IA=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),LA=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),RA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),zA=e=>{let t=RA(e);return t.charAt(0).toUpperCase()+t.slice(1)},BA={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},VA=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},HA=(0,y.createContext)({}),UA=()=>(0,y.useContext)(HA),WA=(0,y.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=UA()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,y.createElement)(`svg`,{ref:c,...BA,width:t??l??BA.width,height:t??l??BA.height,stroke:e??f,strokeWidth:m,className:IA(`lucide`,p,i),...!a&&!VA(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),GA=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(WA,{ref:i,iconNode:t,className:IA(`lucide-${LA(zA(e))}`,`lucide-${e}`,n),...r}));return n.displayName=zA(e),n},KA=GA(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),qA=GA(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),JA=GA(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),YA=GA(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),XA=GA(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ZA=GA(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),QA=GA(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),$A=GA(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),ej=GA(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),tj=GA(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),nj=GA(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),rj=GA(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ij=(function(e){if(e==null)return lj;if(typeof e==`function`)return cj(e);if(typeof e==`object`)return Array.isArray(e)?aj(e):oj(e);if(typeof e==`string`)return sj(e);throw Error(`Expected function, string, or object as test`)});function aj(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=fj,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=hj(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&de===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=Oj(e,t,n,r,i,a,o,s,c);wj(l),gj(l,u)}}function yj(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function bj(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var xj=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Sj=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Cj(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=yj(e,n);if(!o||Sj.has(o.protocol)||!(xj.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=bj(e);return o&&t.some(e=>{let t=yj(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function wj(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)wj(t)}}var Tj=Symbol(`node-seen`);function Ej(e,t,n){return t===_j.remove?{type:`remove`}:t===_j.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function Dj(e,t,n){if(t===_j.remove)return{type:`remove`};if(t===_j.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var Oj=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Tj])return!0;if(u.tagName===`a`){let n=Cj(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Tj]=!0,gj(u,l),f&&typeof d==`number`){let e=Ej(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[pj,d];f.children[d]=e.element}return pj}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Cj(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Tj]=!0,gj(u,l),f&&typeof d==`number`){let e=Dj(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[pj,d];f.children[d]=e.element}return pj}else return u.properties.src=t,!0}return!0};return l},kj=typeof self==`object`?self:globalThis,Aj=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new kj[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new kj[a](o),i)};return r},jj=e=>Aj(new Map,e)(0),Mj=``,{toString:Nj}={},{keys:Pj}=Object,Fj=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Nj.call(e).slice(8,-1);switch(n){case`Array`:return[1,Mj];case`Object`:return[2,Mj];case`Date`:return[3,Mj];case`RegExp`:return[4,Mj];case`Map`:return[5,Mj];case`Set`:return[6,Mj];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Ij=([e,t])=>e===0&&(t===`function`||t===`symbol`),Lj=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Fj(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Pj(r))(e||!Ij(Fj(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ij(Fj(n))||Ij(Fj(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ij(Fj(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Rj=(e,{json:t,lossy:n}={})=>{let r=[];return Lj(!(t||n),!!t,new Map,r)(e),r},zj=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?jj(Rj(e,t)):structuredClone(e):(e,t)=>jj(Rj(e,t)),Bj=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Bj.prototype.normal={},Bj.prototype.property={},Bj.prototype.space=void 0;function Vj(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Bj(n,r,t)}function Hj(e){return e.toLowerCase()}var Uj=class{constructor(e,t){this.attribute=t,this.property=e}};Uj.prototype.attribute=``,Uj.prototype.booleanish=!1,Uj.prototype.boolean=!1,Uj.prototype.commaOrSpaceSeparated=!1,Uj.prototype.commaSeparated=!1,Uj.prototype.defined=!1,Uj.prototype.mustUseProperty=!1,Uj.prototype.number=!1,Uj.prototype.overloadedBoolean=!1,Uj.prototype.property=``,Uj.prototype.spaceSeparated=!1,Uj.prototype.space=void 0;var Wj=s({boolean:()=>Kj,booleanish:()=>qj,commaOrSpaceSeparated:()=>Zj,commaSeparated:()=>Xj,number:()=>P,overloadedBoolean:()=>Jj,spaceSeparated:()=>Yj}),Gj=0,Kj=Qj(),qj=Qj(),Jj=Qj(),P=Qj(),Yj=Qj(),Xj=Qj(),Zj=Qj();function Qj(){return 2**++Gj}var $j=Object.keys(Wj),eM=class extends Uj{constructor(e,t,n,r){let i=-1;if(super(e,t),tM(this,`space`,r),typeof n==`number`)for(;++i<$j.length;){let e=$j[i];tM(this,$j[i],(n&Wj[e])===Wj[e])}}};eM.prototype.defined=!0;function tM(e,t,n){n&&(e[t]=n)}function nM(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eM(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Hj(r)]=r,n[Hj(a.attribute)]=r}return new Bj(t,n,e.space)}var rM=nM({properties:{ariaActiveDescendant:null,ariaAtomic:qj,ariaAutoComplete:null,ariaBusy:qj,ariaChecked:qj,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:Yj,ariaCurrent:null,ariaDescribedBy:Yj,ariaDetails:null,ariaDisabled:qj,ariaDropEffect:Yj,ariaErrorMessage:null,ariaExpanded:qj,ariaFlowTo:Yj,ariaGrabbed:qj,ariaHasPopup:null,ariaHidden:qj,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yj,ariaLevel:P,ariaLive:null,ariaModal:qj,ariaMultiLine:qj,ariaMultiSelectable:qj,ariaOrientation:null,ariaOwns:Yj,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:qj,ariaReadOnly:qj,ariaRelevant:null,ariaRequired:qj,ariaRoleDescription:Yj,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:qj,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function iM(e,t){return t in e?e[t]:t}function aM(e,t){return iM(e,t.toLowerCase())}var oM=nM({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Xj,acceptCharset:Yj,accessKey:Yj,action:null,allow:null,allowFullScreen:Kj,allowPaymentRequest:Kj,allowUserMedia:Kj,alt:null,as:null,async:Kj,autoCapitalize:null,autoComplete:Yj,autoFocus:Kj,autoPlay:Kj,blocking:Yj,capture:null,charSet:null,checked:Kj,cite:null,className:Yj,cols:P,colSpan:null,content:null,contentEditable:qj,controls:Kj,controlsList:Yj,coords:P|Xj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Kj,defer:Kj,dir:null,dirName:null,disabled:Kj,download:Jj,draggable:qj,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Kj,formTarget:null,headers:Yj,height:P,hidden:Jj,high:P,href:null,hrefLang:null,htmlFor:Yj,httpEquiv:Yj,id:null,imageSizes:null,imageSrcSet:null,inert:Kj,inputMode:null,integrity:null,is:null,isMap:Kj,itemId:null,itemProp:Yj,itemRef:Yj,itemScope:Kj,itemType:Yj,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Kj,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:Kj,muted:Kj,name:null,nonce:null,noModule:Kj,noValidate:Kj,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Kj,optimum:P,pattern:null,ping:Yj,placeholder:null,playsInline:Kj,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Kj,referrerPolicy:null,rel:Yj,required:Kj,reversed:Kj,rows:P,rowSpan:P,sandbox:Yj,scope:null,scoped:Kj,seamless:Kj,selected:Kj,shadowRootClonable:Kj,shadowRootDelegatesFocus:Kj,shadowRootMode:null,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:qj,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:Kj,useMap:null,value:qj,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yj,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Kj,declare:Kj,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:Kj,noHref:Kj,noShade:Kj,noWrap:Kj,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:qj,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Kj,disableRemotePlayback:Kj,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:aM}),sM=nM({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Zj,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:Yj,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:Kj,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xj,g2:Xj,glyphName:Xj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:Zj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:P,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yj,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zj,rev:Zj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zj,requiredFeatures:Zj,requiredFonts:Zj,requiredFormats:Zj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:Zj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zj,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zj,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:iM}),cM=nM({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),lM=nM({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:aM}),uM=nM({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),dM={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},fM=/[A-Z]/g,pM=/-[a-z]/g,mM=/^data[-\w.:]+$/i;function hM(e,t){let n=Hj(t),r=t,i=Uj;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&mM.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(pM,_M);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!pM.test(e)){let n=e.replace(fM,gM);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=eM}return new i(r,t)}function gM(e){return`-`+e.toLowerCase()}function _M(e){return e.charAt(1).toUpperCase()}var vM=Vj([rM,oM,cM,lM,uM],`html`),yM=Vj([rM,sM,cM,lM,uM],`svg`);function bM(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function xM(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var SM=/[#.]/g;function CM(e,t){let n=e||``,r={},i=0,a,o;for(;i-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=LM(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length1?n[e.line-2]:0)+e.column-1;if(r=55296&&e<=57343}function mN(e){return e>=56320&&e<=57343}function hN(e,t){return(e-55296)*1024+9216+t}function gN(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _N(e){return e>=64976&&e<=65007||dN.has(e)}var I;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(I||={});var vN=65536,yN=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=vN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(mN(t))return this.pos++,this._addGap(),hN(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,F.EOF;return this._err(I.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let n=this.html.charCodeAt(t);return n===F.CARRIAGE_RETURN?F.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let e=this.html.charCodeAt(this.pos);return e===F.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,F.LINE_FEED):e===F.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,pN(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===F.LINE_FEED||e===F.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){gN(e)?this._err(I.controlCharacterInInputStream):_N(e)&&this._err(I.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var SN=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),CN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function wN(e){return e>=55296&&e<=57343||e>1114111?65533:CN.get(e)??e}var TN;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(TN||={});var EN=32,DN;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(DN||={});function ON(e){return e>=TN.ZERO&&e<=TN.NINE}function kN(e){return e>=TN.UPPER_A&&e<=TN.UPPER_F||e>=TN.LOWER_A&&e<=TN.LOWER_F}function AN(e){return e>=TN.UPPER_A&&e<=TN.UPPER_Z||e>=TN.LOWER_A&&e<=TN.LOWER_Z||ON(e)}function jN(e){return e===TN.EQUALS||AN(e)}var MN;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(MN||={});var NN;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(NN||={});var PN=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=MN.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=NN.Strict}startEntity(e){this.decodeMode=e,this.state=MN.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case MN.EntityStart:return e.charCodeAt(t)===TN.NUM?(this.state=MN.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=MN.NamedEntity,this.stateNamedEntity(e,t));case MN.NumericStart:return this.stateNumericStart(e,t);case MN.NumericDecimal:return this.stateNumericDecimal(e,t);case MN.NumericHex:return this.stateNumericHex(e,t);case MN.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|EN)===TN.LOWER_X?(this.state=MN.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=MN.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,i!==0){if(a===TN.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==NN.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&DN.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~DN.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case MN.NamedEntity:return this.result!==0&&(this.decodeMode!==NN.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case MN.NumericDecimal:return this.emitNumericEntity(0,2);case MN.NumericHex:return this.emitNumericEntity(0,3);case MN.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case MN.EntityStart:return 0}}};function FN(e,t,n,r){let i=(t&DN.BRANCH_LENGTH)>>7,a=t&DN.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(nr)s=t-1;else return e[t+i]}return-1}var L;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(L||={});var IN;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(IN||={});var LN;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(LN||={});var R;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(R||={});var z;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(z||={});var RN=new Map([[R.A,z.A],[R.ADDRESS,z.ADDRESS],[R.ANNOTATION_XML,z.ANNOTATION_XML],[R.APPLET,z.APPLET],[R.AREA,z.AREA],[R.ARTICLE,z.ARTICLE],[R.ASIDE,z.ASIDE],[R.B,z.B],[R.BASE,z.BASE],[R.BASEFONT,z.BASEFONT],[R.BGSOUND,z.BGSOUND],[R.BIG,z.BIG],[R.BLOCKQUOTE,z.BLOCKQUOTE],[R.BODY,z.BODY],[R.BR,z.BR],[R.BUTTON,z.BUTTON],[R.CAPTION,z.CAPTION],[R.CENTER,z.CENTER],[R.CODE,z.CODE],[R.COL,z.COL],[R.COLGROUP,z.COLGROUP],[R.DD,z.DD],[R.DESC,z.DESC],[R.DETAILS,z.DETAILS],[R.DIALOG,z.DIALOG],[R.DIR,z.DIR],[R.DIV,z.DIV],[R.DL,z.DL],[R.DT,z.DT],[R.EM,z.EM],[R.EMBED,z.EMBED],[R.FIELDSET,z.FIELDSET],[R.FIGCAPTION,z.FIGCAPTION],[R.FIGURE,z.FIGURE],[R.FONT,z.FONT],[R.FOOTER,z.FOOTER],[R.FOREIGN_OBJECT,z.FOREIGN_OBJECT],[R.FORM,z.FORM],[R.FRAME,z.FRAME],[R.FRAMESET,z.FRAMESET],[R.H1,z.H1],[R.H2,z.H2],[R.H3,z.H3],[R.H4,z.H4],[R.H5,z.H5],[R.H6,z.H6],[R.HEAD,z.HEAD],[R.HEADER,z.HEADER],[R.HGROUP,z.HGROUP],[R.HR,z.HR],[R.HTML,z.HTML],[R.I,z.I],[R.IMG,z.IMG],[R.IMAGE,z.IMAGE],[R.INPUT,z.INPUT],[R.IFRAME,z.IFRAME],[R.KEYGEN,z.KEYGEN],[R.LABEL,z.LABEL],[R.LI,z.LI],[R.LINK,z.LINK],[R.LISTING,z.LISTING],[R.MAIN,z.MAIN],[R.MALIGNMARK,z.MALIGNMARK],[R.MARQUEE,z.MARQUEE],[R.MATH,z.MATH],[R.MENU,z.MENU],[R.META,z.META],[R.MGLYPH,z.MGLYPH],[R.MI,z.MI],[R.MO,z.MO],[R.MN,z.MN],[R.MS,z.MS],[R.MTEXT,z.MTEXT],[R.NAV,z.NAV],[R.NOBR,z.NOBR],[R.NOFRAMES,z.NOFRAMES],[R.NOEMBED,z.NOEMBED],[R.NOSCRIPT,z.NOSCRIPT],[R.OBJECT,z.OBJECT],[R.OL,z.OL],[R.OPTGROUP,z.OPTGROUP],[R.OPTION,z.OPTION],[R.P,z.P],[R.PARAM,z.PARAM],[R.PLAINTEXT,z.PLAINTEXT],[R.PRE,z.PRE],[R.RB,z.RB],[R.RP,z.RP],[R.RT,z.RT],[R.RTC,z.RTC],[R.RUBY,z.RUBY],[R.S,z.S],[R.SCRIPT,z.SCRIPT],[R.SEARCH,z.SEARCH],[R.SECTION,z.SECTION],[R.SELECT,z.SELECT],[R.SOURCE,z.SOURCE],[R.SMALL,z.SMALL],[R.SPAN,z.SPAN],[R.STRIKE,z.STRIKE],[R.STRONG,z.STRONG],[R.STYLE,z.STYLE],[R.SUB,z.SUB],[R.SUMMARY,z.SUMMARY],[R.SUP,z.SUP],[R.TABLE,z.TABLE],[R.TBODY,z.TBODY],[R.TEMPLATE,z.TEMPLATE],[R.TEXTAREA,z.TEXTAREA],[R.TFOOT,z.TFOOT],[R.TD,z.TD],[R.TH,z.TH],[R.THEAD,z.THEAD],[R.TITLE,z.TITLE],[R.TR,z.TR],[R.TRACK,z.TRACK],[R.TT,z.TT],[R.U,z.U],[R.UL,z.UL],[R.SVG,z.SVG],[R.VAR,z.VAR],[R.WBR,z.WBR],[R.XMP,z.XMP]]);function zN(e){return RN.get(e)??z.UNKNOWN}var B=z,BN={[L.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[L.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[L.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[L.XLINK]:new Set,[L.XML]:new Set,[L.XMLNS]:new Set},VN=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);new Set([R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT]);var V;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(V||={});var HN={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function UN(e){return e>=F.DIGIT_0&&e<=F.DIGIT_9}function WN(e){return e>=F.LATIN_CAPITAL_A&&e<=F.LATIN_CAPITAL_Z}function GN(e){return e>=F.LATIN_SMALL_A&&e<=F.LATIN_SMALL_Z}function KN(e){return GN(e)||WN(e)}function qN(e){return KN(e)||UN(e)}function JN(e){return e+32}function YN(e){return e===F.SPACE||e===F.LINE_FEED||e===F.TABULATION||e===F.FORM_FEED}function XN(e){return YN(e)||e===F.SOLIDUS||e===F.GREATER_THAN_SIGN}function ZN(e){return e===F.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:pN(e)?I.surrogateCharacterReference:_N(e)?I.noncharacterCharacterReference:gN(e)||e===F.CARRIAGE_RETURN?I.controlCharacterReference:null}var QN=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new yN(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new PN(SN,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=ZN(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(I.endTagWithAttributes),e.selfClosing&&this._err(I.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case bN.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case bN.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case bN.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:bN.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=YN(e)?bN.WHITESPACE_CHARACTER:e===F.NULL?bN.NULL_CHARACTER:bN.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(bN.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=V.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?NN.Attribute:NN.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case V.DATA:this._stateData(e);break;case V.RCDATA:this._stateRcdata(e);break;case V.RAWTEXT:this._stateRawtext(e);break;case V.SCRIPT_DATA:this._stateScriptData(e);break;case V.PLAINTEXT:this._statePlaintext(e);break;case V.TAG_OPEN:this._stateTagOpen(e);break;case V.END_TAG_OPEN:this._stateEndTagOpen(e);break;case V.TAG_NAME:this._stateTagName(e);break;case V.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case V.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case V.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case V.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case V.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case V.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case V.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case V.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case V.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case V.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case V.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case V.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case V.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case V.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case V.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case V.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case V.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case V.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case V.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case V.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case V.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case V.BOGUS_COMMENT:this._stateBogusComment(e);break;case V.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case V.COMMENT_START:this._stateCommentStart(e);break;case V.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case V.COMMENT:this._stateComment(e);break;case V.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case V.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case V.COMMENT_END:this._stateCommentEnd(e);break;case V.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case V.DOCTYPE:this._stateDoctype(e);break;case V.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case V.DOCTYPE_NAME:this._stateDoctypeName(e);break;case V.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case V.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case V.CDATA_SECTION:this._stateCdataSection(e);break;case V.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case V.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case V.CHARACTER_REFERENCE:this._stateCharacterReference();break;case V.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case F.LESS_THAN_SIGN:this.state=V.TAG_OPEN;break;case F.AMPERSAND:this._startCharacterReference();break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitCodePoint(e);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case F.AMPERSAND:this._startCharacterReference();break;case F.LESS_THAN_SIGN:this.state=V.RCDATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case F.LESS_THAN_SIGN:this.state=V.RAWTEXT_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case F.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break;case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case F.NULL:this._err(I.unexpectedNullCharacter),this._emitChars(`�`);break;case F.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(KN(e))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case F.EXCLAMATION_MARK:this.state=V.MARKUP_DECLARATION_OPEN;break;case F.SOLIDUS:this.state=V.END_TAG_OPEN;break;case F.QUESTION_MARK:this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(e);break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=V.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(KN(e))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case F.GREATER_THAN_SIGN:this._err(I.missingEndTagName),this.state=V.DATA;break;case F.EOF:this._err(I.eofBeforeTagName),this._emitChars(``);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===F.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:KN(e)?(this._emitChars(`<`),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){KN(e)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(``);break;case F.NULL:this._err(I.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case F.EOF:this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===F.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(fN.SCRIPT,!1)&&XN(this.preprocessor.peek(fN.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==L.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(cP,L.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sP,L.HTML)}clearBackToTableRowContext(){this.clearBackTo(oP,L.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===z.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===z.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case L.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case L.SVG:if(aP.has(r))return!1;break;case L.MATHML:if(iP.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,tP)}hasInListItemScope(e){return this.hasInDynamicScope(e,nP)}hasInButtonScope(e){return this.hasInDynamicScope(e,rP)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case L.HTML:if(VN.has(t))return!0;if(tP.has(t))return!1;break;case L.SVG:if(aP.has(t))return!1;break;case L.MATHML:if(iP.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===L.HTML)switch(this.tagIDs[e]){case z.TBODY:case z.THEAD:case z.TFOOT:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case z.OPTION:case z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$N.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&eP.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&eP.has(this.currentTagId);)this.pop()}},dP=3,fP;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(fP||={});var pP={type:fP.Marker},mP=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])),i=0;for(let e=0;er.get(e.name)===e.value)&&(i+=1,i>=dP&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(pP)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:fP.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:fP.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(pP);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===fP.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===fP.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===fP.Element&&t.element===e)}},hP={createDocument(){return{nodeName:`#document`,mode:LN.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};hP.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(hP.isTextNode(n)){n.value+=t;return}}hP.appendChild(e,hP.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&hP.isTextNode(r)?r.value+=t:hP.insertBefore(e,hP.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;re.startsWith(t))}function TP(e){return e.name===gP&&e.publicId===null&&(e.systemId===null||e.systemId===_P)}function EP(e){if(e.name!==gP)return LN.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===vP)return LN.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xP.has(n))return LN.QUIRKS;let e=t===null?bP:yP;if(wP(n,e))return LN.QUIRKS;if(e=t===null?SP:CP,wP(n,e))return LN.LIMITED_QUIRKS}return LN.NO_QUIRKS}var DP={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},OP=`definitionurl`,kP=`definitionURL`,AP=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),jP=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:L.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:L.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:L.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:L.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:L.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:L.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:L.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:L.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:L.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:L.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:L.XMLNS}]]),MP=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),NP=new Set([z.B,z.BIG,z.BLOCKQUOTE,z.BODY,z.BR,z.CENTER,z.CODE,z.DD,z.DIV,z.DL,z.DT,z.EM,z.EMBED,z.H1,z.H2,z.H3,z.H4,z.H5,z.H6,z.HEAD,z.HR,z.I,z.IMG,z.LI,z.LISTING,z.MENU,z.META,z.NOBR,z.OL,z.P,z.PRE,z.RUBY,z.S,z.SMALL,z.SPAN,z.STRONG,z.STRIKE,z.SUB,z.SUP,z.TABLE,z.TT,z.U,z.UL,z.VAR]);function PP(e){let t=e.tagID;return t===z.FONT&&e.attrs.some(({name:e})=>e===IN.COLOR||e===IN.SIZE||e===IN.FACE)||NP.has(t)}function FP(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===L.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,L.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=HN.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===R.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==L.HTML))switch(this.fragmentContextID){case z.TITLE:case z.TEXTAREA:this.tokenizer.state=HN.RCDATA;break;case z.STYLE:case z.XMP:case z.IFRAME:case z.NOEMBED:case z.NOFRAMES:case z.NOSCRIPT:this.tokenizer.state=HN.RAWTEXT;break;case z.SCRIPT:this.tokenizer.state=HN.SCRIPT_DATA;break;case z.PLAINTEXT:this.tokenizer.state=HN.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,L.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,L.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(R.HTML,L.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,z.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===bN.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===z.SVG&&this.treeAdapter.getTagName(t)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===L.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===z.MGLYPH||e.tagID===z.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,L.HTML)}_processToken(e){switch(e.type){case bN.CHARACTER:this.onCharacter(e);break;case bN.NULL_CHARACTER:this.onNullCharacter(e);break;case bN.COMMENT:this.onComment(e);break;case bN.DOCTYPE:this.onDoctype(e);break;case bN.START_TAG:this._processStartTag(e);break;case bN.END_TAG:this.onEndTag(e);break;case bN.EOF:this.onEof(e);break;case bN.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return VP(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===fP.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(z.P),this.openElements.popUntilTagNamePopped(z.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case z.TR:this.insertionMode=H.IN_ROW;return;case z.TBODY:case z.THEAD:case z.TFOOT:this.insertionMode=H.IN_TABLE_BODY;return;case z.CAPTION:this.insertionMode=H.IN_CAPTION;return;case z.COLGROUP:this.insertionMode=H.IN_COLUMN_GROUP;return;case z.TABLE:this.insertionMode=H.IN_TABLE;return;case z.BODY:this.insertionMode=H.IN_BODY;return;case z.FRAMESET:this.insertionMode=H.IN_FRAMESET;return;case z.SELECT:this._resetInsertionModeForSelect(e);return;case z.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case z.HTML:this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return;case z.TD:case z.TH:if(e>0){this.insertionMode=H.IN_CELL;return}break;case z.HEAD:if(e>0){this.insertionMode=H.IN_HEAD;return}break}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===z.TEMPLATE)break;if(e===z.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(e){return KP.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case z.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===L.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case z.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return BN[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fL(this,e);return}switch(this.insertionMode){case H.INITIAL:sF(this,e);break;case H.BEFORE_HTML:uF(this,e);break;case H.BEFORE_HEAD:pF(this,e);break;case H.IN_HEAD:_F(this,e);break;case H.IN_HEAD_NO_SCRIPT:bF(this,e);break;case H.AFTER_HEAD:CF(this,e);break;case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:EF(this,e);break;case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:xI(this,e);break;case H.IN_TABLE_TEXT:PI(this,e);break;case H.IN_COLUMN_GROUP:VI(this,e);break;case H.AFTER_BODY:rL(this,e);break;case H.AFTER_AFTER_BODY:lL(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dL(this,e);return}switch(this.insertionMode){case H.INITIAL:sF(this,e);break;case H.BEFORE_HTML:uF(this,e);break;case H.BEFORE_HEAD:pF(this,e);break;case H.IN_HEAD:_F(this,e);break;case H.IN_HEAD_NO_SCRIPT:bF(this,e);break;case H.AFTER_HEAD:CF(this,e);break;case H.TEXT:this._insertCharacters(e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:xI(this,e);break;case H.IN_COLUMN_GROUP:VI(this,e);break;case H.AFTER_BODY:rL(this,e);break;case H.AFTER_AFTER_BODY:lL(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){nF(this,e);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:nF(this,e);break;case H.IN_TABLE_TEXT:FI(this,e);break;case H.AFTER_BODY:rF(this,e);break;case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:iF(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:oF(this,e);break;case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:this._err(e,I.misplacedDoctype);break;case H.IN_TABLE_TEXT:FI(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?mL(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case H.INITIAL:sF(this,e);break;case H.BEFORE_HTML:cF(this,e);break;case H.BEFORE_HEAD:dF(this,e);break;case H.IN_HEAD:mF(this,e);break;case H.IN_HEAD_NO_SCRIPT:vF(this,e);break;case H.AFTER_HEAD:xF(this,e);break;case H.IN_BODY:aI(this,e);break;case H.IN_TABLE:AI(this,e);break;case H.IN_TABLE_TEXT:FI(this,e);break;case H.IN_CAPTION:LI(this,e);break;case H.IN_COLUMN_GROUP:zI(this,e);break;case H.IN_TABLE_BODY:HI(this,e);break;case H.IN_ROW:WI(this,e);break;case H.IN_CELL:KI(this,e);break;case H.IN_SELECT:JI(this,e);break;case H.IN_SELECT_IN_TABLE:XI(this,e);break;case H.IN_TEMPLATE:QI(this,e);break;case H.AFTER_BODY:tL(this,e);break;case H.IN_FRAMESET:iL(this,e);break;case H.AFTER_FRAMESET:oL(this,e);break;case H.AFTER_AFTER_BODY:cL(this,e);break;case H.AFTER_AFTER_FRAMESET:uL(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?hL(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case H.INITIAL:sF(this,e);break;case H.BEFORE_HTML:lF(this,e);break;case H.BEFORE_HEAD:fF(this,e);break;case H.IN_HEAD:hF(this,e);break;case H.IN_HEAD_NO_SCRIPT:yF(this,e);break;case H.AFTER_HEAD:SF(this,e);break;case H.IN_BODY:_I(this,e);break;case H.TEXT:yI(this,e);break;case H.IN_TABLE:jI(this,e);break;case H.IN_TABLE_TEXT:FI(this,e);break;case H.IN_CAPTION:RI(this,e);break;case H.IN_COLUMN_GROUP:BI(this,e);break;case H.IN_TABLE_BODY:UI(this,e);break;case H.IN_ROW:GI(this,e);break;case H.IN_CELL:qI(this,e);break;case H.IN_SELECT:YI(this,e);break;case H.IN_SELECT_IN_TABLE:ZI(this,e);break;case H.IN_TEMPLATE:$I(this,e);break;case H.AFTER_BODY:nL(this,e);break;case H.IN_FRAMESET:aL(this,e);break;case H.AFTER_FRAMESET:sL(this,e);break;case H.AFTER_AFTER_BODY:lL(this,e);break;default:}}onEof(e){switch(this.insertionMode){case H.INITIAL:sF(this,e);break;case H.BEFORE_HTML:uF(this,e);break;case H.BEFORE_HEAD:pF(this,e);break;case H.IN_HEAD:_F(this,e);break;case H.IN_HEAD_NO_SCRIPT:bF(this,e);break;case H.AFTER_HEAD:CF(this,e);break;case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:vI(this,e);break;case H.TEXT:bI(this,e);break;case H.IN_TABLE_TEXT:FI(this,e);break;case H.IN_TEMPLATE:eL(this,e);break;case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:aF(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===F.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:this._insertCharacters(e);break;case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:TF(this,e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:xI(this,e);break;case H.IN_TABLE_TEXT:NI(this,e);break;default:}}};function YP(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):gI(e,t),n}function XP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function ZP(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=WP;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=QP(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function QP(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $P(e,t,n){let r=zN(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===z.TEMPLATE&&i===L.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function eF(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function tF(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function oF(e,t){e._setDocumentType(t);let n=t.forceQuirks?LN.QUIRKS:EP(t);TP(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function sF(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,LN.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function cF(e,t){t.tagID===z.HTML?(e._insertElement(t,L.HTML),e.insertionMode=H.BEFORE_HEAD):uF(e,t)}function lF(e,t){let n=t.tagID;(n===z.HTML||n===z.HEAD||n===z.BODY||n===z.BR)&&uF(e,t)}function uF(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function dF(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.HEAD:e._insertElement(t,L.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break;default:pF(e,t)}}function fF(e,t){let n=t.tagID;n===z.HEAD||n===z.BODY||n===z.HTML||n===z.BR?pF(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function pF(e,t){e._insertFakeElement(R.HEAD,z.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function mF(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.TITLE:e._switchToTextParsing(t,HN.RCDATA);break;case z.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,HN.RAWTEXT):(e._insertElement(t,L.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break;case z.NOFRAMES:case z.STYLE:e._switchToTextParsing(t,HN.RAWTEXT);break;case z.SCRIPT:e._switchToTextParsing(t,HN.SCRIPT_DATA);break;case z.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break;case z.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:_F(e,t)}}function hF(e,t){switch(t.tagID){case z.HEAD:e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break;case z.BODY:case z.BR:case z.HTML:_F(e,t);break;case z.TEMPLATE:gF(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function gF(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==z.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function _F(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function vF(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.BASEFONT:case z.BGSOUND:case z.HEAD:case z.LINK:case z.META:case z.NOFRAMES:case z.STYLE:mF(e,t);break;case z.NOSCRIPT:e._err(t,I.nestedNoscriptInHead);break;default:bF(e,t)}}function yF(e,t){switch(t.tagID){case z.NOSCRIPT:e.openElements.pop(),e.insertionMode=H.IN_HEAD;break;case z.BR:bF(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function bF(e,t){let n=t.type===bN.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function xF(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.BODY:e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break;case z.FRAMESET:e._insertElement(t,L.HTML),e.insertionMode=H.IN_FRAMESET;break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,z.HEAD),mF(e,t),e.openElements.remove(e.headElement);break;case z.HEAD:e._err(t,I.misplacedStartTagForHeadElement);break;default:CF(e,t)}}function SF(e,t){switch(t.tagID){case z.BODY:case z.HTML:case z.BR:CF(e,t);break;case z.TEMPLATE:gF(e,t);break;default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function CF(e,t){e._insertFakeElement(R.BODY,z.BODY),e.insertionMode=H.IN_BODY,wF(e,t)}function wF(e,t){switch(t.type){case bN.CHARACTER:EF(e,t);break;case bN.WHITESPACE_CHARACTER:TF(e,t);break;case bN.COMMENT:nF(e,t);break;case bN.START_TAG:aI(e,t);break;case bN.END_TAG:_I(e,t);break;case bN.EOF:vI(e,t);break;default:}}function TF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function EF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function DF(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function OF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function kF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_FRAMESET)}function AF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function jF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&VN.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,L.HTML)}function MF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function NF(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),n||(e.formElement=e.openElements.current))}function PF(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===z.LI&&r===z.LI||(n===z.DD||n===z.DT)&&(r===z.DD||r===z.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==z.ADDRESS&&r!==z.DIV&&r!==z.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function FF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.tokenizer.state=HN.PLAINTEXT}function IF(e,t){e.openElements.hasInScope(z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1}function LF(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(tF(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zF(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(z.NOBR)&&(tF(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function VF(e,t){e.treeAdapter.getDocumentMode(e.document)!==LN.QUIRKS&&e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function HF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UF(e){let t=xN(e,IN.TYPE);return t!=null&&t.toLowerCase()===HP}function WF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),UF(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function GF(e,t){e._appendElement(t,L.HTML),t.ackSelfClosing=!0}function KF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qF(e,t){t.tagName=R.IMG,t.tagID=z.IMG,HF(e,t)}function JF(e,t){e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.tokenizer.state=HN.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function YF(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,HN.RAWTEXT)}function XF(e,t){e.framesetOk=!1,e._switchToTextParsing(t,HN.RAWTEXT)}function ZF(e,t){e._switchToTextParsing(t,HN.RAWTEXT)}function QF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function $F(e,t){e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function eI(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,L.HTML)}function tI(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(z.RTC),e._insertElement(t,L.HTML)}function nI(e,t){e._reconstructActiveFormattingElements(),FP(t),LP(t),t.selfClosing?e._appendElement(t,L.MATHML):e._insertElement(t,L.MATHML),t.ackSelfClosing=!0}function rI(e,t){e._reconstructActiveFormattingElements(),IP(t),LP(t),t.selfClosing?e._appendElement(t,L.SVG):e._insertElement(t,L.SVG),t.ackSelfClosing=!0}function iI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function aI(e,t){switch(t.tagID){case z.I:case z.S:case z.B:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.SMALL:case z.STRIKE:case z.STRONG:RF(e,t);break;case z.A:LF(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:jF(e,t);break;case z.P:case z.DL:case z.OL:case z.UL:case z.DIV:case z.DIR:case z.NAV:case z.MAIN:case z.MENU:case z.ASIDE:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.DETAILS:case z.ADDRESS:case z.ARTICLE:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:AF(e,t);break;case z.LI:case z.DD:case z.DT:PF(e,t);break;case z.BR:case z.IMG:case z.WBR:case z.AREA:case z.EMBED:case z.KEYGEN:HF(e,t);break;case z.HR:KF(e,t);break;case z.RB:case z.RTC:eI(e,t);break;case z.RT:case z.RP:tI(e,t);break;case z.PRE:case z.LISTING:MF(e,t);break;case z.XMP:YF(e,t);break;case z.SVG:rI(e,t);break;case z.HTML:DF(e,t);break;case z.BASE:case z.LINK:case z.META:case z.STYLE:case z.TITLE:case z.SCRIPT:case z.BGSOUND:case z.BASEFONT:case z.TEMPLATE:mF(e,t);break;case z.BODY:OF(e,t);break;case z.FORM:NF(e,t);break;case z.NOBR:zF(e,t);break;case z.MATH:nI(e,t);break;case z.TABLE:VF(e,t);break;case z.INPUT:WF(e,t);break;case z.PARAM:case z.TRACK:case z.SOURCE:GF(e,t);break;case z.IMAGE:qF(e,t);break;case z.BUTTON:IF(e,t);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:BF(e,t);break;case z.IFRAME:XF(e,t);break;case z.SELECT:QF(e,t);break;case z.OPTION:case z.OPTGROUP:$F(e,t);break;case z.NOEMBED:case z.NOFRAMES:ZF(e,t);break;case z.FRAMESET:kF(e,t);break;case z.TEXTAREA:JF(e,t);break;case z.NOSCRIPT:e.options.scriptingEnabled?ZF(e,t):iI(e,t);break;case z.PLAINTEXT:FF(e,t);break;case z.COL:case z.TH:case z.TD:case z.TR:case z.HEAD:case z.FRAME:case z.TBODY:case z.TFOOT:case z.THEAD:case z.CAPTION:case z.COLGROUP:break;default:iI(e,t)}}function oI(e,t){if(e.openElements.hasInScope(z.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function sI(e,t){e.openElements.hasInScope(z.BODY)&&(e.insertionMode=H.AFTER_BODY,nL(e,t))}function cI(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function lI(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(z.FORM):n&&e.openElements.remove(n))}function uI(e){e.openElements.hasInButtonScope(z.P)||e._insertFakeElement(R.P,z.P),e._closePElement()}function dI(e){e.openElements.hasInListItemScope(z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(z.LI),e.openElements.popUntilTagNamePopped(z.LI))}function fI(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function pI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mI(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function hI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,z.BR),e.openElements.pop(),e.framesetOk=!1}function gI(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==z.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function _I(e,t){switch(t.tagID){case z.A:case z.B:case z.I:case z.S:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.NOBR:case z.SMALL:case z.STRIKE:case z.STRONG:tF(e,t);break;case z.P:uI(e);break;case z.DL:case z.UL:case z.OL:case z.DIR:case z.DIV:case z.NAV:case z.PRE:case z.MAIN:case z.MENU:case z.ASIDE:case z.BUTTON:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.ADDRESS:case z.ARTICLE:case z.DETAILS:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.LISTING:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:cI(e,t);break;case z.LI:dI(e);break;case z.DD:case z.DT:fI(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:pI(e);break;case z.BR:hI(e);break;case z.BODY:oI(e,t);break;case z.HTML:sI(e,t);break;case z.FORM:lI(e);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:mI(e,t);break;case z.TEMPLATE:gF(e,t);break;default:gI(e,t)}}function vI(e,t){e.tmplInsertionModeStack.length>0?eL(e,t):aF(e,t)}function yI(e,t){var n;t.tagID===z.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bI(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xI(e,t){if(e.openElements.currentTagId!==void 0&&KP.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case bN.CHARACTER:PI(e,t);break;case bN.WHITESPACE_CHARACTER:NI(e,t);break}else MI(e,t)}function SI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_CAPTION}function CI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function wI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,z.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,zI(e,t)}function TI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_TABLE_BODY}function EI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,z.TBODY),e.insertionMode=H.IN_TABLE_BODY,HI(e,t)}function DI(e,t){e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function OI(e,t){UF(t)?e._appendElement(t,L.HTML):MI(e,t),t.ackSelfClosing=!0}function kI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,L.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function AI(e,t){switch(t.tagID){case z.TD:case z.TH:case z.TR:EI(e,t);break;case z.STYLE:case z.SCRIPT:case z.TEMPLATE:mF(e,t);break;case z.COL:wI(e,t);break;case z.FORM:kI(e,t);break;case z.TABLE:DI(e,t);break;case z.TBODY:case z.TFOOT:case z.THEAD:TI(e,t);break;case z.INPUT:OI(e,t);break;case z.CAPTION:SI(e,t);break;case z.COLGROUP:CI(e,t);break;default:MI(e,t)}}function jI(e,t){switch(t.tagID){case z.TABLE:e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode());break;case z.TEMPLATE:gF(e,t);break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:MI(e,t)}}function MI(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,wF(e,t),e.fosterParentingEnabled=n}function NI(e,t){e.pendingCharacterTokens.push(t)}function PI(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function FI(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===z.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop();break;case z.OPTION:e.openElements.currentTagId===z.OPTION&&e.openElements.pop();break;case z.SELECT:e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode());break;case z.TEMPLATE:gF(e,t);break;default:}}function XI(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):JI(e,t)}function ZI(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):YI(e,t)}function QI(e,t){switch(t.tagID){case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:mF(e,t);break;case z.CAPTION:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,AI(e,t);break;case z.COL:e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,zI(e,t);break;case z.TR:e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,HI(e,t);break;case z.TD:case z.TH:e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,WI(e,t);break;default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,aI(e,t)}}function $I(e,t){t.tagID===z.TEMPLATE&&gF(e,t)}function eL(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):aF(e,t)}function tL(e,t){t.tagID===z.HTML?aI(e,t):rL(e,t)}function nL(e,t){if(t.tagID===z.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===z.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else rL(e,t)}function rL(e,t){e.insertionMode=H.IN_BODY,wF(e,t)}function iL(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.FRAMESET:e._insertElement(t,L.HTML);break;case z.FRAME:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.NOFRAMES:mF(e,t);break;default:}}function aL(e,t){t.tagID===z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==z.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function oL(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.NOFRAMES:mF(e,t);break;default:}}function sL(e,t){t.tagID===z.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function cL(e,t){t.tagID===z.HTML?aI(e,t):lL(e,t)}function lL(e,t){e.insertionMode=H.IN_BODY,wF(e,t)}function uL(e,t){switch(t.tagID){case z.HTML:aI(e,t);break;case z.NOFRAMES:mF(e,t);break;default:}}function dL(e,t){t.chars=`�`,e._insertCharacters(t)}function fL(e,t){e._insertCharacters(t),e.framesetOk=!1}function pL(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==L.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mL(e,t){if(PP(t))pL(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===L.MATHML?FP(t):r===L.SVG&&(RP(t),IP(t)),LP(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function hL(e,t){if(t.tagID===z.P||t.tagID===z.BR){pL(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===L.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR]);var gL=vL(`end`),_L=vL(`start`);function vL(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yL(e){let t=_L(e),n=gL(e);if(t&&n)return{start:t,end:n}}var bL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xL=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),SL={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function CL(e,t){let n=LL(e),r=XM(`type`,{handlers:{root:TL,element:EL,text:DL,comment:AL,doctype:OL,raw:jL},unknown:ML}),i={parser:n?new JP(SL):JP.getFragmentParser(void 0,SL),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),NL(i,_L());let a=VM(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&gj(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function wL(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);let n={type:bN.CHARACTER,chars:e.value,location:RL(e)};NL(t,_L(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function OL(e,t){let n={type:bN.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:RL(e)};NL(t,_L(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kL(e,t){t.stitches=!0;let n=zL(e);`children`in e&&`children`in n&&(n.children=CL({type:`root`,children:e.children},t.options).children),AL({type:`comment`,value:{stitch:n}},t)}function AL(e,t){let n=e.value,r={type:bN.COMMENT,data:n,location:RL(e)};NL(t,_L(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function jL(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,PL(t,_L(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(bL,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function ML(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))kL(n,t);else{let e=``;throw xL.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function NL(e,t){PL(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=HN.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function PL(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function FL(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===HN.PLAINTEXT)return;NL(t,_L(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:RM.html;i===RM.html&&n===`svg`&&(i=RM.svg);let a=eN({...e,children:[]},{space:i===RM.svg?`svg`:`html`}),o={type:bN.START_TAG,tagName:n,tagID:zN(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:RL(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function IL(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&uN.includes(n)||t.parser.tokenizer.state===HN.PLAINTEXT)return;NL(t,gL(e));let r={type:bN.END_TAG,tagName:n,tagID:zN(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:RL(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===HN.RCDATA||t.parser.tokenizer.state===HN.RAWTEXT||t.parser.tokenizer.state===HN.SCRIPT_DATA)&&(t.parser.tokenizer.state=HN.DATA)}function LL(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function RL(e){let t=_L(e)||{line:void 0,column:void 0,offset:void 0},n=gL(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function zL(e){return`children`in e?zj({...e,children:[]}):zj(e)}function BL(e){return function(t,n){return CL(t,{...e,file:n})}}var VL=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],HL={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...VL,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...VL],h2:[[`className`,`sr-only`]],img:[...VL,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...VL,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...VL],table:[...VL],ul:[...VL,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},UL={}.hasOwnProperty;function WL(e,t){let n={type:`root`,children:[]},r=GL({schema:t?{...HL,...t}:HL,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function GL(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return KL(e,n);case`doctype`:return qL(e,n);case`element`:return JL(e,n);case`root`:return YL(e,n);case`text`:return XL(e,n);default:}}}function KL(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return rR(r,t),r}}function qL(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return rR(e,t),e}}function JL(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=ZL(e,t.children),i=QL(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&UL.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function aR(e){return function(t){return WL(t,e)}}function oR(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var sR=yR(/[A-Za-z]/),cR=yR(/[\dA-Za-z]/),lR=yR(/[#-'*+\--9=?A-Z^-~]/);function uR(e){return e!==null&&(e<32||e===127)}var dR=yR(/\d/),fR=yR(/[\dA-Fa-f]/),pR=yR(/[!-/:-@[-`{-~]/);function mR(e){return e!==null&&e<-2}function hR(e){return e!==null&&(e<0||e===32)}function gR(e){return e===-2||e===-1||e===32}var _R=yR(/\p{P}|\p{S}/u),vR=yR(/\s/);function yR(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function bR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function xR(e,t,n){let r=ij((n||{}).ignore||[]),i=SR(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=oR(e,`(`),a=oR(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function BR(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||vR(n)||_R(n))&&(!t||n!==47)}function VR(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}ZR.peek=XR;function HR(){this.buffer()}function UR(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function WR(){this.buffer()}function GR(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function KR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=VR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qR(e){this.exit(e)}function JR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=VR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function YR(e){this.exit(e)}function XR(){return`[`}function ZR(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function QR(){return{enter:{gfmFootnoteCallString:HR,gfmFootnoteCall:UR,gfmFootnoteDefinitionLabelString:WR,gfmFootnoteDefinition:GR},exit:{gfmFootnoteCallString:KR,gfmFootnoteCall:qR,gfmFootnoteDefinitionLabelString:JR,gfmFootnoteDefinition:YR}}}function $R(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ZR},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?tz:ez))),s(),o}}function ez(e,t,n){return t===0?e:tz(e,t,n)}function tz(e,t,n){return(n?``:` `)+e}var nz=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];sz.peek=cz;function rz(){return{canContainEols:[`delete`],enter:{strikethrough:az},exit:{strikethrough:oz}}}function iz(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:nz}],handlers:{delete:sz}}}function az(e){this.enter({type:`delete`,children:[]},e)}function oz(e){this.exit(e)}function sz(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function cz(){return`~`}function lz(e){return e.length}function uz(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||lz,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),mz);return i(),o}function mz(e,t,n){return`>`+(n?``:` `)+e}function hz(e,t){return gz(e,t.inConstruct,!0)&&!gz(e,t.notInConstruct,!1)}function gz(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function yz(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bz(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xz(e,t,n,r){let i=bz(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(yz(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Sz);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(vz(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`,encode:["`"],...s.current()})),t()}return u+=s.move(` +`),a&&(u+=s.move(a+` +`)),u+=s.move(c),l(),u}function Sz(e,t,n){return(n?``:` `)+e}function Cz(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wz(e,t,n,r){let i=Cz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Tz(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ez(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Dz(e){if(e===null||hR(e)||vR(e))return 1;if(_R(e))return 2}function Oz(e,t,n){let r=Dz(e),i=Dz(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}kz.peek=Az;function kz(e,t,n,r){let i=Tz(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Oz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ez(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Oz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ez(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Az(e,t,n){return n.options.emphasis||`*`}var jz={};function Mz(e,t){let n=t||jz;return Nz(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Nz(e,t,n){if(Fz(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Pz(e.children,t,n)}return Array.isArray(e)?Pz(e,t,n):``}function Pz(e,t,n){let r=[],i=-1;for(;++i`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Vz(){return`!`}Hz.peek=Uz;function Hz(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Uz(){return`!`}Wz.peek=Gz;function Wz(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}qz.peek=Jz;function qz(e,t,n,r){let i=Cz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Kz(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Jz(e,t,n){return Kz(e,n)?`<`:`[`}Yz.peek=Xz;function Yz(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Xz(){return`[`}function Zz(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Qz(e){let t=Zz(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function $z(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function eB(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function tB(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?$z(n):Zz(n),s=e.ordered?o===`.`?`)`:`.`:Qz(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),eB(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function iB(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var aB=ij([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function oB(e,t,n,r){return(e.children.some(function(e){return aB(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function sB(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}cB.peek=lB;function cB(e,t,n,r){let i=sB(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Oz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ez(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Oz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ez(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function lB(e,t,n){return n.options.strong||`*`}function uB(e,t,n,r){return n.safe(e.value,r)}function dB(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function fB(e,t,n){let r=(eB(n)+(n.options.ruleSpaces?` `:``)).repeat(dB(n));return n.options.ruleSpaces?r.slice(0,-1):r}var pB={blockquote:pz,break:_z,code:xz,definition:wz,emphasis:kz,hardBreak:_z,heading:Lz,html:Rz,image:Bz,imageReference:Hz,inlineCode:Wz,link:qz,linkReference:Yz,list:tB,listItem:rB,paragraph:iB,root:oB,strong:cB,text:uB,thematicBreak:fB},mB=document.createElement(`i`);function hB(e){let t=`&`+e+`;`;mB.innerHTML=t;let n=mB.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function gB(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var _B=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vB(e){return e.replace(_B,yB)}function yB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return gB(n.slice(t?2:1),t?16:10)}return hB(n)||e}function bB(){return{enter:{table:xB,tableData:TB,tableHeader:TB,tableRow:CB},exit:{codeText:EB,table:SB,tableData:wB,tableHeader:wB,tableRow:wB}}}function xB(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function SB(e){this.exit(e),this.data.inTable=void 0}function CB(e){this.enter({type:`tableRow`,children:[]},e)}function wB(e){this.exit(e)}function TB(e){this.enter({type:`tableCell`,children:[]},e)}function EB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DB));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DB(e,t){return t===`|`?t:e}function OB(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return uz(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++ii?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(IB(e,e.length,0,t),e):t}var RB={}.hasOwnProperty;function zB(e){let t={},n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function fV(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function pV(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};_V(d,-c),_V(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=LB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=LB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=LB(l,pV(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=LB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=LB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,IB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&gR(t)?bV(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||mR(t)?e.check(jV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||mR(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),gR(t)?bV(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),gR(t)?bV(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||mR(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function PV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var FV={name:`codeIndented`,tokenize:LV},IV={partial:!0,tokenize:RV};function LV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),bV(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):mR(t)?e.attempt(IV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||mR(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function RV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):mR(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):bV(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):mR(e)?i(e):n(e)}}var zV={name:`codeText`,previous:VV,resolve:BV,tokenize:HV};function BV(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&WV(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),WV(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),WV(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function QV(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||uR(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||mR(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||hR(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):mR(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||mR(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!gR(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function eH(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):mR(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bV(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||mR(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function tH(e,t){let n;return r;function r(i){return mR(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):gR(i)?bV(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var nH={name:`definition`,tokenize:iH},rH={partial:!0,tokenize:aH};function iH(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return $V.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=VR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return hR(t)?tH(e,l)(t):l(t)}function l(t){return QV(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(rH,d,d)(t)}function d(t){return gR(t)?bV(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||mR(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function aH(e,t,n){return r;function r(t){return hR(t)?tH(e,i)(t):n(t)}function i(t){return eH(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return gR(t)?bV(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||mR(e)?t(e):n(e)}}var oH={name:`hardBreakEscape`,tokenize:sH};function sH(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return mR(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var cH={name:`headingAtx`,resolve:lH,tokenize:uH};function lH(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},IB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function uH(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||hR(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||mR(n)?(e.exit(`atxHeading`),t(n)):gR(n)?bV(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||hR(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var dH=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),fH=[`pre`,`script`,`style`,`textarea`],pH={concrete:!0,name:`htmlFlow`,resolveTo:gH,tokenize:_H},mH={partial:!0,tokenize:yH},hH={partial:!0,tokenize:vH};function gH(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _H(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:O):sR(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):sR(a)?(e.consume(a),i=4,r.interrupt?t:O):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:O):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:ne:m):n(i)}function h(t){return sR(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||hR(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&fH.includes(l)?(i=1,r.interrupt?t(s):ne(s)):dH.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):ne(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||cR(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:ne):n(i)}function v(t){return gR(t)?(e.consume(t),v):ee(t)}function y(t){return t===47?(e.consume(t),ee):t===58||t===95||sR(t)?(e.consume(t),b):gR(t)?(e.consume(t),y):ee(t)}function b(t){return t===45||t===46||t===58||t===95||cR(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):gR(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):gR(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||mR(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||hR(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||gR(e)?y(e):n(e)}function ee(t){return t===62?(e.consume(t),te):n(t)}function te(t){return t===null||mR(t)?ne(t):gR(t)?(e.consume(t),te):n(t)}function ne(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),O):t===93&&i===5?(e.consume(t),se):mR(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(mH,le,E)(t)):t===null||mR(t)?(e.exit(`htmlFlowData`),E(t)):(e.consume(t),ne)}function E(t){return e.check(hH,D,le)(t)}function D(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||mR(t)?E(t):(e.enter(`htmlFlowData`),ne(t))}function ie(t){return t===45?(e.consume(t),O):ne(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):ne(t)}function oe(t){if(t===62){let n=o.toLowerCase();return fH.includes(n)?(e.consume(t),ce):ne(t)}return sR(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):ne(t)}function se(t){return t===93?(e.consume(t),O):ne(t)}function O(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),O):ne(t)}function ce(t){return t===null||mR(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function vH(e,t,n){let r=this;return i;function i(t){return mR(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function yH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(xV,t,n)}}var bH={name:`htmlText`,tokenize:xH};function xH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):sR(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):sR(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):mR(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):mR(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):mR(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):mR(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return sR(t)?(e.consume(t),S):n(t)}function S(t){return t===45||cR(t)?(e.consume(t),S):C(t)}function C(t){return mR(t)?(o=C,ae(t)):gR(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||cR(t)?(e.consume(t),w):t===47||t===62||hR(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||sR(t)?(e.consume(t),ee):mR(t)?(o=T,ae(t)):gR(t)?(e.consume(t),T):ie(t)}function ee(t){return t===45||t===46||t===58||t===95||cR(t)?(e.consume(t),ee):te(t)}function te(t){return t===61?(e.consume(t),ne):mR(t)?(o=te,ae(t)):gR(t)?(e.consume(t),te):T(t)}function ne(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,E):mR(t)?(o=ne,ae(t)):gR(t)?(e.consume(t),ne):(e.consume(t),D)}function E(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):mR(t)?(o=E,ae(t)):(e.consume(t),E)}function D(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||hR(t)?T(t):(e.consume(t),D)}function re(e){return e===47||e===62||hR(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return gR(t)?bV(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var SH={name:`labelEnd`,resolveAll:EH,resolveTo:DH,tokenize:OH},CH={tokenize:kH},wH={tokenize:AH},TH={tokenize:jH};function EH(e){let t=-1,n=[];for(;++t=3&&(a===null||mR(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),gR(t)?bV(e,s,`whitespace`)(t):s(t))}}var BH={continuation:{tokenize:WH},exit:KH,name:`list`,tokenize:UH},VH={partial:!0,tokenize:qH},HH={partial:!0,tokenize:GH};function UH(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:dR(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(RH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return dR(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(xV,r.interrupt?n:u,e.attempt(VH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return gR(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function WH(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(xV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bV(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!gR(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(HH,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,bV(e,e.attempt(BH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function GH(e,t,n){let r=this;return bV(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function KH(e){e.exit(this.containerState.type)}function qH(e,t,n){let r=this;return bV(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!gR(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var JH={name:`setextUnderline`,resolveTo:YH,tokenize:XH};function YH(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function XH(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),gR(t)?bV(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||mR(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ZH={tokenize:aU,partial:!0};function QH(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:nU,continuation:{tokenize:rU},exit:iU}},text:{91:{name:`gfmFootnoteCall`,tokenize:tU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:$H,resolveTo:eU}}}}function $H(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=VR(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function eU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function tU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||hR(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(VR(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return hR(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function nU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||hR(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=VR(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return hR(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bV(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function rU(e,t,n){return e.check(xV,t,e.attempt(ZH,t,n))}function iU(e){e.exit(`gfmFootnoteDefinition`)}function aU(e,t,n){let r=this;return bV(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function oU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Dz(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var sU=class{constructor(){this.map=[]}add(e,t,n){cU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function cU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):mR(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):gR(t)?bV(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||hR(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,gR(t)?bV(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return gR(t)?bV(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||mR(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return gR(t)?bV(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||mR(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||mR(n)?(e.exit(`tableRow`),t(n)):gR(n)?bV(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||hR(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function fU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new sU;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},hU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function mU(e,t,n,r,i){let a=[],o=hU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function hU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var gU={name:`tasklistCheck`,tokenize:vU};function _U(){return{text:{91:gU}}}function vU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return hR(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return mR(r)?t(r):gR(r)?e.check({tokenize:yU},t,n)(r):n(r)}}function yU(e,t,n){return bV(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function bU(e){return zB([ZB(),QH(),oU(e),uU(),_U()])}var xU={};function SU(e){let t=this,n=e||xU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(bU(n)),a.push(PB()),o.push(FB(n))}var CU=Object.defineProperty,wU=Object.defineProperties,TU=Object.getOwnPropertyDescriptors,EU=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,OU=Object.prototype.propertyIsEnumerable,kU=(e,t,n)=>t in e?CU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AU=(e,t)=>{for(var n in t||={})DU.call(t,n)&&kU(e,n,t[n]);if(EU)for(var n of EU(t))OU.call(t,n)&&kU(e,n,t[n]);return e},jU=(e,t)=>wU(e,TU(t)),MU=(e,t)=>{let n=!1,r=!1;for(let i=0;i{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},PU=e=>{let t=0;for(let n=0;n{let n=!1,r=!1,i=-1;for(let a=0;a(=?\s*[$]?\d)/gm,LU=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(IU,(t,n,r,i)=>MU(e,i)?t:`${n}\\>${r}`),RU=/(\*\*)([^*]*\*?)$/,zU=/(__)([^_]*?)$/,BU=/(\*\*\*)([^*]*?)$/,VU=/(\*)([^*]*?)$/,HU=/(_)([^_]*?)$/,UU=/(`)([^`]*?)$/,WU=/(~~)([^~]*?)$/,GU=/^[\s_~*`]*$/,KU=/^[\s]*[-*+][\s]+$/,qU=/[\p{L}\p{N}_]/u,JU=/^```[^`\n]*```?$/,YU=/^\*{4,}$/,XU=/(__)([^_]+)_$/,ZU=/(~~)([^~]+)~$/,QU=/~~/g,$U=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:qU.test(e)},eW=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},tW=(e,t)=>{let n=1;for(let r=t+1;r{let n=!1,r=!1;for(let i=0;i{for(let n=t;n{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?rW(e,t):!1;if(e[n]===` +`)return!1}return!1},aW=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===` +`)return!1}return!1},oW=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===` +`){r=n+1;break}let i=e.length;for(let n=t;n=3&&!s},sW=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&nW(e,t)?!0:n!==`*`&&r===`*`?(t{let t=0,n=!1,r=e.length;for(let i=0;i0?e[i-1]:``,o=i!!(n===`\\`||e.includes(`$`)&&nW(e,t)||iW(e,t)||aW(e,t)||n===`_`||r===`_`||n&&r&&$U(n)&&$U(r)),uW=e=>{let t=0,n=!1,r=e.length;for(let i=0;i0?e[i-1]:``,o=i{let t=0,n=0,r=!1;for(let i=0;i=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},fW=e=>{let t=0,n=!1;for(let r=0;r{let t=0,n=!1;for(let r=0;r{if(!t||GU.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return KU.test(a)&&t.includes(` +`)?!0:oW(e,n,`*`)},hW=e=>{let t=e.match(RU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return MU(e,r)||FU(e,r)||mW(e,n,r)?e:fW(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},gW=(e,t,n)=>{if(!t||GU.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return KU.test(a)&&t.includes(` +`)?!0:oW(e,n,`_`)},_W=e=>{let t=e.match(zU);if(!t){let t=e.match(XU);if(t){let n=e.lastIndexOf(t[1]);if(!(MU(e,n)||FU(e,n))&&pW(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return MU(e,r)||FU(e,r)||gW(e,n,r)?e:pW(e)%2==1?`${e}__`:e},vW=e=>{let t=!1;for(let n=0;n0?e[n-1]:``,r=n{if(!e.match(VU))return e;let t=vW(e);if(t===-1||MU(e,t)||FU(e,t))return e;let n=e.substring(t+1);return!n||GU.test(n)?e:cW(e)%2==1?`${e}*`:e},bW=e=>{let t=!1;for(let n=0;n0?e[n-1]:``,r=n{let t=e.length;for(;t>0&&e[t-1]===` +`;)--t;return t{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(fW(t)%2!=1)return null;let n=t.indexOf(`**`),r=bW(t);return n!==-1&&r!==-1&&n{if(!e.match(HU))return e;let t=bW(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||GU.test(n)||MU(e,t)||FU(e,t))return e;if(uW(e)%2==1){let t=SW(e);return t===null?xW(e):t}return e},wW=e=>{let t=fW(e),n=cW(e);return t%2==0&&n%2==0},TW=(e,t,n)=>!t||GU.test(t)||MU(e,n)||FU(e,n)?!0:oW(e,n,`*`),EW=e=>{if(YU.test(e))return e;let t=e.match(BU);if(!t)return e;let n=t[2];return TW(e,n,e.lastIndexOf(t[1]))?e:dW(e)%2==1?wW(e)?e:`${e}***`:e},DW=/<[a-zA-Z/][^>]*$/,OW=e=>{let t=e.match(DW);return!t||t.index===void 0||MU(e,t.index)?e:e.substring(0,t.index).trimEnd()},kW=e=>!e.match(JU)||e.includes(` +`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,AW=e=>(e.match(/```/g)||[]).length%2==1,jW=e=>{let t=kW(e);if(t!==null)return t;let n=e.match(UU);if(n&&!AW(e)){let t=n[2];if(!t||GU.test(t))return e;if(PU(e)%2==1)return`${e}\``}return e},MW=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",NW=e=>{let t=0,n=!1;for(let r=0;r{let t=0,n=!1;for(let r=0;r{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(` +`,t)!==-1&&!e.endsWith(` +`)?`${e} +$$`:`${e}$$`},IW=e=>NW(e)%2==0?e:FW(e),LW=e=>PW(e)%2==1?`${e}$`:e,RW=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=eW(e,t);if(r===-1||MU(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},zW=(e,t)=>{for(let n=0;n0&&e[n-1]===`!`)continue;let t=tW(e,n);if(t===-1)return n;if(t+1{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=zW(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(tW(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=zW(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},VW=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!MU(e,n)){let r=RW(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!MU(e,n)){let r=BW(e,n,t);if(r!==null)return r}return e},HW=/^-{1,2}$/,UW=/^[\s]*-{1,2}[\s]+$/,WW=/^={1,2}$/,GW=/^[\s]*={1,2}[\s]+$/,KW=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(` +`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(HW.test(i)&&!n.match(UW)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(WW.test(i)&&!n.match(GW)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},qW=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),JW=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(qW,(t,n)=>MU(e,n)?t:`\\~`),YW=e=>{let t=e.match(WU);if(t){let n=t[2];if(!n||GU.test(n))return e;let r=e.lastIndexOf(t[1]);if(MU(e,r)||FU(e,r))return e;if(e.match(QU)?.length%2==1)return`${e}~~`}else{let t=e.match(ZU);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(MU(e,n)||FU(e,n))return e;if(e.match(QU)?.length%2==1)return`${e}~`}}return e},XW=e=>e!==!1,ZW=e=>e===!0,QW={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},$W=[{handler:{name:`singleTilde`,handle:JW,priority:QW.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:LU,priority:QW.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:OW,priority:QW.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:KW,priority:QW.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:VW,priority:QW.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:EW,priority:QW.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:hW,priority:QW.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:_W,priority:QW.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:yW,priority:QW.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:CW,priority:QW.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:jW,priority:QW.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:YW,priority:QW.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:IW,priority:QW.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:LW,priority:QW.INLINE_KATEX},optionKey:`inlineKatex`}],eG=e=>{let t=e?.linkMode??`protocol`;return $W.filter(({handler:t,optionKey:n})=>t.name===`links`?XW(e?.links)||XW(e?.images):t.name===`inlineKatex`?ZW(e?.inlineKatex):XW(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:jU(AU({},e),{handle:e=>VW(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},tG=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=eG(t),i=(t?.handlers??[]).map(e=>({handler:jU(AU({},e),{priority:e.priority??QW.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function nG(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),oG=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sG=`-`,cG=[],lG=`arbitrary..`,uG=e=>{let t=pG(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return fG(e);let n=e.split(sG);return dG(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?iG(i,t):t:i||cG}return n[e]||cG}}},dG=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=dG(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(sG):e.slice(t).join(sG),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?lG+r:void 0})(),pG=e=>{let{theme:t,classGroups:n}=e;return mG(n,t)},mG=(e,t)=>{let n=oG();for(let r in e){let i=e[r];hG(i,n,r,t)}return n},hG=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){_G(e,t,n);return}if(typeof e==`function`){vG(e,t,n,r);return}yG(e,t,n,r)},_G=(e,t,n)=>{let r=e===``?t:bG(t,e);r.classGroupId=n},vG=(e,t,n,r)=>{if(xG(e)){hG(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(aG(n,e))},yG=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(sG),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,SG=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},CG=`!`,wG=`:`,TG=[],EG=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),DG=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;si?a-i:void 0;return EG(t,l,c,u)};if(t){let e=t+wG,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):EG(TG,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},OG=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},kG=e=>({cache:SG(e.cacheSize),parseClassName:DG(e),sortModifiers:OG(e),...uG(e)}),AG=/\s+/,jG=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(AG),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+CG:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e0?` `+c:c)}return c},MG=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=kG(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=jG(e,n);return i(e,a),a};return a=o,(...e)=>a(MG(...e))},FG=[],IG=e=>{let t=t=>t[e]||FG;return t.isThemeGetter=!0,t},LG=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RG=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zG=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VG=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,GG=e=>zG.test(e),KG=e=>!!e&&!Number.isNaN(Number(e)),qG=e=>!!e&&Number.isInteger(Number(e)),JG=e=>e.endsWith(`%`)&&KG(e.slice(0,-1)),YG=e=>BG.test(e),XG=()=>!0,ZG=e=>VG.test(e)&&!HG.test(e),QG=()=>!1,$G=e=>UG.test(e),eK=e=>WG.test(e),tK=e=>!rK(e)&&!dK(e),nK=e=>yK(e,CK,QG),rK=e=>LG.test(e),iK=e=>yK(e,wK,ZG),aK=e=>yK(e,TK,KG),oK=e=>yK(e,DK,XG),sK=e=>yK(e,EK,QG),cK=e=>yK(e,xK,QG),lK=e=>yK(e,SK,eK),uK=e=>yK(e,OK,$G),dK=e=>RG.test(e),fK=e=>bK(e,wK),pK=e=>bK(e,EK),mK=e=>bK(e,xK),hK=e=>bK(e,CK),gK=e=>bK(e,SK),_K=e=>bK(e,OK,!0),vK=e=>bK(e,DK,!0),yK=(e,t,n)=>{let r=LG.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},bK=(e,t,n=!1)=>{let r=RG.exec(e);return r?r[1]?t(r[1]):n:!1},xK=e=>e===`position`||e===`percentage`,SK=e=>e===`image`||e===`url`,CK=e=>e===`length`||e===`size`||e===`bg-size`,wK=e=>e===`length`,TK=e=>e===`number`,EK=e=>e===`family-name`,DK=e=>e===`number`||e===`weight`,OK=e=>e===`shadow`,kK=PG(()=>{let e=IG(`color`),t=IG(`font`),n=IG(`text`),r=IG(`font-weight`),i=IG(`tracking`),a=IG(`leading`),o=IG(`breakpoint`),s=IG(`container`),c=IG(`spacing`),l=IG(`radius`),u=IG(`shadow`),d=IG(`inset-shadow`),f=IG(`text-shadow`),p=IG(`drop-shadow`),m=IG(`blur`),h=IG(`perspective`),g=IG(`aspect`),_=IG(`ease`),v=IG(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),dK,rK],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[dK,rK,c],T=()=>[GG,`full`,`auto`,...w()],ee=()=>[qG,`none`,`subgrid`,dK,rK],te=()=>[`auto`,{span:[`full`,qG,dK,rK]},qG,dK,rK],ne=()=>[qG,`auto`,dK,rK],E=()=>[`auto`,`min`,`max`,`fr`,dK,rK],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],ae=()=>[GG,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[GG,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],se=()=>[GG,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],O=()=>[e,dK,rK],ce=()=>[...b(),mK,cK,{position:[dK,rK]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,hK,nK,{size:[dK,rK]}],de=()=>[JG,fK,iK],fe=()=>[``,`none`,`full`,l,dK,rK],pe=()=>[``,KG,fK,iK],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ge=()=>[KG,JG,mK,cK],_e=()=>[``,`none`,m,dK,rK],ve=()=>[`none`,KG,dK,rK],ye=()=>[`none`,KG,dK,rK],be=()=>[KG,dK,rK],xe=()=>[GG,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[YG],breakpoint:[YG],color:[XG],container:[YG],"drop-shadow":[YG],ease:[`in`,`out`,`in-out`],font:[tK],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[YG],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[YG],shadow:[YG],spacing:[`px`,KG],text:[YG],"text-shadow":[YG],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,GG,rK,dK,g]}],container:[`container`],columns:[{columns:[KG,rK,dK,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[qG,`auto`,dK,rK]}],basis:[{basis:[GG,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[KG,GG,`auto`,`initial`,`none`,rK]}],grow:[{grow:[``,KG,dK,rK]}],shrink:[{shrink:[``,KG,dK,rK]}],order:[{order:[qG,`first`,`last`,`none`,dK,rK]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,fK,iK]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,vK,oK]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,JG,rK]}],"font-family":[{font:[pK,sK,t]}],"font-features":[{"font-features":[rK]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,dK,rK]}],"line-clamp":[{"line-clamp":[KG,`none`,dK,aK]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,dK,rK]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,dK,rK]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[KG,`from-font`,`auto`,dK,iK]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[KG,`auto`,dK,rK]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,dK,rK]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,dK,rK]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},qG,dK,rK],radial:[``,dK,rK],conic:[qG,dK,rK]},gK,lK]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[KG,dK,rK]}],"outline-w":[{outline:[``,KG,fK,iK]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`none`,u,_K,uK]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,_K,uK]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[KG,iK]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,_K,uK]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[KG,dK,rK]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[KG]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[dK,rK]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[KG]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,dK,rK]}],filter:[{filter:[``,`none`,dK,rK]}],blur:[{blur:_e()}],brightness:[{brightness:[KG,dK,rK]}],contrast:[{contrast:[KG,dK,rK]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,_K,uK]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:[``,KG,dK,rK]}],"hue-rotate":[{"hue-rotate":[KG,dK,rK]}],invert:[{invert:[``,KG,dK,rK]}],saturate:[{saturate:[KG,dK,rK]}],sepia:[{sepia:[``,KG,dK,rK]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,dK,rK]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[KG,dK,rK]}],"backdrop-contrast":[{"backdrop-contrast":[KG,dK,rK]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,KG,dK,rK]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[KG,dK,rK]}],"backdrop-invert":[{"backdrop-invert":[``,KG,dK,rK]}],"backdrop-opacity":[{"backdrop-opacity":[KG,dK,rK]}],"backdrop-saturate":[{"backdrop-saturate":[KG,dK,rK]}],"backdrop-sepia":[{"backdrop-sepia":[``,KG,dK,rK]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,dK,rK]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[KG,`initial`,dK,rK]}],ease:[{ease:[`linear`,`initial`,_,dK,rK]}],delay:[{delay:[KG,dK,rK]}],animate:[{animate:[`none`,v,dK,rK]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,dK,rK]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":[`scale-3d`],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[dK,rK,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":[`translate-none`],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,dK,rK]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,dK,rK]}],fill:[{fill:[`none`,...O()]}],"stroke-w":[{stroke:[KG,fK,iK,aK]}],stroke:[{stroke:[`none`,...O()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),AK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MK={};function NK(e,t){return((t||MK).jsx?jK:AK).test(e)}var PK=/[ \t\n\f\r]/g;function FK(e){return typeof e==`object`?e.type===`text`?IK(e.value):!1:IK(e)}function IK(e){return e.replace(PK,``)===``}var LK=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=` +`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function ee(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function te(){var e=[];w(e);for(var t;t=ee();)t!==!1&&(e.push(t),w(e));return e}return C(),te()}function _(e){return e?e.replace(l,p):p}t.exports=g})),RK=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(LK());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),zK=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),BK=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(RK()),r=zK();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function VK(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?UK(e.position):`start`in e||`end`in e?UK(e):`line`in e||`column`in e?HK(e):``}function HK(e){return WK(e&&e.line)+`:`+WK(e&&e.column)}function UK(e){return HK(e&&e.start)+`-`+HK(e&&e.end)}function WK(e){return e&&typeof e==`number`?e:1}var GK=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=VK(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};GK.prototype.file=``,GK.prototype.name=``,GK.prototype.reason=``,GK.prototype.message=``,GK.prototype.stack=``,GK.prototype.column=void 0,GK.prototype.line=void 0,GK.prototype.ancestors=void 0,GK.prototype.cause=void 0,GK.prototype.fatal=void 0,GK.prototype.place=void 0,GK.prototype.ruleId=void 0,GK.prototype.source=void 0;var KK=l(BK(),1),qK={}.hasOwnProperty,JK=new Map,YK=/[A-Z]/g,XK=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ZK=new Set([`td`,`th`]),QK=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function $K(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=uq(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=lq(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?yM:vM,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=eq(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function eq(e,t,n){if(t.type===`element`)return tq(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return nq(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return iq(e,t,n);if(t.type===`mdxjsEsm`)return rq(e,t);if(t.type===`root`)return aq(e,t,n);if(t.type===`text`)return oq(e,t)}function tq(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=yM,e.schema=i),e.ancestors.push(t);let a=gq(e,t.tagName,!1),o=dq(e,t),s=pq(e,t);return XK.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!FK(e):!0})),sq(e,o,a,t),cq(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nq(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}_q(e,t.position)}function rq(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_q(e,t.position)}function iq(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=yM,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:gq(e,t.name,!0),o=fq(e,t),s=pq(e,t);return sq(e,o,a,t),cq(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function aq(e,t,n){let r={};return cq(r,pq(e,t)),e.create(t,e.Fragment,r,n)}function oq(e,t){return t.value}function sq(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function cq(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function lq(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function uq(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_L(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function dq(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&qK.call(t.properties,i)){let a=mq(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ZK.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function fq(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else _q(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else _q(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function pq(e,t){let n=[],r=-1,i=e.passKeys?new Map:JK;for(;++ro))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Dq(e,t,n){return bV(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Oq={tokenize:kq};function kq(e){let t=this,n=e.attempt(xV,r,e.attempt(this.parser.constructs.flowInitial,i,bV(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qV,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Aq={resolveAll:Pq()},jq=Nq(`string`),Mq=Nq(`text`);function Nq(e){return{resolveAll:Pq(e===`text`?Fq:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iWq,contentInitial:()=>Rq,disable:()=>Gq,document:()=>Lq,flow:()=>Bq,flowInitial:()=>zq,insideSpan:()=>Uq,string:()=>Vq,text:()=>Hq}),Lq={42:BH,43:BH,45:BH,48:BH,49:BH,50:BH,51:BH,52:BH,53:BH,54:BH,55:BH,56:BH,57:BH,62:CV},Rq={91:nH},zq={[-2]:FV,[-1]:FV,32:FV},Bq={35:cH,42:RH,45:[JH,RH],60:pH,61:JH,95:RH,96:MV,126:MV},Vq={38:kV,92:DV},Hq={[-5]:IH,[-4]:IH,[-3]:IH,33:MH,38:kV,42:mV,60:[vV,bH],91:PH,92:[oH,DV],93:SH,95:mV,96:zV},Uq={null:[mV,Aq]},Wq={null:[42,95]},Gq={null:[]};function Kq(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=LB(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=pV(a,l.events,l),l.events):[]}function f(e,t){return Jq(p(e),t)}function p(e){return qq(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,ee()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Jq(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||aJ).call(a,void 0,e[0])}for(r.position={start:nJ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nJ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function uJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=fV(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function pJ(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hJ(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function gJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hJ(e,t);let i={src:fV(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function _J(e,t){let n={src:fV(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vJ(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hJ(e,t);let i={href:fV(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bJ(e,t){let n={href:fV(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xJ(e,t,n){let r=e.all(t),i=n?SJ(n):CJ(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function wJ(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_L(t.children[1]),o=gL(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function kJ(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(PJ(t.slice(i),i>0,!1)),a.join(``)}function PJ(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===jJ||t===MJ;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===jJ||t===MJ;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function FJ(e,t){let n={type:`text`,value:NJ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IJ(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var LJ={blockquote:sJ,break:cJ,code:lJ,delete:uJ,emphasis:dJ,footnoteReference:fJ,heading:pJ,html:mJ,imageReference:gJ,image:_J,inlineCode:vJ,linkReference:yJ,link:bJ,listItem:xJ,list:wJ,paragraph:TJ,root:EJ,strong:DJ,table:OJ,tableCell:AJ,tableRow:kJ,text:FJ,thematicBreak:IJ,toml:RJ,yaml:RJ,definition:RJ,footnoteDefinition:RJ};function RJ(){}function zJ(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function BJ(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function VJ(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||zJ,r=e.options.footnoteBackLabel||BJ,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...zj(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` +`}]}}var HJ={}.hasOwnProperty,UJ={};function WJ(e,t){let n=t||UJ,r=new Map,i=new Map,a={all:s,applyData:KJ,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...LJ,...n.handlers},one:o,options:n,patch:GJ,wrap:JJ};return gj(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(HJ.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=zj(n);return r.children=a.all(e),r}return zj(e)}return(a.options.unknownHandler||qJ)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r0&&n.push({type:`text`,value:` +`}),n}function YJ(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function XJ(e,t){let n=WJ(e,t),r=n.one(e,void 0),i=VJ(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function ZJ(e,t){return e&&`run`in e?async function(n,r){let i=XJ(n,{file:r,...t});await e.run(i,r)}:function(n,r){return XJ(n,{file:r,...e||t})}}function QJ(e){if(e)throw e}var $J=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var rY={basename:iY,dirname:aY,extname:oY,join:sY,sep:`/`};function iY(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);uY(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function aY(e){if(uY(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function oY(e){uY(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function sY(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function lY(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function uY(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var dY={cwd:fY};function fY(){return`/`}function pY(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function mY(e){if(typeof e==`string`)e=new URL(e);else if(!pY(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return hY(e)}function hY(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];eY(o)&&eY(r)&&(r=(0,CY.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function EY(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function DY(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function OY(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kY(e){if(!eY(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function AY(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function jY(e){return MY(e)?e:new _Y(e)}function MY(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function NY(e){return typeof e==`string`||PY(e)}function PY(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var FY=g();function IY(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var LY=IY();function RY(e){LY=e}var zY={exec:()=>null};function BY(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(HY.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var VY=(()=>{try{return!0}catch{return!1}})(),HY={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},UY=/^(?:[ \t]*(?:\n|$))+/,WY=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,GY=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,KY=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qY=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,JY=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,YY=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,XY=BY(YY).replace(/bull/g,JY).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(),ZY=BY(YY).replace(/bull/g,JY).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(),QY=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$Y=/^[^\n]+/,eX=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tX=BY(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,eX).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),nX=BY(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,JY).getRegex(),rX=`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`,iX=/|$))/,aX=BY(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,iX).replace(`tag`,rX).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oX=BY(QY).replace(`hr`,KY).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[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,rX).getRegex(),sX={blockquote:BY(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,oX).getRegex(),code:WY,def:tX,fences:GY,heading:qY,hr:KY,html:aX,lheading:XY,list:nX,newline:UY,paragraph:oX,table:zY,text:$Y},cX=BY(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,KY).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,rX).getRegex(),lX={...sX,lheading:ZY,table:cX,paragraph:BY(QY).replace(`hr`,KY).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,cX).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,rX).getRegex()},uX={...sX,html:BY(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,iX).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:zY,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:BY(QY).replace(`hr`,KY).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,XY).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},dX=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fX=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pX=/^( {2,}|\\)\n(?!\s*$)/,mX=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,VY?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),CX=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wX=BY(CX,`u`).replace(/punct/g,hX).getRegex(),TX=BY(CX,`u`).replace(/punct/g,yX).getRegex(),EX=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,DX=BY(EX,`gu`).replace(/notPunctSpace/g,_X).replace(/punctSpace/g,gX).replace(/punct/g,hX).getRegex(),OX=BY(EX,`gu`).replace(/notPunctSpace/g,xX).replace(/punctSpace/g,bX).replace(/punct/g,yX).getRegex(),kX=BY(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,_X).replace(/punctSpace/g,gX).replace(/punct/g,hX).getRegex(),AX=BY(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,hX).getRegex(),jX=BY(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,_X).replace(/punctSpace/g,gX).replace(/punct/g,hX).getRegex(),MX=BY(/\\(punct)/,`gu`).replace(/punct/g,hX).getRegex(),NX=BY(/^<(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(),PX=BY(iX).replace(`(?:-->|$)`,`-->`).getRegex(),FX=BY(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,PX).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),IX=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,LX=BY(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,IX).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),RX=BY(/^!?\[(label)\]\[(ref)\]/).replace(`label`,IX).replace(`ref`,eX).getRegex(),zX=BY(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,eX).getRegex(),BX=BY(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,RX).replace(`nolink`,zX).getRegex(),VX=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,HX={_backpedal:zY,anyPunctuation:MX,autolink:NX,blockSkip:SX,br:pX,code:fX,del:zY,delLDelim:zY,delRDelim:zY,emStrongLDelim:wX,emStrongRDelimAst:DX,emStrongRDelimUnd:kX,escape:dX,link:LX,nolink:zX,punctuation:vX,reflink:RX,reflinkSearch:BX,tag:FX,text:mX,url:zY},UX={...HX,link:BY(/^!?\[(label)\]\((.*?)\)/).replace(`label`,IX).getRegex(),reflink:BY(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,IX).getRegex()},WX={...HX,emStrongRDelimAst:OX,emStrongLDelim:TX,delLDelim:AX,delRDelim:jX,url:BY(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,VX).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:BY(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},YX=e=>JX[e];function XX(e,t){if(t){if(HY.escapeTest.test(e))return e.replace(HY.escapeReplace,YX)}else if(HY.escapeTestNoEncode.test(e))return e.replace(HY.escapeReplaceNoEncode,YX);return e}function ZX(e){try{e=encodeURI(e).replace(HY.percentDecode,`%`)}catch{return null}return e}function QX(e,t){let n=e.replace(HY.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(HY.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function tZ(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function nZ(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function rZ(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` +`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` +`)}var iZ=class{options;rules;lexer;constructor(e){this.options=e||LY}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:$X(e,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=rZ(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=$X(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:$X(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=$X(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=tZ(t[2].split(` +`,1)[0],t[1].length),l=e.split(` +`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` +`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(` +`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` +`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` +`+l}u=!l.trim(),r+=p+` +`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=QX(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(` +`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=$X(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=eZ(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),nZ(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return nZ(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},aZ=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||LY,this.options.tokenizer=this.options.tokenizer||new iZ,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:HY,block:KX.normal,inline:qX.normal};this.options.pedantic?(t.block=KX.pedantic,t.inline=qX.pedantic):this.options.gfm&&(t.block=KX.gfm,this.options.breaks?t.inline=qX.breaks:t.inline=qX.gfm),this.tokenizer.rules=t}static get rules(){return{block:KX,inline:qX}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(HY.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` +`)?``:` +`)+r.raw,a.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},oZ=class{options;parser;constructor(e){this.options=e||LY}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(HY.notSpaceStart)?.[0],i=e.replace(HY.endingNewline,``)+` +`;return r?`
`+(n?i:XX(i,!0))+`
+`:`
`+(n?i:XX(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return` `}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${XX(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ZX(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ZX(e);if(i===null)return XX(n);e=i;let a=`${XX(n)}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:XX(e.text)}},sZ=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},cZ=class e{options;renderer;textRenderer;constructor(e){this.options=e||LY,this.options.renderer=this.options.renderer||new oZ,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sZ}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new oZ(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new iZ(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new lZ;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];lZ.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&lZ.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return aZ.lex(e,t??this.defaults)}parser(e,t){return cZ.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?aZ.lex:aZ.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?cZ.parse:cZ.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?aZ.lex:aZ.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?cZ.parse:cZ.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+XX(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function dZ(e,t){return uZ.parse(e,t)}dZ.options=dZ.setOptions=function(e){return uZ.setOptions(e),dZ.defaults=uZ.defaults,RY(dZ.defaults),dZ},dZ.getDefaults=IY,dZ.defaults=LY,dZ.use=function(...e){return uZ.use(...e),dZ.defaults=uZ.defaults,RY(dZ.defaults),dZ},dZ.walkTokens=function(e,t){return uZ.walkTokens(e,t)},dZ.parseInline=uZ.parseInline,dZ.Parser=cZ,dZ.parser=cZ.parse,dZ.Renderer=oZ,dZ.TextRenderer=sZ,dZ.Lexer=aZ,dZ.lexer=aZ.lex,dZ.Tokenizer=iZ,dZ.Hooks=lZ,dZ.parse=dZ,dZ.options,dZ.setOptions,dZ.use,dZ.walkTokens,dZ.parseInline,cZ.parse,aZ.lex;var fZ=300,pZ=`300px`,mZ=500;function hZ(e={}){let{immediate:t=!1,debounceDelay:n=fZ,rootMargin:r=pZ,idleTimeout:i=mZ}=e,[a,o]=(0,y.useState)(!1),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(null),u=(0,y.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,y.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,y.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,y.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var gZ=/\s/,_Z=/^\s+$/,vZ=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),yZ=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,bZ=e=>e.some(e=>yZ(e)&&vZ.has(e.tagName)),xZ=e=>{let t=[],n=``,r=!1;for(let i of e){let e=gZ.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},SZ=e=>{let t=[],n=``;for(let r of e)gZ.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},CZ=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},wZ=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(bZ(t))return pj;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?SZ(c):xZ(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,_Z.test(e))return{type:`text`,value:e};let r=u>0&&te=>{let r={count:0,newIndex:0};mj(e,`text`,(e,i)=>wZ(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,`name`,{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}EZ();var DZ=(0,y.createContext)(!1),OZ=()=>(0,y.useContext)(DZ),kZ=(...e)=>kK(rG(e)),AZ=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},jZ=e=>e?(...t)=>AZ(e,kK(rG(t))):kZ,MZ=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},NZ=(0,y.createContext)(kZ),PZ=()=>(0,y.useContext)(NZ),FZ=kZ(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),IZ=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},LZ=(0,y.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=PZ(),c=(0,y.useMemo)(()=>s(FZ),[s]),l=(0,y.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,IZ(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,N.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,N.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,N.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,N.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?` +`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,N.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),RZ=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,N.jsx)(`div`,{className:PZ()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),zZ=(0,y.createContext)({code:``}),BZ=()=>(0,y.useContext)(zZ),VZ=({language:e})=>{let t=PZ();return(0,N.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,N.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},HZ=e=>{let t=e.length;for(;t>0&&e[t-1]===` +`;)t--;return e.slice(0,t)},UZ=(0,y.lazy)(()=>w(()=>import(`./highlighted-body-OFNGDK62-lF2F3Gu1.js`).then(e=>({default:e.HighlightedCodeBlockBody})),[])),WZ=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=PZ(),l=(0,y.useMemo)(()=>HZ(e),[e]),u=(0,y.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(` +`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,N.jsx)(zZ.Provider,{value:{code:e},children:(0,N.jsxs)(RZ,{isIncomplete:i,language:t,children:[(0,N.jsx)(VZ,{language:t}),r?(0,N.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,N.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,N.jsx)(y.Suspense,{fallback:(0,N.jsx)(LZ,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,N.jsx)(UZ,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},GZ={CheckIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,N.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,N.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,N.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,N.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,N.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},KZ=(0,y.createContext)(GZ),qZ=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},JZ=({icons:e,children:t})=>{let n=(0,y.useRef)(e),r=(0,y.useRef)(e?{...GZ,...e}:GZ);qZ(n.current,e)||(n.current=e,r.current=e?{...GZ,...e}:GZ);let i=r.current;return(0,N.jsx)(KZ.Provider,{value:i,children:t})},YZ=()=>(0,y.useContext)(KZ),XZ={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},ZZ=(0,y.createContext)(XZ),QZ=()=>(0,y.useContext)(ZZ),$Z=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=PZ(),[c,l]=(0,y.useState)(!1),u=(0,y.useRef)(0),{code:d}=BZ(),{isAnimating:f}=(0,y.useContext)(a1),p=QZ(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,y.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=YZ(),_=c?g.CheckIcon:g.CopyIcon;return(0,N.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,N.jsx)(_,{size:14})})},eQ={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},tQ=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=PZ(),{code:c}=BZ(),{isAnimating:l}=(0,y.useContext)(a1),u=QZ(),d=YZ(),f=a??c,p=`file.${n&&n in eQ?eQ[n]:`txt`}`,m=()=>{try{MZ(p,f,`text/plain`),e?.()}catch(e){t?.(e)}};return(0,N.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:m,title:u.downloadFile,type:`button`,...o,children:r??(0,N.jsx)(d.DownloadIcon,{size:14})})},nQ=()=>{let{Loader2Icon:e}=YZ(),t=PZ();return(0,N.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,N.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,N.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,N.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},rQ=/\.[^/.]+$/,iQ=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=YZ(),c=PZ(),l=(0,y.useRef)(null),[u,d]=(0,y.useState)(!1),[f,p]=(0,y.useState)(!1),m=QZ(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,y.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,y.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),b=(0,y.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),x=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(rQ,``)}.${i}`}MZ(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,N.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,N.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:b,onLoad:v,ref:l,src:n,...o}),_&&(0,N.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,N.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,N.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:x,title:m.downloadImage,type:`button`,children:(0,N.jsx)(s,{size:14})})]}):null},aQ=0,oQ=()=>{aQ+=1,aQ===1&&(document.body.style.overflow=`hidden`)},sQ=()=>{aQ=Math.max(0,aQ-1),aQ===0&&(document.body.style.overflow=``)},cQ=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=YZ(),c=PZ(),[l,u]=(0,y.useState)(!1),d=QZ(),f=(0,y.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,y.useCallback)(()=>{r(),n()},[r,n]);return(0,y.useEffect)(()=>{if(t){oQ();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),sQ()}}},[t,n]),t?(0,N.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,N.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,N.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,N.jsx)(s,{size:16})}),(0,N.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,N.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,N.jsx)(o,{size:20}),(0,N.jsx)(`span`,{children:d.openExternalLink})]}),(0,N.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,N.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,N.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,N.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:f,type:`button`,children:l?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(i,{size:14}),(0,N.jsx)(`span`,{children:d.copied})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{size:14}),(0,N.jsx)(`span`,{children:d.copyLink})]})}),(0,N.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:p,type:`button`,children:[(0,N.jsx)(o,{size:14}),(0,N.jsx)(`span`,{children:d.openLink})]})]})]})}):null},lQ=(0,y.createContext)(null),uQ=()=>(0,y.useContext)(lQ),dQ=()=>uQ()?.code??null,fQ=()=>uQ()?.mermaid??null,pQ=e=>{var t;let n=uQ();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},mQ=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),hQ=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=PZ(),[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(null),{isAnimating:u}=(0,y.useContext)(a1),d=YZ(),f=fQ(),p=QZ(),m=async t=>{try{if(t===`mmd`){MZ(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){MZ(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){MZ(`diagram.png`,await mQ(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,N.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,N.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,N.jsx)(d.DownloadIcon,{size:14})}),s?(0,N.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,N.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,N.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,N.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},gQ=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=YZ(),c=PZ(),[l,u]=(0,y.useState)(!1),{isAnimating:d,controls:f}=(0,y.useContext)(a1),p=QZ(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,y.useEffect)(()=>{if(l){oQ();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),sQ()}}},[l]),(0,y.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,N.jsx)(o,{size:14})}),l?(0,FY.createPortal)((0,N.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,N.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,N.jsx)(s,{size:20})}),(0,N.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,N.jsx)(l1,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},_Q=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},vQ=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===` +`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(` +`)},yQ=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===` +`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===` +`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(` +`)},bQ=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},xQ=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>bQ(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;ebQ(e)).join(` | `)} |`,i+=1;return r.join(` +`)},SQ=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=PZ(),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(!1),u=(0,y.useRef)(null),d=(0,y.useRef)(0),{isAnimating:f}=(0,y.useContext)(a1),p=QZ(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=_Q(t),o=({csv:vQ,tsv:yQ,md:xQ}[e]||xQ)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=YZ(),g=c?h.CheckIcon:h.CopyIcon;return(0,N.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,N.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,N.jsx)(g,{height:14,width:14})}),o?(0,N.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,N.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,N.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,N.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},CQ=({children:e,className:t,onDownload:n,onError:r})=>{let i=PZ(),[a,o]=(0,y.useState)(!1),s=(0,y.useRef)(null),{isAnimating:c}=(0,y.useContext)(a1),l=QZ(),u=YZ(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=_Q(t),a=e===`csv`?vQ(i):xQ(i);MZ(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,N.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,N.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,N.jsx)(u.DownloadIcon,{size:14})}),a?(0,N.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,N.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,N.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},wQ=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=YZ(),o=PZ(),[s,c]=(0,y.useState)(!1),{isAnimating:l}=(0,y.useContext)(a1),u=QZ(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,y.useEffect)(()=>{if(s){oQ();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),sQ()}}},[s]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,N.jsx)(i,{size:14})}),s?(0,FY.createPortal)((0,N.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,N.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,N.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,N.jsx)(SQ,{}):null,r?(0,N.jsx)(CQ,{}):null,(0,N.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,N.jsx)(a,{size:20})})]}),(0,N.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,N.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},TQ=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=PZ(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,N.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,N.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,N.jsx)(SQ,{}):null,l?(0,N.jsx)(CQ,{}):null,u?(0,N.jsx)(wQ,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,N.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,N.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},EQ=/startLine=(\d+)/,DQ=/\bnoLineNumbers\b/,OQ=(0,y.lazy)(()=>w(()=>import(`./mermaid-GHXKKRXX-dk87-UBJ.js`).then(e=>({default:e.Mermaid})),[])),kQ=/language-([^\s]+)/;function AQ(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function jQ(e,t){return e.className===t.className&&AQ(e.node,t.node)}var MQ=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,NQ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},PQ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},FQ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},IQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`ol`,{className:PZ()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>jQ(e,t));IQ.displayName=`MarkdownOl`;var LQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`li`,{className:PZ()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&AQ(e.node,t.node));LQ.displayName=`MarkdownLi`;var RQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`ul`,{className:PZ()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>jQ(e,t));RQ.displayName=`MarkdownUl`;var zQ=(0,y.memo)(({className:e,node:t,...n})=>(0,N.jsx)(`hr`,{className:PZ()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>jQ(e,t));zQ.displayName=`MarkdownHr`;var BQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`span`,{className:PZ()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>jQ(e,t));BQ.displayName=`MarkdownStrong`;var VQ=(0,y.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=PZ(),{linkSafety:o}=(0,y.useContext)(a1),[s,c]=(0,y.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,y.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,y.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,y.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,N.jsx)(cQ,{...p})]}):(0,N.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>jQ(e,t)&&e.href===t.href);VQ.displayName=`MarkdownA`;var HQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h1`,{className:PZ()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>jQ(e,t));HQ.displayName=`MarkdownH1`;var UQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h2`,{className:PZ()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>jQ(e,t));UQ.displayName=`MarkdownH2`;var WQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h3`,{className:PZ()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>jQ(e,t));WQ.displayName=`MarkdownH3`;var GQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h4`,{className:PZ()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>jQ(e,t));GQ.displayName=`MarkdownH4`;var KQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h5`,{className:PZ()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>jQ(e,t));KQ.displayName=`MarkdownH5`;var qQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`h6`,{className:PZ()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>jQ(e,t));qQ.displayName=`MarkdownH6`;var JQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,y.useContext)(a1);return(0,N.jsx)(TQ,{className:t,showControls:MQ(i,`table`),showCopy:NQ(i,`copy`),showDownload:NQ(i,`download`),showFullscreen:NQ(i,`fullscreen`),...r,children:e})},(e,t)=>jQ(e,t));JQ.displayName=`MarkdownTable`;var YQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`thead`,{className:PZ()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>jQ(e,t));YQ.displayName=`MarkdownThead`;var XQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`tbody`,{className:PZ()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>jQ(e,t));XQ.displayName=`MarkdownTbody`;var ZQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`tr`,{className:PZ()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>jQ(e,t));ZQ.displayName=`MarkdownTr`;var QQ=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`th`,{className:PZ()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>jQ(e,t));QQ.displayName=`MarkdownTh`;var $Q=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`td`,{className:PZ()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>jQ(e,t));$Q.displayName=`MarkdownTd`;var e$=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`blockquote`,{className:PZ()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>jQ(e,t));e$.displayName=`MarkdownBlockquote`;var t$=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`sup`,{className:PZ()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>jQ(e,t));t$.displayName=`MarkdownSup`;var n$=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,N.jsx)(`sub`,{className:PZ()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>jQ(e,t));n$.displayName=`MarkdownSub`;var r$=(0,y.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,y.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,y.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,y.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,y.isValidElement)(e))return e;if(e.type===IQ){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,N.jsx)(`section`,{className:t,...r,children:i}):null}return(0,N.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>jQ(e,t));r$.displayName=`MarkdownSection`;var i$=(0,y.memo)(({node:e,className:t,children:n,...r})=>{let i=PZ(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,y.useContext)(a1),l=fQ(),u=OZ(),d=(t?.match(kQ))?.at(1)??``,f=pQ(d);if(a)return(0,N.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(EQ),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&DQ.test(p))&&c!==!1,v=``;if((0,y.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,N.jsx)(y.Suspense,{fallback:(0,N.jsx)(nQ,{}),children:(0,N.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=MQ(s,`mermaid`),n=FQ(s,`download`),r=FQ(s,`copy`),a=FQ(s,`fullscreen`),c=FQ(s,`panZoom`),l=e&&(n||r||a);return(0,N.jsx)(y.Suspense,{fallback:(0,N.jsx)(nQ,{}),children:(0,N.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,N.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,N.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,N.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,N.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,N.jsx)(hQ,{chart:v,config:o?.config}):null,r?(0,N.jsx)($Z,{code:v}):null,a?(0,N.jsx)(gQ,{chart:v,config:o?.config}):null]})}):null,(0,N.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,N.jsx)(OQ,{chart:v,config:o?.config,showControls:c})})]})})}let b=MQ(s,`code`),x=PQ(s,`download`),S=PQ(s,`copy`);return(0,N.jsx)(WZ,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:b?(0,N.jsxs)(N.Fragment,{children:[x?(0,N.jsx)(tQ,{code:v,language:d}):null,S?(0,N.jsx)($Z,{}):null]}):null})},(e,t)=>e.className===t.className&&AQ(e.node,t.node));i$.displayName=`MarkdownCode`;var a$=(0,y.memo)(iQ,(e,t)=>e.className===t.className&&AQ(e.node,t.node));a$.displayName=`MarkdownImg`;var o$=(0,y.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,y.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,N.jsx)(N.Fragment,{children:e})}return(0,N.jsx)(`p`,{...n,children:e})},(e,t)=>jQ(e,t));o$.displayName=`MarkdownParagraph`;var s$={ol:IQ,li:LQ,ul:RQ,hr:zQ,strong:BQ,a:VQ,h1:HQ,h2:UQ,h3:WQ,h4:GQ,h5:KQ,h6:qQ,table:JQ,thead:YQ,tbody:XQ,tr:ZQ,th:QQ,td:$Q,blockquote:e$,code:i$,img:a$,pre:({children:e})=>(0,y.isValidElement)(e)?(0,y.cloneElement)(e,{"data-block":`true`}):e,sup:t$,sub:n$,p:o$,section:r$},c$=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,l$=/\p{L}/u;function u$(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(c$.test(e))return`rtl`;if(l$.test(e))return`ltr`}return`ltr`}var d$=/^[ \t]{0,3}(`{3,}|~{3,})/,f$=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,p$=e=>{let t=e.split(` +`),n=null,r=0;for(let e of t){let t=d$.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},m$=e=>{let t=e.split(` +`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&f$.test(t))return!0}return!1},h$=()=>e=>{gj(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},g$=[],_$={allowDangerousHtml:!0},v$=new WeakMap,y$=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=v$.get(e);n||(n=e.name,v$.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=v$.get(r);e||(e=r.name,v$.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},b$=e=>{let t=x$(e),n=e.children||``;return O$(t.runSync(t.parse(n),n),e)},x$=e=>{let t=y$.get(e);if(t)return t;let n=C$(e);return y$.set(e,n),n},S$=e=>e.some(e=>Array.isArray(e)?e[0]===BL:e===BL),C$=e=>{let t=e.rehypePlugins||g$,n=e.remarkPlugins||g$,r=S$(t)?n:[...n,h$],i=e.remarkRehypeOptions?{..._$,...e.remarkRehypeOptions}:_$;return TY().use(oJ).use(r).use(ZJ,i).use(t)},w$=e=>e,T$=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},E$=(e,t)=>{for(let n in xq)if(Object.hasOwn(xq,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=xq[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},D$=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},O$=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||w$;gj(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return T$(c,s,a,e.value),s;if(e.type===`element`&&(E$(e,t),D$(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return $K(e,{Fragment:N.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0})},k$=/\[\^[\w-]{1,200}\](?!:)/,A$=/\[\^[\w-]{1,200}\]:/,j$=/<(\w+)[\s>]/,M$=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),N$=new Map,P$=new Map,F$=e=>{let t=e.toLowerCase(),n=N$.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return N$.set(t,r),r},I$=e=>{let t=e.toLowerCase(),n=P$.get(t);if(n)return n;let r=RegExp(`])[^>]*>`,`gi`);return P$.set(t,r),r},L$=(e,t)=>{if(M$.has(t.toLowerCase()))return 0;let n=e.match(F$(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},R$=(e,t)=>{let n=e.match(I$(t));return n?n.length:0},z$=e=>{let t=0;for(let n=0;n{let t=k$.test(e),n=A$.test(e);if(t||n)return[e];let r=aZ.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=L$(t,e),o=R$(t,e);for(let t=0;t0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match(j$);if(e){let n=e[1];L$(t,n)>R$(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(z$(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},V$=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(` + +`))return t+n+r;let i=n.replace(/\n\n/g,` + +`);return`${t}${(i.startsWith(` +`)?``:` +`)+i+(i.endsWith(` +`)?``:` +`)}${r} + +`})}return n},H$=/([\\`*_~[\]|])/g,U$=e=>e.replace(H$,`\\$1`),W$=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,`gi`);n=n.replace(t,(e,t,n,r)=>t+U$(n).replace(/\n\n/g,` `)+r)}return n},G$=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(G$).join(``):``,K$=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));gj(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=G$(e);e.children=t?[{type:`text`,value:t}]:[]}})},q$=()=>e=>{gj(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},J$=/^[ \t]*<[\w!/?-]/,Y$=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,X$=e=>typeof e!=`string`||e.length===0||!J$.test(e)?e:e.replace(Y$,`$1`),Z$={...HL,protocols:{...HL.protocols,href:[...HL.protocols?.href??[],`tel`]},attributes:{...HL.attributes,code:[...HL.attributes?.code??[],`metastring`]}},Q$={raw:BL,sanitize:[aR,Z$],harden:[vj,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},$$={gfm:[SU,{}],codeMeta:q$},e1=Object.values(Q$),t1=Object.values($$),n1={block:` ▋`,circle:` ●`},r1=[`github-light`,`github-dark`],i1={enabled:!0},a1=(0,y.createContext)({shikiTheme:r1,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:i1}),o1=(0,y.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?X$(e):e,l=(0,N.jsx)(b$,{...s,children:c});return(0,N.jsx)(DZ.Provider,{value:i,children:a?(0,N.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});o1.displayName=`Block`;var s1=(0,y.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=e1,remarkPlugins:s=t1,className:c,shikiTheme:l=r1,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=o1,parseMarkdownIntoBlocksFn:h=B$,caret:g,plugins:_,remend:v,linkSafety:b=i1,lineNumbers:x=!0,allowedTags:S,literalTagContent:C,translations:w,icons:T,prefix:ee,onAnimationStart:te,onAnimationEnd:ne,...E})=>{let D=(0,y.useId)(),[re,ie]=(0,y.useTransition)(),ae=(0,y.useMemo)(()=>jZ(ee),[ee]),oe=(0,y.useRef)(null),se=(0,y.useRef)(te),O=(0,y.useRef)(ne);se.current=te,O.current=ne,(0,y.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=oe.current;if(oe.current=f,i===null){f&&((e=se.current)==null||e.call(se));return}f&&!i?(n=se.current)==null||n.call(se):!f&&i&&((r=O.current)==null||r.call(O))},[f,t]);let ce=(0,y.useMemo)(()=>S?Object.keys(S):[],[S]),le=(0,y.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?tG(e,v):e;return C&&C.length>0&&(n=W$(n,C)),ce.length>0&&(n=V$(n,ce)),n},[e,t,r,v,ce,C]),ue=(0,y.useMemo)(()=>h(le),[le,h]),[de,fe]=(0,y.useState)(ue);(0,y.useEffect)(()=>{t===`streaming`&&!_e?ie(()=>{fe(ue)}):fe(ue)},[ue,t]);let pe=t===`streaming`?de:ue,me=(0,y.useMemo)(()=>n===`auto`?pe.map(u$):void 0,[pe,n]),he=(0,y.useMemo)(()=>pe.map((e,t)=>`${D}-${t}`),[pe.length,D]),ge=(0,y.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),_e=(0,y.useMemo)(()=>ge?ge===`true`?EZ():EZ(p):null,[ge]),ve=(0,y.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:x,mode:t,mermaid:u,linkSafety:b}),[l,d,f,x,t,u,b,_?.code]),ye=(0,y.useMemo)(()=>({...XZ,...w}),[(0,y.useMemo)(()=>w?JSON.stringify(w):``,[w])]),be=(0,y.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...s$,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,y.createElement)(t,n):null:(0,y.createElement)(e,n)}return n},[a]),xe=(0,y.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),Se=(0,y.useMemo)(()=>{let e=o;if(S&&Object.keys(S).length>0&&o===e1){let t={...Z$,tagNames:[...Z$.tagNames??[],...Object.keys(S)],attributes:{...Z$.attributes,...S}};e=[Q$.raw,[aR,t],Q$.harden]}return C&&C.length>0&&(e=[...e,[K$,C]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),_e&&f&&(e=[...e,_e.rehypePlugin]),e},[o,_?.math,_e,f,S,C]),Ce=(0,y.useMemo)(()=>{if(!f||pe.length===0)return!1;let e=pe.at(-1);return p$(e)||m$(e)},[f,pe]),we=(0,y.useMemo)(()=>g&&f&&!Ce?{"--streamdown-caret":`"${n1[g]}"`}:void 0,[g,f,Ce]);return t===`static`?(0,N.jsx)(ZZ.Provider,{value:ye,children:(0,N.jsx)(lQ.Provider,{value:_??null,children:(0,N.jsx)(a1.Provider,{value:ve,children:(0,N.jsx)(JZ,{icons:T,children:(0,N.jsx)(NZ.Provider,{value:ae,children:(0,N.jsx)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?u$(le):n,children:(0,N.jsx)(b$,{components:be,rehypePlugins:Se,remarkPlugins:xe,...E,children:le})})})})})})}):(0,N.jsx)(ZZ.Provider,{value:ye,children:(0,N.jsx)(lQ.Provider,{value:_??null,children:(0,N.jsx)(a1.Provider,{value:ve,children:(0,N.jsx)(JZ,{icons:T,children:(0,N.jsx)(NZ.Provider,{value:ae,children:(0,N.jsxs)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!Ce?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:we,children:[pe.length===0&&g&&f&&(0,N.jsx)(`span`,{}),pe.map((e,t)=>{let a=t===pe.length-1,o=f&&a&&p$(e);return(0,N.jsx)(m,{animatePlugin:_e,components:be,content:e,dir:me?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:Se,remarkPlugins:xe,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...E},he[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);s1.displayName=`Streamdown`;var c1=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=YZ(),d=PZ(),f=(0,y.useRef)(null),p=(0,y.useRef)(null),[m,h]=(0,y.useState)(o),[g,_]=(0,y.useState)({x:0,y:0}),[v,b]=(0,y.useState)(!1),[x,S]=(0,y.useState)({x:0,y:0}),[C,w]=(0,y.useState)({x:0,y:0}),T=(0,y.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),ee=(0,y.useCallback)(()=>{T(i)},[T,i]),te=(0,y.useCallback)(()=>{T(-i)},[T,i]),ne=(0,y.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),E=(0,y.useCallback)(e=>{e.preventDefault(),T(e.deltaY>0?-i:i)},[T,i]),D=(0,y.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;b(!0),S({x:e.clientX,y:e.clientY}),w(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),re=(0,y.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-x.x,n=e.clientY-x.y;_({x:C.x+t,y:C.y+n})},[v,x,C]),ie=(0,y.useCallback)(e=>{b(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,y.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,E,{passive:!1}),()=>{e.removeEventListener(`wheel`,E)}},[E]),(0,y.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,re,{passive:!1}),e.addEventListener(`pointerup`,ie),e.addEventListener(`pointercancel`,ie),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,re),e.removeEventListener(`pointerup`,ie),e.removeEventListener(`pointercancel`,ie)}},[v,re,ie]),(0,N.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,N.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,N.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:ee,title:`Zoom in`,type:`button`,children:(0,N.jsx)(l,{size:16})}),(0,N.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:te,title:`Zoom out`,type:`button`,children:(0,N.jsx)(u,{size:16})}),(0,N.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:ne,title:`Reset zoom and pan`,type:`button`,children:(0,N.jsx)(c,{size:16})})]}):null,(0,N.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:D,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},l1=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=PZ(),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(!1),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(0),{mermaid:g}=(0,y.useContext)(a1),_=fQ(),v=g?.errorComponent,{shouldRender:b,containerRef:x}=hZ({immediate:r});if((0,y.useEffect)(()=>{if(b){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,b,_]),!(b||u||f))return(0,N.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:x});if(c&&!u&&!f)return(0,N.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:x,children:(0,N.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,N.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,N.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,N.jsx)(`div`,{ref:x,children:(0,N.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,N.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:x,children:[(0,N.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,N.jsxs)(`details`,{className:a(`mt-2`),children:[(0,N.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,N.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let S=u||f;return(0,N.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:x,children:(0,N.jsx)(c1,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,N.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:S},role:`img`})})})};function u1(e,t){return d1(e,t||{})||{type:`root`,children:[]}}function d1(e,t){let n=f1(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function f1(e,t){switch(e.nodeType){case 1:return _1(e,t);case 3:return h1(e);case 8:return g1(e);case 9:return p1(e,t);case 10:return m1();case 11:return p1(e,t);default:return}}function p1(e,t){return{type:`root`,children:v1(e,t)}}function m1(){return{type:`doctype`}}function h1(e){return{type:`text`,value:e.nodeValue||``}}function g1(e){return{type:`comment`,value:e.nodeValue||``}}function _1(e,t){let n=e.namespaceURI,r=n===RM.svg?FM:PM,i=n===RM.html?e.tagName.toLowerCase():e.tagName,a=n===RM.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++cl&&(l=e):e&&(l!==void 0&&l>-1&&c.push(` +`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function R1(e,t,n){return e.type===`element`?z1(e,t,n):e.type===`text`?n.whitespace===`normal`?B1(e,n):V1(e):[]}function z1(e,t,n){let r=U1(e,n),i=e.children||[],a=-1,o=[];if(F1(e))return o;let s,c;for(j1(e)||P1(e)&&S1(t,e,P1)?c=` +`:N1(e)?(s=2,c=2):I1(e)&&(s=1,c=1);++a15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15e.replace(q1,`-$1`).toLowerCase(),Y1={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},X1=/[&><"']/g,Z1=e=>String(e).replace(X1,e=>Y1[e]),Q1=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?Q1(e.body[0]):e:e.type===`font`?Q1(e.body):e,$1=new Set([`mathord`,`textord`,`atom`]),e0=e=>$1.has(Q1(e).type),t0=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},n0={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function r0(e){if(`default`in e)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!=`string`)return n.enum[0];switch(n){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{}}}var i0=class{constructor(e){e===void 0&&(e={}),e||={};for(var t of Object.keys(n0)){var n=n0[t],r=e[t];this[t]=r===void 0?r0(n):n.processor?n.processor(r):r}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new U(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=t0(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},a0=class{constructor(e,t,n){this.id=e,this.size=t,this.cramped=n}sup(){return m0[h0[this.id]]}sub(){return m0[g0[this.id]]}fracNum(){return m0[_0[this.id]]}fracDen(){return m0[v0[this.id]]}cramp(){return m0[y0[this.id]]}text(){return m0[b0[this.id]]}isTight(){return this.size>=2}},o0=0,s0=1,c0=2,l0=3,u0=4,d0=5,f0=6,p0=7,m0=[new a0(o0,0,!1),new a0(s0,0,!0),new a0(c0,1,!1),new a0(l0,1,!0),new a0(u0,2,!1),new a0(d0,2,!0),new a0(f0,3,!1),new a0(p0,3,!0)],h0=[u0,d0,u0,d0,f0,p0,f0,p0],g0=[d0,d0,d0,d0,p0,p0,p0,p0],_0=[c0,l0,u0,d0,f0,p0,f0,p0],v0=[l0,l0,d0,d0,p0,p0,p0,p0],y0=[s0,s0,l0,l0,d0,d0,p0,p0],b0=[o0,s0,c0,l0,c0,l0,c0,l0],x0={DISPLAY:m0[o0],TEXT:m0[c0],SCRIPT:m0[u0],SCRIPTSCRIPT:m0[f0]},S0=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function C0(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var w0=[];S0.forEach(e=>e.blocks.forEach(e=>w0.push(...e)));function T0(e){for(var t=0;t=w0[t]&&e<=w0[t+1])return!0;return!1}var E0=80,D0=function(e,t){return`M95,`+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+` -`+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},O0=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+` -`+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},k0=function(e,t){return`M983 `+(10+e+t)+` +l`+e/3.13+` -`+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},A0=function(e,t){return`M424,`+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` +h400000v`+(40+e)+`h-400000z`},j0=function(e,t){return`M473,`+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},M0=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},N0=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` +H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},P0=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=D0(t,E0);break;case`sqrtSize1`:r=O0(t,E0);break;case`sqrtSize2`:r=k0(t,E0);break;case`sqrtSize3`:r=A0(t,E0);break;case`sqrtSize4`:r=j0(t,E0);break;case`sqrtTall`:r=N0(t,E0,n)}return r},F0=function(e,t){switch(e){case`⎜`:return`M291 0 H417 V`+t+` H291z M291 0 H417 V`+t+` H291z`;case`∣`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`;case`∥`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`+(`M367 0 H410 V`+t+` H367z M367 0 H410 V`+t+` H367z`);case`⎟`:return`M457 0 H583 V`+t+` H457z M457 0 H583 V`+t+` H457z`;case`⎢`:return`M319 0 H403 V`+t+` H319z M319 0 H403 V`+t+` H319z`;case`⎥`:return`M263 0 H347 V`+t+` H263z M263 0 H347 V`+t+` H263z`;case`⎪`:return`M384 0 H504 V`+t+` H384z M384 0 H504 V`+t+` H384z`;case`⏐`:return`M312 0 H355 V`+t+` H312z M312 0 H355 V`+t+` H312z`;case`‖`:return`M257 0 H300 V`+t+` H257z M257 0 H300 V`+t+` H257z`+(`M478 0 H521 V`+t+` H478z M478 0 H521 V`+t+` H478z`);default:return``}},I0={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftbracketunder:`M0 0 h120 V290 H399995 v120 H0z +M0 0 h120 V290 H399995 v120 H0z`,leftbracketover:`M0 440 h120 V150 H399995 v-120 H0z +M0 440 h120 V150 H399995 v-120 H0z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightbracketunder:`M399995 0 h-120 V290 H0 v120 H400000z +M399995 0 h-120 V290 H0 v120 H400000z`,rightbracketover:`M399995 440 h-120 V150 H0 v-120 H399995z +M399995 440 h-120 V150 H0 v-120 H399995z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},L0=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+` v1759 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},R0=class{constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText()).join(``)}},z0={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},B0={ex:!0,em:!0,mu:!0},V0=function(e){return typeof e!=`string`&&(e=e.unit),e in z0||e in B0||e===`ex`},H0=function(e,t){var n;if(e.unit in z0)n=z0[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new U(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},U0=function(e){return+e.toFixed(4)+`em`},W0=function(e){return e.filter(e=>e).join(` `)},G0=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},K0=function(e){var t=document.createElement(e);t.className=W0(this.classes);for(var n of Object.keys(this.style))t.style[n]=this.style[n];for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,J0=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+Z1(W0(this.classes))+`"`);var n=``;for(var r of Object.keys(this.style))n+=J1(r)+`:`+this.style[r]+`;`;n&&(t+=` style="`+Z1(n)+`"`);for(var i of Object.keys(this.attributes)){if(q0.test(i))throw new U(`Invalid attribute name '`+i+`'`);t+=` `+i+`="`+Z1(this.attributes[i])+`"`}t+=`>`;for(var a=0;a`,t},Y0=class{constructor(e,t,n,r){G0.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return K0.call(this,`span`)}toMarkup(){return J0.call(this,`span`)}},X0=class{constructor(e,t,n,r){G0.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return K0.call(this,`a`)}toMarkup(){return J0.call(this,`a`)}},Z0=class{constructor(e,t,n){this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);e.src=this.src,e.alt=this.alt,e.className=`mord`;for(var t of Object.keys(this.style))e.style[t]=this.style[t];return e}toMarkup(){var e=``+Z1(this.alt)+``,e}},Q0={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},$0=class{constructor(e,t,n,r,i,a,o,s){this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=C0(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Q0[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=U0(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=W0(this.classes));for(var n of Object.keys(this.style))t||=document.createElement(`span`),t.style[n]=this.style[n];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+U0(this.italic)+`;`);for(var r of Object.keys(this.style))n+=J1(r)+`:`+this.style[r]+`;`;n&&(e=!0,t+=` style="`+Z1(n)+`"`);var i=Z1(this.text);return e?(t+=`>`,t+=i,t+=``,t):i}},e2=class{constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},t2=class{constructor(e,t){this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,I0[this.pathName]),e}toMarkup(){return this.alternate?``:``}},n2=class{constructor(e){this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function r2(e){if(e instanceof $0)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function i2(e){if(e instanceof Y0)return e;throw Error(`Expected span but got `+String(e)+`.`)}var a2=e=>e instanceof Y0||e instanceof X0||e instanceof R0,o2={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},s2={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},c2={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function l2(e,t){o2[e]=t}function u2(e,t,n){if(!o2[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=o2[t][r];if(!i&&e[0]in c2&&(r=c2[e[0]].charCodeAt(0),i=o2[t][r]),!i&&n===`text`&&T0(r)&&(i=o2[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var d2={};function f2(e){var t=e>=5?0:e>=3?1:2;if(!d2[t]){var n=d2[t]={cssEmPerMu:s2.quad[t]/18};for(var r in s2)s2.hasOwnProperty(r)&&(n[r]=s2[r][t])}return d2[t]}var p2={bin:1,close:1,inner:1,open:1,punct:1,rel:1},m2={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},h2={math:{},text:{}};function W(e,t,n,r,i,a){h2[e][i]={font:t,group:n,replace:r},a&&r&&(h2[e][r]=h2[e][i])}var G=`math`,K=`text`,q=`main`,J=`ams`,g2=`accent-token`,_2=`bin`,v2=`close`,y2=`inner`,b2=`mathord`,x2=`op-token`,S2=`open`,C2=`punct`,Y=`rel`,w2=`spacing`,X=`textord`;W(G,q,Y,`≡`,`\\equiv`,!0),W(G,q,Y,`≺`,`\\prec`,!0),W(G,q,Y,`≻`,`\\succ`,!0),W(G,q,Y,`∼`,`\\sim`,!0),W(G,q,Y,`⊥`,`\\perp`),W(G,q,Y,`⪯`,`\\preceq`,!0),W(G,q,Y,`⪰`,`\\succeq`,!0),W(G,q,Y,`≃`,`\\simeq`,!0),W(G,q,Y,`∣`,`\\mid`,!0),W(G,q,Y,`≪`,`\\ll`,!0),W(G,q,Y,`≫`,`\\gg`,!0),W(G,q,Y,`≍`,`\\asymp`,!0),W(G,q,Y,`∥`,`\\parallel`),W(G,q,Y,`⋈`,`\\bowtie`,!0),W(G,q,Y,`⌣`,`\\smile`,!0),W(G,q,Y,`⊑`,`\\sqsubseteq`,!0),W(G,q,Y,`⊒`,`\\sqsupseteq`,!0),W(G,q,Y,`≐`,`\\doteq`,!0),W(G,q,Y,`⌢`,`\\frown`,!0),W(G,q,Y,`∋`,`\\ni`,!0),W(G,q,Y,`∝`,`\\propto`,!0),W(G,q,Y,`⊢`,`\\vdash`,!0),W(G,q,Y,`⊣`,`\\dashv`,!0),W(G,q,Y,`∋`,`\\owns`),W(G,q,C2,`.`,`\\ldotp`),W(G,q,C2,`⋅`,`\\cdotp`),W(G,q,C2,`⋅`,`·`),W(K,q,X,`⋅`,`·`),W(G,q,X,`#`,`\\#`),W(K,q,X,`#`,`\\#`),W(G,q,X,`&`,`\\&`),W(K,q,X,`&`,`\\&`),W(G,q,X,`ℵ`,`\\aleph`,!0),W(G,q,X,`∀`,`\\forall`,!0),W(G,q,X,`ℏ`,`\\hbar`,!0),W(G,q,X,`∃`,`\\exists`,!0),W(G,q,X,`∇`,`\\nabla`,!0),W(G,q,X,`♭`,`\\flat`,!0),W(G,q,X,`ℓ`,`\\ell`,!0),W(G,q,X,`♮`,`\\natural`,!0),W(G,q,X,`♣`,`\\clubsuit`,!0),W(G,q,X,`℘`,`\\wp`,!0),W(G,q,X,`♯`,`\\sharp`,!0),W(G,q,X,`♢`,`\\diamondsuit`,!0),W(G,q,X,`ℜ`,`\\Re`,!0),W(G,q,X,`♡`,`\\heartsuit`,!0),W(G,q,X,`ℑ`,`\\Im`,!0),W(G,q,X,`♠`,`\\spadesuit`,!0),W(G,q,X,`§`,`\\S`,!0),W(K,q,X,`§`,`\\S`),W(G,q,X,`¶`,`\\P`,!0),W(K,q,X,`¶`,`\\P`),W(G,q,X,`†`,`\\dag`),W(K,q,X,`†`,`\\dag`),W(K,q,X,`†`,`\\textdagger`),W(G,q,X,`‡`,`\\ddag`),W(K,q,X,`‡`,`\\ddag`),W(K,q,X,`‡`,`\\textdaggerdbl`),W(G,q,v2,`⎱`,`\\rmoustache`,!0),W(G,q,S2,`⎰`,`\\lmoustache`,!0),W(G,q,v2,`⟯`,`\\rgroup`,!0),W(G,q,S2,`⟮`,`\\lgroup`,!0),W(G,q,_2,`∓`,`\\mp`,!0),W(G,q,_2,`⊖`,`\\ominus`,!0),W(G,q,_2,`⊎`,`\\uplus`,!0),W(G,q,_2,`⊓`,`\\sqcap`,!0),W(G,q,_2,`∗`,`\\ast`),W(G,q,_2,`⊔`,`\\sqcup`,!0),W(G,q,_2,`◯`,`\\bigcirc`,!0),W(G,q,_2,`∙`,`\\bullet`,!0),W(G,q,_2,`‡`,`\\ddagger`),W(G,q,_2,`≀`,`\\wr`,!0),W(G,q,_2,`⨿`,`\\amalg`),W(G,q,_2,`&`,`\\And`),W(G,q,Y,`⟵`,`\\longleftarrow`,!0),W(G,q,Y,`⇐`,`\\Leftarrow`,!0),W(G,q,Y,`⟸`,`\\Longleftarrow`,!0),W(G,q,Y,`⟶`,`\\longrightarrow`,!0),W(G,q,Y,`⇒`,`\\Rightarrow`,!0),W(G,q,Y,`⟹`,`\\Longrightarrow`,!0),W(G,q,Y,`↔`,`\\leftrightarrow`,!0),W(G,q,Y,`⟷`,`\\longleftrightarrow`,!0),W(G,q,Y,`⇔`,`\\Leftrightarrow`,!0),W(G,q,Y,`⟺`,`\\Longleftrightarrow`,!0),W(G,q,Y,`↦`,`\\mapsto`,!0),W(G,q,Y,`⟼`,`\\longmapsto`,!0),W(G,q,Y,`↗`,`\\nearrow`,!0),W(G,q,Y,`↩`,`\\hookleftarrow`,!0),W(G,q,Y,`↪`,`\\hookrightarrow`,!0),W(G,q,Y,`↘`,`\\searrow`,!0),W(G,q,Y,`↼`,`\\leftharpoonup`,!0),W(G,q,Y,`⇀`,`\\rightharpoonup`,!0),W(G,q,Y,`↙`,`\\swarrow`,!0),W(G,q,Y,`↽`,`\\leftharpoondown`,!0),W(G,q,Y,`⇁`,`\\rightharpoondown`,!0),W(G,q,Y,`↖`,`\\nwarrow`,!0),W(G,q,Y,`⇌`,`\\rightleftharpoons`,!0),W(G,J,Y,`≮`,`\\nless`,!0),W(G,J,Y,``,`\\@nleqslant`),W(G,J,Y,``,`\\@nleqq`),W(G,J,Y,`⪇`,`\\lneq`,!0),W(G,J,Y,`≨`,`\\lneqq`,!0),W(G,J,Y,``,`\\@lvertneqq`),W(G,J,Y,`⋦`,`\\lnsim`,!0),W(G,J,Y,`⪉`,`\\lnapprox`,!0),W(G,J,Y,`⊀`,`\\nprec`,!0),W(G,J,Y,`⋠`,`\\npreceq`,!0),W(G,J,Y,`⋨`,`\\precnsim`,!0),W(G,J,Y,`⪹`,`\\precnapprox`,!0),W(G,J,Y,`≁`,`\\nsim`,!0),W(G,J,Y,``,`\\@nshortmid`),W(G,J,Y,`∤`,`\\nmid`,!0),W(G,J,Y,`⊬`,`\\nvdash`,!0),W(G,J,Y,`⊭`,`\\nvDash`,!0),W(G,J,Y,`⋪`,`\\ntriangleleft`),W(G,J,Y,`⋬`,`\\ntrianglelefteq`,!0),W(G,J,Y,`⊊`,`\\subsetneq`,!0),W(G,J,Y,``,`\\@varsubsetneq`),W(G,J,Y,`⫋`,`\\subsetneqq`,!0),W(G,J,Y,``,`\\@varsubsetneqq`),W(G,J,Y,`≯`,`\\ngtr`,!0),W(G,J,Y,``,`\\@ngeqslant`),W(G,J,Y,``,`\\@ngeqq`),W(G,J,Y,`⪈`,`\\gneq`,!0),W(G,J,Y,`≩`,`\\gneqq`,!0),W(G,J,Y,``,`\\@gvertneqq`),W(G,J,Y,`⋧`,`\\gnsim`,!0),W(G,J,Y,`⪊`,`\\gnapprox`,!0),W(G,J,Y,`⊁`,`\\nsucc`,!0),W(G,J,Y,`⋡`,`\\nsucceq`,!0),W(G,J,Y,`⋩`,`\\succnsim`,!0),W(G,J,Y,`⪺`,`\\succnapprox`,!0),W(G,J,Y,`≆`,`\\ncong`,!0),W(G,J,Y,``,`\\@nshortparallel`),W(G,J,Y,`∦`,`\\nparallel`,!0),W(G,J,Y,`⊯`,`\\nVDash`,!0),W(G,J,Y,`⋫`,`\\ntriangleright`),W(G,J,Y,`⋭`,`\\ntrianglerighteq`,!0),W(G,J,Y,``,`\\@nsupseteqq`),W(G,J,Y,`⊋`,`\\supsetneq`,!0),W(G,J,Y,``,`\\@varsupsetneq`),W(G,J,Y,`⫌`,`\\supsetneqq`,!0),W(G,J,Y,``,`\\@varsupsetneqq`),W(G,J,Y,`⊮`,`\\nVdash`,!0),W(G,J,Y,`⪵`,`\\precneqq`,!0),W(G,J,Y,`⪶`,`\\succneqq`,!0),W(G,J,Y,``,`\\@nsubseteqq`),W(G,J,_2,`⊴`,`\\unlhd`),W(G,J,_2,`⊵`,`\\unrhd`),W(G,J,Y,`↚`,`\\nleftarrow`,!0),W(G,J,Y,`↛`,`\\nrightarrow`,!0),W(G,J,Y,`⇍`,`\\nLeftarrow`,!0),W(G,J,Y,`⇏`,`\\nRightarrow`,!0),W(G,J,Y,`↮`,`\\nleftrightarrow`,!0),W(G,J,Y,`⇎`,`\\nLeftrightarrow`,!0),W(G,J,Y,`△`,`\\vartriangle`),W(G,J,X,`ℏ`,`\\hslash`),W(G,J,X,`▽`,`\\triangledown`),W(G,J,X,`◊`,`\\lozenge`),W(G,J,X,`Ⓢ`,`\\circledS`),W(G,J,X,`®`,`\\circledR`),W(K,J,X,`®`,`\\circledR`),W(G,J,X,`∡`,`\\measuredangle`,!0),W(G,J,X,`∄`,`\\nexists`),W(G,J,X,`℧`,`\\mho`),W(G,J,X,`Ⅎ`,`\\Finv`,!0),W(G,J,X,`⅁`,`\\Game`,!0),W(G,J,X,`‵`,`\\backprime`),W(G,J,X,`▲`,`\\blacktriangle`),W(G,J,X,`▼`,`\\blacktriangledown`),W(G,J,X,`■`,`\\blacksquare`),W(G,J,X,`⧫`,`\\blacklozenge`),W(G,J,X,`★`,`\\bigstar`),W(G,J,X,`∢`,`\\sphericalangle`,!0),W(G,J,X,`∁`,`\\complement`,!0),W(G,J,X,`ð`,`\\eth`,!0),W(K,q,X,`ð`,`ð`),W(G,J,X,`╱`,`\\diagup`),W(G,J,X,`╲`,`\\diagdown`),W(G,J,X,`□`,`\\square`),W(G,J,X,`□`,`\\Box`),W(G,J,X,`◊`,`\\Diamond`),W(G,J,X,`¥`,`\\yen`,!0),W(K,J,X,`¥`,`\\yen`,!0),W(G,J,X,`✓`,`\\checkmark`,!0),W(K,J,X,`✓`,`\\checkmark`),W(G,J,X,`ℶ`,`\\beth`,!0),W(G,J,X,`ℸ`,`\\daleth`,!0),W(G,J,X,`ℷ`,`\\gimel`,!0),W(G,J,X,`ϝ`,`\\digamma`,!0),W(G,J,X,`ϰ`,`\\varkappa`),W(G,J,S2,`┌`,`\\@ulcorner`,!0),W(G,J,v2,`┐`,`\\@urcorner`,!0),W(G,J,S2,`└`,`\\@llcorner`,!0),W(G,J,v2,`┘`,`\\@lrcorner`,!0),W(G,J,Y,`≦`,`\\leqq`,!0),W(G,J,Y,`⩽`,`\\leqslant`,!0),W(G,J,Y,`⪕`,`\\eqslantless`,!0),W(G,J,Y,`≲`,`\\lesssim`,!0),W(G,J,Y,`⪅`,`\\lessapprox`,!0),W(G,J,Y,`≊`,`\\approxeq`,!0),W(G,J,_2,`⋖`,`\\lessdot`),W(G,J,Y,`⋘`,`\\lll`,!0),W(G,J,Y,`≶`,`\\lessgtr`,!0),W(G,J,Y,`⋚`,`\\lesseqgtr`,!0),W(G,J,Y,`⪋`,`\\lesseqqgtr`,!0),W(G,J,Y,`≑`,`\\doteqdot`),W(G,J,Y,`≓`,`\\risingdotseq`,!0),W(G,J,Y,`≒`,`\\fallingdotseq`,!0),W(G,J,Y,`∽`,`\\backsim`,!0),W(G,J,Y,`⋍`,`\\backsimeq`,!0),W(G,J,Y,`⫅`,`\\subseteqq`,!0),W(G,J,Y,`⋐`,`\\Subset`,!0),W(G,J,Y,`⊏`,`\\sqsubset`,!0),W(G,J,Y,`≼`,`\\preccurlyeq`,!0),W(G,J,Y,`⋞`,`\\curlyeqprec`,!0),W(G,J,Y,`≾`,`\\precsim`,!0),W(G,J,Y,`⪷`,`\\precapprox`,!0),W(G,J,Y,`⊲`,`\\vartriangleleft`),W(G,J,Y,`⊴`,`\\trianglelefteq`),W(G,J,Y,`⊨`,`\\vDash`,!0),W(G,J,Y,`⊪`,`\\Vvdash`,!0),W(G,J,Y,`⌣`,`\\smallsmile`),W(G,J,Y,`⌢`,`\\smallfrown`),W(G,J,Y,`≏`,`\\bumpeq`,!0),W(G,J,Y,`≎`,`\\Bumpeq`,!0),W(G,J,Y,`≧`,`\\geqq`,!0),W(G,J,Y,`⩾`,`\\geqslant`,!0),W(G,J,Y,`⪖`,`\\eqslantgtr`,!0),W(G,J,Y,`≳`,`\\gtrsim`,!0),W(G,J,Y,`⪆`,`\\gtrapprox`,!0),W(G,J,_2,`⋗`,`\\gtrdot`),W(G,J,Y,`⋙`,`\\ggg`,!0),W(G,J,Y,`≷`,`\\gtrless`,!0),W(G,J,Y,`⋛`,`\\gtreqless`,!0),W(G,J,Y,`⪌`,`\\gtreqqless`,!0),W(G,J,Y,`≖`,`\\eqcirc`,!0),W(G,J,Y,`≗`,`\\circeq`,!0),W(G,J,Y,`≜`,`\\triangleq`,!0),W(G,J,Y,`∼`,`\\thicksim`),W(G,J,Y,`≈`,`\\thickapprox`),W(G,J,Y,`⫆`,`\\supseteqq`,!0),W(G,J,Y,`⋑`,`\\Supset`,!0),W(G,J,Y,`⊐`,`\\sqsupset`,!0),W(G,J,Y,`≽`,`\\succcurlyeq`,!0),W(G,J,Y,`⋟`,`\\curlyeqsucc`,!0),W(G,J,Y,`≿`,`\\succsim`,!0),W(G,J,Y,`⪸`,`\\succapprox`,!0),W(G,J,Y,`⊳`,`\\vartriangleright`),W(G,J,Y,`⊵`,`\\trianglerighteq`),W(G,J,Y,`⊩`,`\\Vdash`,!0),W(G,J,Y,`∣`,`\\shortmid`),W(G,J,Y,`∥`,`\\shortparallel`),W(G,J,Y,`≬`,`\\between`,!0),W(G,J,Y,`⋔`,`\\pitchfork`,!0),W(G,J,Y,`∝`,`\\varpropto`),W(G,J,Y,`◀`,`\\blacktriangleleft`),W(G,J,Y,`∴`,`\\therefore`,!0),W(G,J,Y,`∍`,`\\backepsilon`),W(G,J,Y,`▶`,`\\blacktriangleright`),W(G,J,Y,`∵`,`\\because`,!0),W(G,J,Y,`⋘`,`\\llless`),W(G,J,Y,`⋙`,`\\gggtr`),W(G,J,_2,`⊲`,`\\lhd`),W(G,J,_2,`⊳`,`\\rhd`),W(G,J,Y,`≂`,`\\eqsim`,!0),W(G,q,Y,`⋈`,`\\Join`),W(G,J,Y,`≑`,`\\Doteq`,!0),W(G,J,_2,`∔`,`\\dotplus`,!0),W(G,J,_2,`∖`,`\\smallsetminus`),W(G,J,_2,`⋒`,`\\Cap`,!0),W(G,J,_2,`⋓`,`\\Cup`,!0),W(G,J,_2,`⩞`,`\\doublebarwedge`,!0),W(G,J,_2,`⊟`,`\\boxminus`,!0),W(G,J,_2,`⊞`,`\\boxplus`,!0),W(G,J,_2,`⋇`,`\\divideontimes`,!0),W(G,J,_2,`⋉`,`\\ltimes`,!0),W(G,J,_2,`⋊`,`\\rtimes`,!0),W(G,J,_2,`⋋`,`\\leftthreetimes`,!0),W(G,J,_2,`⋌`,`\\rightthreetimes`,!0),W(G,J,_2,`⋏`,`\\curlywedge`,!0),W(G,J,_2,`⋎`,`\\curlyvee`,!0),W(G,J,_2,`⊝`,`\\circleddash`,!0),W(G,J,_2,`⊛`,`\\circledast`,!0),W(G,J,_2,`⋅`,`\\centerdot`),W(G,J,_2,`⊺`,`\\intercal`,!0),W(G,J,_2,`⋒`,`\\doublecap`),W(G,J,_2,`⋓`,`\\doublecup`),W(G,J,_2,`⊠`,`\\boxtimes`,!0),W(G,J,Y,`⇢`,`\\dashrightarrow`,!0),W(G,J,Y,`⇠`,`\\dashleftarrow`,!0),W(G,J,Y,`⇇`,`\\leftleftarrows`,!0),W(G,J,Y,`⇆`,`\\leftrightarrows`,!0),W(G,J,Y,`⇚`,`\\Lleftarrow`,!0),W(G,J,Y,`↞`,`\\twoheadleftarrow`,!0),W(G,J,Y,`↢`,`\\leftarrowtail`,!0),W(G,J,Y,`↫`,`\\looparrowleft`,!0),W(G,J,Y,`⇋`,`\\leftrightharpoons`,!0),W(G,J,Y,`↶`,`\\curvearrowleft`,!0),W(G,J,Y,`↺`,`\\circlearrowleft`,!0),W(G,J,Y,`↰`,`\\Lsh`,!0),W(G,J,Y,`⇈`,`\\upuparrows`,!0),W(G,J,Y,`↿`,`\\upharpoonleft`,!0),W(G,J,Y,`⇃`,`\\downharpoonleft`,!0),W(G,q,Y,`⊶`,`\\origof`,!0),W(G,q,Y,`⊷`,`\\imageof`,!0),W(G,J,Y,`⊸`,`\\multimap`,!0),W(G,J,Y,`↭`,`\\leftrightsquigarrow`,!0),W(G,J,Y,`⇉`,`\\rightrightarrows`,!0),W(G,J,Y,`⇄`,`\\rightleftarrows`,!0),W(G,J,Y,`↠`,`\\twoheadrightarrow`,!0),W(G,J,Y,`↣`,`\\rightarrowtail`,!0),W(G,J,Y,`↬`,`\\looparrowright`,!0),W(G,J,Y,`↷`,`\\curvearrowright`,!0),W(G,J,Y,`↻`,`\\circlearrowright`,!0),W(G,J,Y,`↱`,`\\Rsh`,!0),W(G,J,Y,`⇊`,`\\downdownarrows`,!0),W(G,J,Y,`↾`,`\\upharpoonright`,!0),W(G,J,Y,`⇂`,`\\downharpoonright`,!0),W(G,J,Y,`⇝`,`\\rightsquigarrow`,!0),W(G,J,Y,`⇝`,`\\leadsto`),W(G,J,Y,`⇛`,`\\Rrightarrow`,!0),W(G,J,Y,`↾`,`\\restriction`),W(G,q,X,`‘`,"`"),W(G,q,X,`$`,`\\$`),W(K,q,X,`$`,`\\$`),W(K,q,X,`$`,`\\textdollar`),W(G,q,X,`%`,`\\%`),W(K,q,X,`%`,`\\%`),W(G,q,X,`_`,`\\_`),W(K,q,X,`_`,`\\_`),W(K,q,X,`_`,`\\textunderscore`),W(G,q,X,`∠`,`\\angle`,!0),W(G,q,X,`∞`,`\\infty`,!0),W(G,q,X,`′`,`\\prime`),W(G,q,X,`△`,`\\triangle`),W(G,q,X,`Γ`,`\\Gamma`,!0),W(G,q,X,`Δ`,`\\Delta`,!0),W(G,q,X,`Θ`,`\\Theta`,!0),W(G,q,X,`Λ`,`\\Lambda`,!0),W(G,q,X,`Ξ`,`\\Xi`,!0),W(G,q,X,`Π`,`\\Pi`,!0),W(G,q,X,`Σ`,`\\Sigma`,!0),W(G,q,X,`Υ`,`\\Upsilon`,!0),W(G,q,X,`Φ`,`\\Phi`,!0),W(G,q,X,`Ψ`,`\\Psi`,!0),W(G,q,X,`Ω`,`\\Omega`,!0),W(G,q,X,`A`,`Α`),W(G,q,X,`B`,`Β`),W(G,q,X,`E`,`Ε`),W(G,q,X,`Z`,`Ζ`),W(G,q,X,`H`,`Η`),W(G,q,X,`I`,`Ι`),W(G,q,X,`K`,`Κ`),W(G,q,X,`M`,`Μ`),W(G,q,X,`N`,`Ν`),W(G,q,X,`O`,`Ο`),W(G,q,X,`P`,`Ρ`),W(G,q,X,`T`,`Τ`),W(G,q,X,`X`,`Χ`),W(G,q,X,`¬`,`\\neg`,!0),W(G,q,X,`¬`,`\\lnot`),W(G,q,X,`⊤`,`\\top`),W(G,q,X,`⊥`,`\\bot`),W(G,q,X,`∅`,`\\emptyset`),W(G,J,X,`∅`,`\\varnothing`),W(G,q,b2,`α`,`\\alpha`,!0),W(G,q,b2,`β`,`\\beta`,!0),W(G,q,b2,`γ`,`\\gamma`,!0),W(G,q,b2,`δ`,`\\delta`,!0),W(G,q,b2,`ϵ`,`\\epsilon`,!0),W(G,q,b2,`ζ`,`\\zeta`,!0),W(G,q,b2,`η`,`\\eta`,!0),W(G,q,b2,`θ`,`\\theta`,!0),W(G,q,b2,`ι`,`\\iota`,!0),W(G,q,b2,`κ`,`\\kappa`,!0),W(G,q,b2,`λ`,`\\lambda`,!0),W(G,q,b2,`μ`,`\\mu`,!0),W(G,q,b2,`ν`,`\\nu`,!0),W(G,q,b2,`ξ`,`\\xi`,!0),W(G,q,b2,`ο`,`\\omicron`,!0),W(G,q,b2,`π`,`\\pi`,!0),W(G,q,b2,`ρ`,`\\rho`,!0),W(G,q,b2,`σ`,`\\sigma`,!0),W(G,q,b2,`τ`,`\\tau`,!0),W(G,q,b2,`υ`,`\\upsilon`,!0),W(G,q,b2,`ϕ`,`\\phi`,!0),W(G,q,b2,`χ`,`\\chi`,!0),W(G,q,b2,`ψ`,`\\psi`,!0),W(G,q,b2,`ω`,`\\omega`,!0),W(G,q,b2,`ε`,`\\varepsilon`,!0),W(G,q,b2,`ϑ`,`\\vartheta`,!0),W(G,q,b2,`ϖ`,`\\varpi`,!0),W(G,q,b2,`ϱ`,`\\varrho`,!0),W(G,q,b2,`ς`,`\\varsigma`,!0),W(G,q,b2,`φ`,`\\varphi`,!0),W(G,q,_2,`∗`,`*`,!0),W(G,q,_2,`+`,`+`),W(G,q,_2,`−`,`-`,!0),W(G,q,_2,`⋅`,`\\cdot`,!0),W(G,q,_2,`∘`,`\\circ`,!0),W(G,q,_2,`÷`,`\\div`,!0),W(G,q,_2,`±`,`\\pm`,!0),W(G,q,_2,`×`,`\\times`,!0),W(G,q,_2,`∩`,`\\cap`,!0),W(G,q,_2,`∪`,`\\cup`,!0),W(G,q,_2,`∖`,`\\setminus`,!0),W(G,q,_2,`∧`,`\\land`),W(G,q,_2,`∨`,`\\lor`),W(G,q,_2,`∧`,`\\wedge`,!0),W(G,q,_2,`∨`,`\\vee`,!0),W(G,q,X,`√`,`\\surd`),W(G,q,S2,`⟨`,`\\langle`,!0),W(G,q,S2,`∣`,`\\lvert`),W(G,q,S2,`∥`,`\\lVert`),W(G,q,v2,`?`,`?`),W(G,q,v2,`!`,`!`),W(G,q,v2,`⟩`,`\\rangle`,!0),W(G,q,v2,`∣`,`\\rvert`),W(G,q,v2,`∥`,`\\rVert`),W(G,q,Y,`=`,`=`),W(G,q,Y,`:`,`:`),W(G,q,Y,`≈`,`\\approx`,!0),W(G,q,Y,`≅`,`\\cong`,!0),W(G,q,Y,`≥`,`\\ge`),W(G,q,Y,`≥`,`\\geq`,!0),W(G,q,Y,`←`,`\\gets`),W(G,q,Y,`>`,`\\gt`,!0),W(G,q,Y,`∈`,`\\in`,!0),W(G,q,Y,``,`\\@not`),W(G,q,Y,`⊂`,`\\subset`,!0),W(G,q,Y,`⊃`,`\\supset`,!0),W(G,q,Y,`⊆`,`\\subseteq`,!0),W(G,q,Y,`⊇`,`\\supseteq`,!0),W(G,J,Y,`⊈`,`\\nsubseteq`,!0),W(G,J,Y,`⊉`,`\\nsupseteq`,!0),W(G,q,Y,`⊨`,`\\models`),W(G,q,Y,`←`,`\\leftarrow`,!0),W(G,q,Y,`≤`,`\\le`),W(G,q,Y,`≤`,`\\leq`,!0),W(G,q,Y,`<`,`\\lt`,!0),W(G,q,Y,`→`,`\\rightarrow`,!0),W(G,q,Y,`→`,`\\to`),W(G,J,Y,`≱`,`\\ngeq`,!0),W(G,J,Y,`≰`,`\\nleq`,!0),W(G,q,w2,`\xA0`,`\\ `),W(G,q,w2,`\xA0`,`\\space`),W(G,q,w2,`\xA0`,`\\nobreakspace`),W(K,q,w2,`\xA0`,`\\ `),W(K,q,w2,`\xA0`,` `),W(K,q,w2,`\xA0`,`\\space`),W(K,q,w2,`\xA0`,`\\nobreakspace`),W(G,q,w2,null,`\\nobreak`),W(G,q,w2,null,`\\allowbreak`),W(G,q,C2,`,`,`,`),W(G,q,C2,`;`,`;`),W(G,J,_2,`⊼`,`\\barwedge`,!0),W(G,J,_2,`⊻`,`\\veebar`,!0),W(G,q,_2,`⊙`,`\\odot`,!0),W(G,q,_2,`⊕`,`\\oplus`,!0),W(G,q,_2,`⊗`,`\\otimes`,!0),W(G,q,X,`∂`,`\\partial`,!0),W(G,q,_2,`⊘`,`\\oslash`,!0),W(G,J,_2,`⊚`,`\\circledcirc`,!0),W(G,J,_2,`⊡`,`\\boxdot`,!0),W(G,q,_2,`△`,`\\bigtriangleup`),W(G,q,_2,`▽`,`\\bigtriangledown`),W(G,q,_2,`†`,`\\dagger`),W(G,q,_2,`⋄`,`\\diamond`),W(G,q,_2,`⋆`,`\\star`),W(G,q,_2,`◃`,`\\triangleleft`),W(G,q,_2,`▹`,`\\triangleright`),W(G,q,S2,`{`,`\\{`),W(K,q,X,`{`,`\\{`),W(K,q,X,`{`,`\\textbraceleft`),W(G,q,v2,`}`,`\\}`),W(K,q,X,`}`,`\\}`),W(K,q,X,`}`,`\\textbraceright`),W(G,q,S2,`{`,`\\lbrace`),W(G,q,v2,`}`,`\\rbrace`),W(G,q,S2,`[`,`\\lbrack`,!0),W(K,q,X,`[`,`\\lbrack`,!0),W(G,q,v2,`]`,`\\rbrack`,!0),W(K,q,X,`]`,`\\rbrack`,!0),W(G,q,S2,`(`,`\\lparen`,!0),W(G,q,v2,`)`,`\\rparen`,!0),W(K,q,X,`<`,`\\textless`,!0),W(K,q,X,`>`,`\\textgreater`,!0),W(G,q,S2,`⌊`,`\\lfloor`,!0),W(G,q,v2,`⌋`,`\\rfloor`,!0),W(G,q,S2,`⌈`,`\\lceil`,!0),W(G,q,v2,`⌉`,`\\rceil`,!0),W(G,q,X,`\\`,`\\backslash`),W(G,q,X,`∣`,`|`),W(G,q,X,`∣`,`\\vert`),W(K,q,X,`|`,`\\textbar`,!0),W(G,q,X,`∥`,`\\|`),W(G,q,X,`∥`,`\\Vert`),W(K,q,X,`∥`,`\\textbardbl`),W(K,q,X,`~`,`\\textasciitilde`),W(K,q,X,`\\`,`\\textbackslash`),W(K,q,X,`^`,`\\textasciicircum`),W(G,q,Y,`↑`,`\\uparrow`,!0),W(G,q,Y,`⇑`,`\\Uparrow`,!0),W(G,q,Y,`↓`,`\\downarrow`,!0),W(G,q,Y,`⇓`,`\\Downarrow`,!0),W(G,q,Y,`↕`,`\\updownarrow`,!0),W(G,q,Y,`⇕`,`\\Updownarrow`,!0),W(G,q,x2,`∐`,`\\coprod`),W(G,q,x2,`⋁`,`\\bigvee`),W(G,q,x2,`⋀`,`\\bigwedge`),W(G,q,x2,`⨄`,`\\biguplus`),W(G,q,x2,`⋂`,`\\bigcap`),W(G,q,x2,`⋃`,`\\bigcup`),W(G,q,x2,`∫`,`\\int`),W(G,q,x2,`∫`,`\\intop`),W(G,q,x2,`∬`,`\\iint`),W(G,q,x2,`∭`,`\\iiint`),W(G,q,x2,`∏`,`\\prod`),W(G,q,x2,`∑`,`\\sum`),W(G,q,x2,`⨂`,`\\bigotimes`),W(G,q,x2,`⨁`,`\\bigoplus`),W(G,q,x2,`⨀`,`\\bigodot`),W(G,q,x2,`∮`,`\\oint`),W(G,q,x2,`∯`,`\\oiint`),W(G,q,x2,`∰`,`\\oiiint`),W(G,q,x2,`⨆`,`\\bigsqcup`),W(G,q,x2,`∫`,`\\smallint`),W(K,q,y2,`…`,`\\textellipsis`),W(G,q,y2,`…`,`\\mathellipsis`),W(K,q,y2,`…`,`\\ldots`,!0),W(G,q,y2,`…`,`\\ldots`,!0),W(G,q,y2,`⋯`,`\\@cdots`,!0),W(G,q,y2,`⋱`,`\\ddots`,!0),W(G,q,X,`⋮`,`\\varvdots`),W(K,q,X,`⋮`,`\\varvdots`),W(G,q,g2,`ˊ`,`\\acute`),W(G,q,g2,`ˋ`,`\\grave`),W(G,q,g2,`¨`,`\\ddot`),W(G,q,g2,`~`,`\\tilde`),W(G,q,g2,`ˉ`,`\\bar`),W(G,q,g2,`˘`,`\\breve`),W(G,q,g2,`ˇ`,`\\check`),W(G,q,g2,`^`,`\\hat`),W(G,q,g2,`⃗`,`\\vec`),W(G,q,g2,`˙`,`\\dot`),W(G,q,g2,`˚`,`\\mathring`),W(G,q,b2,``,`\\@imath`),W(G,q,b2,``,`\\@jmath`),W(G,q,X,`ı`,`ı`),W(G,q,X,`ȷ`,`ȷ`),W(K,q,X,`ı`,`\\i`,!0),W(K,q,X,`ȷ`,`\\j`,!0),W(K,q,X,`ß`,`\\ss`,!0),W(K,q,X,`æ`,`\\ae`,!0),W(K,q,X,`œ`,`\\oe`,!0),W(K,q,X,`ø`,`\\o`,!0),W(K,q,X,`Æ`,`\\AE`,!0),W(K,q,X,`Œ`,`\\OE`,!0),W(K,q,X,`Ø`,`\\O`,!0),W(K,q,g2,`ˊ`,`\\'`),W(K,q,g2,`ˋ`,"\\`"),W(K,q,g2,`ˆ`,`\\^`),W(K,q,g2,`˜`,`\\~`),W(K,q,g2,`ˉ`,`\\=`),W(K,q,g2,`˘`,`\\u`),W(K,q,g2,`˙`,`\\.`),W(K,q,g2,`¸`,`\\c`),W(K,q,g2,`˚`,`\\r`),W(K,q,g2,`ˇ`,`\\v`),W(K,q,g2,`¨`,`\\"`),W(K,q,g2,`˝`,`\\H`),W(K,q,g2,`◯`,`\\textcircled`);var T2={"--":!0,"---":!0,"``":!0,"''":!0};W(K,q,X,`–`,`--`,!0),W(K,q,X,`–`,`\\textendash`),W(K,q,X,`—`,`---`,!0),W(K,q,X,`—`,`\\textemdash`),W(K,q,X,`‘`,"`",!0),W(K,q,X,`‘`,`\\textquoteleft`),W(K,q,X,`’`,`'`,!0),W(K,q,X,`’`,`\\textquoteright`),W(K,q,X,`“`,"``",!0),W(K,q,X,`“`,`\\textquotedblleft`),W(K,q,X,`”`,`''`,!0),W(K,q,X,`”`,`\\textquotedblright`),W(G,q,X,`°`,`\\degree`,!0),W(K,q,X,`°`,`\\degree`),W(K,q,X,`°`,`\\textdegree`,!0),W(G,q,X,`£`,`\\pounds`),W(G,q,X,`£`,`\\mathsterling`,!0),W(K,q,X,`£`,`\\pounds`),W(K,q,X,`£`,`\\textsterling`,!0),W(G,J,X,`✠`,`\\maltese`),W(K,J,X,`✠`,`\\maltese`);for(var E2=`0123456789/@."`,D2=0;D2{var n=e.charCodeAt(0),r=e.charCodeAt(1),i=(n-55296)*1024+(r-56320)+65536,a=t===`math`?0:1;if(119808<=i&&i<120484){var o=Math.floor((i-119808)/26);return[U2[o][2],U2[o][a]]}else if(120782<=i&&i<=120831){var s=Math.floor((i-120782)/10);return[W2[s][2],W2[s][a]]}else if(i===120485||i===120486)return[U2[0][2],U2[0][a]];else if(1204860)return q2(i,c,r,t,a.concat(l));if(s){var u,d;if(s===`boldsymbol`){var f=Y2(i,r,t,a,n);u=f.fontName,d=[f.fontClass]}else o?(u=l4[s].fontName,d=[s]):(u=c4(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(K2(i,u,r).metrics)return q2(i,u,r,t,a.concat(d));if(T2.hasOwnProperty(i)&&u.slice(0,10)===`Typewriter`){for(var p=[],m=0;m{if(W0(e.classes)!==W0(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Q2=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Z=function(e,t,n,r){var i=new Y0(e,t,n,r);return $2(i),i},e4=(e,t,n,r)=>new Y0(e,t,n,r),t4=function(e,t,n){var r=Z([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=U0(r.height),r.maxFontSize=1,r},n4=function(e,t,n,r){var i=new X0(e,t,n,r);return $2(i),i},r4=function(e){var t=new R0(e);return $2(t),t},i4=function(e,t){return e instanceof R0?Z([],[e],t):e},a4=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=Z([`mspace`],[],t),r=H0(e,t);return n.style.marginRight=U0(r),n},c4=function(e,t,n){var r=``;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}var i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:t===`textit`?`Italic`:`Regular`;return r+`-`+i},l4={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},u4={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},d4=function(e,t){var[n,r,i]=u4[e],a=e4([`overlay`],[new e2([new t2(n)],{width:U0(r),height:U0(i),style:`width:`+U0(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=U0(i),a.style.width=U0(r),a},f4={number:3,unit:`mu`},p4={number:4,unit:`mu`},m4={number:5,unit:`mu`},h4={mord:{mop:f4,mbin:p4,mrel:m4,minner:f4},mop:{mord:f4,mop:f4,mrel:m4,minner:f4},mbin:{mord:p4,mop:p4,mopen:p4,minner:p4},mrel:{mord:m4,mop:m4,mopen:m4,minner:m4},mopen:{},mclose:{mop:f4,mbin:p4,mrel:m4,minner:f4},mpunct:{mord:f4,mop:f4,mrel:m4,mopen:f4,mclose:f4,mpunct:f4,minner:f4},minner:{mord:f4,mop:f4,mbin:p4,mrel:m4,mopen:f4,mpunct:f4,minner:f4}},g4={mord:{mop:f4},mop:{mord:f4,mop:f4},mbin:{},mrel:{},mopen:{},mclose:{mop:f4},mpunct:{},minner:{mop:f4}},_4={},v4={},y4={};function b4(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c{var n=t.classes[0],r=e.classes[0];n===`mbin`&&T4.has(r)?t.classes[0]=`mord`:r===`mbin`&&w4.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),k4(i,(e,t)=>{var n=M4(t),r=M4(e),i=n&&r?e.hasClass(`mtight`)?g4[n]?.[r]:h4[n]?.[r]:null;if(i)return s4(i,c)},{node:u},d,f),i},k4=function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},A4=function(e){return e instanceof R0||e instanceof X0||e instanceof Y0&&e.hasClass(`enclosing`)?e:null},j4=function(e,t){var n=A4(e);if(n){var r=n.children;if(r.length){if(t===`right`)return j4(r[r.length-1],`right`);if(t===`left`)return j4(r[0],`left`)}}return e},M4=function(e,t){return e?(t&&(e=j4(e,t)),D4[e.classes[0]]||null):null},N4=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return Z(t.concat(n))},P4=function(e,t,n){if(!e)return Z();if(v4[e.type]){var r=v4[e.type](e,t);if(n&&t.size!==n.size){r=Z(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new U(`Got group of unknown type: '`+e.type+`'`)};function F4(e,t){var n=Z([`base`],e,t),r=Z([`strut`]);return r.style.height=U0(n.height+n.depth),n.depth&&(r.style.verticalAlign=U0(-n.depth)),n.children.unshift(r),n}function I4(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=O4(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(F4(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(F4(o,t));var l;n?(l=F4(O4(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=Z([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=U0(u.height+u.depth),u.depth&&(d.style.verticalAlign=U0(-u.depth))}return u}function L4(e){return new R0(e)}var Q=class{constructor(e,t,n){this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=W0(this.classes));for(var n=0;n0&&(e+=` class ="`+Z1(W0(this.classes))+`"`),e+=`>`;for(var n=0;n`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},R4=class{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Z1(this.toText())}toText(){return this.text}},z4=class{constructor(e){this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,U0(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},B4=new Set([`\\imath`,`\\jmath`]),V4=new Set([`mrow`,`mtable`]),H4=function(e,t,n){return h2[t][e]&&h2[t][e].replace&&e.charCodeAt(0)!==55349&&!(T2.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=h2[t][e].replace),new R4(e)},U4=function(e){return e.length===1?e[0]:new Q(`mrow`,e)},W4=function(e,t){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`;var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode;if(n===`mathit`)return`italic`;if(n===`boldsymbol`)return e.type===`textord`?`bold`:`bold-italic`;if(n===`mathbf`)return`bold`;if(n===`mathbb`)return`double-struck`;if(n===`mathsfit`)return`sans-serif-italic`;if(n===`mathfrak`)return`fraktur`;if(n===`mathscr`||n===`mathcal`)return`script`;if(n===`mathsf`)return`sans-serif`;if(n===`mathtt`)return`monospace`;var i=e.text;if(B4.has(i))return null;if(h2[r][i]){var a=h2[r][i].replace;a&&(i=a)}var o=l4[n].fontName;return u2(i,o,r)?l4[n].variant:null};function G4(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof R4&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof R4&&n.text===`,`}else return!1}var K4=function(e,t,n){if(e.length===1){var r=J4(e[0],t);return n&&r instanceof Q&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||G4(a))){var c=s.children[0];c instanceof Q&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof R4&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof R4&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},q4=function(e,t,n){return U4(K4(e,t,n))},J4=function(e,t){if(!e)return new Q(`mrow`);if(y4[e.type])return y4[e.type](e,t);throw new U(`Got group of unknown type: '`+e.type+`'`)};function Y4(e,t,n,r,i){var a=K4(e,n),o=a.length===1&&a[0]instanceof Q&&V4.has(a[0].type)?a[0]:new Q(`mrow`,a),s=new Q(`annotation`,[new R4(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Q(`math`,[new Q(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),Z([i?`katex`:`katex-mathml`],[c])}var X4=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Z4=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Q4=function(e,t){return t.size<2?e:X4[e-1][t.size-1]},$4=class e{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Z4[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Q4(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Z4[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Q4(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=f2(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};$4.BASESIZE=6;var e3=function(e){return new $4({style:e.displayMode?x0.DISPLAY:x0.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},t3=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=Z(n,[e])}return e},n3=function(e,t,n){var r=e3(n),i;return n.output===`mathml`?Y4(e,t,r,n.displayMode,!0):(i=n.output===`html`?Z([`katex`],[I4(e,r)]):Z([`katex`],[Y4(e,t,r,n.displayMode,!1),I4(e,r)]),t3(i,n))},r3=function(e,t,n){return t3(Z([`katex`],[I4(e,e3(n))]),n)},i3={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},a3=function(e){var t=new Q(`mo`,[new R4(i3[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},o3={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},s3=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),c3=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(s3.has(r)){var i=e,a=i.base.type===`ordgroup`?i.base.body.length:1,o,s,c;if(a>5)r===`widehat`||r===`widecheck`?(o=420,n=2364,c=.42,s=r+`4`):(o=312,n=2340,c=.34,s=`tilde4`);else{var l=[1,1,2,2,3,3][a];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],c=[0,.24,.3,.3,.36,.42][l],s=r+l):(n=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],c=[0,.26,.286,.3,.306,.34][l],s=`tilde`+l)}return{span:e4([],[new e2([new t2(s)],{width:`100%`,height:U0(c),viewBox:`0 0 `+n+` `+o,preserveAspectRatio:`none`})],t),minWidth:0,height:c}}else{var u=[],d=o3[r],[f,p,m]=d,h=m/1e3,g=f.length,_,v;if(g===1){var y=d[3];_=[`hide-tail`],v=[y]}else if(g===2)_=[`halfarrow-left`,`halfarrow-right`],v=[`xMinYMin`,`xMaxYMin`];else if(g===3)_=[`brace-left`,`brace-center`,`brace-right`],v=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support + `+g+` children.`);for(var b=0;b0&&(r.style.minWidth=U0(i)),r},l3=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=Z([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new n2({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new n2({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=e4([],[new e2(c,{width:`100%`,height:U0(o)})],i)}return a.height=o,a.style.height=U0(o),a};function u3(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function d3(e){var t=f3(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function f3(e){return e&&(e.type===`atom`||m2.hasOwnProperty(e.type))?e:null}var p3=e=>{if(e instanceof $0)return e;if(a2(e)&&e.children.length===1)return p3(e.children[0])},m3=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=u3(e.base,`accent`),n=r.base,e.base=n,i=i2(P4(e,t)),e.base=r):(r=u3(e,`accent`),n=r.base);var a=P4(n,t.havingCrampedStyle()),o=r.isShifty&&e0(n),s=0;o&&(s=p3(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=c3(r,t),u=o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+U0(2*s)+`)`,marginLeft:U0(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=d4(`vec`,t),f=u4.vec[1]):(d=X2({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=r2(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=Z([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=U0(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=Z([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},h3=(e,t)=>{var n=e.isStretchy?a3(e.label):new Q(`mo`,[H4(e.label,e.mode)]),r=new Q(`mover`,[J4(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},g3=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));b4({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=S4(t[0]),r=!g3.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:m3,mathmlBuilder:h3}),b4({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:m3,mathmlBuilder:h3}),b4({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=P4(e.base,t),r=c3(e,t),i=e.label===`\\utilde`?.12:0;return Z([`mord`,`accentunder`],[o4({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=a3(e.label),r=new Q(`munder`,[J4(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var _3=e=>{var t=new Q(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};b4({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=i4(P4(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=i4(P4(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=c3(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=o4({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c},{type:`elem`,elem:o,shift:d}]})}else u=o4({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c}]});return u.children[0].children[0].children[1].classes.push(`svg-align`),Z([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=a3(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=_3(J4(e.body,t));r=e.below?new Q(`munderover`,[n,_3(J4(e.below,t)),i]):new Q(`mover`,[n,i])}else e.below?r=new Q(`munder`,[n,_3(J4(e.below,t))]):(r=_3(),r=new Q(`mover`,[n,r]));return r}});function v3(e,t){var n=O4(e.body,t,!0);return Z([e.mclass],n,t)}function y3(e,t){var n,r=K4(e.body,t);return e.mclass===`minner`?n=new Q(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Q(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Q(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}b4({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:C4(i),isCharacterBox:e0(i)}},htmlBuilder:v3,mathmlBuilder:y3});var b3=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};b4({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:b3(t[0]),body:C4(t[1]),isCharacterBox:e0(t[1])}}}),b4({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:b3(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:C4(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:e0(c)}},htmlBuilder:v3,mathmlBuilder:y3}),b4({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:b3(t[0]),body:C4(t[0])}},htmlBuilder(e,t){var n=O4(e.body,t,!0),r=Z([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Q(`mstyle`,K4(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var x3={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},S3=()=>({type:`styling`,body:[],mode:`math`,style:`display`}),C3=e=>e.type===`textord`&&e.text===`@`,w3=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function T3(e,t,n){var r=x3[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function E3(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new U(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;aAV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;pAV=|." after @`,o[c]);var m={type:`styling`,body:[T3(l,u,e)],mode:`math`,style:`display`};r.push(m),s=S3()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}b4({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=i4(P4(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=U0(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Q(`mrow`,[J4(e.label,t)]);return n=new Q(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Q(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),b4({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=i4(P4(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Q(`mrow`,[J4(e.fragment,t)])}}),b4({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=u3(t[0],`ordgroup`).body,i=``,a=0;a=1114111)throw new U(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var D3=(e,t)=>r4(O4(e.body,t.withColor(e.color),!1)),O3=(e,t)=>{var n=new Q(`mstyle`,K4(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};b4({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=u3(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:C4(i)}},htmlBuilder:D3,mathmlBuilder:O3}),b4({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=u3(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:D3,mathmlBuilder:O3}),b4({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&u3(i,`size`).value}},htmlBuilder(e,t){var n=Z([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=U0(H0(e.size,t)))),n},mathmlBuilder(e,t){var n=new Q(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,U0(H0(e.size,t)))),n}});var k3={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},A3=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new U(`Expected a control sequence`,e);return t},j3=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},M3=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};b4({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(k3[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=k3[r.text]),u3(t.parseFunction(),`internal`);throw new U(`Invalid token after macro prefix`,r)}}),b4({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new U(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new U(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new U(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new U(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===k3[n]),{type:`internal`,mode:t.mode}}}),b4({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=A3(t.gullet.popToken());return t.gullet.consumeSpaces(),M3(t,r,j3(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),b4({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=A3(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return M3(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var N3=function(e,t,n){var r=u2(h2.math[e]&&h2.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},P3=function(e,t,n,r){var i=n.havingBaseStyle(t),a=Z(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},F3=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=U0(i),e.height-=i,e.depth+=i},I3=function(e,t,n,r,i,a){var o=P3(q2(e,`Main-Regular`,i,r),t,r,a);return n&&F3(o,r,t),o},L3=function(e,t,n,r){return q2(e,`Size`+t+`-Regular`,n,r)},R3=function(e,t,n,r,i,a){var o=L3(e,t,i,r),s=P3(Z([`delimsizing`,`size`+t],[o],r),x0.TEXT,r,a);return n&&F3(s,r,x0.TEXT),s},z3=function(e,t,n){return{type:`elem`,elem:Z([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[Z([],[q2(e,t,n)])])}},B3=function(e,t,n){var r=o2[`Size4-Regular`][e.charCodeAt(0)]?o2[`Size4-Regular`][e.charCodeAt(0)][4]:o2[`Size1-Regular`][e.charCodeAt(0)][4],i=e4([],[new e2([new t2(`inner`,F0(e,Math.round(1e3*t)))],{width:U0(r),height:U0(t),style:`width:`+U0(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=U0(t),i.style.width=U0(r),{type:`elem`,elem:i}},V3=.008,H3={type:`kern`,size:-1*V3},U3=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),W3=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),G3=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):U3.has(e)?(c=`∣`,u=`vert`,d=333):W3.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=N3(o,f,i),m=p.height+p.depth,h=N3(c,f,i),g=h.height+h.depth,_=N3(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=N3(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,ee=[];if(u.length>0){var te=C-m-v,ne=Math.round(C*1e3),E=L0(u,Math.round(te*1e3)),D=new t2(u,E),re=U0(d/1e3),ie=U0(ne/1e3),ae=e4([],[new e2([D],{width:re,height:ie,viewBox:`0 0 `+d+` `+ne})],r);ae.height=ne/1e3,ae.style.width=re,ae.style.height=ie,ee.push({type:`elem`,elem:ae})}else{if(ee.push(z3(l,f,i)),ee.push(H3),s===null){var oe=C-m-v+2*V3;ee.push(B3(c,oe,r))}else{var se=(C-m-v-y)/2+2*V3;ee.push(B3(c,se,r)),ee.push(H3),ee.push(z3(s,f,i)),ee.push(H3),ee.push(B3(c,se,r))}ee.push(H3),ee.push(z3(o,f,i))}var O=r.havingBaseStyle(x0.TEXT);return P3(Z([`delimsizing`,`mult`],[o4({positionType:`bottom`,positionData:T,children:ee})],O),x0.TEXT,r,a)},K3=80,q3=.08,J3=function(e,t,n,r,i){return e4([`hide-tail`],[new e2([new t2(e,P0(e,r,n))],{width:`400em`,height:U0(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Y3=function(e,t){var n=t.havingBaseSizing(),r=a6(`\\surd`,e*n.sizeMultiplier,r6,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s=0,c=0,l=0,u;return r.type===`small`?(l=1e3+1e3*a+K3,e<1?i=1:e<1.4&&(i=.7),s=(1+a+q3)/i,c=(1+a)/i,o=J3(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+K3)*$3[r.size],c=($3[r.size]+a)/i,s=($3[r.size]+a+q3)/i,o=J3(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+q3,c=e+a,l=Math.floor(1e3*e+a)+K3,o=J3(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=U0(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},X3=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Z3=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Q3=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),$3=[0,1.2,1.8,2.4,3],e6=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),X3.has(e)||Q3.has(e))return R3(e,t,!1,n,r,i);if(Z3.has(e))return G3(e,$3[t],!1,n,r,i);throw new U(`Illegal delimiter: '`+e+`'`)},t6=[{type:`small`,style:x0.SCRIPTSCRIPT},{type:`small`,style:x0.SCRIPT},{type:`small`,style:x0.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],n6=[{type:`small`,style:x0.SCRIPTSCRIPT},{type:`small`,style:x0.SCRIPT},{type:`small`,style:x0.TEXT},{type:`stack`}],r6=[{type:`small`,style:x0.SCRIPTSCRIPT},{type:`small`,style:x0.SCRIPT},{type:`small`,style:x0.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],i6=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},a6=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},o6=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Q3.has(e)?t6:X3.has(e)?r6:n6,s=a6(e,t,o,r);return s.type===`small`?I3(e,s.style,n,r,i,a):s.type===`large`?R3(e,s.size,n,r,i,a):G3(e,t,n,r,i,a)},s6=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return o6(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},c6={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},l6=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function u6(e,t){var n=f3(e);if(n&&l6.has(n.text))return n;throw n?new U(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new U(`Invalid delimiter type '`+e.type+`'`,e)}b4({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=u6(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:c6[e.funcName].size,mclass:c6[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?Z([e.mclass]):e6(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(H4(e.delim,e.mode));var n=new Q(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=U0($3[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function d6(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}b4({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new U(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:u6(t[0],e).text,color:n}}}),b4({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=u6(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=u3(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{d6(e);for(var n=O4(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{d6(e);var n=K4(e.body,t);if(e.left!==`.`){var r=new Q(`mo`,[H4(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Q(`mo`,[H4(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return U4(n)}}),b4({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=u6(t[0],e);if(!e.parser.leftrightDepth)throw new U(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===`.`)n=N4(t,[]);else{n=e6(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=new Q(`mo`,[e.delim===`\\vert`||e.delim===`|`?H4(`|`,`text`):H4(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var f6=(e,t)=>{var n=i4(P4(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o=0,s=e0(e.body);if(r===`sout`)a=Z([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=H0({number:.6,unit:`pt`},t),l=H0({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=U0(d/2+c);var f=Math.floor(1e3*d*i);a=e4([`hide-tail`],[new e2([new t2(`phase`,M0(f))],{width:`400em`,height:U0(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=U0(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p=0,m=0,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=l3(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=U0(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=U0(h),a.style.borderRightWidth=U0(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=o4({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=o4({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?Z([`mord`,`cancel-lap`],[g],t):Z([`mord`],[g],t)},p6=(e,t)=>{var n=0,r=new Q(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[J4(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+U0(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};b4({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=u3(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:f6,mathmlBuilder:p6}),b4({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=u3(t[0],`color-token`).color,o=u3(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:f6,mathmlBuilder:p6}),b4({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),b4({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:f6,mathmlBuilder:p6}),b4({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:f6,mathmlBuilder:p6}),b4({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var m6={};function h6(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new U(`{`+e.envName+`} can be used only in display mode.`)},x6=new Set([`gather`,`gather*`]);function S6(e){if(!e.includes(`ed`))return!e.includes(`*`)}function C6(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new U(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new v6(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(y6(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new U(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n0&&(T+=g,xe))for(n=0;n=o)){var pe=void 0;(r>0||e.hskipBeforeAndAfter)&&(pe=O?.pregap??d,pe!==0&&(E=Z([`arraycolsep`],[]),E.style.width=U0(pe),ne.push(E)));var me=[];for(n=0;n0){for(var xe=t4(`hline`,t,l),Se=t4(`hdashline`,t,l),Ce=[{type:`elem`,elem:be,shift:0}];c.length>0;){var we=c.pop(),Te=we.pos-ee;we.isDashed?Ce.push({type:`elem`,elem:Se,shift:Te}):Ce.push({type:`elem`,elem:xe,shift:Te})}be=o4({positionType:`individualShift`,children:Ce})}if(re.length===0)return Z([`mord`],[be],t);var Ee=Z([`tag`],[o4({positionType:`individualShift`,children:re})],t);return r4([be,Ee])},E6={c:`center `,l:`left `,r:`right `},D6=function(e,t){for(var n=[],r=new Q(`mtd`,[],[`mtr-glue`]),i=new Q(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=E6[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};h6({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(f3(t[0])?[t[0]]:u3(t[0],`ordgroup`).body).map(function(e){var t=d3(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new U(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return C6(e.parser,r,w6(e.envName))},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new U(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=C6(e.parser,r,w6(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=C6(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(f3(t[0])?[t[0]]:u3(t[0],`ordgroup`).body).map(function(e){var t=d3(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new U(`Unknown column alignment: `+t,e)});if(n.length>1)throw new U(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=C6(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new U(`{subarray} can contain only one column`);return i},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=C6(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},w6(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:O6,htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){x6.has(e.envName)&&b6(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:S6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return C6(e.parser,t,`display`)},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:O6,htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){b6(e);var t={autoTag:S6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return C6(e.parser,t,`display`)},htmlBuilder:T6,mathmlBuilder:D6}),h6({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return b6(e),E3(e.parser)},htmlBuilder:T6,mathmlBuilder:D6}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),b4({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new U(e.funcName+` valid only within array environment`)}});var k6=m6;b4({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new U(`Invalid environment name`,i);for(var a=``,o=0;o{var n=e.font,r=t.withFont(n);return P4(e.body,r)},j6=(e,t)=>{var n=e.font,r=t.withFont(n);return J4(e.body,r)},M6={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`,"\\bm":`\\boldsymbol`};b4({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=S4(t[0]),a=r;return a in M6&&(a=M6[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:A6,mathmlBuilder:j6}),b4({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:b3(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:e0(r)}}}),b4({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:A6,mathmlBuilder:j6});var N6=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=P4(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Q(`mfrac`,[J4(e.numer,t),J4(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=H0(e.barSize,t);n.setAttribute(`linethickness`,U0(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Q(`mo`,[new R4(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Q(`mo`,[new R4(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return U4(i)}return n},F6=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;b4({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),F6({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:N6,mathmlBuilder:P6}),b4({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var I6=[`display`,`text`,`script`,`scriptscript`],L6=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};b4({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=S4(t[0]),o=a.type===`atom`&&a.family===`open`?L6(a.text):null,s=S4(t[1]),c=s.type===`atom`&&s.family===`close`?L6(s.text):null,l=u3(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=u3(p.body[0],`textord`);f=I6[Number(m.text)]}}else p=u3(p,`textord`),f=I6[Number(p.text)];return F6({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),b4({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:u3(t[0],`size`).value,token:i}}}),b4({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=u3(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var R6=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?P4(e.sup,t.havingStyle(n.sup()),t):P4(e.sub,t.havingStyle(n.sub()),t),i=u3(e.base,`horizBrace`)):i=u3(e,`horizBrace`);var a=P4(i.base,t.havingBaseStyle(x0.DISPLAY)),o=c3(i,t),s;if(i.isOver?(s=o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o}]}),s.children[0].children[0].children[1].classes.push(`svg-align`)):(s=o4({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o},{type:`kern`,size:.1},{type:`elem`,elem:a}]}),s.children[0].children[0].children[0].classes.push(`svg-align`)),r){var c=Z([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):o4({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return Z([`minner`,i.isOver?`mover`:`munder`],[s],t)};b4({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:R6,mathmlBuilder:(e,t)=>{var n=a3(e.label);return new Q(e.isOver?`mover`:`munder`,[J4(e.base,t),n])}}),b4({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=u3(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:C4(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=O4(e.body,t,!1);return n4(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=q4(e.body,t);return n instanceof Q||(n=new Q(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),b4({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=u3(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var{parser:n,funcName:r,token:i}=e,a=u3(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u{var n=O4(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Z(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>q4(e.body,t)}),b4({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:C4(t[0]),mathml:C4(t[1])}},htmlBuilder:(e,t)=>r4(O4(e.html,t,!1)),mathmlBuilder:(e,t)=>q4(e.mathml,t)});var z6=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new U(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!V0(n))throw new U(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};b4({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=u3(n[0],`raw`).string.split(`,`),l=0;l{var n=H0(e.height,t),r=0;e.totalheight.number>0&&(r=H0(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=H0(e.width,t));var a={height:U0(n+r)};i>0&&(a.width=U0(i)),r>0&&(a.verticalAlign=U0(-r));var o=new Z0(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Q(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=H0(e.height,t),i=0;if(e.totalheight.number>0&&(i=H0(e.totalheight,t)-r,n.setAttribute(`valign`,U0(-i))),n.setAttribute(`height`,U0(r+i)),e.width.number>0){var a=H0(e.width,t);n.setAttribute(`width`,U0(a))}return n.setAttribute(`src`,e.src),n}}),b4({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=u3(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return s4(e.dimension,t)},mathmlBuilder(e,t){return new z4(H0(e.dimension,t))}}),b4({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=Z([],[P4(e.body,t)]),n=Z([`inner`],[n],t)):n=Z([`inner`],[P4(e.body,t)]);var r=Z([`fix`],[]),i=Z([e.alignment],[n,r],t),a=Z([`strut`]);return a.style.height=U0(i.height+i.depth),i.depth&&(a.style.verticalAlign=U0(-i.depth)),i.children.unshift(a),i=Z([`thinbox`],[i],t),Z([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[J4(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),b4({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,body:o}}}),b4({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new U(`Mismatched `+e.funcName)}});var B6=(e,t)=>{switch(t.style.size){case x0.DISPLAY.size:return e.display;case x0.TEXT.size:return e.text;case x0.SCRIPT.size:return e.script;case x0.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};b4({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:C4(t[0]),text:C4(t[1]),script:C4(t[2]),scriptscript:C4(t[3])}},htmlBuilder:(e,t)=>r4(O4(B6(e,t),t,!1)),mathmlBuilder:(e,t)=>q4(B6(e,t),t)});var V6=(e,t,n,r,i,a,o)=>{e=Z([],[e]);var s=n&&e0(n),c,l;if(t){var u=P4(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=P4(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=o4({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:U0(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:U0(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=o4({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:U0(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=o4({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:U0(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=Z([`mspace`],[],r);m.style.marginRight=U0(a),p.unshift(m)}return Z([`mop`,`op-limits`],p,r)},H6=new Set([`\\smallint`]),U6=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=u3(e.base,`op`),i=!0):a=u3(e,`op`);var o=t.style,s=!1;o.size===x0.DISPLAY.size&&a.symbol&&!H6.has(a.name)&&(s=!0);var c;if(a.symbol){var l=s?`Size2-Regular`:`Size1-Regular`,u=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(u=a.name.slice(1),a.name=u===`oiint`?`\\iint`:`\\iiint`),c=q2(a.name,l,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u.length>0){var d=c.italic,f=d4(u+`Size`+(s?`2`:`1`),t);c=o4({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+u,c.classes.unshift(`mop`),c.italic=d}}else if(a.body){var p=O4(a.body,t,!0);p.length===1&&p[0]instanceof $0?(c=p[0],c.classes[0]=`mop`):c=Z([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new Q(`mo`,[H4(e.name,e.mode)]),H6.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Q(`mo`,K4(e.body,t));else{n=new Q(`mi`,[new R4(e.name.slice(1))]);var r=new Q(`mo`,[H4(`⁡`,`text`)]);n=e.parentIsSupSub?new Q(`mrow`,[n,r]):L4([n,r])}return n},G6={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};b4({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=G6[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:U6,mathmlBuilder:W6}),b4({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:C4(r)}},htmlBuilder:U6,mathmlBuilder:W6});var K6={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};b4({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:U6,mathmlBuilder:W6}),b4({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:U6,mathmlBuilder:W6}),b4({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=K6[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:U6,mathmlBuilder:W6});var q6=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=u3(e.base,`operatorname`),i=!0):a=u3(e,`operatorname`);var o;if(a.body.length>0){for(var s=O4(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:C4(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:q6,mathmlBuilder:(e,t)=>{for(var n=K4(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``))]);var s=new Q(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Q(`mo`,[H4(`⁡`,`text`)]);return e.parentIsSupSub?new Q(`mrow`,[s,c]):L4([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),x4({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?r4(O4(e.body,t,!1)):Z([`mord`],O4(e.body,t,!0),t)},mathmlBuilder(e,t){return q4(e.body,t,!0)}}),b4({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=P4(e.body,t.havingCrampedStyle()),r=t4(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Z([`mord`,`overline`],[o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new R4(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`mover`,[J4(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),b4({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:C4(r)}},htmlBuilder:(e,t)=>r4(O4(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Q(`mphantom`,K4(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),b4({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>Z([`mord`,`rlap`],[Z([`inner`],[P4(e.body,t.withPhantom())]),Z([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[new Q(`mphantom`,K4(C4(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),b4({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=u3(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=P4(e.body,t);return o4({positionType:`shift`,positionData:-H0(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Q(`mpadded`,[J4(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),b4({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),b4({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=u3(t[0],`size`),o=u3(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&u3(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=Z([`mord`,`rule`],[],t),r=H0(e.width,t),i=H0(e.height,t),a=e.shift?H0(e.shift,t):0;return n.style.borderRightWidth=U0(r),n.style.borderTopWidth=U0(i),n.style.bottom=U0(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=H0(e.width,t),r=H0(e.height,t),i=e.shift?H0(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Q(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,U0(n)),o.setAttribute(`height`,U0(r));var s=new Q(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,U0(i)):(s.setAttribute(`height`,U0(i)),s.setAttribute(`depth`,U0(-i))),s.setAttribute(`voffset`,U0(i)),s}});function J6(e,t,n){for(var r=O4(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Y6.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return J6(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Q(`mstyle`,K4(e.body,n));return r.setAttribute(`mathsize`,U0(n.sizeMultiplier)),r}}),b4({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&u3(n[0],`ordgroup`);if(o)for(var s=``,c=0;c{var n=Z([],[P4(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Z([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r{var n=new Q(`mpadded`,[J4(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),b4({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=P4(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=i4(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=U0(c);var d=o4({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(x0.SCRIPTSCRIPT),p=P4(e.index,f,t);return Z([`mord`,`sqrt`],[Z([`root`],[o4({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return Z([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Q(`mroot`,[J4(n,t),J4(r,t)]):new Q(`msqrt`,[J4(n,t)])}});var X6={display:x0.DISPLAY,text:x0.TEXT,script:x0.SCRIPT,scriptscript:x0.SCRIPTSCRIPT};b4({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=X6[e.style],r=t.havingStyle(n).withFont(``);return J6(e.body,r,t)},mathmlBuilder(e,t){var n=X6[e.style],r=t.havingStyle(n),i=new Q(`mstyle`,K4(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Z6=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===x0.DISPLAY.size||n.alwaysHandleSupSub)?U6:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===x0.DISPLAY.size||n.limits)?q6:null:n.type===`accent`?e0(n.base)?m3:null:n.type===`horizBrace`&&!e.sub===n.isOver?R6:null:null};x4({type:`supsub`,htmlBuilder(e,t){var n=Z6(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=P4(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&e0(r);if(i){var p=t.havingStyle(t.style.sup());s=P4(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=P4(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===x0.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=U0(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof $0||y)&&(v=U0(-o.italic))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)0&&(u+=S,d-=S)}b=o4({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=o4({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=o4({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return Z([M4(o,`right`)||`mord`],[o,Z([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[J4(e.base,t)];e.sub&&a.push(J4(e.sub,t)),e.sup&&a.push(J4(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===x0.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===x0.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===x0.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===x0.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===x0.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===x0.DISPLAY)?`munder`:`msub`}return new Q(o,a)}}),x4({type:`atom`,htmlBuilder(e,t){return J2(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Q(`mo`,[H4(e.text,e.mode)]);if(e.family===`bin`){var r=W4(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var Q6={mi:`italic`,mn:`normal`,mtext:`normal`};x4({type:`mathord`,htmlBuilder(e,t){return X2(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Q(`mi`,[H4(e.text,e.mode,t)]),r=W4(e,t)||`italic`;return r!==Q6[n.type]&&n.setAttribute(`mathvariant`,r),n}}),x4({type:`textord`,htmlBuilder(e,t){return X2(e,t,`textord`)},mathmlBuilder(e,t){var n=H4(e.text,e.mode,t),r=W4(e,t)||`normal`,i=e.mode===`text`?new Q(`mtext`,[n]):/[0-9]/.test(e.text)?new Q(`mn`,[n]):e.text===`\\prime`?new Q(`mo`,[n]):new Q(`mi`,[n]);return r!==Q6[i.type]&&i.setAttribute(`mathvariant`,r),i}});var $6={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},e8={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};x4({type:`spacing`,htmlBuilder(e,t){if(e8.hasOwnProperty(e.text)){var n=e8[e.text].className||``;if(e.mode===`text`){var r=X2(e,t,`textord`);return r.classes.push(n),r}else return Z([`mspace`,n],[J2(e.text,e.mode,t)],t)}else if($6.hasOwnProperty(e.text))return Z([`mspace`,$6[e.text]],[],t);else throw new U(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(e8.hasOwnProperty(e.text))n=new Q(`mtext`,[new R4(`\xA0`)]);else if($6.hasOwnProperty(e.text))return new Q(`mspace`);else throw new U(`Unknown type of space "`+e.text+`"`);return n}});var t8=()=>{var e=new Q(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};x4({type:`tag`,mathmlBuilder(e,t){var n=new Q(`mtable`,[new Q(`mtr`,[t8(),new Q(`mtd`,[q4(e.body,t)]),t8(),new Q(`mtd`,[q4(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var n8={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},r8={"\\textbf":`textbf`,"\\textmd":`textmd`},i8={"\\textit":`textit`,"\\textup":`textup`},a8=(e,t)=>{var n=e.font;return n?n8[n]?t.withTextFontFamily(n8[n]):r8[n]?t.withTextFontWeight(r8[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(i8[n]):t};b4({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:C4(i),font:r}},htmlBuilder(e,t){var n=a8(e,t);return Z([`mord`,`text`],O4(e.body,n,!0),n)},mathmlBuilder(e,t){var n=a8(e,t);return q4(e.body,n)}}),b4({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=P4(e.body,t),r=t4(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Z([`mord`,`underline`],[o4({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new R4(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`munder`,[J4(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),b4({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=P4(e.body,t),r=t.fontMetrics().axisHeight;return o4({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Q(`mpadded`,[J4(e.body,t)],[`vcenter`])}}),b4({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new U(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=o8(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),s8=_4,c8=`[ \r + ]`,l8=`\\\\[a-zA-Z@]+`,u8=`\\\\[^\ud800-\udfff]`,d8=`(`+l8+`)`+c8+`*`,f8=`\\\\( +|[ \r ]+ +?)[ \r ]*`,p8=`[̀-ͯ]`,m8=RegExp(p8+`+$`),h8=`(`+c8+`+)|`+(f8+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(p8+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(p8+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+d8)+(`|`+u8+`)`),g8=class{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(h8,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new v6(`EOF`,new _6(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new U(`Unexpected character: '`+e[t]+`'`,new v6(e[t],new _6(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new v6(r,new _6(this,t,this.tokenRegex.lastIndex))}},_8=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new U(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},v8=g6;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var y8={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new U("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=y8[t.text],r==null||r>=n)throw new U(`Invalid base-`+n+` digit `+t.text);for(var i;(i=y8[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new U(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new U(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new U(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new U(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>b8(e,!1,!0,!1)),$(`\\renewcommand`,e=>b8(e,!0,!1,!1)),$(`\\providecommand`,e=>b8(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),s8[n],h2.math[n],h2.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var x8={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},S8=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in x8?t=x8[n]:(n.slice(0,4)===`\\not`||n in h2.math&&S8.has(h2.math[n].group))&&(t=`\\dotsb`),t});var C8={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in C8?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in C8&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in C8?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new U(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var w8=U0(o2[`Main-Regular`][84][1]-.7*o2[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+w8+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+w8+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var T8=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,T8(!1)),$(`\\bra@set`,T8(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var E8={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},D8=class{constructor(e,t,n){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _8(v8,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new g8(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else ({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new v6(`EOF`,n.loc)),this.pushTokens(r),new v6(``,_6.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new U(`Extra }`,i)}else if(i.text===`EOF`)throw new U(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new U(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new U(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new U(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new U(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new U(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new v6(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new g8(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||s8.hasOwnProperty(e)||h2.math.hasOwnProperty(e)||h2.text.hasOwnProperty(e)||E8.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?s8.hasOwnProperty(e)&&!s8[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},O8=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,k8=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),A8={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},j8={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},M8=class e{constructor(e,t){this.mode=`math`,this.gullet=new D8(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new U(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new v6(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&s8[i.text]&&s8[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=128)this.settings.strict&&(T0(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:_6.range(e),text:t};else return null;if(this.consume(),i)for(var u=0;u0;)e[r]===`{`?n++:e[r]===`}`&&n--,r++;return r}function a5(e){let t=``,n=0,r=null;for(;ne.startsWith(t.prefix,n));if(i){let r=i5(e,n+i.prefix.length);for(let t=1;te/i)}function c5({audio:e}){return(0,N.jsx)(`div`,{className:`mb-1.5 flex h-8 items-center gap-[2px]`,children:s5(e,32).map((e,t)=>(0,N.jsx)(`div`,{className:`w-1.5 rounded-full bg-dm-blue/70`,style:{height:`${Math.max(e*100,10)}%`}},t))})}function l5({thinking:e,isStreaming:t}){let[n,r]=(0,y.useState)(!1);return(0,N.jsxs)(`div`,{className:`mb-2`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex items-center gap-1.5 text-xs text-dm-text-secondary hover:text-dm-text transition-colors`,children:[(0,N.jsx)(qA,{className:`size-3.5`}),(0,N.jsx)(`span`,{children:t?`Thinking...`:`Thought process`}),n?(0,N.jsx)(YA,{className:`size-3.5`}):(0,N.jsx)(XA,{className:`size-3.5`})]}),n&&(0,N.jsx)(`div`,{className:`mt-1.5 max-h-48 overflow-y-auto rounded-lg bg-dm-surface-high/60 px-3 py-2 text-xs leading-relaxed text-dm-text-secondary whitespace-pre-wrap`,children:e})]})}function u5({message:e}){let t=e.role===`user`,n=!!e.thinking,r=n&&!e.content;return(0,N.jsx)(`div`,{className:`flex animate-fade-in-up ${t?`justify-end`:`justify-start`}`,children:(0,N.jsxs)(`div`,{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${t?`bg-dm-surface-higher text-dm-text`:`frosted text-dm-text`}`,children:[e.image&&(0,N.jsx)(`img`,{src:e.image,alt:`Captured frame`,className:`mb-2 h-20 w-auto rounded-lg`}),e.audio&&(0,N.jsx)(c5,{audio:e.audio}),n&&(0,N.jsx)(l5,{thinking:e.thinking,isStreaming:e.isStreaming&&r}),!(e.hideText&&e.audio)&&(e.content?t?(0,N.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.content}):(0,N.jsx)(s1,{plugins:{math:n5},parseIncompleteMarkdown:!1,isAnimating:!!e.isStreaming,children:o5(e.content)}):e.isStreaming?(0,N.jsx)(`span`,{className:`inline-block animate-pulse text-dm-blue`,children:`|`}):null)]})})}function d5(){return(0,N.jsx)(`div`,{className:`flex justify-start`,children:(0,N.jsx)(`div`,{className:`frosted flex items-center gap-1 rounded-2xl px-4 py-3`,children:[0,1,2].map(e=>(0,N.jsx)(`span`,{className:`inline-block size-1.5 rounded-full bg-dm-text-secondary animate-typing-dot`,style:{animationDelay:`${e*.15}s`}},e))})})}function f5(){return crypto.randomUUID?.()??`msg-${Date.now()}-${Math.random()}`}function p5({onScanStart:e,isScanning:t,scanCompleteFrame:n,onScanConsumed:r}){let{generate:i,stopGeneration:a}=CA(),{captureFrame:o,isRecording:s,startRecording:c,stopRecording:l}=jA(),[u,d]=(0,y.useState)([]),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(!1),[g,_]=(0,y.useState)(!1),v=(0,y.useRef)(null),b=(0,y.useRef)(``),x=(0,y.useRef)([]);(0,y.useEffect)(()=>{b.current=f},[f]),(0,y.useEffect)(()=>{x.current=u},[u]),(0,y.useEffect)(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[u]);let S=(0,y.useCallback)((e,t,n)=>{d(r=>r.map(r=>r.id===e?n===`thinking`?{...r,thinking:(r.thinking??``)+t}:{...r,content:r.content+t}:r))},[]),C=(0,y.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,isStreaming:!1}:t))},[]),w=(0,y.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,content:``,thinking:void 0}:t))},[]),T=(0,y.useCallback)(async e=>{let{text:t,image:n,audio:r,hideText:a}=e;if(!t.trim()||m)return;let s={id:f5(),role:`user`,content:t.trim(),...n&&{image:n},...r&&{audio:r},...a&&{hideText:a}},c=f5(),l={id:c,role:`assistant`,content:``,isStreaming:!0},u=[...x.current,s];d(e=>[...e,s,l]),p(``),h(!0);try{await i(u,(e,t)=>S(c,e,t),{enableThinking:g,captureFrame:o,onToolCall:()=>w(c),onTranscription:e=>{d(t=>t.map(t=>t.id===s.id?{...t,content:e,hideText:!1}:t))}})}finally{C(c),h(!1)}},[m,g,i,o,S,C,w]),ee=(0,y.useCallback)(()=>{if(m||t)return;let n=o();n&&e(n)},[m,t,o,e]);(0,y.useEffect)(()=>{if(!n)return;r();let e=n;T({text:b.current.trim()||`Describe what you see`,image:e})},[n]);let te=(0,y.useCallback)(async()=>{if(!m)if(s){let e=await l();if(!e)return;T({text:b.current.trim()||`Transcribe this audio and respond to what I said.`,audio:e,hideText:!b.current.trim()})}else try{await c()}catch{}},[m,s,c,l,T]),ne=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),T({text:f}))},E=u.length===0&&!m;return(0,N.jsxs)(`div`,{className:`fixed inset-x-0 bottom-0 z-20 flex flex-col items-center px-4 pb-4`,children:[u.length>0&&(0,N.jsxs)(`div`,{ref:v,className:`chat-scroll mb-3 flex max-h-[50vh] w-full max-w-2xl flex-col gap-2.5 overflow-y-auto px-1`,children:[u.map(e=>e.role===`assistant`&&e.isStreaming&&!e.content&&!e.thinking?null:(0,N.jsx)(u5,{message:e},e.id)),m&&u.at(-1)?.role===`assistant`&&!u.at(-1)?.content&&!u.at(-1)?.thinking&&(0,N.jsx)(d5,{})]}),E&&(0,N.jsx)(`div`,{className:`mb-3 flex flex-wrap justify-center gap-2`,children:vA.map(e=>(0,N.jsx)(`button`,{type:`button`,onClick:()=>T({text:e}),className:`frosted rounded-full px-4 py-2 text-sm font-medium text-dm-text transition-all hover:bg-dm-surface-higher hover:text-white`,children:e},e))}),s&&(0,N.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-sm text-dm-red`,children:[(0,N.jsx)(`span`,{className:`inline-block size-2 animate-pulse rounded-full bg-dm-red`}),`Recording...`]}),(0,N.jsxs)(`div`,{className:`frosted flex w-full max-w-2xl items-center gap-2 rounded-2xl p-2`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:te,disabled:m&&!s,className:`relative flex size-10 shrink-0 items-center justify-center rounded-xl transition-all ${s?`bg-dm-red text-white`:`text-dm-text-secondary hover:text-dm-text`} disabled:opacity-40`,children:[s&&(0,N.jsx)(`span`,{className:`absolute inset-0 rounded-xl bg-dm-red animate-pulse-ring`}),s?(0,N.jsx)(tj,{className:`relative z-10 size-4`}):(0,N.jsx)($A,{className:`size-5`})]}),(0,N.jsx)(`input`,{type:`text`,value:f,onChange:e=>p(e.target.value),onKeyDown:ne,placeholder:`Ask Gemma anything...`,disabled:m,className:`min-w-0 flex-1 bg-transparent px-2 text-sm text-dm-text placeholder-dm-text-secondary/60 outline-none disabled:opacity-50`}),(0,N.jsx)(`button`,{type:`button`,onClick:ee,disabled:m||t,className:`flex size-10 shrink-0 items-center justify-center rounded-xl text-dm-text-secondary transition-colors hover:text-dm-text disabled:opacity-40`,children:(0,N.jsx)(JA,{className:`size-5`})}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),disabled:m,title:g?`Thinking enabled`:`Thinking disabled`,className:`flex size-10 shrink-0 items-center justify-center rounded-xl transition-all disabled:opacity-40 ${g?`bg-dm-surface-higher text-dm-text`:`text-dm-text-secondary hover:text-dm-text`}`,children:(0,N.jsx)(qA,{className:`size-5`})}),m?(0,N.jsx)(`button`,{type:`button`,onClick:a,title:`Stop generating`,className:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-dm-red text-white transition-all hover:opacity-90`,children:(0,N.jsx)(tj,{className:`size-4`})}):!f.trim()&&u.length>0?(0,N.jsx)(`button`,{type:`button`,onClick:()=>d([]),title:`Reset conversation`,className:`flex size-10 shrink-0 items-center justify-center rounded-xl text-dm-text-secondary transition-all hover:text-dm-text`,children:(0,N.jsx)(ej,{className:`size-5`})}):(0,N.jsx)(`button`,{type:`button`,onClick:()=>T({text:f}),disabled:!f.trim(),className:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-dm-text text-dm-bg transition-all hover:opacity-90 disabled:opacity-40`,children:(0,N.jsx)(KA,{className:`size-5`})})]})]})}function m5({imageDataUrl:e,onComplete:t}){return(0,y.useEffect)(()=>{let e=setTimeout(t,yA);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`fixed inset-0 z-30 flex flex-col items-center justify-center bg-dm-bg/60 backdrop-blur-sm animate-fade-in-up`,children:[(0,N.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-dm-outline shadow-2xl shadow-dm-blue/20`,children:[(0,N.jsx)(`img`,{src:e,alt:`Captured frame`,className:`block h-auto max-h-[300px] w-auto max-w-[400px] object-contain`}),(0,N.jsx)(`div`,{className:`absolute left-0 right-0 h-0.5 bg-gradient-to-r from-transparent via-dm-blue to-transparent animate-scan-line`}),(0,N.jsx)(`div`,{className:`absolute top-2 left-2 size-5 border-t-2 border-l-2 border-dm-blue animate-pulse`}),(0,N.jsx)(`div`,{className:`absolute top-2 right-2 size-5 border-t-2 border-r-2 border-dm-blue animate-pulse`}),(0,N.jsx)(`div`,{className:`absolute bottom-2 left-2 size-5 border-b-2 border-l-2 border-dm-blue animate-pulse`}),(0,N.jsx)(`div`,{className:`absolute bottom-2 right-2 size-5 border-b-2 border-r-2 border-dm-blue animate-pulse`})]}),(0,N.jsxs)(`div`,{className:`mt-5 flex items-center gap-2 text-sm text-dm-text/80`,children:[(0,N.jsx)(QA,{className:`size-4 animate-spin`}),`Analyzing...`]})]})}function h5(){let{videoRef:e,canvasRef:t,videoSource:n,startWebcam:r,loadVideoFile:i}=jA(),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=(0,y.useRef)(null),m=(0,y.useCallback)(e=>{c(e),o(!0)},[]),h=(0,y.useCallback)(()=>{o(!1),u(s)},[s]),g=(0,y.useCallback)(()=>{u(null),c(null)},[]);return(0,N.jsxs)(`div`,{className:`fixed inset-0 animate-fade-in-up`,children:[(0,N.jsx)(`video`,{ref:e,autoPlay:!0,muted:!0,playsInline:!0,className:`absolute inset-0 h-full w-full object-cover ${n===`webcam`?`-scale-x-100`:``}`}),(0,N.jsx)(`canvas`,{ref:t,className:`hidden`}),(0,N.jsx)(`input`,{ref:p,type:`file`,accept:`video/*`,onChange:e=>{let t=e.target.files?.[0];t&&(i(t),f(null)),e.target.value=``},className:`hidden`}),(0,N.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 h-32 bg-gradient-to-b from-black/50 to-transparent`}),(0,N.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-0 h-64 bg-gradient-to-t from-black/70 to-transparent`}),!n&&(0,N.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-6 bg-dm-bg`,children:[d&&(0,N.jsx)(`p`,{className:`text-sm text-dm-text-secondary`,children:d}),(0,N.jsxs)(`div`,{className:`flex gap-4`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>{r().catch(()=>f(`Camera access denied.`))},className:`frosted flex w-44 flex-col items-center gap-3 rounded-2xl py-6 text-dm-text transition-colors hover:bg-dm-surface-higher`,children:[(0,N.jsx)(nj,{className:`size-8`}),(0,N.jsx)(`span`,{className:`text-base font-medium`,children:`Start Webcam`})]}),(0,N.jsxs)(`button`,{type:`button`,onClick:()=>p.current?.click(),className:`frosted flex w-44 flex-col items-center gap-3 rounded-2xl py-6 text-dm-text transition-colors hover:bg-dm-surface-higher`,children:[(0,N.jsx)(ZA,{className:`size-8`}),(0,N.jsx)(`span`,{className:`text-base font-medium`,children:`Select Video`})]})]}),(0,N.jsx)(`p`,{className:`text-xs text-dm-text-secondary`,children:`Everything runs locally — no data leaves your device`})]}),(0,N.jsxs)(`header`,{className:`absolute inset-x-0 top-0 z-10 flex items-center justify-between bg-gradient-to-b from-black/60 via-black/30 to-transparent px-5 pt-4 pb-10`,children:[(0,N.jsx)(`h1`,{className:`text-2xl font-bold text-dm-text drop-shadow-lg`,children:`Gemma 4`}),(0,N.jsx)(rj,{className:`size-12 text-white drop-shadow-lg`})]}),n&&(0,N.jsxs)(N.Fragment,{children:[a&&s&&(0,N.jsx)(m5,{imageDataUrl:s,onComplete:h}),(0,N.jsx)(p5,{onScanStart:m,isScanning:a,scanCompleteFrame:l,onScanConsumed:g})]})]})}function g5(){let[e,t]=(0,y.useState)(`landing`);return(0,N.jsxs)(N.Fragment,{children:[e===`landing`&&(0,N.jsx)(NA,{onStart:()=>t(`loading`)}),e===`loading`&&(0,N.jsx)(FA,{onReady:()=>t(`main`)}),e===`main`&&(0,N.jsx)(h5,{})]})}function _5(){return(0,N.jsx)(kA,{children:(0,N.jsx)(MA,{children:(0,N.jsx)(g5,{})})})}(0,b.createRoot)(document.getElementById(`root`)).render((0,N.jsx)(y.StrictMode,{children:(0,N.jsx)(_5,{})}));export{TA as a,l1 as i,dQ as n,f as o,a1 as r,LZ as t}; \ No newline at end of file diff --git a/assets/mermaid-GHXKKRXX-dk87-UBJ.js b/assets/mermaid-GHXKKRXX-dk87-UBJ.js new file mode 100644 index 0000000000000000000000000000000000000000..a6076d5414d8904426e6b0c6b149c3ca54251d19 --- /dev/null +++ b/assets/mermaid-GHXKKRXX-dk87-UBJ.js @@ -0,0 +1 @@ +import{i as e}from"./index-GZqzxFHz.js";export{e as Mermaid}; \ No newline at end of file diff --git a/index.html b/index.html index 777df5fb2900782d81df6b47061161eff382c03a..00482bea6c5f50919366728b7ec65b17965ba0d2 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ Gemma 4 | In-Browser Multimodal AI - - + +